@yorkie-js/react 0.6.15 → 0.6.17

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.
@@ -5,7 +5,7 @@ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { createContext, useMemo, useState, useEffect, useContext, useCallback } from "react";
7
7
  const name$1 = "@yorkie-js/react";
8
- const version$1 = "0.6.15";
8
+ const version$1 = "0.6.17";
9
9
  const pkg$1 = {
10
10
  name: name$1,
11
11
  version: version$1
@@ -6020,11 +6020,15 @@ const _User = class _User extends Message {
6020
6020
  */
6021
6021
  __publicField(this, "id", "");
6022
6022
  /**
6023
- * @generated from field: string username = 2;
6023
+ * @generated from field: string auth_provider = 2;
6024
+ */
6025
+ __publicField(this, "authProvider", "");
6026
+ /**
6027
+ * @generated from field: string username = 3;
6024
6028
  */
6025
6029
  __publicField(this, "username", "");
6026
6030
  /**
6027
- * @generated from field: google.protobuf.Timestamp created_at = 3;
6031
+ * @generated from field: google.protobuf.Timestamp created_at = 4;
6028
6032
  */
6029
6033
  __publicField(this, "createdAt");
6030
6034
  proto3.util.initPartial(data, this);
@@ -6054,12 +6058,19 @@ __publicField(_User, "fields", proto3.util.newFieldList(() => [
6054
6058
  },
6055
6059
  {
6056
6060
  no: 2,
6061
+ name: "auth_provider",
6062
+ kind: "scalar",
6063
+ T: 9
6064
+ /* ScalarType.STRING */
6065
+ },
6066
+ {
6067
+ no: 3,
6057
6068
  name: "username",
6058
6069
  kind: "scalar",
6059
6070
  T: 9
6060
6071
  /* ScalarType.STRING */
6061
6072
  },
6062
- { no: 3, name: "created_at", kind: "message", T: Timestamp }
6073
+ { no: 4, name: "created_at", kind: "message", T: Timestamp }
6063
6074
  ]));
6064
6075
  let User = _User;
6065
6076
  const _Project = class _Project extends Message {
@@ -6220,6 +6231,51 @@ __publicField(_Project, "fields", proto3.util.newFieldList(() => [
6220
6231
  { no: 13, name: "updated_at", kind: "message", T: Timestamp }
6221
6232
  ]));
6222
6233
  let Project = _Project;
6234
+ const _MetricPoint = class _MetricPoint extends Message {
6235
+ constructor(data) {
6236
+ super();
6237
+ /**
6238
+ * @generated from field: int64 timestamp = 1;
6239
+ */
6240
+ __publicField(this, "timestamp", protoInt64.zero);
6241
+ /**
6242
+ * @generated from field: int32 value = 2;
6243
+ */
6244
+ __publicField(this, "value", 0);
6245
+ proto3.util.initPartial(data, this);
6246
+ }
6247
+ static fromBinary(bytes, options) {
6248
+ return new _MetricPoint().fromBinary(bytes, options);
6249
+ }
6250
+ static fromJson(jsonValue, options) {
6251
+ return new _MetricPoint().fromJson(jsonValue, options);
6252
+ }
6253
+ static fromJsonString(jsonString, options) {
6254
+ return new _MetricPoint().fromJsonString(jsonString, options);
6255
+ }
6256
+ static equals(a, b) {
6257
+ return proto3.util.equals(_MetricPoint, a, b);
6258
+ }
6259
+ };
6260
+ __publicField(_MetricPoint, "runtime", proto3);
6261
+ __publicField(_MetricPoint, "typeName", "yorkie.v1.MetricPoint");
6262
+ __publicField(_MetricPoint, "fields", proto3.util.newFieldList(() => [
6263
+ {
6264
+ no: 1,
6265
+ name: "timestamp",
6266
+ kind: "scalar",
6267
+ T: 3
6268
+ /* ScalarType.INT64 */
6269
+ },
6270
+ {
6271
+ no: 2,
6272
+ name: "value",
6273
+ kind: "scalar",
6274
+ T: 5
6275
+ /* ScalarType.INT32 */
6276
+ }
6277
+ ]));
6278
+ let MetricPoint = _MetricPoint;
6223
6279
  const _UpdatableProjectFields = class _UpdatableProjectFields extends Message {
6224
6280
  constructor(data) {
6225
6281
  super();
@@ -6392,6 +6448,14 @@ const _DocumentSummary = class _DocumentSummary extends Message {
6392
6448
  * @generated from field: string snapshot = 3;
6393
6449
  */
6394
6450
  __publicField(this, "snapshot", "");
6451
+ /**
6452
+ * @generated from field: int32 attached_clients = 7;
6453
+ */
6454
+ __publicField(this, "attachedClients", 0);
6455
+ /**
6456
+ * @generated from field: yorkie.v1.DocSize document_size = 8;
6457
+ */
6458
+ __publicField(this, "documentSize");
6395
6459
  /**
6396
6460
  * @generated from field: google.protobuf.Timestamp created_at = 4;
6397
6461
  */
@@ -6443,6 +6507,14 @@ __publicField(_DocumentSummary, "fields", proto3.util.newFieldList(() => [
6443
6507
  T: 9
6444
6508
  /* ScalarType.STRING */
6445
6509
  },
6510
+ {
6511
+ no: 7,
6512
+ name: "attached_clients",
6513
+ kind: "scalar",
6514
+ T: 5
6515
+ /* ScalarType.INT32 */
6516
+ },
6517
+ { no: 8, name: "document_size", kind: "message", T: DocSize },
6446
6518
  { no: 4, name: "created_at", kind: "message", T: Timestamp },
6447
6519
  { no: 5, name: "accessed_at", kind: "message", T: Timestamp },
6448
6520
  { no: 6, name: "updated_at", kind: "message", T: Timestamp }
@@ -6498,9 +6570,9 @@ let Presence$1 = (_g = class extends Message {
6498
6570
  constructor(data) {
6499
6571
  super();
6500
6572
  /**
6501
- * @generated from field: map<string, string> data = 1;
6573
+ * @generated from field: repeated string data = 1;
6502
6574
  */
6503
- __publicField(this, "data", {});
6575
+ __publicField(this, "data", []);
6504
6576
  proto3.util.initPartial(data, this);
6505
6577
  }
6506
6578
  static fromBinary(bytes, options) {
@@ -6516,11 +6588,7 @@ let Presence$1 = (_g = class extends Message {
6516
6588
  return proto3.util.equals(_g, a, b);
6517
6589
  }
6518
6590
  }, __publicField(_g, "runtime", proto3), __publicField(_g, "typeName", "yorkie.v1.Presence"), __publicField(_g, "fields", proto3.util.newFieldList(() => [
6519
- { no: 1, name: "data", kind: "map", K: 9, V: {
6520
- kind: "scalar",
6521
- T: 9
6522
- /* ScalarType.STRING */
6523
- } }
6591
+ { no: 1, name: "data", kind: "scalar", T: 9, repeated: true }
6524
6592
  ])), _g);
6525
6593
  let Checkpoint$1 = (_h = class extends Message {
6526
6594
  constructor(data) {
@@ -6754,6 +6822,84 @@ __publicField(_DocEvent, "fields", proto3.util.newFieldList(() => [
6754
6822
  { no: 3, name: "body", kind: "message", T: DocEventBody }
6755
6823
  ]));
6756
6824
  let DocEvent = _DocEvent;
6825
+ const _DataSize = class _DataSize extends Message {
6826
+ constructor(data) {
6827
+ super();
6828
+ /**
6829
+ * @generated from field: int32 data = 1;
6830
+ */
6831
+ __publicField(this, "data", 0);
6832
+ /**
6833
+ * @generated from field: int32 meta = 2;
6834
+ */
6835
+ __publicField(this, "meta", 0);
6836
+ proto3.util.initPartial(data, this);
6837
+ }
6838
+ static fromBinary(bytes, options) {
6839
+ return new _DataSize().fromBinary(bytes, options);
6840
+ }
6841
+ static fromJson(jsonValue, options) {
6842
+ return new _DataSize().fromJson(jsonValue, options);
6843
+ }
6844
+ static fromJsonString(jsonString, options) {
6845
+ return new _DataSize().fromJsonString(jsonString, options);
6846
+ }
6847
+ static equals(a, b) {
6848
+ return proto3.util.equals(_DataSize, a, b);
6849
+ }
6850
+ };
6851
+ __publicField(_DataSize, "runtime", proto3);
6852
+ __publicField(_DataSize, "typeName", "yorkie.v1.DataSize");
6853
+ __publicField(_DataSize, "fields", proto3.util.newFieldList(() => [
6854
+ {
6855
+ no: 1,
6856
+ name: "data",
6857
+ kind: "scalar",
6858
+ T: 5
6859
+ /* ScalarType.INT32 */
6860
+ },
6861
+ {
6862
+ no: 2,
6863
+ name: "meta",
6864
+ kind: "scalar",
6865
+ T: 5
6866
+ /* ScalarType.INT32 */
6867
+ }
6868
+ ]));
6869
+ let DataSize = _DataSize;
6870
+ const _DocSize = class _DocSize extends Message {
6871
+ constructor(data) {
6872
+ super();
6873
+ /**
6874
+ * @generated from field: yorkie.v1.DataSize live = 1;
6875
+ */
6876
+ __publicField(this, "live");
6877
+ /**
6878
+ * @generated from field: yorkie.v1.DataSize gc = 2;
6879
+ */
6880
+ __publicField(this, "gc");
6881
+ proto3.util.initPartial(data, this);
6882
+ }
6883
+ static fromBinary(bytes, options) {
6884
+ return new _DocSize().fromBinary(bytes, options);
6885
+ }
6886
+ static fromJson(jsonValue, options) {
6887
+ return new _DocSize().fromJson(jsonValue, options);
6888
+ }
6889
+ static fromJsonString(jsonString, options) {
6890
+ return new _DocSize().fromJsonString(jsonString, options);
6891
+ }
6892
+ static equals(a, b) {
6893
+ return proto3.util.equals(_DocSize, a, b);
6894
+ }
6895
+ };
6896
+ __publicField(_DocSize, "runtime", proto3);
6897
+ __publicField(_DocSize, "typeName", "yorkie.v1.DocSize");
6898
+ __publicField(_DocSize, "fields", proto3.util.newFieldList(() => [
6899
+ { no: 1, name: "live", kind: "message", T: DataSize },
6900
+ { no: 2, name: "gc", kind: "message", T: DataSize }
6901
+ ]));
6902
+ let DocSize = _DocSize;
6757
6903
  const _ActivateClientRequest = class _ActivateClientRequest extends Message {
6758
6904
  constructor(data) {
6759
6905
  super();
@@ -15795,9 +15941,10 @@ class TreeStyleOperation extends Operation {
15795
15941
  }
15796
15942
  function toPresence(presence) {
15797
15943
  const pbPresence = new Presence$1();
15798
- const pbDataMap = pbPresence.data;
15944
+ const pbDataArray = pbPresence.data;
15799
15945
  for (const [key, value] of Object.entries(presence)) {
15800
- pbDataMap[key] = JSON.stringify(value);
15946
+ pbDataArray.push(key);
15947
+ pbDataArray.push(JSON.stringify(value));
15801
15948
  }
15802
15949
  return pbPresence;
15803
15950
  }
@@ -16359,9 +16506,11 @@ function fromTimeTicket(pbTimeTicket) {
16359
16506
  }
16360
16507
  function fromPresence(pbPresence) {
16361
16508
  const data = {};
16362
- Object.entries(pbPresence.data).forEach(([key, value]) => {
16509
+ for (let i = 0; i < pbPresence.data.length; i += 2) {
16510
+ const key = pbPresence.data[i];
16511
+ const value = pbPresence.data[i + 1];
16363
16512
  data[key] = JSON.parse(value);
16364
- });
16513
+ }
16365
16514
  return data;
16366
16515
  }
16367
16516
  function fromPresenceChange(pbPresenceChange) {
@@ -20746,7 +20895,7 @@ function createAuthInterceptor(apiKey, token) {
20746
20895
  };
20747
20896
  }
20748
20897
  const name = "@yorkie-js/sdk";
20749
- const version = "0.6.15";
20898
+ const version = "0.6.17";
20750
20899
  const pkg = {
20751
20900
  name,
20752
20901
  version