@cocreate/cursors 1.24.0 → 1.24.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 +17 -0
- package/docs/index.html +237 -237
- package/package.json +11 -15
- package/src/index.js +493 -424
- package/webpack.config.js +65 -90
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [1.24.2](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.24.1...v1.24.2) (2025-04-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added css-loader ([eab505a](https://github.com/CoCreate-app/CoCreate-cursors/commit/eab505acd6c3ef74fa38e7bf27ad0a6b5ab73ad1))
|
|
7
|
+
* update query attributes ([7afd3d7](https://github.com/CoCreate-app/CoCreate-cursors/commit/7afd3d79c2a038773f59ed82bf0e82a76303487b))
|
|
8
|
+
* updated cocreate modules versions ([7db97ed](https://github.com/CoCreate-app/CoCreate-cursors/commit/7db97ed3ba4bae6efe88e6f6e6eac52cef464ec7))
|
|
9
|
+
* webpack.config and devdependencies ([9a6e1ca](https://github.com/CoCreate-app/CoCreate-cursors/commit/9a6e1ca6726667eba70969548f7232ce1a4b66c7))
|
|
10
|
+
|
|
11
|
+
## [1.24.1](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.24.0...v1.24.1) (2025-04-11)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* update observer observe param to type and and attributeName to attributeFilter ([924d448](https://github.com/CoCreate-app/CoCreate-cursors/commit/924d448b2e575cefc01aead3640f53e7095b34f0))
|
|
17
|
+
|
|
1
18
|
# [1.24.0](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.23.5...v1.24.0) (2024-11-04)
|
|
2
19
|
|
|
3
20
|
|
package/docs/index.html
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<title>CoCreate-cursor Documentation | CoCreateJS</title>
|
|
8
|
+
<link
|
|
9
|
+
rel="icon"
|
|
10
|
+
type="image/png"
|
|
11
|
+
sizes="32x32"
|
|
12
|
+
href="https://cocreate.app/images/favicon.ico" />
|
|
13
|
+
<meta
|
|
14
|
+
name="description"
|
|
15
|
+
content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable." />
|
|
16
|
+
<meta
|
|
17
|
+
name="keywords"
|
|
18
|
+
content="helper classes, utility classes, css framework, css library, inline style classes" />
|
|
19
|
+
<meta name="robots" content="index,follow" />
|
|
20
|
+
<meta
|
|
21
|
+
property="og:image"
|
|
22
|
+
content="https://cdn.cocreate.app/docs/boilerplate.png" />
|
|
23
|
+
<link
|
|
24
|
+
rel="stylesheet"
|
|
25
|
+
href="../index.css"
|
|
26
|
+
array="files"
|
|
27
|
+
object="60888216117c640e7596303f"
|
|
28
|
+
key="src"
|
|
29
|
+
type="text/css"
|
|
30
|
+
save="true" />
|
|
31
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
|
32
|
+
</head>
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
34
|
+
<body>
|
|
35
|
+
<!-- Navbar -->
|
|
36
|
+
<nav
|
|
37
|
+
class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
|
|
38
|
+
content_id="content"
|
|
39
|
+
scroll="sticky-nav,"
|
|
40
|
+
scroll-up="5"
|
|
41
|
+
scroll-down="5"
|
|
42
|
+
path="../"
|
|
43
|
+
src="../components/navbar.html"></nav>
|
|
44
|
+
<sidenav
|
|
45
|
+
id="menuL"
|
|
46
|
+
class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
|
|
47
|
+
resizable
|
|
48
|
+
resize-query="[content_id='content']"
|
|
49
|
+
resize-property="margin-left"
|
|
50
|
+
resize-value="width">
|
|
51
|
+
<menu
|
|
52
|
+
array="files"
|
|
53
|
+
object="603717b07de7fb350ae9fec8"
|
|
54
|
+
key="src"></menu>
|
|
55
|
+
<div resize="right"></div>
|
|
56
|
+
</sidenav>
|
|
57
|
+
<main
|
|
58
|
+
class="padding-top:15px padding:15px@lg@xl"
|
|
59
|
+
content_id="content"
|
|
60
|
+
id="cocreate-cursor">
|
|
61
|
+
<div
|
|
62
|
+
class="display:flex flex-wrap:wrap justify-content:space-between">
|
|
63
|
+
<div class="display:flex align-items:center">
|
|
64
|
+
<h2>CoCreate-cursor</h2>
|
|
65
|
+
</div>
|
|
66
|
+
<div
|
|
67
|
+
class="display:flex align-items:center font-size:20px"
|
|
68
|
+
share-height="600"
|
|
69
|
+
share-width="500"
|
|
70
|
+
share-media="https://via.placeholder.com/300/09f/fff.png">
|
|
71
|
+
<a
|
|
72
|
+
href="https://github.com/CoCreate-app/CoCreate-cursor"
|
|
73
|
+
target="_blank"
|
|
74
|
+
class="margin-right:15px"
|
|
75
|
+
><i src="/assets/svg/github.svg"></i
|
|
76
|
+
></a>
|
|
77
|
+
<a
|
|
78
|
+
class="margin-right:15px share"
|
|
79
|
+
share-network="twitter"
|
|
80
|
+
title="Share on twitter"
|
|
81
|
+
><i src="/assets/svg/twitter.svg"></i
|
|
82
|
+
></a>
|
|
83
|
+
<a
|
|
84
|
+
class="margin-right:15px share"
|
|
85
|
+
share-network="facebook"
|
|
86
|
+
title="Share on Facebook"
|
|
87
|
+
><i src="/assets/svg/facebook.svg"></i
|
|
88
|
+
></a>
|
|
89
|
+
<a
|
|
90
|
+
class="margin-right:15px share"
|
|
91
|
+
share-network="instagram"
|
|
92
|
+
title="Share on instagram"
|
|
93
|
+
><i src="/assets/svg/instagram.svg"></i
|
|
94
|
+
></a>
|
|
95
|
+
<a
|
|
96
|
+
class="margin-right:15px share"
|
|
97
|
+
share-network="share"
|
|
98
|
+
title="Share on share"
|
|
99
|
+
><i src="/assets/svg/share-alt.svg"></i
|
|
100
|
+
></a>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
<p class="max-width:500px margin:20px_0px">
|
|
104
|
+
A simple component of HTML5, CSS and pure JavaScript. Easy
|
|
105
|
+
configuration using data attributes and highly stylizable, whose
|
|
106
|
+
objective is to provide a shared cursor in an html element
|
|
107
|
+
(input, textarea or div [content-editable])
|
|
108
|
+
</p>
|
|
109
|
+
<div id="cursor-section" class="display:flex flex-wrap:wrap">
|
|
110
|
+
<div
|
|
111
|
+
class="flex-grow:1 width:300px padding:0px_10px margin:20px_0px">
|
|
112
|
+
<h2
|
|
113
|
+
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
|
114
|
+
Install
|
|
115
|
+
</h2>
|
|
116
|
+
<pre><code class="language-javascript">npm install cocreate-cursors</code></pre>
|
|
117
|
+
<p class="padding:10px_0px">Or you can use cdn link:</p>
|
|
118
|
+
<pre><code class="language-javascript">https://cdn.cocreate.app/CoCreate-cursors.min.js</code></pre>
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
<h2
|
|
121
|
+
class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">
|
|
122
|
+
Usage
|
|
123
|
+
</h2>
|
|
124
|
+
<div class="">
|
|
125
|
+
<p class="padding:10px_0px">This is cursor reference</p>
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
<div class="flex-grow:1 min-width:300px width:100%">
|
|
128
|
+
<pre>
|
|
129
129
|
<code>
|
|
130
130
|
<form array="module_activities" class="margin:20px">
|
|
131
131
|
<textarea
|
|
@@ -139,122 +139,122 @@
|
|
|
139
139
|
</form>
|
|
140
140
|
</code>
|
|
141
141
|
</pre>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
142
|
+
</div>
|
|
143
|
+
<p class="padding:10px_0px">This is cursor reference</p>
|
|
144
|
+
</div>
|
|
145
|
+
<h2
|
|
146
|
+
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
|
147
|
+
Attributes
|
|
148
|
+
</h2>
|
|
149
|
+
<ul class="list-style-type:none">
|
|
150
|
+
<li
|
|
151
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
152
|
+
<h4>
|
|
153
|
+
<span>-</span>
|
|
154
|
+
<span class="cocreate-badge success"
|
|
155
|
+
>string</span
|
|
156
|
+
>
|
|
157
|
+
<span class="cocreate-badge warning"
|
|
158
|
+
>optional</span
|
|
159
|
+
>
|
|
160
|
+
</h4>
|
|
161
|
+
<p>
|
|
162
|
+
It has no data attributes, the cursor starts
|
|
163
|
+
automatically for elements with realtime = true
|
|
164
|
+
</p>
|
|
165
|
+
</li>
|
|
166
|
+
</ul>
|
|
167
|
+
</div>
|
|
168
168
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
169
|
+
<div
|
|
170
|
+
class="flex-grow:1 width:300px padding:0px_10px margin:20px_0px border-bottom:1px_solid_lightgrey">
|
|
171
|
+
<!-- SandBox -->
|
|
172
|
+
<h2
|
|
173
|
+
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
|
174
|
+
Demo
|
|
175
|
+
</h2>
|
|
176
|
+
<div
|
|
177
|
+
class="position:sticky top:0 padding:15px_0px height:100vh">
|
|
178
|
+
<!-- SandBox -->
|
|
179
|
+
<div
|
|
180
|
+
class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
|
|
181
|
+
id="playground">
|
|
182
|
+
<div
|
|
183
|
+
id="demo-code"
|
|
184
|
+
resizable
|
|
185
|
+
class="position:relative height:50%">
|
|
186
|
+
<textarea
|
|
187
|
+
type="code"
|
|
188
|
+
lang="html"
|
|
189
|
+
array="demos"
|
|
190
|
+
object=""
|
|
191
|
+
key="demo"
|
|
192
|
+
save="false"
|
|
193
|
+
id="demo"
|
|
194
|
+
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
195
|
+
<div
|
|
196
|
+
resize="bottom"
|
|
197
|
+
class="background:lightgrey"></div>
|
|
198
|
+
</div>
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
<div
|
|
201
|
+
id="demo-preview"
|
|
202
|
+
class="position:relative overflow:auto background-color:white">
|
|
203
|
+
<div class="demopreview padding:20px"></div>
|
|
204
|
+
</div>
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
206
|
+
<div
|
|
207
|
+
class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
|
208
|
+
<a
|
|
209
|
+
class="margin-right:10px"
|
|
210
|
+
id="eye"
|
|
211
|
+
show="#eye-slash"
|
|
212
|
+
hide="#eye, #demo-preview"
|
|
213
|
+
toggle="code-height"
|
|
214
|
+
toggle-query="#demo-code"
|
|
215
|
+
><i
|
|
216
|
+
class="height:18px"
|
|
217
|
+
src="/assets/svg/eye.svg"></i
|
|
218
|
+
></a>
|
|
219
|
+
<a
|
|
220
|
+
class="margin-right:10px"
|
|
221
|
+
hidden
|
|
222
|
+
id="eye-slash"
|
|
223
|
+
show="#eye, #demo-preview"
|
|
224
|
+
hide="#eye-slash"
|
|
225
|
+
toggle="code-height"
|
|
226
|
+
toggle-query="#demo-code"
|
|
227
|
+
><i src="/assets/svg/eye-slash.svg"></i
|
|
228
|
+
></a>
|
|
229
|
+
<a
|
|
230
|
+
class="margin-right:10px"
|
|
231
|
+
id="code"
|
|
232
|
+
show="#code-slash"
|
|
233
|
+
hide="#code, #demo-code"
|
|
234
|
+
><i src="/assets/svg/code.svg"></i
|
|
235
|
+
></a>
|
|
236
|
+
<a
|
|
237
|
+
class="margin-right:10px"
|
|
238
|
+
hidden
|
|
239
|
+
id="code-slash"
|
|
240
|
+
show="#code, #demo-code"
|
|
241
|
+
hide="#code-slash"
|
|
242
|
+
><i
|
|
243
|
+
class="height:18px"
|
|
244
|
+
src="/assets/svg/code.svg"></i
|
|
245
|
+
></a>
|
|
246
|
+
<a
|
|
247
|
+
class="margin-right:5px"
|
|
248
|
+
fullscreen
|
|
249
|
+
fullscreen-query="#playground"></a>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
<!-- End SandBox -->
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</main>
|
|
257
257
|
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
<script src="https://CoCreate.app/dist/CoCreate.js"></script>
|
|
259
|
+
</body>
|
|
260
260
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cursors",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.2",
|
|
4
4
|
"description": "Collaborative user cursor position for inputs, textarea's and contenteditable elements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cursors",
|
|
@@ -46,25 +46,21 @@
|
|
|
46
46
|
},
|
|
47
47
|
"main": "./src/index.js",
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"clean-webpack-plugin": "^3.0.0",
|
|
53
|
-
"file-loader": "^6.2.0",
|
|
49
|
+
"css-loader": "^5.1.3",
|
|
50
|
+
"esbuild": "^0.25.2",
|
|
51
|
+
"esbuild-loader": "^4.3.0",
|
|
54
52
|
"mini-css-extract-plugin": "^1.5.0",
|
|
55
|
-
"style-loader": "^3.3.1",
|
|
56
|
-
"terser-webpack-plugin": "^5.1.1",
|
|
57
53
|
"webpack": "^5.24.4",
|
|
58
54
|
"webpack-cli": "^4.5.0",
|
|
59
55
|
"webpack-log": "^3.0.1"
|
|
60
56
|
},
|
|
61
57
|
"dependencies": {
|
|
62
|
-
"@cocreate/local-storage": "^1.
|
|
63
|
-
"@cocreate/observer": "^1.
|
|
64
|
-
"@cocreate/random-color": "^1.
|
|
65
|
-
"@cocreate/selection": "^1.
|
|
66
|
-
"@cocreate/socket-client": "^1.
|
|
67
|
-
"@cocreate/utils": "^1.
|
|
68
|
-
"@cocreate/uuid": "^1.
|
|
58
|
+
"@cocreate/local-storage": "^1.16.1",
|
|
59
|
+
"@cocreate/observer": "^1.18.0",
|
|
60
|
+
"@cocreate/random-color": "^1.12.1",
|
|
61
|
+
"@cocreate/selection": "^1.14.0",
|
|
62
|
+
"@cocreate/socket-client": "^1.40.1",
|
|
63
|
+
"@cocreate/utils": "^1.38.0",
|
|
64
|
+
"@cocreate/uuid": "^1.12.0"
|
|
69
65
|
}
|
|
70
66
|
}
|