@cocreate/resize 1.14.0 → 1.14.1

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,13 @@
1
+ ## [1.14.1](https://github.com/CoCreate-app/CoCreate-resize/compare/v1.14.0...v1.14.1) (2025-04-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added css-loader ([778f474](https://github.com/CoCreate-app/CoCreate-resize/commit/778f4747c380bf8bc55b702ae1c1be712a967f6e))
7
+ * update query attributes ([1c2c485](https://github.com/CoCreate-app/CoCreate-resize/commit/1c2c4856b6a61ec8036878fa4dbfdde408b1d0ec))
8
+ * updated cocreate modules versions ([b52c58d](https://github.com/CoCreate-app/CoCreate-resize/commit/b52c58d497dfcc721dd09c5be26343626bb1a73a))
9
+ * webpack.config and devdependencies ([f600023](https://github.com/CoCreate-app/CoCreate-resize/commit/f60002306be8e7af9b1675d823edff5192f6f22d))
10
+
1
11
  # [1.14.0](https://github.com/CoCreate-app/CoCreate-resize/compare/v1.13.1...v1.14.0) (2025-04-11)
2
12
 
3
13
 
@@ -173,7 +173,7 @@
173
173
  id="menuL"
174
174
  class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:50px width:275px:hover width:0px@xs"
175
175
  resizable
176
- resize-selector="[content_id='content']"
176
+ resize-query="[content_id='content']"
177
177
  resize-property="margin-left"
178
178
  resize-value="width">
179
179
  <!-- Search -->
@@ -205,7 +205,7 @@
205
205
  filter-query-key="main-menu-position"
206
206
  filter-query-value="0"
207
207
  filter-value-type="number"
208
- render-selector="[template]">
208
+ render-query="[template]">
209
209
  <!-- Template -->
210
210
  <li
211
211
  template
@@ -216,7 +216,7 @@
216
216
  array="files"
217
217
  object="{{object.main-menu-primary}}"
218
218
  key="path"
219
- input-selector="#a{{object._id}}"
219
+ input-query="#a{{object._id}}"
220
220
  input-key="primary-url" />
221
221
  <a
222
222
  actions="state, openModal"
@@ -266,7 +266,7 @@
266
266
  array="files"
267
267
  object="{{object.main-menu-secondary}}"
268
268
  key="path"
269
- input-selector="#a{{object._id}}"
269
+ input-query="#a{{object._id}}"
270
270
  input-key="secondary-url" />
271
271
  <a
272
272
  actions="state, openModal"
@@ -394,7 +394,7 @@
394
394
  dnd-group-key="dashboard"
395
395
  array="files"
396
396
  filter-limit="20"
397
- render-selector="[template]"
397
+ render-query="[template]"
398
398
  droppable="true">
399
399
  <div
400
400
  template
package/docs/index.html CHANGED
@@ -1,341 +1,341 @@
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>CoCreate-resize 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 light weight resize handler make any element resizable by adding data attributes or usinng init object. Great for Customized text box or text area."
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/resize.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>CoCreate-resize 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 light weight resize handler make any element resizable by adding data attributes or usinng init object. Great for Customized text box or text area." />
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/resize.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="cocreate-resize"
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>CoCreate-resize</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="A light weight resize handler make any element resizable by adding data attributes or usinng init object. Great for Customized text box or text area."
80
- share-title="CoCreate-resize"
81
- share-height="600"
82
- share-width="700"
83
- share-media="https://cdn.cocreate.app/docs/resize.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/CoCreate-resize"
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 light weight resize handler make any element resizable by adding data
126
- attributes or usinng init object. Great for Customized text box or text
127
- area.
128
- </h1>
129
- <div id="resize-section" class="display:flex flex-wrap:wrap">
130
- <div
131
- class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px"
132
- >
133
- <div
134
- id="resize-install"
135
- class="border-bottom:1px_solid_lightgrey"
136
- scroll
137
- scroll-intersect="color:dodgerblue"
138
- scroll-selector="#resize-install-section"
139
- >
140
- <span
141
- class="display:flex align-items:center width:fit-content"
142
- hover="display:block!important"
143
- hover-selector="[href='#resize-install']"
144
- >
145
- <h2 class="padding:5px_0px">Install</h2>
146
- <a class="margin-left:10px display:none" href="#resize-install"
147
- ><i src="/assets/svg/link.svg"></i
148
- ></a>
149
- </span>
150
- </div>
151
- <pre
152
- class="margin-top:15px"
153
- ><code class="language-bash">npm i @cocreate/resize</code></pre>
154
- <p class="padding:10px_0px line-height:1.5">
155
- Or you can use cdn link:
156
- </p>
157
- <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/resize/latest/CoCreate-resize.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="cocreate-resize">
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>CoCreate-resize</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="A light weight resize handler make any element resizable by adding data attributes or usinng init object. Great for Customized text box or text area."
73
+ share-title="CoCreate-resize"
74
+ share-height="600"
75
+ share-width="700"
76
+ share-media="https://cdn.cocreate.app/docs/resize.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/CoCreate-resize"
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 light weight resize handler make any element resizable by
117
+ adding data attributes or usinng init object. Great for
118
+ Customized text box or text area.
119
+ </h1>
120
+ <div id="resize-section" class="display:flex flex-wrap:wrap">
121
+ <div
122
+ class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
123
+ <div
124
+ id="resize-install"
125
+ class="border-bottom:1px_solid_lightgrey"
126
+ scroll
127
+ scroll-intersect="color:dodgerblue"
128
+ scroll-query="#resize-install-section">
129
+ <span
130
+ class="display:flex align-items:center width:fit-content"
131
+ hover="display:block!important"
132
+ hover-query="[href='#resize-install']">
133
+ <h2 class="padding:5px_0px">Install</h2>
134
+ <a
135
+ class="margin-left:10px display:none"
136
+ href="#resize-install"
137
+ ><i src="/assets/svg/link.svg"></i
138
+ ></a>
139
+ </span>
140
+ </div>
141
+ <pre
142
+ class="margin-top:15px"><code class="language-bash">npm i @cocreate/resize</code></pre>
143
+ <p class="padding:10px_0px line-height:1.5">
144
+ Or you can use cdn link:
145
+ </p>
146
+ <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/resize/latest/CoCreate-resize.min.js&lt;/script&gt;</code></pre>
158
147
 
159
- <p class="padding:10px_0px line-height:1.5">resize usage content</p>
160
- <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
148
+ <p class="padding:10px_0px line-height:1.5">
149
+ resize usage content
150
+ </p>
151
+ <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
161
152
 
162
- <div
163
- id="resize-usage"
164
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
165
- scroll
166
- scroll-intersect="color:dodgerblue"
167
- scroll-selector="#resize-usage-section"
168
- >
169
- <span
170
- class="display:flex align-items:center width:fit-content"
171
- hover="display:block!important"
172
- hover-selector="[href='#resize-usage']"
173
- >
174
- <h2 class="padding:5px_0px">Usage</h2>
175
- <a class="margin-left:10px display:none" href="#resize-usage"
176
- ><i src="/assets/svg/link.svg"></i
177
- ></a>
178
- </span>
179
- </div>
180
- <p class="padding:10px_0px line-height:1.5">
181
- This is resize usage content
182
- </p>
183
- <pre><code class="language-javascript">&lt;div&gt;&lt;/div&gt;</code></pre>
184
- <p class="padding:10px_0px line-height:1.5">
185
- This is resize usage content
186
- </p>
153
+ <div
154
+ id="resize-usage"
155
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
156
+ scroll
157
+ scroll-intersect="color:dodgerblue"
158
+ scroll-query="#resize-usage-section">
159
+ <span
160
+ class="display:flex align-items:center width:fit-content"
161
+ hover="display:block!important"
162
+ hover-query="[href='#resize-usage']">
163
+ <h2 class="padding:5px_0px">Usage</h2>
164
+ <a
165
+ class="margin-left:10px display:none"
166
+ href="#resize-usage"
167
+ ><i src="/assets/svg/link.svg"></i
168
+ ></a>
169
+ </span>
170
+ </div>
171
+ <p class="padding:10px_0px line-height:1.5">
172
+ This is resize usage content
173
+ </p>
174
+ <pre><code class="language-javascript">&lt;div&gt;&lt;/div&gt;</code></pre>
175
+ <p class="padding:10px_0px line-height:1.5">
176
+ This is resize usage content
177
+ </p>
187
178
 
188
- <div
189
- id="resize-attributes"
190
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
191
- scroll
192
- scroll-intersect="color:dodgerblue"
193
- scroll-selector="#resize-attributes-section"
194
- >
195
- <span
196
- class="display:flex align-items:center width:fit-content"
197
- hover="display:block!important"
198
- hover-selector="[href='#resize-attributes']"
199
- >
200
- <h2 class="padding:5px_0px">Attributes</h2>
201
- <a class="margin-left:10px display:none" href="#resize-attributes"
202
- ><i src="/assets/svg/link.svg"></i
203
- ></a>
204
- </span>
205
- </div>
206
- <ul class="list-style-type:none">
207
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
208
- <h4>
209
- <span>resize</span>
210
- <span class="cocreate-badge success">string</span>
211
- <span class="cocreate-badge warning">optional</span>
212
- </h4>
213
- <p>resize-attribute</p>
214
- </li>
215
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
216
- <h4>
217
- <span>resize</span>
218
- <span class="cocreate-badge success">string</span>
219
- <span class="cocreate-badge warning">optional</span>
220
- </h4>
221
- <p>resize-attribute</p>
222
- </li>
223
- </ul>
224
- </div>
179
+ <div
180
+ id="resize-attributes"
181
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
182
+ scroll
183
+ scroll-intersect="color:dodgerblue"
184
+ scroll-query="#resize-attributes-section">
185
+ <span
186
+ class="display:flex align-items:center width:fit-content"
187
+ hover="display:block!important"
188
+ hover-query="[href='#resize-attributes']">
189
+ <h2 class="padding:5px_0px">Attributes</h2>
190
+ <a
191
+ class="margin-left:10px display:none"
192
+ href="#resize-attributes"
193
+ ><i src="/assets/svg/link.svg"></i
194
+ ></a>
195
+ </span>
196
+ </div>
197
+ <ul class="list-style-type:none">
198
+ <li
199
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
200
+ <h4>
201
+ <span>resize</span>
202
+ <span class="cocreate-badge success"
203
+ >string</span
204
+ >
205
+ <span class="cocreate-badge warning"
206
+ >optional</span
207
+ >
208
+ </h4>
209
+ <p>resize-attribute</p>
210
+ </li>
211
+ <li
212
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
213
+ <h4>
214
+ <span>resize</span>
215
+ <span class="cocreate-badge success"
216
+ >string</span
217
+ >
218
+ <span class="cocreate-badge warning"
219
+ >optional</span
220
+ >
221
+ </h4>
222
+ <p>resize-attribute</p>
223
+ </li>
224
+ </ul>
225
+ </div>
225
226
 
226
- <div
227
- class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey"
228
- >
229
- <!-- SandBox -->
230
- <div
231
- id="resize-demo"
232
- class="border-bottom:1px_solid_lightgrey"
233
- scroll
234
- scroll-intersect="color:dodgerblue"
235
- scroll-selector="#resize-demo-section"
236
- >
237
- <span
238
- class="display:flex align-items:center width:fit-content"
239
- hover="display:block!important"
240
- hover-selector="[href='#resize-demo']"
241
- >
242
- <h2 class="padding:5px_0px">Demo</h2>
243
- <a class="margin-left:10px display:none" href="#resize-demo"
244
- ><i src="/assets/svg/link.svg"></i
245
- ></a>
246
- </span>
247
- </div>
248
- <div class="position:sticky top:0 padding:10px_0px height:100vh">
249
- <!-- SandBox -->
250
- <div
251
- class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
252
- id="playground"
253
- >
254
- <div
255
- id="demo-code"
256
- resizable
257
- class="position:relative height:50%"
258
- >
259
- <textarea
260
- type="code"
261
- lang="html"
262
- array="demos"
263
- object=""
264
- key="demo"
265
- save="false"
266
- id="demo"
267
- input-selector=".demopreview"
268
- input-attribute="value"
269
- input-events="input, onload"
270
- class="height:100% width:100% outline:none border:none resize:none padding:5px"
271
- ></textarea>
272
- <div resize="bottom" class="background:lightgrey"></div>
273
- </div>
227
+ <div
228
+ class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
229
+ <!-- SandBox -->
230
+ <div
231
+ id="resize-demo"
232
+ class="border-bottom:1px_solid_lightgrey"
233
+ scroll
234
+ scroll-intersect="color:dodgerblue"
235
+ scroll-query="#resize-demo-section">
236
+ <span
237
+ class="display:flex align-items:center width:fit-content"
238
+ hover="display:block!important"
239
+ hover-query="[href='#resize-demo']">
240
+ <h2 class="padding:5px_0px">Demo</h2>
241
+ <a
242
+ class="margin-left:10px display:none"
243
+ href="#resize-demo"
244
+ ><i src="/assets/svg/link.svg"></i
245
+ ></a>
246
+ </span>
247
+ </div>
248
+ <div
249
+ class="position:sticky top:0 padding:10px_0px height:100vh">
250
+ <!-- SandBox -->
251
+ <div
252
+ class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
253
+ id="playground">
254
+ <div
255
+ id="demo-code"
256
+ resizable
257
+ class="position:relative height:50%">
258
+ <textarea
259
+ type="code"
260
+ lang="html"
261
+ array="demos"
262
+ object=""
263
+ key="demo"
264
+ save="false"
265
+ id="demo"
266
+ input-query=".demopreview"
267
+ input-attribute="value"
268
+ input-events="input, onload"
269
+ class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
270
+ <div
271
+ resize="bottom"
272
+ class="background:lightgrey"></div>
273
+ </div>
274
274
 
275
- <div
276
- id="demo-preview"
277
- class="position:relative overflow:auto background-color:white"
278
- >
279
- <div class="demopreview padding:20px"></div>
280
- </div>
275
+ <div
276
+ id="demo-preview"
277
+ class="position:relative overflow:auto background-color:white">
278
+ <div class="demopreview padding:20px"></div>
279
+ </div>
281
280
 
282
- <div
283
- class="font-size:20px position:absolute top:10px right:10px opacity:0.6"
284
- >
285
- <a
286
- class="margin-right:10px"
287
- id="eye"
288
- show="#eye-slash"
289
- hide="#eye, #demo-preview"
290
- toggle="code-height"
291
- toggle-selector="#demo-code"
292
- ><i class="height:18px" src="/assets/svg/eye.svg"></i
293
- ></a>
294
- <a
295
- class="margin-right:10px"
296
- hidden
297
- id="eye-slash"
298
- show="#eye, #demo-preview"
299
- hide="#eye-slash"
300
- toggle="code-height"
301
- toggle-selector="#demo-code"
302
- ><i src="/assets/svg/eye-slash.svg"></i
303
- ></a>
304
- <a
305
- class="margin-right:10px"
306
- id="code"
307
- show="#code-slash"
308
- hide="#code, #demo-code"
309
- ><i src="/assets/svg/code.svg"></i
310
- ></a>
311
- <a
312
- class="margin-right:10px"
313
- hidden
314
- id="code-slash"
315
- show="#code, #demo-code"
316
- hide="#code-slash"
317
- ><i class="height:18px" src="/assets/svg/code.svg"></i
318
- ></a>
319
- <a
320
- class="margin-right:5px"
321
- fullscreen
322
- fullscreen-selector="#playground"
323
- ></a>
324
- </div>
325
- </div>
326
- <!-- End SandBox -->
327
- </div>
328
- </div>
329
- </div>
330
- <button
331
- href="https://github.com/CoCreate-app/CoCreate-resize/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
332
- target="_blank"
333
- 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)"
334
- >
335
- <i src="../assets/svg/pencil-alt.svg"></i>
336
- </button>
337
- </main>
281
+ <div
282
+ class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
283
+ <a
284
+ class="margin-right:10px"
285
+ id="eye"
286
+ show="#eye-slash"
287
+ hide="#eye, #demo-preview"
288
+ toggle="code-height"
289
+ toggle-query="#demo-code"
290
+ ><i
291
+ class="height:18px"
292
+ src="/assets/svg/eye.svg"></i
293
+ ></a>
294
+ <a
295
+ class="margin-right:10px"
296
+ hidden
297
+ id="eye-slash"
298
+ show="#eye, #demo-preview"
299
+ hide="#eye-slash"
300
+ toggle="code-height"
301
+ toggle-query="#demo-code"
302
+ ><i src="/assets/svg/eye-slash.svg"></i
303
+ ></a>
304
+ <a
305
+ class="margin-right:10px"
306
+ id="code"
307
+ show="#code-slash"
308
+ hide="#code, #demo-code"
309
+ ><i src="/assets/svg/code.svg"></i
310
+ ></a>
311
+ <a
312
+ class="margin-right:10px"
313
+ hidden
314
+ id="code-slash"
315
+ show="#code, #demo-code"
316
+ hide="#code-slash"
317
+ ><i
318
+ class="height:18px"
319
+ src="/assets/svg/code.svg"></i
320
+ ></a>
321
+ <a
322
+ class="margin-right:5px"
323
+ fullscreen
324
+ fullscreen-query="#playground"></a>
325
+ </div>
326
+ </div>
327
+ <!-- End SandBox -->
328
+ </div>
329
+ </div>
330
+ </div>
331
+ <button
332
+ href="https://github.com/CoCreate-app/CoCreate-resize/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
333
+ target="_blank"
334
+ 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)">
335
+ <i src="../assets/svg/pencil-alt.svg"></i>
336
+ </button>
337
+ </main>
338
338
 
339
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
340
- </body>
339
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
340
+ </body>
341
341
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/resize",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "A light weight resize handler make any element resizable by adding data attributes or usinng init object. Great for Customized text box or text area.",
5
5
  "keywords": [
6
6
  "resize",
@@ -45,19 +45,15 @@
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.3.9",
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"
57
+ "@cocreate/observer": "^1.18.0"
62
58
  }
63
59
  }
package/webpack.config.js CHANGED
@@ -1,83 +1,65 @@
1
- const path = require("path")
2
- const TerserPlugin = require("terser-webpack-plugin")
3
- const MiniCssExtractPlugin = require("mini-css-extract-plugin")
4
- let isProduction = process.env.NODE_ENV === "production"
5
- const { CleanWebpackPlugin } = require("clean-webpack-plugin")
6
-
7
- module.exports = {
8
- entry: {
9
- "CoCreate-resize": "./src/index.js",
10
- },
11
- output: {
12
- path: path.resolve(__dirname, "dist"),
13
- filename: isProduction ? "[name].min.js" : "[name].js",
14
- libraryTarget: "umd",
15
- libraryExport: "default",
16
- library: "CoCreateResize",
17
- globalObject: "this",
18
- },
19
-
20
- plugins: [
21
- new CleanWebpackPlugin(),
22
- new MiniCssExtractPlugin({
23
- filename: "[name].css",
24
- }),
25
- ],
26
- // Default mode for Webpack is production.
27
- // Depending on mode Webpack will apply different things
28
- // on final bundle. For now we don't need production's JavaScript
29
- // minifying and other thing so let's set mode to development
30
- mode: isProduction ? "production" : "development",
31
- module: {
32
- rules: [{
33
- test: /.js$/,
34
- exclude: /(node_modules)/,
35
- use: {
36
- loader: "babel-loader",
37
- options: {
38
- plugins: ["@babel/plugin-transform-modules-commonjs"],
39
- },
40
- },
41
- },
42
- {
43
- test: /.css$/i,
44
- use: [
45
- { loader: "style-loader", options: { injectType: "linkTag" } },
46
- "file-loader",
47
- ],
48
- },
49
- ],
50
- },
51
-
52
- // add source map
53
- ...(isProduction ? {} : { devtool: "eval-source-map" }),
54
-
55
- optimization: {
56
- minimize: true,
57
- minimizer: [
58
- new TerserPlugin({
59
- extractComments: true,
60
- // cache: true,
61
- parallel: true,
62
- // sourceMap: true, // Must be set to true if using source-maps in production
63
- terserOptions: {
64
- // https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
65
- // extractComments: 'all',
66
- compress: {
67
- drop_console: true,
68
- },
69
- },
70
- }),
71
- ],
72
- splitChunks: {
73
- chunks: "all",
74
- minSize: 200,
75
- // maxSize: 99999,
76
- //minChunks: 1,
77
-
78
- cacheGroups: {
79
- defaultVendors: false,
80
- },
81
- },
82
- },
83
- }
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-resize": "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", "resize"],
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
+ };