@cocreate/position 1.10.1 → 1.10.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 +10 -0
- package/docs/index.html +418 -371
- package/package.json +5 -9
- package/webpack.config.js +65 -90
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [1.10.2](https://github.com/CoCreate-app/CoCreate-position/compare/v1.10.1...v1.10.2) (2025-04-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added css-loader ([5cf2da4](https://github.com/CoCreate-app/CoCreate-position/commit/5cf2da4489c73173fb3d28cb36f36630a4aabb59))
|
|
7
|
+
* update query attributes ([a4e968f](https://github.com/CoCreate-app/CoCreate-position/commit/a4e968fcc0f29d8eeeafc6a9c90c3b7bd59a4c4d))
|
|
8
|
+
* updated cocreate modules versions ([e10a63e](https://github.com/CoCreate-app/CoCreate-position/commit/e10a63e457b1a9fa222ee11f792504cbcfe84041))
|
|
9
|
+
* webpack.config and devdependencies ([3620c99](https://github.com/CoCreate-app/CoCreate-position/commit/3620c9963f79819ec42b2d936279bf1671970cb4))
|
|
10
|
+
|
|
1
11
|
## [1.10.1](https://github.com/CoCreate-app/CoCreate-position/compare/v1.10.0...v1.10.1) (2025-04-11)
|
|
2
12
|
|
|
3
13
|
|
package/docs/index.html
CHANGED
|
@@ -1,162 +1,153 @@
|
|
|
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
|
-
<meta
|
|
24
|
-
property="og:image"
|
|
25
|
-
content="https://cdn.cocreate.app/docs/position.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-position 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 draggable, customizable Pop up that toggle hiddent content via attributes. Great for multitasking and showing multiple views." />
|
|
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/position.png" />
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</p>
|
|
154
|
-
<p class="padding-top:15px">
|
|
155
|
-
When you click <a> tag, position comes to the surface.
|
|
156
|
-
</p>
|
|
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-position">
|
|
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-position</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 draggable, customizable Pop up that toggle hiddent content via attributes. Great for multitasking and showing multiple views."
|
|
73
|
+
share-title="CoCreate-position"
|
|
74
|
+
share-height="600"
|
|
75
|
+
share-width="700"
|
|
76
|
+
share-media="https://cdn.cocreate.app/docs/position.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-position"
|
|
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 draggable, customizable Pop up that toggle hiddent content via
|
|
117
|
+
attributes. Great for multitasking and showing multiple views.
|
|
118
|
+
</h1>
|
|
119
|
+
<div id="xxxxx-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="position-usage"
|
|
124
|
+
class="margin-top:80px border-bottom:1px_solid_lightgrey"
|
|
125
|
+
scroll
|
|
126
|
+
scroll-intersect="color:dodgerblue"
|
|
127
|
+
scroll-query="#position-usage-section">
|
|
128
|
+
<span
|
|
129
|
+
class="display:flex align-items:center width:fit-content"
|
|
130
|
+
hover="display:block!important"
|
|
131
|
+
hover-query="[href='#position-usage']">
|
|
132
|
+
<h2 class="padding:5px_0px">Usage</h2>
|
|
133
|
+
<a
|
|
134
|
+
class="margin-left:10px display:none"
|
|
135
|
+
href="#position-usage"
|
|
136
|
+
><i src="/assets/svg/link.svg"></i
|
|
137
|
+
></a>
|
|
138
|
+
</span>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="">
|
|
141
|
+
<p class="padding-top:15px">
|
|
142
|
+
CoCreate-position uses <a> tag.
|
|
143
|
+
</p>
|
|
144
|
+
<p class="padding-top:15px">
|
|
145
|
+
When you click <a> tag, position comes to the
|
|
146
|
+
surface.
|
|
147
|
+
</p>
|
|
157
148
|
|
|
158
|
-
|
|
159
|
-
|
|
149
|
+
<div class="flex-grow:1 min-width:300px width:100%">
|
|
150
|
+
<pre>
|
|
160
151
|
<code class="language-html">
|
|
161
152
|
<button>
|
|
162
153
|
<a target="position" href="https://server.cocreate.app/CoCreate-adminUI/module_datatable.html"
|
|
@@ -173,225 +164,281 @@
|
|
|
173
164
|
</button>
|
|
174
165
|
</code>
|
|
175
166
|
</pre>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
<div
|
|
170
|
+
id="position-attributes"
|
|
171
|
+
class="margin-top:80px border-bottom:1px_solid_lightgrey"
|
|
172
|
+
scroll
|
|
173
|
+
scroll-intersect="color:dodgerblue"
|
|
174
|
+
scroll-query="#position-attributes-section">
|
|
175
|
+
<span
|
|
176
|
+
class="display:flex align-items:center width:fit-content"
|
|
177
|
+
hover="display:block!important"
|
|
178
|
+
hover-query="[href='#position-attributes']">
|
|
179
|
+
<h2 class="padding:5px_0px">Attributes</h2>
|
|
180
|
+
<a
|
|
181
|
+
class="margin-left:10px display:none"
|
|
182
|
+
href="#position-attributes"
|
|
183
|
+
><i src="/assets/svg/link.svg"></i
|
|
184
|
+
></a>
|
|
185
|
+
</span>
|
|
186
|
+
</div>
|
|
187
|
+
<ul class="list-style-type:none">
|
|
188
|
+
<li
|
|
189
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
190
|
+
<h4>
|
|
191
|
+
<span>target</span>
|
|
192
|
+
<span class="cocreate-badge success"
|
|
193
|
+
>string</span
|
|
194
|
+
>
|
|
195
|
+
<span class="cocreate-badge danger"
|
|
196
|
+
>required</span
|
|
197
|
+
>
|
|
198
|
+
</h4>
|
|
199
|
+
<p>Target must be "position".</p>
|
|
200
|
+
</li>
|
|
201
|
+
<li
|
|
202
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
203
|
+
<h4>
|
|
204
|
+
<span>href</span>
|
|
205
|
+
<span class="cocreate-badge success"
|
|
206
|
+
>string</span
|
|
207
|
+
>
|
|
208
|
+
<span class="cocreate-badge danger"
|
|
209
|
+
>required</span
|
|
210
|
+
>
|
|
211
|
+
</h4>
|
|
212
|
+
<p>
|
|
213
|
+
Href attribute indicates html file to set in
|
|
214
|
+
position.
|
|
215
|
+
</p>
|
|
216
|
+
</li>
|
|
217
|
+
<li
|
|
218
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
219
|
+
<h4>
|
|
220
|
+
<span>position-ajax</span>
|
|
221
|
+
<span class="cocreate-badge success"
|
|
222
|
+
>boolean</span
|
|
223
|
+
>
|
|
224
|
+
<span class="cocreate-badge warning"
|
|
225
|
+
>optional</span
|
|
226
|
+
>
|
|
227
|
+
</h4>
|
|
228
|
+
<p>Attribute whether to use ajax or not.</p>
|
|
229
|
+
</li>
|
|
230
|
+
<li
|
|
231
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
232
|
+
<h4>
|
|
233
|
+
<span>position-width</span>
|
|
234
|
+
<span class="cocreate-badge success"
|
|
235
|
+
>string</span
|
|
236
|
+
>
|
|
237
|
+
<span class="cocreate-badge warning"
|
|
238
|
+
>optional</span
|
|
239
|
+
>
|
|
240
|
+
</h4>
|
|
241
|
+
<p>
|
|
242
|
+
Width of position. Unit can be pixel or percent.
|
|
243
|
+
</p>
|
|
244
|
+
</li>
|
|
245
|
+
<li
|
|
246
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
247
|
+
<h4>
|
|
248
|
+
<span>position-height</span>
|
|
249
|
+
<span class="cocreate-badge success"
|
|
250
|
+
>string</span
|
|
251
|
+
>
|
|
252
|
+
<span class="cocreate-badge warning"
|
|
253
|
+
>optional</span
|
|
254
|
+
>
|
|
255
|
+
</h4>
|
|
256
|
+
<p>
|
|
257
|
+
Height of position. Unit can be pixel or
|
|
258
|
+
percent.
|
|
259
|
+
</p>
|
|
260
|
+
</li>
|
|
261
|
+
<li
|
|
262
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
263
|
+
<h4>
|
|
264
|
+
<span>position-color</span>
|
|
265
|
+
<span class="cocreate-badge success"
|
|
266
|
+
>color</span
|
|
267
|
+
>
|
|
268
|
+
<span class="cocreate-badge warning"
|
|
269
|
+
>optional</span
|
|
270
|
+
>
|
|
271
|
+
</h4>
|
|
272
|
+
<p>Color of position border.</p>
|
|
273
|
+
</li>
|
|
274
|
+
<li
|
|
275
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
276
|
+
<h4>
|
|
277
|
+
<span>position-header</span>
|
|
278
|
+
<span class="cocreate-badge success"
|
|
279
|
+
>boolean</span
|
|
280
|
+
>
|
|
281
|
+
<span class="cocreate-badge warning"
|
|
282
|
+
>optional</span
|
|
283
|
+
>
|
|
284
|
+
</h4>
|
|
285
|
+
<p>Attribute whether to show header or not.</p>
|
|
286
|
+
</li>
|
|
287
|
+
<li
|
|
288
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
289
|
+
<h4>
|
|
290
|
+
<span>position-x</span>
|
|
291
|
+
<span class="cocreate-badge success"
|
|
292
|
+
>string</span
|
|
293
|
+
>
|
|
294
|
+
<span class="cocreate-badge warning"
|
|
295
|
+
>optional</span
|
|
296
|
+
>
|
|
297
|
+
</h4>
|
|
298
|
+
<p>Position X of position.</p>
|
|
299
|
+
</li>
|
|
300
|
+
<li
|
|
301
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
302
|
+
<h4>
|
|
303
|
+
<span>position-y</span>
|
|
304
|
+
<span class="cocreate-badge success"
|
|
305
|
+
>string</span
|
|
306
|
+
>
|
|
307
|
+
<span class="cocreate-badge warning"
|
|
308
|
+
>optional</span
|
|
309
|
+
>
|
|
310
|
+
</h4>
|
|
311
|
+
<p>Position Y of position.</p>
|
|
312
|
+
</li>
|
|
313
|
+
<li
|
|
314
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
315
|
+
<h4>
|
|
316
|
+
<span>open_in</span>
|
|
317
|
+
<span class="cocreate-badge success"
|
|
318
|
+
>string</span
|
|
319
|
+
>
|
|
320
|
+
<span class="cocreate-badge warning"
|
|
321
|
+
>optional</span
|
|
322
|
+
>
|
|
323
|
+
</h4>
|
|
324
|
+
<p>
|
|
325
|
+
Attribute where to show position in. "page" for
|
|
326
|
+
current page. "parent" for parent page. "root"
|
|
327
|
+
for root page.
|
|
328
|
+
</p>
|
|
329
|
+
</li>
|
|
330
|
+
</ul>
|
|
331
|
+
</div>
|
|
284
332
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
</div>
|
|
333
|
+
<div
|
|
334
|
+
class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
|
|
335
|
+
<!-- SandBox -->
|
|
336
|
+
<div
|
|
337
|
+
id="position-demo"
|
|
338
|
+
class="border-bottom:1px_solid_lightgrey"
|
|
339
|
+
scroll
|
|
340
|
+
scroll-intersect="color:dodgerblue"
|
|
341
|
+
scroll-query="#position-demo-section">
|
|
342
|
+
<span
|
|
343
|
+
class="display:flex align-items:center width:fit-content"
|
|
344
|
+
hover="display:block!important"
|
|
345
|
+
hover-query="[href='#position-demo']">
|
|
346
|
+
<h2 class="padding:5px_0px">Demo</h2>
|
|
347
|
+
<a
|
|
348
|
+
class="margin-left:10px display:none"
|
|
349
|
+
href="#position-demo"
|
|
350
|
+
><i src="/assets/svg/link.svg"></i
|
|
351
|
+
></a>
|
|
352
|
+
</span>
|
|
353
|
+
</div>
|
|
354
|
+
<div
|
|
355
|
+
class="position:sticky top:0 padding:15px_0px height:100vh">
|
|
356
|
+
<!-- SandBox -->
|
|
357
|
+
<div
|
|
358
|
+
class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
|
|
359
|
+
id="playground">
|
|
360
|
+
<div
|
|
361
|
+
id="demo-code"
|
|
362
|
+
resizable
|
|
363
|
+
class="position:relative height:50%">
|
|
364
|
+
<textarea
|
|
365
|
+
type="code"
|
|
366
|
+
lang="html"
|
|
367
|
+
array="demos"
|
|
368
|
+
object=""
|
|
369
|
+
key="demo"
|
|
370
|
+
save="false"
|
|
371
|
+
id="demo"
|
|
372
|
+
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
373
|
+
<div
|
|
374
|
+
resize="bottom"
|
|
375
|
+
class="background:lightgrey"></div>
|
|
376
|
+
</div>
|
|
330
377
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
</div>
|
|
378
|
+
<div
|
|
379
|
+
id="demo-preview"
|
|
380
|
+
class="position:relative overflow:auto background-color:white">
|
|
381
|
+
<div class="demopreview padding:20px"></div>
|
|
382
|
+
</div>
|
|
337
383
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
384
|
+
<div
|
|
385
|
+
class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
|
386
|
+
<a
|
|
387
|
+
class="margin-right:10px"
|
|
388
|
+
id="eye"
|
|
389
|
+
show="#eye-slash"
|
|
390
|
+
hide="#eye, #demo-preview"
|
|
391
|
+
toggle="code-height"
|
|
392
|
+
toggle-query="#demo-code"
|
|
393
|
+
><i
|
|
394
|
+
class="height:18px"
|
|
395
|
+
src="/assets/svg/eye.svg"></i
|
|
396
|
+
></a>
|
|
397
|
+
<a
|
|
398
|
+
class="margin-right:10px"
|
|
399
|
+
hidden
|
|
400
|
+
id="eye-slash"
|
|
401
|
+
show="#eye, #demo-preview"
|
|
402
|
+
hide="#eye-slash"
|
|
403
|
+
toggle="code-height"
|
|
404
|
+
toggle-query="#demo-code"
|
|
405
|
+
><i src="/assets/svg/eye-slash.svg"></i
|
|
406
|
+
></a>
|
|
407
|
+
<a
|
|
408
|
+
class="margin-right:10px"
|
|
409
|
+
id="code"
|
|
410
|
+
show="#code-slash"
|
|
411
|
+
hide="#code, #demo-code"
|
|
412
|
+
><i src="/assets/svg/code.svg"></i
|
|
413
|
+
></a>
|
|
414
|
+
<a
|
|
415
|
+
class="margin-right:10px"
|
|
416
|
+
hidden
|
|
417
|
+
id="code-slash"
|
|
418
|
+
show="#code, #demo-code"
|
|
419
|
+
hide="#code-slash"
|
|
420
|
+
><i
|
|
421
|
+
class="height:18px"
|
|
422
|
+
src="/assets/svg/code.svg"></i
|
|
423
|
+
></a>
|
|
424
|
+
<a
|
|
425
|
+
class="margin-right:5px"
|
|
426
|
+
fullscreen
|
|
427
|
+
fullscreen-query="#playground"></a>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
<!-- End SandBox -->
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
<button
|
|
435
|
+
href="https://github.com/CoCreate-app/CoCreate-position/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
|
|
436
|
+
target="_blank"
|
|
437
|
+
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)">
|
|
438
|
+
<i src="../assets/svg/pencil-alt.svg"></i>
|
|
439
|
+
</button>
|
|
440
|
+
</main>
|
|
394
441
|
|
|
395
|
-
|
|
396
|
-
|
|
442
|
+
<script src="https://CoCreate.app/dist/CoCreate.js"></script>
|
|
443
|
+
</body>
|
|
397
444
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/position",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Make any element draggable and movable. Customizable via attributes, great for popups, alerts, multitasking and displaying multiple views.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"position",
|
|
@@ -45,19 +45,15 @@
|
|
|
45
45
|
},
|
|
46
46
|
"main": "./src/index.js",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
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.
|
|
57
|
+
"@cocreate/observer": "^1.18.0"
|
|
62
58
|
}
|
|
63
59
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,90 +1,65 @@
|
|
|
1
|
-
const path = require("path")
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
module.exports = (env, argv) => {
|
|
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
|
-
|
|
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
|
-
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-position": "./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", "position"],
|
|
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
|
+
};
|