@cocreate/scroll 1.13.1 → 1.13.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,20 @@
1
+ ## [1.13.3](https://github.com/CoCreate-app/CoCreate-scroll/compare/v1.13.2...v1.13.3) (2025-05-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update [@cocreate](https://github.com/cocreate) dependencies ([6e9e160](https://github.com/CoCreate-app/CoCreate-scroll/commit/6e9e1602133c73b5eac9d28dd5c16f545abd25f6))
7
+
8
+ ## [1.13.2](https://github.com/CoCreate-app/CoCreate-scroll/compare/v1.13.1...v1.13.2) (2025-04-30)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * added css-loader ([6eaf058](https://github.com/CoCreate-app/CoCreate-scroll/commit/6eaf058ae9360abfbec5057677ea2a990e28a95c))
14
+ * update query attributes ([880d5cd](https://github.com/CoCreate-app/CoCreate-scroll/commit/880d5cd9dc803eed53b671a27c6d6f7224d262a0))
15
+ * updated cocreate modules versions ([a8a0123](https://github.com/CoCreate-app/CoCreate-scroll/commit/a8a0123495ef8636753b343e06ce28b750be871a))
16
+ * webpack.config and devdependencies ([97fa1b1](https://github.com/CoCreate-app/CoCreate-scroll/commit/97fa1b15aaf2d2dd9c4d5d9827611978cf19e9c0))
17
+
1
18
  ## [1.13.1](https://github.com/CoCreate-app/CoCreate-scroll/compare/v1.13.0...v1.13.1) (2025-04-11)
2
19
 
3
20
 
package/docs/index.html CHANGED
@@ -1,379 +1,409 @@
1
1
  <!DOCTYPE html>
2
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>overflow:auto Documentation | CoCreateJS</title>
8
- <link
9
- rel="icon"
10
- type="image/png"
11
- sizes="32x32"
12
- href="https://cocreate.app/images/favicon.ico"
13
- />
14
- <meta
15
- name="description"
16
- content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable."
17
- />
18
- <meta
19
- name="keywords"
20
- content="helper classes, utility classes, css framework, css library, inline style classes"
21
- />
22
- <meta name="robots" content="index,follow" />
23
- <meta
24
- property="og:image"
25
- content="https://cdn.cocreate.app/docs/scroll.png"
26
- />
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>overflow:auto 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/scroll.png" />
27
23
 
28
- <link
29
- rel="stylesheet"
30
- href="../index.css"
31
- array="files"
32
- object="60888216117c640e7596303f"
33
- key="src"
34
- type="text/css"
35
- save="true"
36
- />
37
- <link rel="manifest" href="/manifest.webmanifest" />
38
- </head>
24
+ <link
25
+ rel="stylesheet"
26
+ href="../index.css"
27
+ array="files"
28
+ object="60888216117c640e7596303f"
29
+ key="src"
30
+ type="text/css"
31
+ save="true" />
32
+ <link rel="manifest" href="/manifest.webmanifest" />
33
+ </head>
39
34
 
40
- <body>
41
- <!-- Navbar -->
42
- <nav
43
- class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
44
- content_id="content"
45
- scroll="sticky-nav,"
46
- scroll-up="5"
47
- scroll-down="5"
48
- path="../"
49
- src="../components/navbar.html"
50
- ></nav>
51
- <sidenav
52
- id="menuL"
53
- class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
54
- resizable
55
- resize-selector="[content_id='content']"
56
- resize-property="margin-left"
57
- resize-value="width"
58
- >
59
- <menu array="files" object="603717b07de7fb350ae9fec8" key="src"></menu>
60
- <div resize="right"></div>
61
- </sidenav>
62
- <main
63
- class="padding-top:15px padding:15px@lg@xl"
64
- content_id="content"
65
- id="overflow:auto"
66
- >
67
- <div
68
- class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px"
69
- >
70
- <div class="display:flex align-items:center">
71
- <h2>overflow:auto</h2>
72
- </div>
73
- <div
74
- class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white"
75
- >
76
- <div
77
- class="display:flex align-items:center transition:0.3s padding-left:10px"
78
- share-network="true"
79
- share-text="Enter decription here"
80
- share-title="testing im a title"
81
- share-height="600"
82
- share-width="700"
83
- share-media="https://cdn.cocreate.app/docs/scroll.png"
84
- hover="display:block!important"
85
- hover-selector=".social-networks"
86
- >
87
- <div class="display:none social-networks">
88
- <a
89
- class="margin-right:15px"
90
- share-network="twitter"
91
- title="Share on twitter"
92
- ><i src="/assets/svg/twitter.svg"></i
93
- ></a>
94
- <a
95
- class="margin-right:15px"
96
- share-network="facebook"
97
- title="Share on Facebook"
98
- ><i src="/assets/svg/facebook.svg"></i
99
- ></a>
100
- <a
101
- class="margin-right:15px"
102
- share-network="instagram"
103
- title="Share on instagram"
104
- ><i src="/assets/svg/instagram.svg"></i
105
- ></a>
106
- </div>
107
- <a
108
- class="margin-right:15px"
109
- share-network="share"
110
- title="Share on share"
111
- ><i src="/assets/svg/share-alt.svg"></i
112
- ></a>
113
- </div>
114
- <a
115
- href="https://github.com/CoCreate-app/overflow:auto"
116
- target="_blank"
117
- class="margin-right:15px"
118
- ><i src="/assets/svg/github.svg"></i
119
- ></a>
120
- </div>
121
- </div>
122
- <h1
123
- class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100"
124
- >
125
- A headless vinilla javascript micro component. Easy configuration using
126
- HTML5 attributes or Javscript api.
127
- </h1>
128
- <div id="scroll-section" class="display:flex flex-wrap:wrap">
129
- <div
130
- class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px"
131
- >
132
- <div
133
- id="scroll-install"
134
- class="border-bottom:1px_solid_lightgrey"
135
- scroll
136
- scroll-intersect="color:dodgerblue"
137
- scroll-selector="#scroll-install-section"
138
- >
139
- <span
140
- class="display:flex align-items:center width:fit-content"
141
- hover="display:block!important"
142
- hover-selector="[href='#scroll-install']"
143
- >
144
- <h2 class="padding:5px_0px">Install</h2>
145
- <a class="margin-left:10px display:none" href="#scroll-install"
146
- ><i src="/assets/svg/link.svg"></i
147
- ></a>
148
- </span>
149
- </div>
150
- <pre><code class="language-bash">npm i @cocreate/scroll</code></pre>
151
- <p class="padding:10px_0px line-height:1.5">
152
- Or you can use cdn link:
153
- </p>
154
- <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/scroll/latest/overflow:auto.min.js&lt;/script&gt;</code></pre>
35
+ <body>
36
+ <!-- Navbar -->
37
+ <nav
38
+ class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
39
+ content_id="content"
40
+ scroll="sticky-nav,"
41
+ scroll-up="5"
42
+ scroll-down="5"
43
+ path="../"
44
+ src="../components/navbar.html"></nav>
45
+ <sidenav
46
+ id="menuL"
47
+ class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
48
+ resizable
49
+ resize-query="[content_id='content']"
50
+ resize-property="margin-left"
51
+ resize-value="width">
52
+ <menu
53
+ array="files"
54
+ object="603717b07de7fb350ae9fec8"
55
+ key="src"></menu>
56
+ <div resize="right"></div>
57
+ </sidenav>
58
+ <main
59
+ class="padding-top:15px padding:15px@lg@xl"
60
+ content_id="content"
61
+ id="overflow:auto">
62
+ <div
63
+ class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
64
+ <div class="display:flex align-items:center">
65
+ <h2>overflow:auto</h2>
66
+ </div>
67
+ <div
68
+ class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
69
+ <div
70
+ class="display:flex align-items:center transition:0.3s padding-left:10px"
71
+ share-network="true"
72
+ share-text="Enter decription here"
73
+ share-title="testing im a title"
74
+ share-height="600"
75
+ share-width="700"
76
+ share-media="https://cdn.cocreate.app/docs/scroll.png"
77
+ hover="display:block!important"
78
+ hover-query=".social-networks">
79
+ <div class="display:none social-networks">
80
+ <a
81
+ class="margin-right:15px"
82
+ share-network="twitter"
83
+ title="Share on twitter"
84
+ ><i src="/assets/svg/twitter.svg"></i
85
+ ></a>
86
+ <a
87
+ class="margin-right:15px"
88
+ share-network="facebook"
89
+ title="Share on Facebook"
90
+ ><i src="/assets/svg/facebook.svg"></i
91
+ ></a>
92
+ <a
93
+ class="margin-right:15px"
94
+ share-network="instagram"
95
+ title="Share on instagram"
96
+ ><i src="/assets/svg/instagram.svg"></i
97
+ ></a>
98
+ </div>
99
+ <a
100
+ class="margin-right:15px"
101
+ share-network="share"
102
+ title="Share on share"
103
+ ><i src="/assets/svg/share-alt.svg"></i
104
+ ></a>
105
+ </div>
106
+ <a
107
+ href="https://github.com/CoCreate-app/overflow:auto"
108
+ target="_blank"
109
+ class="margin-right:15px"
110
+ ><i src="/assets/svg/github.svg"></i
111
+ ></a>
112
+ </div>
113
+ </div>
114
+ <h1
115
+ class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
116
+ A headless vinilla javascript micro component. Easy
117
+ configuration using HTML5 attributes or Javscript api.
118
+ </h1>
119
+ <div id="scroll-section" class="display:flex flex-wrap:wrap">
120
+ <div
121
+ class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
122
+ <div
123
+ id="scroll-install"
124
+ class="border-bottom:1px_solid_lightgrey"
125
+ scroll
126
+ scroll-intersect="color:dodgerblue"
127
+ scroll-query="#scroll-install-section">
128
+ <span
129
+ class="display:flex align-items:center width:fit-content"
130
+ hover="display:block!important"
131
+ hover-query="[href='#scroll-install']">
132
+ <h2 class="padding:5px_0px">Install</h2>
133
+ <a
134
+ class="margin-left:10px display:none"
135
+ href="#scroll-install"
136
+ ><i src="/assets/svg/link.svg"></i
137
+ ></a>
138
+ </span>
139
+ </div>
140
+ <pre><code class="language-bash">npm i @cocreate/scroll</code></pre>
141
+ <p class="padding:10px_0px line-height:1.5">
142
+ Or you can use cdn link:
143
+ </p>
144
+ <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/scroll/latest/overflow:auto.min.js&lt;/script&gt;</code></pre>
155
145
 
156
- <div
157
- id="scroll-usage"
158
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
159
- scroll
160
- scroll-intersect="color:dodgerblue"
161
- scroll-selector="#scroll-usage-section"
162
- >
163
- <span
164
- class="display:flex align-items:center width:fit-content"
165
- hover="display:block!important"
166
- hover-selector="[href='#scroll-usage']"
167
- >
168
- <h2 class="padding:5px_0px">Usage</h2>
169
- <a class="margin-left:10px display:none" href="#scroll-usage"
170
- ><i src="/assets/svg/link.svg"></i
171
- ></a>
172
- </span>
173
- </div>
174
- <div class="">
175
- <p class="padding:10px_0px line-height:1.5">This is scroll usage</p>
146
+ <div
147
+ id="scroll-usage"
148
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
149
+ scroll
150
+ scroll-intersect="color:dodgerblue"
151
+ scroll-query="#scroll-usage-section">
152
+ <span
153
+ class="display:flex align-items:center width:fit-content"
154
+ hover="display:block!important"
155
+ hover-query="[href='#scroll-usage']">
156
+ <h2 class="padding:5px_0px">Usage</h2>
157
+ <a
158
+ class="margin-left:10px display:none"
159
+ href="#scroll-usage"
160
+ ><i src="/assets/svg/link.svg"></i
161
+ ></a>
162
+ </span>
163
+ </div>
164
+ <div class="">
165
+ <p class="padding:10px_0px line-height:1.5">
166
+ This is scroll usage
167
+ </p>
176
168
 
177
- <div class="flex-grow:1 min-width:300px width:100%">
178
- <pre>
169
+ <div class="flex-grow:1 min-width:300px width:100%">
170
+ <pre>
179
171
  <code class="language-html">
180
172
  &lt;div scroll-up_class="up" scroll-down_class="down" scroll-ing_class="scrolling" scroll-range_class="range" scroll-range_begin="1000" scroll-range_end="1500" scroll-intersect="intersect"&gt;</code>
181
173
  </pre>
182
- </div>
183
- <p class="padding:10px_0px line-height:1.5">This is scroll usage</p>
184
- <p class="padding:10px_0px line-height:1.5">This is scroll usage</p>
185
- </div>
186
- <div
187
- id="scroll-attributes"
188
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
189
- scroll
190
- scroll-intersect="color:dodgerblue"
191
- scroll-selector="#scroll-attributes-section"
192
- >
193
- <span
194
- class="display:flex align-items:center width:fit-content"
195
- hover="display:block!important"
196
- hover-selector="[href='#scroll-attributes']"
197
- >
198
- <h2 class="padding:5px_0px">Attributes</h2>
199
- <a class="margin-left:10px display:none" href="#scroll-attributes"
200
- ><i src="/assets/svg/link.svg"></i
201
- ></a>
202
- </span>
203
- </div>
204
- <ul class="list-style-type:none">
205
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
206
- <h4>
207
- <span>scroll-up_class</span>
208
- <span class="cocreate-badge success">string</span>
209
- <span class="cocreate-badge warning">optional</span>
210
- </h4>
211
- <p>Scroll-Up-Class</p>
212
- </li>
213
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
214
- <h4>
215
- <span>scroll-down_class</span>
216
- <span class="cocreate-badge success">string</span>
217
- <span class="cocreate-badge warning">optional</span>
218
- </h4>
219
- <p>Scroll-Down-Class</p>
220
- </li>
221
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
222
- <h4>
223
- <span>scroll-ing_class</span>
224
- <span class="cocreate-badge success">string</span>
225
- <span class="cocreate-badge warning">optional</span>
226
- </h4>
227
- <p>Scroll-Range-Class</p>
228
- </li>
229
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
230
- <h4>
231
- <span>scroll-range_class</span>
232
- <span class="cocreate-badge success">string</span>
233
- <span class="cocreate-badge warning">optional</span>
234
- </h4>
235
- <p>Scroll-Range-Class</p>
236
- </li>
237
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
238
- <h4>
239
- <span>scroll-range_begin</span>
240
- <span class="cocreate-badge success">number</span>
241
- <span class="cocreate-badge warning">optional</span>
242
- </h4>
243
- <p>Scroll-Range-Begin</p>
244
- </li>
245
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
246
- <h4>
247
- <span>scroll-range_end</span>
248
- <span class="cocreate-badge success">number</span>
249
- <span class="cocreate-badge warning">optional</span>
250
- </h4>
251
- <p>Scroll-Range-End</p>
252
- </li>
253
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
254
- <h4>
255
- <span>scroll-intersect</span>
256
- <span class="cocreate-badge success">string</span>
257
- <span class="cocreate-badge warning">optional</span>
258
- </h4>
259
- <p>Scroll-Intersect</p>
260
- </li>
261
- </ul>
262
- </div>
174
+ </div>
175
+ <p class="padding:10px_0px line-height:1.5">
176
+ This is scroll usage
177
+ </p>
178
+ <p class="padding:10px_0px line-height:1.5">
179
+ This is scroll usage
180
+ </p>
181
+ </div>
182
+ <div
183
+ id="scroll-attributes"
184
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
185
+ scroll
186
+ scroll-intersect="color:dodgerblue"
187
+ scroll-query="#scroll-attributes-section">
188
+ <span
189
+ class="display:flex align-items:center width:fit-content"
190
+ hover="display:block!important"
191
+ hover-query="[href='#scroll-attributes']">
192
+ <h2 class="padding:5px_0px">Attributes</h2>
193
+ <a
194
+ class="margin-left:10px display:none"
195
+ href="#scroll-attributes"
196
+ ><i src="/assets/svg/link.svg"></i
197
+ ></a>
198
+ </span>
199
+ </div>
200
+ <ul class="list-style-type:none">
201
+ <li
202
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
203
+ <h4>
204
+ <span>scroll-up_class</span>
205
+ <span class="cocreate-badge success"
206
+ >string</span
207
+ >
208
+ <span class="cocreate-badge warning"
209
+ >optional</span
210
+ >
211
+ </h4>
212
+ <p>Scroll-Up-Class</p>
213
+ </li>
214
+ <li
215
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
216
+ <h4>
217
+ <span>scroll-down_class</span>
218
+ <span class="cocreate-badge success"
219
+ >string</span
220
+ >
221
+ <span class="cocreate-badge warning"
222
+ >optional</span
223
+ >
224
+ </h4>
225
+ <p>Scroll-Down-Class</p>
226
+ </li>
227
+ <li
228
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
229
+ <h4>
230
+ <span>scroll-ing_class</span>
231
+ <span class="cocreate-badge success"
232
+ >string</span
233
+ >
234
+ <span class="cocreate-badge warning"
235
+ >optional</span
236
+ >
237
+ </h4>
238
+ <p>Scroll-Range-Class</p>
239
+ </li>
240
+ <li
241
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
242
+ <h4>
243
+ <span>scroll-range_class</span>
244
+ <span class="cocreate-badge success"
245
+ >string</span
246
+ >
247
+ <span class="cocreate-badge warning"
248
+ >optional</span
249
+ >
250
+ </h4>
251
+ <p>Scroll-Range-Class</p>
252
+ </li>
253
+ <li
254
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
255
+ <h4>
256
+ <span>scroll-range_begin</span>
257
+ <span class="cocreate-badge success"
258
+ >number</span
259
+ >
260
+ <span class="cocreate-badge warning"
261
+ >optional</span
262
+ >
263
+ </h4>
264
+ <p>Scroll-Range-Begin</p>
265
+ </li>
266
+ <li
267
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
268
+ <h4>
269
+ <span>scroll-range_end</span>
270
+ <span class="cocreate-badge success"
271
+ >number</span
272
+ >
273
+ <span class="cocreate-badge warning"
274
+ >optional</span
275
+ >
276
+ </h4>
277
+ <p>Scroll-Range-End</p>
278
+ </li>
279
+ <li
280
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
281
+ <h4>
282
+ <span>scroll-intersect</span>
283
+ <span class="cocreate-badge success"
284
+ >string</span
285
+ >
286
+ <span class="cocreate-badge warning"
287
+ >optional</span
288
+ >
289
+ </h4>
290
+ <p>Scroll-Intersect</p>
291
+ </li>
292
+ </ul>
293
+ </div>
263
294
 
264
- <div
265
- class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey"
266
- >
267
- <!-- SandBox -->
268
- <div
269
- id="scroll-demo"
270
- class="border-bottom:1px_solid_lightgrey"
271
- scroll
272
- scroll-intersect="color:dodgerblue"
273
- scroll-selector="#scroll-demo-section"
274
- >
275
- <span
276
- class="display:flex align-items:center width:fit-content"
277
- hover="display:block!important"
278
- hover-selector="[href='#scroll-demo']"
279
- >
280
- <h2 class="padding:5px_0px">Demo</h2>
281
- <a class="margin-left:10px display:none" href="#scroll-demo"
282
- ><i src="/assets/svg/link.svg"></i
283
- ></a>
284
- </span>
285
- </div>
286
- <div class="position:sticky top:0 padding:15px_0px height:100vh">
287
- <!-- SandBox -->
288
- <div
289
- class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
290
- id="playground"
291
- >
292
- <div
293
- id="demo-code"
294
- resizable
295
- class="position:relative height:50%"
296
- >
297
- <textarea
298
- type="code"
299
- lang="html"
300
- array="demos"
301
- object=""
302
- key="demo"
303
- save="false"
304
- id="demo"
305
- input-selector=".demopreview"
306
- input-attribute="value"
307
- input-events="input, onload"
308
- class="height:100% width:100% outline:none border:none resize:none padding:5px"
309
- ></textarea>
310
- <div resize="bottom" class="background:lightgrey"></div>
311
- </div>
295
+ <div
296
+ class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
297
+ <!-- SandBox -->
298
+ <div
299
+ id="scroll-demo"
300
+ class="border-bottom:1px_solid_lightgrey"
301
+ scroll
302
+ scroll-intersect="color:dodgerblue"
303
+ scroll-query="#scroll-demo-section">
304
+ <span
305
+ class="display:flex align-items:center width:fit-content"
306
+ hover="display:block!important"
307
+ hover-query="[href='#scroll-demo']">
308
+ <h2 class="padding:5px_0px">Demo</h2>
309
+ <a
310
+ class="margin-left:10px display:none"
311
+ href="#scroll-demo"
312
+ ><i src="/assets/svg/link.svg"></i
313
+ ></a>
314
+ </span>
315
+ </div>
316
+ <div
317
+ class="position:sticky top:0 padding:15px_0px height:100vh">
318
+ <!-- SandBox -->
319
+ <div
320
+ class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
321
+ id="playground">
322
+ <div
323
+ id="demo-code"
324
+ resizable
325
+ class="position:relative height:50%">
326
+ <textarea
327
+ type="code"
328
+ lang="html"
329
+ array="demos"
330
+ object=""
331
+ key="demo"
332
+ save="false"
333
+ id="demo"
334
+ input-query=".demopreview"
335
+ input-attribute="value"
336
+ input-events="input, onload"
337
+ class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
338
+ <div
339
+ resize="bottom"
340
+ class="background:lightgrey"></div>
341
+ </div>
312
342
 
313
- <div
314
- id="demo-preview"
315
- class="position:relative overflow:auto background-color:white"
316
- >
317
- <div class="demopreview padding:20px"></div>
318
- </div>
343
+ <div
344
+ id="demo-preview"
345
+ class="position:relative overflow:auto background-color:white">
346
+ <div class="demopreview padding:20px"></div>
347
+ </div>
319
348
 
320
- <div
321
- class="font-size:20px position:absolute top:10px right:10px opacity:0.6"
322
- >
323
- <a
324
- class="margin-right:10px"
325
- id="eye"
326
- show="#eye-slash"
327
- hide="#eye, #demo-preview"
328
- toggle="code-height"
329
- toggle-selector="#demo-code"
330
- ><i class="height:18px" src="/assets/svg/eye.svg"></i
331
- ></a>
332
- <a
333
- class="margin-right:10px"
334
- hidden
335
- id="eye-slash"
336
- show="#eye, #demo-preview"
337
- hide="#eye-slash"
338
- toggle="code-height"
339
- toggle-selector="#demo-code"
340
- ><i src="/assets/svg/eye-slash.svg"></i
341
- ></a>
342
- <a
343
- class="margin-right:10px"
344
- id="code"
345
- show="#code-slash"
346
- hide="#code, #demo-code"
347
- ><i src="/assets/svg/code.svg"></i
348
- ></a>
349
- <a
350
- class="margin-right:10px"
351
- hidden
352
- id="code-slash"
353
- show="#code, #demo-code"
354
- hide="#code-slash"
355
- ><i class="height:18px" src="/assets/svg/code.svg"></i
356
- ></a>
357
- <a
358
- class="margin-right:5px"
359
- fullscreen
360
- fullscreen-selector="#playground"
361
- ></a>
362
- </div>
363
- </div>
364
- <!-- End SandBox -->
365
- </div>
366
- </div>
367
- </div>
368
- <button
369
- href="https://github.com/CoCreate-app/overflow:auto/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
370
- target="_blank"
371
- class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)"
372
- >
373
- <i src="../assets/svg/pencil-alt.svg"></i>
374
- </button>
375
- </main>
349
+ <div
350
+ class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
351
+ <a
352
+ class="margin-right:10px"
353
+ id="eye"
354
+ show="#eye-slash"
355
+ hide="#eye, #demo-preview"
356
+ toggle="code-height"
357
+ toggle-query="#demo-code"
358
+ ><i
359
+ class="height:18px"
360
+ src="/assets/svg/eye.svg"></i
361
+ ></a>
362
+ <a
363
+ class="margin-right:10px"
364
+ hidden
365
+ id="eye-slash"
366
+ show="#eye, #demo-preview"
367
+ hide="#eye-slash"
368
+ toggle="code-height"
369
+ toggle-query="#demo-code"
370
+ ><i src="/assets/svg/eye-slash.svg"></i
371
+ ></a>
372
+ <a
373
+ class="margin-right:10px"
374
+ id="code"
375
+ show="#code-slash"
376
+ hide="#code, #demo-code"
377
+ ><i src="/assets/svg/code.svg"></i
378
+ ></a>
379
+ <a
380
+ class="margin-right:10px"
381
+ hidden
382
+ id="code-slash"
383
+ show="#code, #demo-code"
384
+ hide="#code-slash"
385
+ ><i
386
+ class="height:18px"
387
+ src="/assets/svg/code.svg"></i
388
+ ></a>
389
+ <a
390
+ class="margin-right:5px"
391
+ fullscreen
392
+ fullscreen-query="#playground"></a>
393
+ </div>
394
+ </div>
395
+ <!-- End SandBox -->
396
+ </div>
397
+ </div>
398
+ </div>
399
+ <button
400
+ href="https://github.com/CoCreate-app/overflow:auto/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
401
+ target="_blank"
402
+ class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
403
+ <i src="../assets/svg/pencil-alt.svg"></i>
404
+ </button>
405
+ </main>
376
406
 
377
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
378
- </body>
407
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
408
+ </body>
379
409
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/scroll",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "A simple scroll component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "scroll",
@@ -45,20 +45,16 @@
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "devDependencies": {
48
- "@babel/core": "^7.9.6",
49
- "@babel/preset-env": "^7.9.6",
50
- "babel-loader": "^8.1.0",
51
- "clean-webpack-plugin": "^3.0.0",
52
- "file-loader": "^6.2.0",
48
+ "css-loader": "^5.1.3",
49
+ "esbuild": "^0.25.2",
50
+ "esbuild-loader": "^4.3.0",
53
51
  "mini-css-extract-plugin": "^1.5.0",
54
- "style-loader": "^3.3.1",
55
- "terser-webpack-plugin": "^5.1.1",
56
52
  "webpack": "^5.24.4",
57
53
  "webpack-cli": "^4.5.0",
58
54
  "webpack-log": "^3.0.1"
59
55
  },
60
56
  "dependencies": {
61
- "@cocreate/observer": "^1.16.1",
62
- "@cocreate/actions": "^1.19.1"
57
+ "@cocreate/observer": "^1.18.1",
58
+ "@cocreate/actions": "^1.21.1"
63
59
  }
64
60
  }
package/src/index.js CHANGED
@@ -24,7 +24,7 @@ const CoCreateScroll = {
24
24
  const upSize = this.__getSize(element.getAttribute("scroll-up"));
25
25
  const downSize = this.__getSize(element.getAttribute("scroll-down"));
26
26
  const attrName = element.getAttribute("scroll-attribute") || "class";
27
- const targetSelector = element.getAttribute("scroll-selector");
27
+ const targetSelector = element.getAttribute("scroll-query");
28
28
  const scrollSelector = element.getAttribute("scroll-element");
29
29
  const intersectValue = element.getAttribute("scroll-intersect");
30
30
  const scrollTo = element.getAttribute("scroll-to");
@@ -145,7 +145,7 @@ const CoCreateScroll = {
145
145
  let element = entry.target;
146
146
  const attrName =
147
147
  element.getAttribute("scroll-attribute") || "class";
148
- const targetSelector = element.getAttribute("scroll-selector");
148
+ const targetSelector = element.getAttribute("scroll-query");
149
149
  const intersectValue = element.getAttribute("scroll-intersect");
150
150
 
151
151
  let targetElements = [element];
package/webpack.config.js CHANGED
@@ -1,90 +1,65 @@
1
- const path = require("path")
2
- const TerserPlugin = require("terser-webpack-plugin")
3
- const MiniCssExtractPlugin = require("mini-css-extract-plugin")
4
- const { CleanWebpackPlugin } = require("clean-webpack-plugin")
5
-
6
- module.exports = (env, argv) => {
7
- let isProduction = false
8
- if (argv.mode === 'production')
9
- isProduction = true
10
-
11
- const config = {
12
- entry: {
13
- "CoCreate-scroll": "./src/index.js",
14
- },
15
- output: {
16
- path: path.resolve(__dirname, "dist"),
17
- filename: isProduction ? "[name].min.js" : "[name].js",
18
- libraryTarget: "umd",
19
- libraryExport: "default",
20
- library: ["CoCreate", "scroll"],
21
- globalObject: "this",
22
- },
23
-
24
- plugins: [
25
- new CleanWebpackPlugin(),
26
- new MiniCssExtractPlugin({
27
- filename: "[name].css",
28
- }),
29
- ],
30
- // Default mode for Webpack is production.
31
- // Depending on mode Webpack will apply different things
32
- // on final bundle. For now we don't need production's JavaScript
33
- // minifying and other thing so let's set mode to development
34
- mode: isProduction ? "production" : "development",
35
- module: {
36
- rules: [
37
- {
38
- test: /.js$/,
39
- exclude: /(node_modules)/,
40
- use: {
41
- loader: "babel-loader",
42
- options: {
43
- plugins: ["@babel/plugin-transform-modules-commonjs"],
44
- },
45
- },
46
- },
47
- {
48
- test: /.css$/i,
49
- use: [
50
- { loader: "style-loader", options: { injectType: "linkTag" } },
51
- "file-loader",
52
- ],
53
- },
54
- ],
55
- },
56
-
57
- // add source map
58
- ...(isProduction ? {} : { devtool: "eval-source-map" }),
59
-
60
- optimization: {
61
- minimize: true,
62
- minimizer: [
63
- new TerserPlugin({
64
- extractComments: true,
65
- // cache: true,
66
- parallel: true,
67
- // sourceMap: true, // Must be set to true if using source-maps in production
68
- terserOptions: {
69
- // https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
70
- // extractComments: 'all',
71
- compress: {
72
- drop_console: true,
73
- },
74
- },
75
- }),
76
- ],
77
- splitChunks: {
78
- chunks: "all",
79
- minSize: 200,
80
- // maxSize: 99999,
81
- //minChunks: 1,
82
-
83
- cacheGroups: {
84
- defaultVendors: false,
85
- },
86
- },
87
- },
88
- }
89
- return config
90
- }
1
+ const path = require("path");
2
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3
+ const { EsbuildPlugin } = require("esbuild-loader");
4
+ const { FileUploader } = require("@cocreate/webpack");
5
+
6
+ module.exports = async (env, argv) => {
7
+ const isProduction = argv && argv.mode === "production";
8
+ const config = {
9
+ entry: {
10
+ "CoCreate-scroll": "./src/index.js"
11
+ },
12
+ output: {
13
+ path: path.resolve(__dirname, "dist"),
14
+ filename: isProduction ? "[name].min.js" : "[name].js",
15
+ libraryExport: "default",
16
+ library: ["CoCreate", "scroll"],
17
+ clean: true
18
+ },
19
+ plugins: [
20
+ new MiniCssExtractPlugin({
21
+ filename: isProduction ? "[name].min.css" : "[name].css"
22
+ }),
23
+ new FileUploader(env, argv)
24
+ ],
25
+ mode: isProduction ? "production" : "development",
26
+ devtool: isProduction ? "source-map" : "eval-source-map",
27
+ module: {
28
+ rules: [
29
+ {
30
+ test: /.js$/,
31
+ exclude: /node_modules/,
32
+ use: {
33
+ loader: "esbuild-loader",
34
+ options: {
35
+ loader: "js",
36
+ target: "es2017"
37
+ }
38
+ }
39
+ },
40
+ {
41
+ test: /.css$/i,
42
+ use: [MiniCssExtractPlugin.loader, "css-loader"]
43
+ }
44
+ ]
45
+ },
46
+ optimization: {
47
+ minimize: isProduction,
48
+ minimizer: [
49
+ new EsbuildPlugin({
50
+ target: "es2017",
51
+ css: true
52
+ })
53
+ ],
54
+ splitChunks: {
55
+ cacheGroups: {
56
+ defaultVendors: false
57
+ }
58
+ }
59
+ },
60
+ performance: {
61
+ hints: isProduction ? "warning" : false
62
+ }
63
+ };
64
+ return config;
65
+ };