@cocreate/cursors 1.11.34 → 1.12.1
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 +14 -0
- package/package.json +8 -8
- package/src/index.js +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.12.1](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.12.0...v1.12.1) (2022-11-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump d@cocreate ependencies ([aaa7b66](https://github.com/CoCreate-app/CoCreate-cursors/commit/aaa7b66a57a94c962573b96bc6c9903c6c9995b5))
|
|
7
|
+
|
|
8
|
+
# [1.12.0](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.34...v1.12.0) (2022-11-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* added crud.getAttributeNames to observer attributeName param, this will allow observing custom attributes ([cf37758](https://github.com/CoCreate-app/CoCreate-cursors/commit/cf377581c3f086f4a4edf5fc37cf1d7c20ae05d7))
|
|
14
|
+
|
|
1
15
|
## [1.11.34](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.33...v1.11.34) (2022-10-02)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cursors",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Collaborative user cursor position for inputs, textarea's and contenteditable elements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cursors",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"webpack-log": "^3.0.1"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@cocreate/crud-client": "^1.
|
|
66
|
-
"@cocreate/docs": "^1.3.
|
|
67
|
-
"@cocreate/message-client": "^1.1.
|
|
68
|
-
"@cocreate/observer": "^1.5.
|
|
69
|
-
"@cocreate/random-color": "^1.2.
|
|
70
|
-
"@cocreate/selection": "^1.4.
|
|
71
|
-
"@cocreate/uuid": "^1.2.
|
|
65
|
+
"@cocreate/crud-client": "^1.13.0",
|
|
66
|
+
"@cocreate/docs": "^1.3.20",
|
|
67
|
+
"@cocreate/message-client": "^1.1.87",
|
|
68
|
+
"@cocreate/observer": "^1.5.18",
|
|
69
|
+
"@cocreate/random-color": "^1.2.36",
|
|
70
|
+
"@cocreate/selection": "^1.4.24",
|
|
71
|
+
"@cocreate/uuid": "^1.2.17"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/index.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
/*globals localStorage, ResizeObserver*/
|
|
2
2
|
import observer from '@cocreate/observer';
|
|
3
|
+
import CRUD from '@cocreate/crud-client';
|
|
3
4
|
import message from '@cocreate/message-client';
|
|
4
5
|
import uuid from '@cocreate/uuid';
|
|
5
6
|
import { getElementPosition } from '@cocreate/selection';
|
|
6
7
|
import {randomColor} from '@cocreate/random-color';
|
|
7
8
|
import './index.css';
|
|
8
9
|
|
|
10
|
+
let crud
|
|
11
|
+
if(CRUD && CRUD.default)
|
|
12
|
+
crud = CRUD.default
|
|
13
|
+
else
|
|
14
|
+
crud = CRUD
|
|
15
|
+
|
|
9
16
|
const clientId = message.socket.clientId || uuid.generate(12);
|
|
10
17
|
const cursorBackground = randomColor();
|
|
11
18
|
|
|
@@ -352,7 +359,7 @@ observer.init({
|
|
|
352
359
|
observer.init({
|
|
353
360
|
name: 'CoCreateCursorAtt',
|
|
354
361
|
observe: ['attributes'],
|
|
355
|
-
attributeName: ['collection', 'document_id', 'name'],
|
|
362
|
+
attributeName: crud.getAttributeNames(['collection', 'document_id', 'name']),
|
|
356
363
|
callback: function(mutation) {
|
|
357
364
|
initElement(mutation.target);
|
|
358
365
|
}
|