@dxos/shell 0.8.2 → 0.8.3-main.7f5a14c

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.
@@ -12862,7 +12862,24 @@ var __create = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropD
12862
12862
  });
12863
12863
  init_inject_globals();
12864
12864
  init_inject_globals();
12865
- __toESM(require_base32_decode());
12865
+ init_inject_globals();
12866
+ var ObjectIdSchema = String$.pipe(pattern(/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i)).annotations({
12867
+ description: "a Universally Unique Lexicographically Sortable Identifier",
12868
+ pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
12869
+ }), ObjectId = class extends ObjectIdSchema {
12870
+ static isValid(te) {
12871
+ try {
12872
+ return decodeSync(ObjectId)(te), !0;
12873
+ } catch {
12874
+ return !1;
12875
+ }
12876
+ }
12877
+ static random() {
12878
+ return ulid();
12879
+ }
12880
+ };
12881
+ init_inject_globals();
12882
+ var import_base32_decode = __toESM(require_base32_decode());
12866
12883
  init_inject_globals();
12867
12884
  init_inject_globals();
12868
12885
  function toDataView(te) {
@@ -12904,9 +12921,265 @@ init_inject_globals();
12904
12921
  var randomBytes = (te) => {
12905
12922
  const J = globalThis.crypto ?? __require("@dxos/node-std/crypto").webcrypto, ne = new Uint8Array(te);
12906
12923
  return J.getRandomValues(ne), ne;
12907
- };
12924
+ }, __dxlog_file$8 = "/home/runner/work/dxos/dxos/packages/common/keys/src/space-id.ts", MULTIBASE_PREFIX = "B", ENCODED_LENGTH = 33, isValid = (te) => typeof te == "string" && te.startsWith(MULTIBASE_PREFIX) && te.length === ENCODED_LENGTH, _n, SpaceId = (_n = class extends String$.pipe(filter(isValid)) {
12925
+ }, _n.byteLength = 20, _n.encode = (J) => (invariant$1(J instanceof Uint8Array, "Invalid type", {
12926
+ F: __dxlog_file$8,
12927
+ L: 43,
12928
+ S: _n,
12929
+ A: [
12930
+ "value instanceof Uint8Array",
12931
+ "'Invalid type'"
12932
+ ]
12933
+ }), invariant$1(J.length === SpaceId.byteLength, "Invalid length", {
12934
+ F: __dxlog_file$8,
12935
+ L: 44,
12936
+ S: _n,
12937
+ A: [
12938
+ "value.length === SpaceId.byteLength",
12939
+ "'Invalid length'"
12940
+ ]
12941
+ }), MULTIBASE_PREFIX + base32Encode(J, "RFC4648")), _n.decode = (J) => (invariant$1(J.startsWith(MULTIBASE_PREFIX), "Invalid multibase32 encoding", {
12942
+ F: __dxlog_file$8,
12943
+ L: 49,
12944
+ S: _n,
12945
+ A: [
12946
+ "value.startsWith(MULTIBASE_PREFIX)",
12947
+ "'Invalid multibase32 encoding'"
12948
+ ]
12949
+ }), new Uint8Array((0, import_base32_decode.default)(J.slice(1), "RFC4648"))), _n.isValid = isValid, _n.random = () => SpaceId.encode(randomBytes(SpaceId.byteLength)), _n), __dxlog_file2$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/dxn.ts", LOCAL_SPACE_TAG = "@", An, yn, Zt;
12950
+ Zt = class {
12951
+ constructor(J, ne) {
12952
+ cn(this, An);
12953
+ cn(this, yn);
12954
+ switch (invariant$1(ne.length > 0, void 0, {
12955
+ F: __dxlog_file2$1,
12956
+ L: 161,
12957
+ S: this,
12958
+ A: [
12959
+ "parts.length > 0",
12960
+ ""
12961
+ ]
12962
+ }), invariant$1(ne.every((re) => typeof re == "string" && re.length > 0 && re.indexOf(":") === -1), void 0, {
12963
+ F: __dxlog_file2$1,
12964
+ L: 162,
12965
+ S: this,
12966
+ A: [
12967
+ "parts.every((part) => typeof part === 'string' && part.length > 0 && part.indexOf(':') === -1)",
12968
+ ""
12969
+ ]
12970
+ }), J) {
12971
+ case Zt.kind.TYPE:
12972
+ if (ne.length > 2)
12973
+ throw new Error('Invalid "type" DXN');
12974
+ break;
12975
+ case Zt.kind.ECHO:
12976
+ if (ne.length !== 2)
12977
+ throw new Error('Invalid "echo" DXN');
12978
+ break;
12979
+ }
12980
+ Jt(this, An, J), Jt(this, yn, ne);
12981
+ }
12982
+ static hash(J) {
12983
+ return J.toString();
12984
+ }
12985
+ get kind() {
12986
+ return At(this, An);
12987
+ }
12988
+ static equals(J, ne) {
12989
+ return J.kind === ne.kind && J.parts.length === ne.parts.length && J.parts.every((re, ae) => re === ne.parts[ae]);
12990
+ }
12991
+ // TODO(burdon): Rename isValid.
12992
+ static isDXNString(J) {
12993
+ return J.startsWith("dxn:");
12994
+ }
12995
+ static parse(J) {
12996
+ if (typeof J != "string")
12997
+ throw new Error(`Invalid DXN: ${J}`);
12998
+ const [ne, re, ...ae] = J.split(":");
12999
+ if (ne !== "dxn")
13000
+ throw new Error(`Invalid DXN: ${J}`);
13001
+ if (!(typeof re == "string" && re.length > 0))
13002
+ throw new Error(`Invalid DXN: ${J}`);
13003
+ if (!(ae.length > 0))
13004
+ throw new Error(`Invalid DXN: ${J}`);
13005
+ return new Zt(re, ae);
13006
+ }
13007
+ static tryParse(J) {
13008
+ try {
13009
+ return Zt.parse(J);
13010
+ } catch {
13011
+ return;
13012
+ }
13013
+ }
13014
+ /**
13015
+ * @example `dxn:type:example.com/type/Contact`
13016
+ */
13017
+ static fromTypename(J) {
13018
+ return new Zt(Zt.kind.TYPE, [
13019
+ J
13020
+ ]);
13021
+ }
13022
+ /**
13023
+ * @example `dxn:type:example.com/type/Contact:0.1.0`
13024
+ */
13025
+ // TODO(dmaretskyi): Consider using @ as the version separator.
13026
+ static fromTypenameAndVersion(J, ne) {
13027
+ return new Zt(Zt.kind.TYPE, [
13028
+ J,
13029
+ ne
13030
+ ]);
13031
+ }
13032
+ /**
13033
+ * @example `dxn:echo:@:01J00J9B45YHYSGZQTQMSKMGJ6`
13034
+ */
13035
+ static fromLocalObjectId(J) {
13036
+ return new Zt(Zt.kind.ECHO, [
13037
+ LOCAL_SPACE_TAG,
13038
+ J
13039
+ ]);
13040
+ }
13041
+ static fromQueue(J, ne, re, ae) {
13042
+ return invariant$1(SpaceId.isValid(ne), void 0, {
13043
+ F: __dxlog_file2$1,
13044
+ L: 150,
13045
+ S: this,
13046
+ A: [
13047
+ "SpaceId.isValid(spaceId)",
13048
+ ""
13049
+ ]
13050
+ }), invariant$1(ObjectId.isValid(re), void 0, {
13051
+ F: __dxlog_file2$1,
13052
+ L: 151,
13053
+ S: this,
13054
+ A: [
13055
+ "ObjectId.isValid(queueId)",
13056
+ ""
13057
+ ]
13058
+ }), invariant$1(!ae || ObjectId.isValid(ae), void 0, {
13059
+ F: __dxlog_file2$1,
13060
+ L: 152,
13061
+ S: this,
13062
+ A: [
13063
+ "!objectId || ObjectId.isValid(objectId)",
13064
+ ""
13065
+ ]
13066
+ }), new Zt(Zt.kind.QUEUE, [
13067
+ J,
13068
+ ne,
13069
+ re,
13070
+ ...ae ? [
13071
+ ae
13072
+ ] : []
13073
+ ]);
13074
+ }
13075
+ get parts() {
13076
+ return At(this, yn);
13077
+ }
13078
+ // TODO(burdon): Should getters fail?
13079
+ get typename() {
13080
+ return invariant$1(At(this, An) === Zt.kind.TYPE, void 0, {
13081
+ F: __dxlog_file2$1,
13082
+ L: 188,
13083
+ S: this,
13084
+ A: [
13085
+ "this.#kind === DXN.kind.TYPE",
13086
+ ""
13087
+ ]
13088
+ }), At(this, yn)[0];
13089
+ }
13090
+ hasTypenameOf(J) {
13091
+ return At(this, An) === Zt.kind.TYPE && At(this, yn).length === 1 && At(this, yn)[0] === J;
13092
+ }
13093
+ isLocalObjectId() {
13094
+ return At(this, An) === Zt.kind.ECHO && At(this, yn)[0] === LOCAL_SPACE_TAG && At(this, yn).length === 2;
13095
+ }
13096
+ asTypeDXN() {
13097
+ if (this.kind !== Zt.kind.TYPE)
13098
+ return;
13099
+ const [J, ne] = At(this, yn);
13100
+ return {
13101
+ type: J,
13102
+ version: ne
13103
+ };
13104
+ }
13105
+ asEchoDXN() {
13106
+ if (this.kind !== Zt.kind.ECHO)
13107
+ return;
13108
+ const [J, ne] = At(this, yn);
13109
+ return {
13110
+ spaceId: J === LOCAL_SPACE_TAG ? void 0 : J,
13111
+ echoId: ne
13112
+ };
13113
+ }
13114
+ asQueueDXN() {
13115
+ if (this.kind !== Zt.kind.QUEUE)
13116
+ return;
13117
+ const [J, ne, re, ae] = At(this, yn);
13118
+ if (typeof re == "string")
13119
+ return {
13120
+ subspaceTag: J,
13121
+ spaceId: ne,
13122
+ queueId: re,
13123
+ objectId: ae
13124
+ };
13125
+ }
13126
+ toString() {
13127
+ return `dxn:${At(this, An)}:${At(this, yn).join(":")}`;
13128
+ }
13129
+ /**
13130
+ * Used by Node.js to get textual representation of this object when it's printed with a `console.log` statement.
13131
+ */
13132
+ [inspectCustom](J, ne, re) {
13133
+ const ae = (oe) => `\x1B[${oe}m`;
13134
+ return ae(re.colors.blueBright[0]) + this.toString() + ae(re.colors.reset[0]);
13135
+ }
13136
+ get [devtoolsFormatter]() {
13137
+ return {
13138
+ header: () => [
13139
+ "span",
13140
+ {
13141
+ style: "font-weight: bold;"
13142
+ },
13143
+ this.toString()
13144
+ ]
13145
+ };
13146
+ }
13147
+ }, An = new WeakMap(), yn = new WeakMap(), Zt.Schema = NonEmptyString.pipe(
13148
+ pattern(/^dxn:([^:]+):(?:[^:]+:?)+[^:]$/),
13149
+ // TODO(dmaretskyi): To set the format we need to move the annotation IDs out of the echo-schema package.
13150
+ // FormatAnnotation.set(FormatEnum.DXN),
13151
+ annotations({
13152
+ title: "DXN",
13153
+ description: "DXN URI",
13154
+ examples: [
13155
+ "dxn:type:example.com/type/MyType",
13156
+ "dxn:echo:@:01J00J9B45YHYSGZQTQMSKMGJ6"
13157
+ ]
13158
+ })
13159
+ ), Zt.kind = Object.freeze({
13160
+ /**
13161
+ * dxn:type:<type name>[:<version>]
13162
+ */
13163
+ TYPE: "type",
13164
+ /**
13165
+ * dxn:echo:<space id>:<echo id>
13166
+ * dxn:echo:@:<echo id>
13167
+ */
13168
+ // TODO(burdon): Rename to OBJECT? (BREAKING CHANGE).
13169
+ // TODO(burdon): Add separate Kind for space.
13170
+ ECHO: "echo",
13171
+ /**
13172
+ * The subspace tag enables us to partition queues by usage within the context of a space.
13173
+ * dxn:queue:<subspace_tag>:<space_id>:<queue_id>[:object_id]
13174
+ * dxn:queue:data:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
13175
+ * dxn:queue:trace:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
13176
+ */
13177
+ QUEUE: "queue"
13178
+ });
12908
13179
  init_inject_globals();
