@cocreate/utils 1.20.10 → 1.21.0
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/.github/FUNDING.yml +3 -3
- package/.github/workflows/automated.yml +95 -95
- package/.github/workflows/manual.yml +44 -44
- package/CHANGELOG.md +1489 -1470
- package/CoCreate.config.js +26 -26
- package/LICENSE +21 -21
- package/README.md +85 -85
- package/demo/index.html +23 -18
- package/docs/index.html +361 -138
- package/package.json +64 -64
- package/release.config.js +21 -21
- package/src/archive.js +495 -495
- package/src/index.js +13 -13
- package/src/utils.js +606 -608
- package/webpack.config.js +84 -84
package/docs/index.html
CHANGED
|
@@ -1,138 +1,361 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
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-utils Documentation | CoCreateJS
|
|
8
|
-
<link
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
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-utils 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/utils.png" />
|
|
23
|
+
|
|
24
|
+
<!-- CoCreate CSS -->
|
|
25
|
+
<link
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
href="https://cdn.cocreate.app/latest/CoCreate.min.css"
|
|
28
|
+
type="text/css" />
|
|
29
|
+
<link
|
|
30
|
+
rel="stylesheet"
|
|
31
|
+
href="/docs/index.css"
|
|
32
|
+
collection="files"
|
|
33
|
+
document_id="60888216117c640e7596303f"
|
|
34
|
+
name="src"
|
|
35
|
+
type="text/css"
|
|
36
|
+
save="true" />
|
|
37
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
|
38
|
+
</head>
|
|
39
|
+
|
|
40
|
+
<body>
|
|
41
|
+
<nav
|
|
42
|
+
class="nav display:flex align-items:center left:0px background:whitesmoke padding-top:10px padding-bottom:10px"
|
|
43
|
+
content_id="content"
|
|
44
|
+
scroll="sticky-nav,hide-nav"
|
|
45
|
+
scroll-up="10"
|
|
46
|
+
scroll-down="10"
|
|
47
|
+
collection="files"
|
|
48
|
+
document_id="60395ef42b3ac232657040fd"
|
|
49
|
+
name="src"></nav>
|
|
50
|
+
<sidenav
|
|
51
|
+
id="menuL"
|
|
52
|
+
class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
|
|
53
|
+
resizable
|
|
54
|
+
resize-target="[content_id='content']"
|
|
55
|
+
resize-property="margin-left"
|
|
56
|
+
resize-value="width">
|
|
57
|
+
<menu
|
|
58
|
+
collection="files"
|
|
59
|
+
document_id="603717b07de7fb350ae9fec8"
|
|
60
|
+
name="src"></menu>
|
|
61
|
+
<div resize="right"></div>
|
|
62
|
+
</sidenav>
|
|
63
|
+
<main
|
|
64
|
+
class="padding-top:15px padding:15px@lg@xl"
|
|
65
|
+
content_id="content"
|
|
66
|
+
id="cocreate-utils">
|
|
67
|
+
<div
|
|
68
|
+
class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
|
|
69
|
+
<div class="display:flex align-items:center">
|
|
70
|
+
<h2>CoCreate-utils</h2>
|
|
71
|
+
</div>
|
|
72
|
+
<div
|
|
73
|
+
class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
|
|
74
|
+
<div
|
|
75
|
+
class="display:flex align-items:center transition:0.3s padding-left:10px"
|
|
76
|
+
share-network="true"
|
|
77
|
+
share-text="Enter decription here"
|
|
78
|
+
share-title="testing im a title"
|
|
79
|
+
share-height="600"
|
|
80
|
+
share-width="700"
|
|
81
|
+
share-media="https://cdn.cocreate.app/docs/utils.png"
|
|
82
|
+
hover="display:block!important"
|
|
83
|
+
hover-target=".social-networks">
|
|
84
|
+
<div class="display:none social-networks">
|
|
85
|
+
<a
|
|
86
|
+
class="margin-right:15px"
|
|
87
|
+
share-network="twitter"
|
|
88
|
+
title="Share on twitter"
|
|
89
|
+
><i
|
|
90
|
+
class="height:20px fill:#505050"
|
|
91
|
+
src="/assets/svg/twitter.svg"></i
|
|
92
|
+
></a>
|
|
93
|
+
<a
|
|
94
|
+
class="margin-right:15px"
|
|
95
|
+
share-network="facebook"
|
|
96
|
+
title="Share on Facebook"
|
|
97
|
+
><i
|
|
98
|
+
class="height:20px fill:#505050"
|
|
99
|
+
src="/assets/svg/facebook.svg"></i
|
|
100
|
+
></a>
|
|
101
|
+
<a
|
|
102
|
+
class="margin-right:15px"
|
|
103
|
+
share-network="instagram"
|
|
104
|
+
title="Share on instagram"
|
|
105
|
+
><i
|
|
106
|
+
class="height:20px fill:#505050"
|
|
107
|
+
src="/assets/svg/instagram.svg"></i
|
|
108
|
+
></a>
|
|
109
|
+
</div>
|
|
110
|
+
<a
|
|
111
|
+
class="margin-right:15px"
|
|
112
|
+
share-network="share"
|
|
113
|
+
title="Share on share"
|
|
114
|
+
><i
|
|
115
|
+
class="height:20px fill:#505050"
|
|
116
|
+
src="/assets/svg/share-alt.svg"></i
|
|
117
|
+
></a>
|
|
118
|
+
</div>
|
|
119
|
+
<a
|
|
120
|
+
href="https://github.com/CoCreate-app/CoCreate-utils"
|
|
121
|
+
target="_blank"
|
|
122
|
+
class="margin-right:15px"
|
|
123
|
+
><i
|
|
124
|
+
class="height:20px fill:#505050"
|
|
125
|
+
src="/assets/svg/github.svg"></i
|
|
126
|
+
></a>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<h1
|
|
130
|
+
class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
|
|
131
|
+
A headless vinilla javascript micro component. Easy
|
|
132
|
+
configuration using HTML5 attributes or Javscript api.
|
|
133
|
+
</h1>
|
|
134
|
+
<div id="utils-section" class="display:flex flex-wrap:wrap">
|
|
135
|
+
<div
|
|
136
|
+
class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
|
|
137
|
+
<div
|
|
138
|
+
id="utils-install"
|
|
139
|
+
class="border-bottom:1px_solid_lightgrey"
|
|
140
|
+
scroll
|
|
141
|
+
scroll-intersect="color:dodgerblue"
|
|
142
|
+
scroll-target="#utils-install-section">
|
|
143
|
+
<span
|
|
144
|
+
class="display:flex align-items:center width:fit-content"
|
|
145
|
+
hover="display:block!important"
|
|
146
|
+
hover-target="[href='#utils-install']">
|
|
147
|
+
<h2 class="padding:5px_0px">Install</h2>
|
|
148
|
+
<a
|
|
149
|
+
class="margin-left:10px display:none"
|
|
150
|
+
href="#utils-install"
|
|
151
|
+
><i
|
|
152
|
+
class="height:20px fill:#505050"
|
|
153
|
+
src="/assets/svg/link.svg"></i
|
|
154
|
+
></a>
|
|
155
|
+
</span>
|
|
156
|
+
</div>
|
|
157
|
+
<pre
|
|
158
|
+
class="margin-top:15px"><code class="language-bash">npm i @cocreate/utils</code></pre>
|
|
159
|
+
<p class="padding:10px_0px line-height:1.5">
|
|
160
|
+
Or you can use cdn link:
|
|
161
|
+
</p>
|
|
162
|
+
<pre><code class="language-html"><script>https://cdn.cocreate.app/utils/latest/CoCreate-utils.min.js</script></code></pre>
|
|
163
|
+
|
|
164
|
+
<div
|
|
165
|
+
id="utils-usage"
|
|
166
|
+
class="margin-top:80px border-bottom:1px_solid_lightgrey"
|
|
167
|
+
scroll
|
|
168
|
+
scroll-intersect="color:dodgerblue"
|
|
169
|
+
scroll-target="#utils-usage-section">
|
|
170
|
+
<span
|
|
171
|
+
class="display:flex align-items:center width:fit-content"
|
|
172
|
+
hover="display:block!important"
|
|
173
|
+
hover-target="[href='#utils-usage']">
|
|
174
|
+
<h2 class="padding:5px_0px">Usage</h2>
|
|
175
|
+
<a
|
|
176
|
+
class="margin-left:10px display:none"
|
|
177
|
+
href="#utils-usage"
|
|
178
|
+
><i
|
|
179
|
+
class="height:20px fill:#505050"
|
|
180
|
+
src="/assets/svg/link.svg"></i
|
|
181
|
+
></a>
|
|
182
|
+
</span>
|
|
183
|
+
</div>
|
|
184
|
+
<p class="padding:10px_0px line-height:1.5">
|
|
185
|
+
utils usage content
|
|
186
|
+
</p>
|
|
187
|
+
<pre><code class="language-html"><div></div></code></pre>
|
|
188
|
+
|
|
189
|
+
<div
|
|
190
|
+
id="utils-attributes"
|
|
191
|
+
class="margin-top:80px border-bottom:1px_solid_lightgrey"
|
|
192
|
+
scroll
|
|
193
|
+
scroll-intersect="color:dodgerblue"
|
|
194
|
+
scroll-target="#utils-attributes-section">
|
|
195
|
+
<span
|
|
196
|
+
class="display:flex align-items:center width:fit-content"
|
|
197
|
+
hover="display:block!important"
|
|
198
|
+
hover-target="[href='#utils-attributes']">
|
|
199
|
+
<h2 class="padding:5px_0px">Attributes</h2>
|
|
200
|
+
<a
|
|
201
|
+
class="margin-left:10px display:none"
|
|
202
|
+
href="#utils-attributes"
|
|
203
|
+
><i
|
|
204
|
+
class="height:20px fill:#505050"
|
|
205
|
+
src="/assets/svg/link.svg"></i
|
|
206
|
+
></a>
|
|
207
|
+
</span>
|
|
208
|
+
</div>
|
|
209
|
+
<ul class="list-style-type:none">
|
|
210
|
+
<li
|
|
211
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
212
|
+
<h4>
|
|
213
|
+
<span>utils</span>
|
|
214
|
+
<span class="cocreate-badge success"
|
|
215
|
+
>string</span
|
|
216
|
+
>
|
|
217
|
+
<span class="cocreate-badge warning"
|
|
218
|
+
>optional</span
|
|
219
|
+
>
|
|
220
|
+
</h4>
|
|
221
|
+
<p>utils-attribute</p>
|
|
222
|
+
</li>
|
|
223
|
+
<li
|
|
224
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
225
|
+
<h4>
|
|
226
|
+
<span>utils</span>
|
|
227
|
+
<span class="cocreate-badge success"
|
|
228
|
+
>string</span
|
|
229
|
+
>
|
|
230
|
+
<span class="cocreate-badge warning"
|
|
231
|
+
>optional</span
|
|
232
|
+
>
|
|
233
|
+
</h4>
|
|
234
|
+
<p>utils-attribute</p>
|
|
235
|
+
</li>
|
|
236
|
+
</ul>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<div
|
|
240
|
+
class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
|
|
241
|
+
<!-- SandBox -->
|
|
242
|
+
<div
|
|
243
|
+
id="utils-demo"
|
|
244
|
+
class="border-bottom:1px_solid_lightgrey"
|
|
245
|
+
scroll
|
|
246
|
+
scroll-intersect="color:dodgerblue"
|
|
247
|
+
scroll-target="#utils-demo-section">
|
|
248
|
+
<span
|
|
249
|
+
class="display:flex align-items:center width:fit-content"
|
|
250
|
+
hover="display:block!important"
|
|
251
|
+
hover-target="[href='#utils-demo']">
|
|
252
|
+
<h2 class="padding:5px_0px">Demo</h2>
|
|
253
|
+
<a
|
|
254
|
+
class="margin-left:10px display:none"
|
|
255
|
+
href="#utils-demo"
|
|
256
|
+
><i
|
|
257
|
+
class="height:20px fill:#505050"
|
|
258
|
+
src="/assets/svg/link.svg"></i
|
|
259
|
+
></a>
|
|
260
|
+
</span>
|
|
261
|
+
</div>
|
|
262
|
+
<div
|
|
263
|
+
class="position:sticky top:0 padding:10px_0px height:100vh">
|
|
264
|
+
<!-- SandBox -->
|
|
265
|
+
<div
|
|
266
|
+
class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
|
|
267
|
+
id="playground">
|
|
268
|
+
<div
|
|
269
|
+
id="demo-code"
|
|
270
|
+
resizable
|
|
271
|
+
class="position:relative height:50%">
|
|
272
|
+
<textarea
|
|
273
|
+
type="code"
|
|
274
|
+
lang="html"
|
|
275
|
+
collection="demos"
|
|
276
|
+
document_id=""
|
|
277
|
+
name="demo"
|
|
278
|
+
save="false"
|
|
279
|
+
id="demo"
|
|
280
|
+
input-target=".demopreview"
|
|
281
|
+
input-attribute="value"
|
|
282
|
+
input-events="input, onload"
|
|
283
|
+
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
284
|
+
<div
|
|
285
|
+
resize="bottom"
|
|
286
|
+
class="background:lightgrey"></div>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<div
|
|
290
|
+
id="demo-preview"
|
|
291
|
+
class="position:relative overflow:auto background-color:white">
|
|
292
|
+
<div class="demopreview padding:20px"></div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<div
|
|
296
|
+
class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
|
297
|
+
<a
|
|
298
|
+
class="margin-right:10px"
|
|
299
|
+
id="eye"
|
|
300
|
+
show="#eye-slash"
|
|
301
|
+
hide="#eye, #demo-preview"
|
|
302
|
+
toggle="code-height"
|
|
303
|
+
toggle-target="#demo-code"
|
|
304
|
+
><i
|
|
305
|
+
class="height:18px fill:#505050"
|
|
306
|
+
src="/assets/svg/eye.svg"></i
|
|
307
|
+
></a>
|
|
308
|
+
<a
|
|
309
|
+
class="margin-right:10px"
|
|
310
|
+
hidden
|
|
311
|
+
id="eye-slash"
|
|
312
|
+
show="#eye, #demo-preview"
|
|
313
|
+
hide="#eye-slash"
|
|
314
|
+
toggle="code-height"
|
|
315
|
+
toggle-target="#demo-code"
|
|
316
|
+
><i
|
|
317
|
+
class="height:20px fill:#505050"
|
|
318
|
+
src="/assets/svg/eye-slash.svg"></i
|
|
319
|
+
></a>
|
|
320
|
+
<a
|
|
321
|
+
class="margin-right:10px"
|
|
322
|
+
id="code"
|
|
323
|
+
show="#code-slash"
|
|
324
|
+
hide="#code, #demo-code"
|
|
325
|
+
><i
|
|
326
|
+
class="height:20px fill:#505050"
|
|
327
|
+
src="/assets/svg/code.svg"></i
|
|
328
|
+
></a>
|
|
329
|
+
<a
|
|
330
|
+
class="margin-right:10px"
|
|
331
|
+
hidden
|
|
332
|
+
id="code-slash"
|
|
333
|
+
show="#code, #demo-code"
|
|
334
|
+
hide="#code-slash"
|
|
335
|
+
><i
|
|
336
|
+
class="display:flex height:18px fill:#505050"
|
|
337
|
+
src="/assets/svg/code.svg"></i
|
|
338
|
+
></a>
|
|
339
|
+
<a
|
|
340
|
+
class="margin-right:5px"
|
|
341
|
+
fullscreen
|
|
342
|
+
fullscreen-target="#playground"></a>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
<!-- End SandBox -->
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
<button
|
|
350
|
+
href="https://github.com/CoCreate-app/CoCreate-utils/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
|
|
351
|
+
target="_blank"
|
|
352
|
+
class="position:fixed bottom:15px right:15px padding:15px background:dodgerblue color:#fff font-size:1.5rem grow-hover border-radius:50% border-width:0 box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
|
|
353
|
+
<i
|
|
354
|
+
class="height:20px fill:#505050"
|
|
355
|
+
src="/assets/svg/pencil-alt.svg"></i>
|
|
356
|
+
</button>
|
|
357
|
+
</main>
|
|
358
|
+
<script src="./apikey.js"></script>
|
|
359
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
|
360
|
+
</body>
|
|
361
|
+
</html>
|