@cocreate/cursors 1.23.1 → 1.23.3

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,17 @@
1
+ ## [1.23.3](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.23.2...v1.23.3) (2024-02-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * realtime defaults to false ([4f85854](https://github.com/CoCreate-app/CoCreate-cursors/commit/4f8585465739ba3a6910d3acf298a1f983dffad8))
7
+
8
+ ## [1.23.2](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.23.1...v1.23.2) (2024-02-05)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Removed https://cdn.cocreate.app/latest/CoCreate.min.css ([48837ce](https://github.com/CoCreate-app/CoCreate-cursors/commit/48837ceb1664efe65c1dea74e2c83b1a91e2b514))
14
+
1
15
  ## [1.23.1](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.23.0...v1.23.1) (2023-12-09)
2
16
 
3
17
 
package/demo/index.html CHANGED
@@ -11,12 +11,6 @@
11
11
  href="../assets/favicon.ico" />
12
12
  <title>Cursors | CoCreate</title>
13
13
 
14
- <!-- CoCreateCSS -->
15
- <link
16
- rel="stylesheet"
17
- href="https://cdn.cocreate.app/latest/CoCreate.min.css"
18
- type="text/css" />
19
-
20
14
  <!-- CoCreate Cursors -->
21
15
  <link rel="stylesheet" href="./CoCreate-cursors.css" type="text/css" />
22
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/cursors",
3
- "version": "1.23.1",
3
+ "version": "1.23.3",
4
4
  "description": "Collaborative user cursor position for inputs, textarea's and contenteditable elements.",
5
5
  "keywords": [
6
6
  "cursors",
package/src/index.js CHANGED
@@ -50,7 +50,7 @@ function initElements(elements) {
50
50
  function initElement(element) {
51
51
  let realtime = element.getAttribute('realtime');
52
52
  let cursors = element.getAttribute('cursors');
53
- if (realtime == 'false' || cursors == 'false') return;
53
+ if (!realtime || realtime === 'false' || cursors === 'false') return;
54
54
  if (element.hasAttribute('actions')) return;
55
55
  if (element.cursor) return;
56
56
  element.cursor = true;
@@ -98,7 +98,7 @@ function drawCursors(selection) {
98
98
  let realtime = element.getAttribute('realtime');
99
99
  let cursors = element.getAttribute('cursors');
100
100
  let contenteditable = element.getAttribute('contenteditable');
101
- if (realtime == 'false' || cursors == 'false') continue;
101
+ if (!realtime || realtime == 'false' || cursors == 'false') continue;
102
102
  if (element.tagName != 'INPUT' && element.tagName != 'TEXTAREA')
103
103
  if (contenteditable == 'false' || contenteditable == null)
104
104
  if (cursors != 'true') continue;