@cocreate/text 1.26.3 → 1.26.5
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 +4 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [1.26.5](https://github.com/CoCreate-app/CoCreate-text/compare/v1.26.4...v1.26.5) (2024-05-08)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* check if realtime and crdt prior to sendPosition ([c50954d](https://github.com/CoCreate-app/CoCreate-text/commit/c50954d98ed012dde171c8a00ef4cd6ed509f73e))
|
7
|
+
|
8
|
+
## [1.26.4](https://github.com/CoCreate-app/CoCreate-text/compare/v1.26.3...v1.26.4) (2024-04-29)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* bump cocreate dependencies ([8acb8bb](https://github.com/CoCreate-app/CoCreate-text/commit/8acb8bb800d99426a81e97633407d4acf7ecbf99))
|
14
|
+
|
1
15
|
## [1.26.3](https://github.com/CoCreate-app/CoCreate-text/compare/v1.26.2...v1.26.3) (2024-02-14)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cocreate/text",
|
3
|
-
"version": "1.26.
|
3
|
+
"version": "1.26.5",
|
4
4
|
"description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
5
5
|
"keywords": [
|
6
6
|
"text",
|
@@ -58,12 +58,12 @@
|
|
58
58
|
"webpack-log": "^3.0.1"
|
59
59
|
},
|
60
60
|
"dependencies": {
|
61
|
-
"@cocreate/actions": "^1.
|
62
|
-
"@cocreate/crdt": "^1.
|
63
|
-
"@cocreate/cursors": "^1.
|
64
|
-
"@cocreate/observer": "^1.
|
65
|
-
"@cocreate/selection": "^1.
|
66
|
-
"@cocreate/utils": "^1.
|
67
|
-
"@cocreate/uuid": "^1.
|
61
|
+
"@cocreate/actions": "^1.18.1",
|
62
|
+
"@cocreate/crdt": "^1.27.3",
|
63
|
+
"@cocreate/cursors": "^1.23.3",
|
64
|
+
"@cocreate/observer": "^1.16.0",
|
65
|
+
"@cocreate/selection": "^1.12.1",
|
66
|
+
"@cocreate/utils": "^1.33.6",
|
67
|
+
"@cocreate/uuid": "^1.11.1"
|
68
68
|
}
|
69
69
|
}
|
package/src/index.js
CHANGED
@@ -126,7 +126,10 @@ function initDocument(doc) {
|
|
126
126
|
documents.set(doc);
|
127
127
|
doc.addEventListener('selectionchange', (e) => {
|
128
128
|
let element = doc.activeElement;
|
129
|
-
|
129
|
+
let { isRealtime, isCrdt } = getAttributes(element);
|
130
|
+
|
131
|
+
if (isRealtime && isCrdt)
|
132
|
+
sendPosition(element);
|
130
133
|
});
|
131
134
|
}
|
132
135
|
}
|