@cocreate/events 1.10.2 → 1.10.4

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/demo/hover.html CHANGED
@@ -1,56 +1,72 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Hover | CoCreateJS</title>
5
-
6
-
7
-
8
- <!-- Custom CSS -->
9
- <style type="text/css">
10
- .test{background:red}
11
- .new{background:yellow}
12
- .active{
13
- background-color:blue;
14
- }
15
- .hidden {
16
- display: none;
17
- }
18
- </style>
19
- <link rel="manifest" href="/manifest.webmanifest" />
20
- </head>
21
- <body>
22
-
23
- <div hover="active" class="test">hhh
24
- <!--<div class="test">click me</div><br/>-->
25
- </div>
26
-
27
-
28
- <article>
29
- <div id="div-01" class="vdom-item">
30
- <p>Here is div-01 i should get class hidden</p>
31
- <div>
32
- <div class="vdom-item" >some content1</div>
33
- <span hover="test" hover-closest=".vdom-item"><i class="height:16px fill:#505050" src="/assets/svg/caret-down".svg"></i></span>
34
- </div>
35
- <div class="vdom-item" >some content2</div>
36
- </div>
37
- <div class="vdom-item" >some content3</div>
38
- <div id="div-03">Here is div-03</div>
39
- </article>
40
- <br>
41
- <hr>
42
- <div class="vdom-item" hover="active" hover-target="article > div">some content</div>
43
- <br>
44
- <hr>
45
- <div class="vdom-item" hover-attribute='class' hover="active" hover-target=".vdom-item">
46
- click for active
47
- </div>
48
-
49
- <div class="vdom-item" id="hey" data-test="" hover-attribute='data-test' hover="active, other, hi, jean">
50
- some content
51
- </div>
52
-
53
- <!--<script src="../dist/CoCreate-events.js"></script>-->
54
- <script src="https://cdn.cocreate.app/latest/CoCreate.min.js" ></script>
55
- </body>
56
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Hover | CoCreateJS</title>
5
+
6
+ <!-- Custom CSS -->
7
+ <style type="text/css">
8
+ .test {
9
+ background: red;
10
+ }
11
+ .new {
12
+ background: yellow;
13
+ }
14
+ .active {
15
+ background-color: blue;
16
+ }
17
+ .hidden {
18
+ display: none;
19
+ }
20
+ </style>
21
+ <link rel="manifest" href="/manifest.webmanifest" />
22
+ </head>
23
+ <body>
24
+ <div hover="active" class="test">
25
+ hhh
26
+ <!--<div class="test">click me</div><br/>-->
27
+ </div>
28
+
29
+ <article>
30
+ <div id="div-01" class="vdom-item">
31
+ <p>Here is div-01 i should get class hidden</p>
32
+ <div>
33
+ <div class="vdom-item">some content1</div>
34
+ <span hover="test" hover-closest=".vdom-item"
35
+ ><i
36
+ class="height:16px fill:#505050"
37
+ src="/assets/svg/caret-down.svg"></i
38
+ ></span>
39
+ </div>
40
+ <div class="vdom-item">some content2</div>
41
+ </div>
42
+ <div class="vdom-item">some content3</div>
43
+ <div id="div-03">Here is div-03</div>
44
+ </article>
45
+ <br />
46
+ <hr />
47
+ <div class="vdom-item" hover="active" hover-target="article > div">
48
+ some content
49
+ </div>
50
+ <br />
51
+ <hr />
52
+ <div
53
+ class="vdom-item"
54
+ hover-attribute="class"
55
+ hover="active"
56
+ hover-target=".vdom-item">
57
+ click for active
58
+ </div>
59
+
60
+ <div
61
+ class="vdom-item"
62
+ id="hey"
63
+ data-test=""
64
+ hover-attribute="data-test"
65
+ hover="active, other, hi, jean">
66
+ some content
67
+ </div>
68
+
69
+ <!--<script src="../dist/CoCreate-events.js"></script>-->
70
+ <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
71
+ </body>
72
+ </html>
package/demo/index.html CHANGED
@@ -1,135 +1,135 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Events | CoCreateJS</title>
5
-
6
- <!-- CoCreate Favicon -->
7
- <link
8
- rel="icon"
9
- href="https://cdn.cocreate.app/favicon.ico"
10
- type="image/ico"
11
- sizes="16x16" />
12
-
13
- <!-- Custom CSS -->
14
- <style type="text/css">
15
- .test {
16
- background: red;
17
- }
18
- .new {
19
- background: yellow;
20
- }
21
- .active {
22
- background-color: blue;
23
- }
24
- .hidden {
25
- display: none;
26
- }
27
- </style>
28
- <link rel="manifest" href="/manifest.webmanifest" />
29
- </head>
30
- <body>
31
- <div toggle="active" class="test">
32
- hhh
33
- <!--<div class="test">click me</div><br/>-->
34
- </div>
35
-
36
- <i
37
- class="fas fa-plus-circle"
38
- toggle="fa-minus-circle, fa-plus-circle"></i>
39
-
40
- <article>
41
- <div id="div-01" class="vdom-item">
42
- <p>Here is div-01 i should get class hidden</p>
43
- <div>
44
- <div class="vdom-item">some content1</div>
45
- <span toggle="test" toggle-closest=".vdom-item">
46
- <i
47
- class="height:16px fill:#505050"
48
- src="/assets/svg/caret-down.svg"></i>
49
- </span>
50
- </div>
51
- <div class="vdom-item">some content2</div>
52
- </div>
53
- <div class="vdom-item">some content3</div>
54
- <div id="div-03">Here is div-03</div>
55
- </article>
56
- <br />
57
- <hr />
58
- <div class="vdom-item" toggle="active" toggle-target="article > div">
59
- some content
60
- </div>
61
- <br />
62
- <hr />
63
- <div
64
- class="vdom-item"
65
- toggle-attribute="class"
66
- toggle="active"
67
- toggle-target=".vdom-item">
68
- click for active
69
- </div>
70
- <br />
71
- <hr />
72
- TEST HERE
73
- <div
74
- class="vdom-item"
75
- id="hey"
76
- data-test=""
77
- toggle-attribute="id"
78
- toggle="active, other, hi, jean">
79
- some content
80
- </div>
81
-
82
- <!-- custom event example -->
83
- <div test-value="active" test-events="click" event>other content</div>
84
- <!-- defining key example -->
85
- <div click-target="#testing" click-value="hello, bye" click-key="ty">
86
- click here
87
- </div>
88
- <div id="testing" class="{{ty}}">
89
- <span class="{{ty}}"><b a="{{ty}}">other content {{ty}}</b></span>
90
- <span class="{{ty}}"><b a="{{ty}}">other content {{ty}}</b></span>
91
- </div>
92
-
93
- <!-- defining key example -->
94
- <div>
95
- <div observe-target=".testing" observe-attribute="value">
96
- testing this new value
97
- </div>
98
- <input
99
- input-target=".testing"
100
- input-attribute="value"
101
- input-events="input, onload"
102
- value="great test" />
103
- <input class="testing {{ty}}" />
104
- <div class="testing {{ty}}">other content</div>
105
- </div>
106
-
107
- <span
108
- id="keyname"
109
- clone-data="{'attributes': {'key': '{{keyname}}', 'value': ''}}"
110
- {{keyname}}="test"
111
- style="margin-right: 10px; padding: 5px">
112
- <svg
113
- class="svg"
114
- width="12"
115
- height="12"
116
- viewBox="0 0 12 12"
117
- xmlns="http://www.w3.org/2000/svg">
118
- <path
119
- d="M5 5V0h1v5h5v1H6v5H5V6H0V5h5z"
120
- fill-rule="nonzero"
121
- fill-opacity="1"
122
- fill="#fff"
123
- stroke="none"></path>
124
- </svg>
125
- </span>
126
- <input
127
- placeholder="Search all attributes"
128
- input-value
129
- input-key="keyname"
130
- input-target="#keyname" />
131
-
132
- <!--<script src="../dist/CoCreate-events.js"></script>-->
133
- <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
134
- </body>
135
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Events | CoCreateJS</title>
5
+
6
+ <!-- CoCreate Favicon -->
7
+ <link
8
+ rel="icon"
9
+ href="https://cdn.cocreate.app/favicon.ico"
10
+ type="image/ico"
11
+ sizes="16x16" />
12
+
13
+ <!-- Custom CSS -->
14
+ <style type="text/css">
15
+ .test {
16
+ background: red;
17
+ }
18
+ .new {
19
+ background: yellow;
20
+ }
21
+ .active {
22
+ background-color: blue;
23
+ }
24
+ .hidden {
25
+ display: none;
26
+ }
27
+ </style>
28
+ <link rel="manifest" href="/manifest.webmanifest" />
29
+ </head>
30
+ <body>
31
+ <div toggle="active" class="test">
32
+ hhh
33
+ <!--<div class="test">click me</div><br/>-->
34
+ </div>
35
+
36
+ <i
37
+ class="fas fa-plus-circle"
38
+ toggle="fa-minus-circle, fa-plus-circle"></i>
39
+
40
+ <article>
41
+ <div id="div-01" class="vdom-item">
42
+ <p>Here is div-01 i should get class hidden</p>
43
+ <div>
44
+ <div class="vdom-item">some content1</div>
45
+ <span toggle="test" toggle-closest=".vdom-item">
46
+ <i
47
+ class="height:16px fill:#505050"
48
+ src="/assets/svg/caret-down.svg"></i>
49
+ </span>
50
+ </div>
51
+ <div class="vdom-item">some content2</div>
52
+ </div>
53
+ <div class="vdom-item">some content3</div>
54
+ <div id="div-03">Here is div-03</div>
55
+ </article>
56
+ <br />
57
+ <hr />
58
+ <div class="vdom-item" toggle="active" toggle-target="article > div">
59
+ some content
60
+ </div>
61
+ <br />
62
+ <hr />
63
+ <div
64
+ class="vdom-item"
65
+ toggle-attribute="class"
66
+ toggle="active"
67
+ toggle-target=".vdom-item">
68
+ click for active
69
+ </div>
70
+ <br />
71
+ <hr />
72
+ TEST HERE
73
+ <div
74
+ class="vdom-item"
75
+ id="hey"
76
+ data-test=""
77
+ toggle-attribute="id"
78
+ toggle="active, other, hi, jean">
79
+ some content
80
+ </div>
81
+
82
+ <!-- custom event example -->
83
+ <div test-value="active" test-events="click" event>other content</div>
84
+ <!-- defining key example -->
85
+ <div click-target="#testing" click-value="hello, bye" click-key="ty">
86
+ click here
87
+ </div>
88
+ <div id="testing" class="{{ty}}">
89
+ <span class="{{ty}}"><b a="{{ty}}">other content {{ty}}</b></span>
90
+ <span class="{{ty}}"><b a="{{ty}}">other content {{ty}}</b></span>
91
+ </div>
92
+
93
+ <!-- defining key example -->
94
+ <div>
95
+ <div observe-target=".testing" observe-attribute="value">
96
+ testing this new value
97
+ </div>
98
+ <input
99
+ input-target=".testing"
100
+ input-attribute="value"
101
+ input-events="input, onload"
102
+ value="great test" />
103
+ <input class="testing {{ty}}" />
104
+ <div class="testing {{ty}}">other content</div>
105
+ </div>
106
+
107
+ <span
108
+ id="keyname"
109
+ clone-data="{'attributes': {'key': '{{keyname}}', 'value': ''}}"
110
+ {{keyname}}="test"
111
+ style="margin-right: 10px; padding: 5px">
112
+ <svg
113
+ class="svg"
114
+ width="12"
115
+ height="12"
116
+ viewBox="0 0 12 12"
117
+ xmlns="http://www.w3.org/2000/svg">
118
+ <path
119
+ d="M5 5V0h1v5h5v1H6v5H5V6H0V5h5z"
120
+ fill-rule="nonzero"
121
+ fill-opacity="1"
122
+ fill="#fff"
123
+ stroke="none"></path>
124
+ </svg>
125
+ </span>
126
+ <input
127
+ placeholder="Search all attributes"
128
+ input-value
129
+ input-key="keyname"
130
+ input-target="#keyname" />
131
+
132
+ <!--<script src="../dist/CoCreate-events.js"></script>-->
133
+ <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
134
+ </body>
135
+ </html>
@@ -1,55 +1,89 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Selected | CoCreateJS</title>
5
-
6
- <!-- CoCreate Favicon -->
7
- <link rel="icon" href="https://cdn.cocreate.app/favicon.ico" type="image/ico" sizes="16x16">
8
- <!-- Custom CSS -->
9
- <style type="text/css">
10
- .test{background:red}
11
- .green{background:green}
12
- .yellow{background:yellow}
13
- .blue{background:blue}
14
- .red{background:red}
15
- .active{
16
- background-color:blue;
17
-
18
- }
19
- .hfhfh[selected]{}
20
-
21
- </style>
22
- <link rel="manifest" href="/manifest.webmanifest" />
23
- </head>
24
- <body>
25
-
26
- <!--<article>-->
27
-
28
-
29
-
30
-
31
- <div id="yyy" selected-target=".tester" selected-value="active," selected-attribute="data-test" selected-group="uno" data-test="" class="test">1 tab</div>
32
- <div selected-value="active" selected-group="uno" class="test">2 tab</div>
33
- <div selected-value="active" selected-group="uno" class="test">3 tab</div>
34
-
35
- <hr/>
36
-
37
- <div selected-value="yellow" selected-group="2" class="green">1 tab</div>
38
- <div selected-value="blue" selected-group="2" class="green">2 tab</div>
39
- <div selected-value="red" selected-group="2" class="green">3 tab</div>
40
-
41
- <hr/>
42
- <div class="tester">
43
- <div selected-value="active" selected-closest="div.tester" class="test">4 tab</div>
44
- <div selected-value="active" class="test">4 tab</div>
45
-
46
- <div selected-value="color:black; background:grey" selected-attribute="style" style="">color tab</div>
47
-
48
- <div id="yyyy" data-test="" class="test">1 tab</div>
49
- </div>
50
-
51
- <!-- <script src="../dist/CoCreate-selected.js"></script> -->
52
- <script src="https://cdn.cocreate.app/1.50.6/CoCreate.min.js"></script>
53
- <!-- <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script> -->
54
- </body>
55
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Selected | CoCreateJS</title>
5
+
6
+ <!-- CoCreate Favicon -->
7
+ <link
8
+ rel="icon"
9
+ href="https://cdn.cocreate.app/favicon.ico"
10
+ type="image/ico"
11
+ sizes="16x16" />
12
+ <!-- Custom CSS -->
13
+ <style type="text/css">
14
+ .test {
15
+ background: red;
16
+ }
17
+ .green {
18
+ background: green;
19
+ }
20
+ .yellow {
21
+ background: yellow;
22
+ }
23
+ .blue {
24
+ background: blue;
25
+ }
26
+ .red {
27
+ background: red;
28
+ }
29
+ .active {
30
+ background-color: blue;
31
+ }
32
+ .hfhfh[selected] {
33
+ }
34
+ </style>
35
+ <link rel="manifest" href="/manifest.webmanifest" />
36
+ </head>
37
+ <body>
38
+ <!--<article>-->
39
+
40
+ <div
41
+ id="yyy"
42
+ selected-target=".tester"
43
+ selected-value="active,"
44
+ selected-attribute="data-test"
45
+ selected-group="uno"
46
+ data-test=""
47
+ class="test">
48
+ 1 tab
49
+ </div>
50
+ <div selected-value="active" selected-group="uno" class="test">
51
+ 2 tab
52
+ </div>
53
+ <div selected-value="active" selected-group="uno" class="test">
54
+ 3 tab
55
+ </div>
56
+
57
+ <hr />
58
+
59
+ <div selected-value="yellow" selected-group="2" class="green">
60
+ 1 tab
61
+ </div>
62
+ <div selected-value="blue" selected-group="2" class="green">2 tab</div>
63
+ <div selected-value="red" selected-group="2" class="green">3 tab</div>
64
+
65
+ <hr />
66
+ <div class="tester">
67
+ <div
68
+ selected-value="active"
69
+ selected-closest="div.tester"
70
+ class="test">
71
+ 4 tab
72
+ </div>
73
+ <div selected-value="active" class="test">4 tab</div>
74
+
75
+ <div
76
+ selected-value="color:black; background:grey"
77
+ selected-attribute="style"
78
+ style="">
79
+ color tab
80
+ </div>
81
+
82
+ <div id="yyyy" data-test="" class="test">1 tab</div>
83
+ </div>
84
+
85
+ <!-- <script src="../dist/CoCreate-selected.js"></script> -->
86
+ <script src="https://cdn.cocreate.app/1.50.6/CoCreate.min.js"></script>
87
+ <!-- <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script> -->
88
+ </body>
89
+ </html>
@@ -1,25 +1,31 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Value | CoCreateJS</title>
5
-
6
- <!-- CoCreate Favicon -->
7
- <link rel="icon" href="https://cdn.cocreate.app/favicon.ico" type="image/ico" sizes="16x16">
8
- <link rel="manifest" href="/manifest.webmanifest">
9
- </head>
10
- <body>
11
- <div click-target="#testing" click-value="hello, bye" click-key="ty">
12
- <span id="testing" class="{{ty}}">other content</span>
13
- </div>
14
-
15
- <form realtime="false">
16
- <input input-target="#testing2" input-attribute="value" value-type="array"/>
17
-
18
- <input id="testing2" class="{{ty}}"/>
19
- </form>
20
-
21
- <!-- <script src="../../../CoCreateJS/dist/CoCreate.js"></script> -->
22
- <script src="https://cdn.cocreate.app/latest/CoCreate.min.js" ></script>
23
-
24
- </body>
25
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Value | CoCreateJS</title>
5
+
6
+ <!-- CoCreate Favicon -->
7
+ <link
8
+ rel="icon"
9
+ href="https://cdn.cocreate.app/favicon.ico"
10
+ type="image/ico"
11
+ sizes="16x16" />
12
+ <link rel="manifest" href="/manifest.webmanifest" />
13
+ </head>
14
+ <body>
15
+ <div click-target="#testing" click-value="hello, bye" click-key="ty">
16
+ <span id="testing" class="{{ty}}">other content</span>
17
+ </div>
18
+
19
+ <form realtime="false">
20
+ <input
21
+ input-target="#testing2"
22
+ input-attribute="value"
23
+ value-type="array" />
24
+
25
+ <input id="testing2" class="{{ty}}" />
26
+ </form>
27
+
28
+ <!-- <script src="../../../CoCreateJS/dist/CoCreate.js"></script> -->
29
+ <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
30
+ </body>
31
+ </html>