@cocreate/crdt 1.8.29 → 1.9.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [1.9.2](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.1...v1.9.2) (2022-02-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * replaced show and hide class hidden with attribute hidden ([3add8ee](https://github.com/CoCreate-app/CoCreate-crdt/commit/3add8ee46e64021bf13706c935873076bdcc9927))
7
+
8
+ ## [1.9.1](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.0...v1.9.1) (2022-02-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update dependency versions ([b2ed9b4](https://github.com/CoCreate-app/CoCreate-crdt/commit/b2ed9b488067ec85e011e6291c047f617145d1c1))
14
+
15
+ # [1.9.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.30...v1.9.0) (2022-01-31)
16
+
17
+
18
+ ### Features
19
+
20
+ * provide updated string to localChange update event ([83534dd](https://github.com/CoCreate-app/CoCreate-crdt/commit/83534dd74b868c4f1fdd35f1ae683e19cac33ec7))
21
+
22
+ ## [1.8.30](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.29...v1.8.30) (2022-01-01)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * get-value attribute value now supports a selector added # to all values currently in get-value attributes ([81954c4](https://github.com/CoCreate-app/CoCreate-crdt/commit/81954c4fffdbc08d0624a4cd77356b23f18665ff))
28
+
1
29
  ## [1.8.29](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.8.28...v1.8.29) (2021-12-15)
2
30
 
3
31
 
package/docs/index.html CHANGED
@@ -74,7 +74,7 @@
74
74
  <div class="container svColumn overflow:hidden card position:relative border-radius:2px width:auto height:100%" id="sandbox">
75
75
  <div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
76
76
  <a class="margin-right:10px" id="code" show="#preview" hide="#code, #view"><i class="far fa-eye"></i></a>
77
- <a class="margin-right:10px hidden" id="preview" show="#code, #view" hide="#preview"><i class="fas fa-code"></i></a>
77
+ <a class="margin-right:10px" id="preview" show="#code, #view" hide="#preview" hidden><i class="fas fa-code"></i></a>
78
78
  <a class="margin-right:5px" fullscreen target="#playground"><i class="fas fa-expand"></i></a>
79
79
  </div>
80
80
  <div class="svRow">
@@ -87,7 +87,7 @@
87
87
  <div class="svSplitter svHorizontal"> </div>
88
88
 
89
89
  <div class="svPanel">
90
- <iframe get-value="demo" frameBorder="0" height="100%" width="100%" class="min-width:300px"></iframe>
90
+ <iframe get-value="#demo" frameBorder="0" height="100%" width="100%" class="min-width:300px"></iframe>
91
91
  </div>
92
92
 
93
93
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/crdt",
3
- "version": "1.8.29",
3
+ "version": "1.9.2",
4
4
  "description": "CoCreate crdt",
5
5
  "author": "CoCreate LLC",
6
6
  "license": "SEE LICENSE",
@@ -43,9 +43,9 @@
43
43
  "webpack-log": "^3.0.1"
44
44
  },
45
45
  "dependencies": {
46
- "@cocreate/actions": "^1.3.25",
47
- "@cocreate/crud-client": "^1.4.40",
48
- "@cocreate/message-client": "^1.1.58",
49
- "@cocreate/utils": "^1.4.0"
46
+ "@cocreate/actions": "^1.3.28",
47
+ "@cocreate/crud-client": "^1.4.43",
48
+ "@cocreate/message-client": "^1.1.60",
49
+ "@cocreate/utils": "^1.5.0"
50
50
  }
51
51
  }
package/src/index.js CHANGED
@@ -147,16 +147,17 @@ function insertChange(info, broadcast, flag) {
147
147
  changeLog.push(change);
148
148
  let string = name.get('text') || '';
149
149
  name.set('text', string.customSplice(change.start, change.length, change.value));
150
-
150
+ string = {string: name.get('text')};
151
+
151
152
  if(!info.clientId){
152
153
  info['datetime'] = change.datetime;
153
154
  info['clientId'] = change.clientId;
154
155
 
155
156
  broadcastChange(info);
156
- localChange(info);
157
+ localChange(info, string);
157
158
  }
158
159
  else
159
- localChange(info);
160
+ localChange(info, string);
160
161
 
161
162
  if (info.clientId == clientId && info.save != "false")
162
163
  persistChange(info);
@@ -181,9 +182,9 @@ function broadcastChange(info){
181
182
  });
182
183
  }
183
184
 
184
- function localChange(data) {
185
+ function localChange(data, string) {
185
186
  const localChange = new CustomEvent('cocreate-crdt-update', {
186
- detail: { ...data },
187
+ detail: { ...data, ...string },
187
188
  });
188
189
  window.dispatchEvent(localChange);
189
190
  }