12909
- var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts", PUBLIC_KEY_LENGTH = 32, isLikeArrayBuffer = (te) => typeof te == "object" && te !== null && Object.getPrototypeOf(te).constructor.name === "ArrayBuffer", tn, PublicKey = (tn = class {
13180
+ __toESM(require_base32_decode());
13181
+ init_inject_globals();
13182
+ var import_base32_decode3 = __toESM(require_base32_decode()), __dxlog_file4$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts", PUBLIC_KEY_LENGTH = 32, isLikeArrayBuffer = (te) => typeof te == "object" && te !== null && Object.getPrototypeOf(te).constructor.name === "ArrayBuffer", tn, PublicKey = (tn = class {
12910
13183
  /**
12911
13184
  * Creates new instance of PublicKey automatically determining the input format.
12912
13185
  * @param source A Buffer, or Uint8Array, or hex encoded string, or something with an `asUint8Array` method on it
@@ -12914,7 +13187,7 @@ var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 =
12914
13187
  */
12915
13188
  static from(J) {
12916
13189
  if (invariant$1(J, void 0, {
12917
- F: __dxlog_file2$1,
13190
+ F: __dxlog_file4$1,
12918
13191
  L: 49,
12919
13192
  S: this,
12920
13193
  A: [
@@ -12996,7 +13269,7 @@ var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 =
12996
13269
  */
12997
13270
  static bufferize(J) {
12998
13271
  return invariant$1(typeof J == "string", "Invalid type", {
12999
- F: __dxlog_file2$1,
13272
+ F: __dxlog_file4$1,
13000
13273
  L: 152,
13001
13274
  S: this,
13002
13275
  A: [
@@ -13012,7 +13285,7 @@ var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 =
13012
13285
  */
13013
13286
  static stringify(J) {
13014
13287
  return J instanceof tn ? J = J.asBuffer() : J instanceof Uint8Array && (J = export_Buffer.from(J.buffer, J.byteOffset, J.byteLength)), invariant$1(J instanceof export_Buffer, "Invalid type", {
13015
- F: __dxlog_file2$1,
13288
+ F: __dxlog_file4$1,
13016
13289
  L: 171,
13017
13290
  S: this,
13018
13291
  A: [
@@ -13030,14 +13303,14 @@ var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 =
13030
13303
  }
13031
13304
  static fromMultibase32(J) {
13032
13305
  return invariant$1(J.startsWith("B"), "Invalid multibase32 encoding", {
13033
- F: __dxlog_file2$1,
13306
+ F: __dxlog_file4$1,
13034
13307
  L: 184,
13035
13308
  S: this,
13036
13309
  A: [
13037
13310
  "encoded.startsWith('B')",
13038
13311
  "'Invalid multibase32 encoding'"
13039
13312
  ]
13040
- }), new tn(new Uint8Array((0, import_base32_decode2.default)(J.slice(1), "RFC4648")));
13313
+ }), new tn(new Uint8Array((0, import_base32_decode3.default)(J.slice(1), "RFC4648")));
13041
13314
  }
13042
13315
  constructor(J) {
13043
13316
  if (this._value = J, !(J instanceof Uint8Array))
@@ -13154,265 +13427,6 @@ var import_base32_decode2 = __toESM(require_base32_decode()), __dxlog_file2$1 =
13154
13427
  return tn.isPublicKey(J) ? this.equals(J) : !1;
13155
13428
  }
13156
13429
  }, tn.ZERO = tn.from("00".repeat(PUBLIC_KEY_LENGTH)), tn);
13157
- init_inject_globals();
13158
- var import_base32_decode3 = __toESM(require_base32_decode()), __dxlog_file3$2 = "/home/runner/work/dxos/dxos/packages/common/keys/src/space-id.ts", MULTIBASE_PREFIX2 = "B", ENCODED_LENGTH2 = 33, isValid = (te) => typeof te == "string" && te.startsWith(MULTIBASE_PREFIX2) && te.length === ENCODED_LENGTH2, _n, SpaceId = (_n = class extends String$.pipe(filter(isValid)) {
13159
- }, _n.byteLength = 20, _n.encode = (J) => (invariant$1(J instanceof Uint8Array, "Invalid type", {
13160
- F: __dxlog_file3$2,
13161
- L: 43,
13162
- S: _n,
13163
- A: [
13164
- "value instanceof Uint8Array",
13165
- "'Invalid type'"
13166
- ]
13167
- }), invariant$1(J.length === SpaceId.byteLength, "Invalid length", {
13168
- F: __dxlog_file3$2,
13169
- L: 44,
13170
- S: _n,
13171
- A: [
13172
- "value.length === SpaceId.byteLength",
13173
- "'Invalid length'"
13174
- ]
13175
- }), MULTIBASE_PREFIX2 + base32Encode(J, "RFC4648")), _n.decode = (J) => (invariant$1(J.startsWith(MULTIBASE_PREFIX2), "Invalid multibase32 encoding", {
13176
- F: __dxlog_file3$2,
13177
- L: 49,
13178
- S: _n,
13179
- A: [
13180
- "value.startsWith(MULTIBASE_PREFIX)",
13181
- "'Invalid multibase32 encoding'"
13182
- ]
13183
- }), new Uint8Array((0, import_base32_decode3.default)(J.slice(1), "RFC4648"))), _n.isValid = isValid, _n.random = () => SpaceId.encode(randomBytes(SpaceId.byteLength)), _n);
13184
- init_inject_globals();
13185
- init_inject_globals();
13186
- var ObjectIdSchema = String$.pipe(pattern(/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i)).annotations({
13187
- description: "a Universally Unique Lexicographically Sortable Identifier",
13188
- pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
13189
- }), ObjectId = class extends ObjectIdSchema {
13190
- static isValid(te) {
13191
- try {
13192
- return decodeSync(ObjectId)(te), !0;
13193
- } catch {
13194
- return !1;
13195
- }
13196
- }
13197
- static random() {
13198
- return ulid();
13199
- }
13200
- }, __dxlog_file4$1 = "/home/runner/work/dxos/dxos/packages/common/keys/src/dxn.ts", LOCAL_SPACE_TAG = "@", An, yn, Zt;
13201
- Zt = class {
13202
- constructor(J, ne) {
13203
- cn(this, An);
13204
- cn(this, yn);
13205
- switch (invariant$1(ne.length > 0, void 0, {
13206
- F: __dxlog_file4$1,
13207
- L: 157,
13208
- S: this,
13209
- A: [
13210
- "parts.length > 0",
13211
- ""
13212
- ]
13213
- }), invariant$1(ne.every((re) => typeof re == "string" && re.length > 0 && re.indexOf(":") === -1), void 0, {
13214
- F: __dxlog_file4$1,
13215
- L: 158,
13216
- S: this,
13217
- A: [
13218
- "parts.every((part) => typeof part === 'string' && part.length > 0 && part.indexOf(':') === -1)",
13219
- ""
13220
- ]
13221
- }), J) {
13222
- case Zt.kind.TYPE:
13223
- if (ne.length > 2)
13224
- throw new Error('Invalid "type" DXN');
13225
- break;
13226
- case Zt.kind.ECHO:
13227
- if (ne.length !== 2)
13228
- throw new Error('Invalid "echo" DXN');
13229
- break;
13230
- }
13231
- Jt(this, An, J), Jt(this, yn, ne);
13232
- }
13233
- get kind() {
13234
- return At(this, An);
13235
- }
13236
- static equals(J, ne) {
13237
- return J.kind === ne.kind && J.parts.length === ne.parts.length && J.parts.every((re, ae) => re === ne.parts[ae]);
13238
- }
13239
- // TODO(burdon): Rename isValid.
13240
- static isDXNString(J) {
13241
- return J.startsWith("dxn:");
13242
- }
13243
- static parse(J) {
13244
- if (typeof J != "string")
13245
- throw new Error(`Invalid DXN: ${J}`);
13246
- const [ne, re, ...ae] = J.split(":");
13247
- if (ne !== "dxn")
13248
- throw new Error(`Invalid DXN: ${J}`);
13249
- if (!(typeof re == "string" && re.length > 0))
13250
- throw new Error(`Invalid DXN: ${J}`);
13251
- if (!(ae.length > 0))
13252
- throw new Error(`Invalid DXN: ${J}`);
13253
- return new Zt(re, ae);
13254
- }
13255
- static tryParse(J) {
13256
- try {
13257
- return Zt.parse(J);
13258
- } catch {
13259
- return;
13260
- }
13261
- }
13262
- /**
13263
- * @example `dxn:type:example.com/type/Contact`
13264
- */
13265
- static fromTypename(J) {
13266
- return new Zt(Zt.kind.TYPE, [
13267
- J
13268
- ]);
13269
- }
13270
- /**
13271
- * @example `dxn:type:example.com/type/Contact:0.1.0`
13272
- */
13273
- // TODO(dmaretskyi): Consider using @ as the version separator.
13274
- static fromTypenameAndVersion(J, ne) {
13275
- return new Zt(Zt.kind.TYPE, [
13276
- J,
13277
- ne
13278
- ]);
13279
- }
13280
- /**
13281
- * @example `dxn:echo:@:01J00J9B45YHYSGZQTQMSKMGJ6`
13282
- */
13283
- static fromLocalObjectId(J) {
13284
- return new Zt(Zt.kind.ECHO, [
13285
- LOCAL_SPACE_TAG,
13286
- J
13287
- ]);
13288
- }
13289
- static fromQueue(J, ne, re, ae) {
13290
- return invariant$1(SpaceId.isValid(ne), void 0, {
13291
- F: __dxlog_file4$1,
13292
- L: 146,
13293
- S: this,
13294
- A: [
13295
- "SpaceId.isValid(spaceId)",
13296
- ""
13297
- ]
13298
- }), invariant$1(ObjectId.isValid(re), void 0, {
13299
- F: __dxlog_file4$1,
13300
- L: 147,
13301
- S: this,
13302
- A: [
13303
- "ObjectId.isValid(queueId)",
13304
- ""
13305
- ]
13306
- }), invariant$1(!ae || ObjectId.isValid(ae), void 0, {
13307
- F: __dxlog_file4$1,
13308
- L: 148,
13309
- S: this,
13310
- A: [
13311
- "!objectId || ObjectId.isValid(objectId)",
13312
- ""
13313
- ]
13314
- }), new Zt(Zt.kind.QUEUE, [
13315
- J,
13316
- ne,
13317
- re,
13318
- ...ae ? [
13319
- ae
13320
- ] : []
13321
- ]);
13322
- }
13323
- get parts() {
13324
- return At(this, yn);
13325
- }
13326
- // TODO(burdon): Should getters fail?
13327
- get typename() {
13328
- return invariant$1(At(this, An) === Zt.kind.TYPE, void 0, {
13329
- F: __dxlog_file4$1,
13330
- L: 184,
13331
- S: this,
13332
- A: [
13333
- "this.#kind === DXN.kind.TYPE",
13334
- ""
13335
- ]
13336
- }), At(this, yn)[0];
13337
- }
13338
- hasTypenameOf(J) {
13339
- return At(this, An) === Zt.kind.TYPE && At(this, yn).length === 1 && At(this, yn)[0] === J;
13340
- }
13341
- isLocalObjectId() {
13342
- return At(this, An) === Zt.kind.ECHO && At(this, yn)[0] === LOCAL_SPACE_TAG && At(this, yn).length === 2;
13343
- }
13344
- asTypeDXN() {
13345
- if (this.kind !== Zt.kind.TYPE)
13346
- return;
13347
- const [J, ne] = At(this, yn);
13348
- return {
13349
- type: J,
13350
- version: ne
13351
- };
13352
- }
13353
- asEchoDXN() {
13354
- if (this.kind !== Zt.kind.ECHO)
13355
- return;
13356
- const [J, ne] = At(this, yn);
13357
- return {
13358
- spaceId: J === LOCAL_SPACE_TAG ? void 0 : J,
13359
- echoId: ne
13360
- };
13361
- }
13362
- asQueueDXN() {
13363
- if (this.kind !== Zt.kind.QUEUE)
13364
- return;
13365
- const [J, ne, re, ae] = At(this, yn);
13366
- if (typeof re == "string")
13367
- return {
13368
- subspaceTag: J,
13369
- spaceId: ne,
13370
- queueId: re,
13371
- objectId: ae
13372
- };
13373
- }
13374
- toString() {
13375
- return `dxn:${At(this, An)}:${At(this, yn).join(":")}`;
13376
- }
13377
- /**
13378
- * Used by Node.js to get textual representation of this object when it's printed with a `console.log` statement.
13379
- */
13380
- [inspectCustom](J, ne, re) {
13381
- const ae = (oe) => `\x1B[${oe}m`;
13382
- return ae(re.colors.blueBright[0]) + this.toString() + ae(re.colors.reset[0]);
13383
- }
13384
- }, An = new WeakMap(), yn = new WeakMap(), Zt.Schema = NonEmptyString.pipe(
13385
- pattern(/^dxn:([^:]+):(?:[^:]+:?)+[^:]$/),
13386
- // TODO(dmaretskyi): To set the format we need to move the annotation IDs out of the echo-schema package.
13387
- // FormatAnnotation.set(FormatEnum.DXN),
13388
- annotations({
13389
- title: "DXN",
13390
- description: "DXN URI",
13391
- examples: [
13392
- "dxn:type:example.com/type/MyType",
13393
- "dxn:echo:@:01J00J9B45YHYSGZQTQMSKMGJ6"
13394
- ]
13395
- })
13396
- ), Zt.kind = Object.freeze({
13397
- /**
13398
- * dxn:type:<type name>[:<version>]
13399
- */
13400
- TYPE: "type",
13401
- /**
13402
- * dxn:echo:<space id>:<echo id>
13403
- * dxn:echo:@:<echo id>
13404
- */
13405
- // TODO(burdon): Rename to OBJECT? (BREAKING CHANGE).
13406
- // TODO(burdon): Add separate Kind for space.
13407
- ECHO: "echo",
13408
- /**
13409
- * The subspace tag enables us to partition queues by usage within the context of a space.
13410
- * dxn:queue:<subspace_tag>:<space_id>:<queue_id>[:object_id]
13411
- * dxn:queue:data:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
13412
- * dxn:queue:trace:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
13413
- */
13414
- QUEUE: "queue"
13415
- });
13416
13430
  for (let te = 0; te <= 255; ++te)
13417
13431
  te.toString(16).padStart(2, "0");
13418
13432
  var MAX_SERIALIZATION_LENGTH = 10;
@@ -19944,10 +19958,10 @@ class DxRefTagActivate extends Event {
19944
19958
  }
19945
19959
  let DxRefTag = class extends h$2 {
19946
19960
  constructor() {
19947
- super(), this.refid = makeId("dx-ref-tag"), this.rootclassname = void 0, this.addEventListener("click", this.handleActivate);
19961
+ super(...arguments), this.refid = makeId("dx-ref-tag"), this.rootclassname = void 0;
19948
19962
  }
19949
19963
  connectedCallback() {
19950
- super.connectedCallback(), this.tabIndex = 0, this.classList.add("dx-focus-ring"), this.rootclassname && this.classList.add(this.rootclassname), this.setAttribute("role", "button");
19964
+ super.connectedCallback(), this.tabIndex = 0, this.classList.add("dx-focus-ring"), this.rootclassname && this.classList.add(this.rootclassname), this.setAttribute("role", "button"), this.getAttribute("data-auto-trigger") === "true" ? this.handleActivate({ type: "auto-trigger" }) : this.addEventListener("click", this.handleActivate);
19951
19965
  }
19952
19966
  handleActivate(J) {
19953
19967
  var ne;
@@ -31358,7 +31372,7 @@ var reflectiveRelation = {
31358
31372
  //
31359
31373
  baseSurface: elevationCadence(0),
31360
31374
  groupSurface: elevationCadence(1),
31361
- modalSurface: elevationCadence(2),
31375
+ modalSurface: elevationCadence(2, 1.7),
31362
31376
  //
31363
31377
  // Contrast cadence tokens
31364
31378
  //
@@ -31637,10 +31651,16 @@ var reflectiveRelation = {
31637
31651
  ":root, .dark"
31638
31652
  ],
31639
31653
  group: [
31640
- groupAliases.map((te) => `.bg-${te}, .dark .bg-${te}`).join(", ")
31654
+ [
31655
+ ".sidebar-surface, .dark .sidebar-surface",
31656
+ ...groupAliases.map((te) => `.bg-${te}, .dark .bg-${te}`)
31657
+ ].join(", ")
31641
31658
  ],
31642
31659
  modal: [
31643
- modalAliases.map((te) => `.bg-${te}, .dark .bg-${te}`).join(", ")
31660
+ [
31661
+ ".modal-surface, .dark .modal-surface",
31662
+ ...modalAliases.map((te) => `.bg-${te}, .dark .bg-${te}`)
31663
+ ].join(", ")
31644
31664
  ]
31645
31665
  },
31646
31666
  aliases: {
@@ -31665,6 +31685,13 @@ var reflectiveRelation = {
31665
31685
  initial: 0,
31666
31686
  slope: 1
31667
31687
  }
31688
+ },
31689
+ lacuna: {
31690
+ root: {
31691
+ unit: "rem",
31692
+ initial: 0,
31693
+ slope: 0.125
31694
+ }
31668
31695
  }
31669
31696
  }
31670
31697
  },
@@ -31693,6 +31720,24 @@ var reflectiveRelation = {
31693
31720
  "line",
31694
31721
  2
31695
31722
  ]
31723
+ },
31724
+ trimXs: {
31725
+ root: [
31726
+ "lacuna",
31727
+ 3
31728
+ ]
31729
+ },
31730
+ trimSm: {
31731
+ root: [
31732
+ "lacuna",
31733
+ 6
31734
+ ]
31735
+ },
31736
+ trimMd: {
31737
+ root: [
31738
+ "lacuna",
31739
+ 9
31740
+ ]
31696
31741
  }
31697
31742
  }
31698
31743
  },
@@ -31721,6 +31766,17 @@ var reflectiveRelation = {
31721
31766
  root: [
31722
31767
  "focusLine"
31723
31768
  ]
31769
+ },
31770
+ trimSm: {
31771
+ root: [
31772
+ "card-spacing-inline",
31773
+ "card-spacing-block"
31774
+ ]
31775
+ },
31776
+ trimXs: {
31777
+ root: [
31778
+ "card-spacing-chrome"
31779
+ ]
31724
31780
  }
31725
31781
  }
31726
31782
  }
@@ -31945,6 +32001,11 @@ var reflectiveRelation = {
31945
32001
  facet: "lengths",
31946
32002
  disposition: "extend",
31947
32003
  tokenization: "omit-series"
32004
+ },
32005
+ spacing: {
32006
+ facet: "lengths",
32007
+ disposition: "extend",
32008
+ tokenization: "keep-series"
31948
32009
  }
31949
32010
  };
31950
32011
  physicalColors.definitions.series.neutral, physicalColors.definitions.series.primary, physicalColors.definitions.accompanyingSeries, physicalColors.conditions, physicalColors.series.neutral, physicalColors.series.primary, physicalColors.namespace, semanticColors.conditions, semanticColors.namespace, aliasColors.conditions, aliasColors.namespace;
@@ -32397,62 +32458,62 @@ var tokensTailwindConfig = src_default(tokenSet, adapterConfig), { extend: exten
32397
32458
  ],
32398
32459
  "logical.mlb": [
32399
32460
  {
32400
- mlb: getLength()
32461
+ mlb: getAny()
32401
32462
  }
32402
32463
  ],
32403
32464
  "logical.mli": [
32404
32465
  {
32405
- mli: getLength()
32466
+ mli: getAny()
32406
32467
  }
32407
32468
  ],
32408
32469
  "logical.mbs": [
32409
32470
  {
32410
- mbs: getLength()
32471
+ mbs: getAny()
32411
32472
  }
32412
32473
  ],
32413
32474
  "logical.mbe": [
32414
32475
  {
32415
- mbe: getLength()
32476
+ mbe: getAny()
32416
32477
  }
32417
32478
  ],
32418
32479
  "logical.mis": [
32419
32480
  {
32420
- mis: getLength()
32481
+ mis: getAny()
32421
32482
  }
32422
32483
  ],
32423
32484
  "logical.mie": [
32424
32485
  {
32425
- mie: getLength()
32486
+ mie: getAny()
32426
32487
  }
32427
32488
  ],
32428
32489
  "logical.plb": [
32429
32490
  {
32430
- plb: getLength()
32491
+ plb: getAny()
32431
32492
  }
32432
32493
  ],
32433
32494
  "logical.pli": [
32434
32495
  {
32435
- pli: getLength()
32496
+ pli: getAny()
32436
32497
  }
32437
32498
  ],
32438
32499
  "logical.pbs": [
32439
32500
  {
32440
- pbs: getLength()
32501
+ pbs: getAny()
32441
32502
  }
32442
32503
  ],
32443
32504
  "logical.pbe": [
32444
32505
  {
32445
- pbe: getLength()
32506
+ pbe: getAny()
32446
32507
  }
32447
32508
  ],
32448
32509
  "logical.pis": [
32449
32510
  {
32450
- pis: getLength()
32511
+ pis: getAny()
32451
32512
  }
32452
32513
  ],
32453
32514
  "logical.pie": [
32454
32515
  {
32455
- pie: getLength()
32516
+ pie: getAny()
32456
32517
  }
32457
32518
  ],
32458
32519
  "logical.space-b": [
@@ -33053,10 +33114,13 @@ var tokensTailwindConfig = src_default(tokenSet, adapterConfig), { extend: exten
33053
33114
  listItem: breadcrumbListItem,
33054
33115
  current: breadcrumbCurrent,
33055
33116
  separator: breadcrumbSeparator
33056
- }, buttonRoot = (te, ...J) => mx("dx-button dx-focus-ring group", ...J), buttonGroup = (te, ...J) => mx("inline-flex rounded-sm [&>:first-child]:rounded-is-sm [&>:last-child]:rounded-ie-sm [&>button]:relative", ...J), buttonTheme = {
33117
+ }, staticDefaultButtonColors = "bg-inputSurface";
33118
+ mx(staticDefaultButtonColors, "data-[state=open]:bg-inputSurface aria-pressed:text-accentText aria-pressed:bg-baseSurface aria-checked:text-accentText aria-checked:bg-baseSurface");
33119
+ mx(ghostHover, "hover:text-inherit data-[state=open]:bg-inputSurface aria-pressed:text-accentText aria-pressed:bg-baseSurface aria-checked:text-accentText aria-checked:bg-baseSurface");
33120
+ var buttonRoot = (te, ...J) => mx("dx-button dx-focus-ring group", ...J), buttonGroup = (te, ...J) => mx("inline-flex rounded-sm [&>:first-child]:rounded-is-sm [&>:last-child]:rounded-ie-sm [&>button]:relative", ...J), buttonTheme = {
33057
33121
  root: buttonRoot,
33058
33122
  group: buttonGroup
33059
- }, dialogOverlay = (te, ...J) => mx("dx-dialog__overlay", ...J), dialogContent = ({ inOverlayLayout: te }, ...J) => mx("dx-dialog__content @container dx-focus-ring", !te && "fixed z-50 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]", ...J), dialogTitle = ({ srOnly: te }, ...J) => mx("dx-dialog__title", te && "sr-only", ...J), dialogDescription = ({ srOnly: te }, ...J) => mx("dx-dialog__description", descriptionText, te && "sr-only", ...J), dialogTheme = {
33123
+ }, dialogOverlay = (te, ...J) => mx("dx-dialog__overlay", ...J), dialogContent = ({ inOverlayLayout: te }, ...J) => mx("dx-dialog__content modal-surface @container dx-focus-ring", !te && "fixed z-50 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]", ...J), dialogTitle = ({ srOnly: te }, ...J) => mx("dx-dialog__title", te && "sr-only", ...J), dialogDescription = ({ srOnly: te }, ...J) => mx("dx-dialog__description", descriptionText, te && "sr-only", ...J), dialogTheme = {
33060
33124
  overlay: dialogOverlay,
33061
33125
  content: dialogContent,
33062
33126
  title: dialogTitle,
@@ -33171,7 +33235,7 @@ var tokensTailwindConfig = src_default(tokenSet, adapterConfig), { extend: exten
33171
33235
  }), surfaceZIndex({
33172
33236
  elevation: te,
33173
33237
  level: "menu"
33174
- }), ...J), selectViewport = (te, ...J) => mx(...J), selectItem = (te, ...J) => mx("flex items-center min-bs-[2rem] pli-3 plb-1 gap-2", "text-baseText leading-none rounded-sm select-none outline-none", "[&>svg]:invisible [&[data-state=checked]>svg]:visible", ghostHighlighted, ...J), selectItemIndicator = (te, ...J) => mx("items-center", ...J), selectArrow = (te, ...J) => mx("fill-separator", ...J), selectSeparator = (te, ...J) => mx(blockSeparator, separatorBorderColor, ...J), selectScrollButton = (te, ...J) => mx(modalSurface, "flex items-center justify-center cursor-default bs-6 is-full", ...J), selectTriggerIcon = (te, ...J) => mx(getSize(2), ...J), selectTheme = {
33238
+ }), ...J), selectViewport = (te, ...J) => mx(...J), selectItem = (te, ...J) => mx("flex items-center min-bs-[2rem] pli-3 plb-1 gap-2", "text-baseText leading-none select-none outline-none", "[&>svg]:invisible [&[data-state=checked]>svg]:visible", ghostHighlighted, ...J), selectItemIndicator = (te, ...J) => mx("items-center", ...J), selectArrow = (te, ...J) => mx("fill-separator", ...J), selectSeparator = (te, ...J) => mx(blockSeparator, separatorBorderColor, ...J), selectScrollButton = (te, ...J) => mx(modalSurface, "flex items-center justify-center cursor-default bs-6 is-full", ...J), selectTriggerIcon = (te, ...J) => mx(getSize(2), ...J), selectTheme = {
33175
33239
  content: selectContent,
33176
33240
  viewport: selectViewport,
33177
33241
  item: selectItem,
@@ -33203,7 +33267,7 @@ var tokensTailwindConfig = src_default(tokenSet, adapterConfig), { extend: exten
33203
33267
  actions: toastActions
33204
33268
  }, toolbarRoot = (te, ...J) => mx("flex shrink-0 items-center gap-1 p-1 is-full overflow-x-auto overflow-y-hidden contain-layout bg-toolbarSurface", ...J), toolbarTheme = {
33205
33269
  root: toolbarRoot
33206
- }, tooltipContent = ({ elevation: te }, ...J) => mx("inline-flex items-center rounded-md plb-1 pli-2 max-is-64 bg-inverseSurface text-inverseSurfaceText", popperMotion, surfaceShadow({
33270
+ }, tooltipContent = ({ elevation: te }, ...J) => mx("inline-flex items-center rounded-sm plb-1 pli-2 max-is-64 bg-inverseSurface text-inverseSurfaceText", popperMotion, surfaceShadow({
33207
33271
  elevation: "positioned"
33208
33272
  }), surfaceZIndex({
33209
33273
  elevation: te,
@@ -46646,7 +46710,7 @@ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/common/async/src/persi
46646
46710
  err: te
46647
46711
  }, {
46648
46712
  F: __dxlog_file4,
46649
- L: 77,
46713
+ L: 78,
46650
46714
  S: this,
46651
46715
  C: (ne, re) => ne(...re)
46652
46716
  }), (J = this._restartTask) == null || J.schedule();
@@ -46662,7 +46726,7 @@ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/common/async/src/persi
46662
46726
  state: this._lifecycleState
46663
46727
  }, {
46664
46728
  F: __dxlog_file4,
46665
- L: 90,
46729
+ L: 91,
46666
46730
  S: this,
46667
46731
  C: (J, ne) => J(...ne)
46668
46732
  }), await this._stopCurrentState(), this._lifecycleState === LifecycleState.OPEN && (await cancelWithContext(this._ctx, sleep(this._restartAfter)), this._restartAfter = Math.min(Math.max(this._restartAfter * 2, INIT_RESTART_DELAY), this._maxRestartDelay), await warnAfterTimeout(5e3, "Connection establishment takes too long", async () => {
@@ -46676,7 +46740,7 @@ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/common/async/src/persi
46676
46740
  } catch (te) {
46677
46741
  log$2.catch(te, void 0, {
46678
46742
  F: __dxlog_file4,
46679
- L: 112,
46743
+ L: 113,
46680
46744
  S: this,
46681
46745
  C: (J, ne) => J(...ne)
46682
46746
  });
@@ -47808,16 +47872,6 @@ var Invitation;
47808
47872
  J[J.INIT = 0] = "INIT", J[J.CONNECTING = 1] = "CONNECTING", J[J.CONNECTED = 2] = "CONNECTED", J[J.READY_FOR_AUTHENTICATION = 3] = "READY_FOR_AUTHENTICATION", J[J.AUTHENTICATING = 4] = "AUTHENTICATING", J[J.SUCCESS = 5] = "SUCCESS", J[J.CANCELLED = 6] = "CANCELLED", J[J.TIMEOUT = 7] = "TIMEOUT", J[J.ERROR = 8] = "ERROR", J[J.EXPIRED = 9] = "EXPIRED";
47809
47873
  }(te.State || (te.State = {}));
47810
47874
  })(Invitation || (Invitation = {}));
47811
- var LogLevel;
47812
- (function(te) {
47813
- te[te.NONE = 0] = "NONE", te[te.TRACE = 5] = "TRACE", te[te.DEBUG = 10] = "DEBUG", te[te.VERBOSE = 11] = "VERBOSE", te[te.INFO = 12] = "INFO", te[te.WARN = 13] = "WARN", te[te.ERROR = 14] = "ERROR";
47814
- })(LogLevel || (LogLevel = {}));
47815
- var QueryLogsRequest;
47816
- (function(te) {
47817
- (function(J) {
47818
- J[J.NONE = 0] = "NONE", J[J.INCLUSIVE = 1] = "INCLUSIVE", J[J.EXPLICIT = 2] = "EXPLICIT";
47819
- })(te.MatchingOptions || (te.MatchingOptions = {}));
47820
- })(QueryLogsRequest || (QueryLogsRequest = {}));
47821
47875
  var SystemStatus;
47822
47876
  (function(te) {
47823
47877
  te[te.INACTIVE = 0] = "INACTIVE", te[te.ACTIVE = 1] = "ACTIVE";
@@ -47878,6 +47932,16 @@ var QueryAgentStatusResponse;
47878
47932
  J[J.UNKNOWN = 0] = "UNKNOWN", J[J.ACTIVE = 1] = "ACTIVE", J[J.INACTIVE = 2] = "INACTIVE", J[J.NOT_FOUND = 3] = "NOT_FOUND";
47879
47933
  })(te.AgentStatus || (te.AgentStatus = {}));
47880
47934
  })(QueryAgentStatusResponse || (QueryAgentStatusResponse = {}));
47935
+ var LogLevel;
47936
+ (function(te) {
47937
+ te[te.NONE = 0] = "NONE", te[te.TRACE = 5] = "TRACE", te[te.DEBUG = 10] = "DEBUG", te[te.VERBOSE = 11] = "VERBOSE", te[te.INFO = 12] = "INFO", te[te.WARN = 13] = "WARN", te[te.ERROR = 14] = "ERROR";
47938
+ })(LogLevel || (LogLevel = {}));
47939
+ var QueryLogsRequest;
47940
+ (function(te) {
47941
+ (function(J) {
47942
+ J[J.NONE = 0] = "NONE", J[J.INCLUSIVE = 1] = "INCLUSIVE", J[J.EXPLICIT = 2] = "EXPLICIT";
47943
+ })(te.MatchingOptions || (te.MatchingOptions = {}));
47944
+ })(QueryLogsRequest || (QueryLogsRequest = {}));
47881
47945
  var __dxlog_file$4 = "/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts", isShareableInvitation = (te) => {
47882
47946
  var J;
47883
47947
  return te.authMethod !== Invitation.AuthMethod.KNOWN_PUBLIC_KEY || ((J = te.guestKeypair) == null ? void 0 : J.privateKey);