@cocreate/fullscreen 1.16.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +1 -1
- package/.github/workflows/automated.yml +18 -7
- package/CHANGELOG.md +472 -446
- package/CONTRIBUTING.md +6 -6
- package/README.md +17 -17
- package/demo/index.html +1 -1
- package/docs/index.html +6 -6
- package/package.json +8 -8
- package/src/index.css +0 -10
- package/src/index.js +51 -3
package/CONTRIBUTING.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Contributing to CoCreate-fullscreen
|
|
2
2
|
|
|
3
|
-
This project is work of [many contributors](https://github.com/
|
|
4
|
-
You're encouraged to submit [pull requests](https://github.com/
|
|
5
|
-
[propose features and discuss issues](https://github.com/
|
|
3
|
+
This project is work of [many contributors](https://github.com/CoCreateJS/fullscreen/graphs/contributors).
|
|
4
|
+
You're encouraged to submit [pull requests](https://github.com/CoCreateJS/fullscreen/pulls),
|
|
5
|
+
[propose features and discuss issues](https://github.com/CoCreateJS/fullscreen/issues).
|
|
6
6
|
|
|
7
7
|
In the examples below, substitute your Github username for `contributor` in URLs.
|
|
8
8
|
|
|
9
9
|
## Fork the Project
|
|
10
10
|
|
|
11
|
-
Fork the [project on Github](https://github.com/
|
|
11
|
+
Fork the [project on Github](https://github.com/CoCreateJS/fullscreen) and check out your copy.
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
git fullscreen https://github.com/contributor/CoCreate-fullscreen.git
|
|
15
15
|
cd CoCreate-fullscreen
|
|
16
|
-
git remote add upstream https://github.com/
|
|
16
|
+
git remote add upstream https://github.com/CoCreateJS/fullscreen.git
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Create a Topic Branch
|
|
@@ -75,7 +75,7 @@ git push origin my-feature-branch
|
|
|
75
75
|
|
|
76
76
|
## Make a Pull Request
|
|
77
77
|
|
|
78
|
-
Go to [https://github.com/
|
|
78
|
+
Go to [https://github.com/CoCreateJS/fullscreen](https://github.com/CoCreateJS/fullscreen) and select your feature branch.
|
|
79
79
|
Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
|
80
80
|
|
|
81
81
|
## Rebase
|
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# CoCreate-fullscreen
|
|
2
2
|
|
|
3
|
-
Toggle any html element to view in fullscreen mode. Easy configuration and targeting using the fullscreen and target attribute. Take it for a spin in our [playground!](https://
|
|
3
|
+
Toggle any html element to view in fullscreen mode. Easy configuration and targeting using the fullscreen and target attribute. Take it for a spin in our [playground!](https://CoCreateJS.com/docs/fullscreen)
|
|
4
4
|
|
|
5
|
-

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
10
|

|
|
11
11
|
|
|
12
|
-

|
|
13
13
|
|
|
14
|
-
## [Docs & Demo](https://
|
|
14
|
+
## [Docs & Demo](https://CoCreateJS.com/docs/fullscreen)
|
|
15
15
|
|
|
16
|
-
For a complete guide and working demo refer to the [doumentation](https://
|
|
16
|
+
For a complete guide and working demo refer to the [doumentation](https://CoCreateJS.com/docs/fullscreen)
|
|
17
17
|
|
|
18
18
|
## CDN
|
|
19
19
|
|
|
20
20
|
```html
|
|
21
|
-
<script src="https://cdn.
|
|
21
|
+
<script src="https://cdn.CoCreateJS.com/fullscreen/latest/CoCreate-fullscreen.min.js"></script>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
```html
|
|
25
|
-
<script src="https://cdn.
|
|
25
|
+
<script src="https://cdn.CoCreateJS.com/fullscreen/latest/CoCreate-fullscreen.min.css"></script>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## NPM
|
|
@@ -50,13 +50,13 @@ $ yarn install @cocreate/fullscreen
|
|
|
50
50
|
|
|
51
51
|
# Announcements
|
|
52
52
|
|
|
53
|
-
All updates to this library are documented in our [CHANGELOG](https://github.com/
|
|
53
|
+
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreateJS/fullscreen/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreateJS/fullscreen/releases). You may also subscribe to email for releases and breaking changes.
|
|
54
54
|
|
|
55
55
|
<a name="roadmap"></a>
|
|
56
56
|
|
|
57
57
|
# Roadmap
|
|
58
58
|
|
|
59
|
-
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/
|
|
59
|
+
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreateJS/fullscreen/issues) and [pull requests](https://github.com/CoCreateJS/fullscreen/pulls). We would love to hear your feedback.
|
|
60
60
|
|
|
61
61
|
<a name="about"></a>
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ If you are interested in the future direction of this project, please take a loo
|
|
|
64
64
|
|
|
65
65
|
CoCreate-fullscreen is guided and supported by the CoCreate Developer Experience Team.
|
|
66
66
|
|
|
67
|
-
Please Email the Developer Experience Team [here](mailto:develop@
|
|
67
|
+
Please Email the Developer Experience Team [here](mailto:develop@CoCreateJS.com) in case of any queries.
|
|
68
68
|
|
|
69
69
|
CoCreate-fullscreen is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
|
|
70
70
|
|
|
@@ -72,9 +72,9 @@ CoCreate-fullscreen is maintained and funded by CoCreate. The names and logos fo
|
|
|
72
72
|
|
|
73
73
|
# How to Contribute
|
|
74
74
|
|
|
75
|
-
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/
|
|
75
|
+
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreateJS/fullscreen/blob/master/CONTRIBUTING.md) guide for details.
|
|
76
76
|
|
|
77
|
-
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/
|
|
77
|
+
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreateJS/fullscreen/issues) and [pull requests](https://github.com/CoCreateJS/fullscreen/pulls) or merely upvote or comment on existing issues or pull requests.
|
|
78
78
|
|
|
79
79
|
We appreciate your continued support, thank you!
|
|
80
80
|
|
|
@@ -82,4 +82,4 @@ We appreciate your continued support, thank you!
|
|
|
82
82
|
<a name="license"></a>
|
|
83
83
|
# License
|
|
84
84
|
|
|
85
|
-
[The MIT License (MIT)](https://github.com/
|
|
85
|
+
[The MIT License (MIT)](https://github.com/CoCreateJS/fullscreen/blob/master/LICENSE)
|
package/demo/index.html
CHANGED
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
|
|
151
151
|
<!--<script src="../dist/CoCreate-fullscreen.js"></script>-->
|
|
152
152
|
<!-- <script src="../../../CoCreateJS/dist/CoCreate.js"></script> -->
|
|
153
|
-
<script src="https://
|
|
153
|
+
<script src="https://CoCreateJS.com/dist/CoCreate.js"></script>
|
|
154
154
|
</body>
|
|
155
155
|
</html>
|
package/docs/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<meta name="robots" content="index,follow" />
|
|
15
15
|
<meta
|
|
16
16
|
property="og:image"
|
|
17
|
-
content="https://cdn.
|
|
17
|
+
content="https://cdn.CoCreateJS.com/docs/fullscreen.png" />
|
|
18
18
|
|
|
19
19
|
<title>CoCreate-fullscreen Documentation | CoCreateJS</title>
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
rel="icon"
|
|
24
24
|
type="image/png"
|
|
25
25
|
sizes="32x32"
|
|
26
|
-
href="https://
|
|
26
|
+
href="https://CoCreateJS.com/images/favicon.ico" />
|
|
27
27
|
<link
|
|
28
28
|
rel="stylesheet"
|
|
29
29
|
href="../index.css"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
share-title="CoCreate Fullscreen"
|
|
77
77
|
share-height="600"
|
|
78
78
|
share-width="700"
|
|
79
|
-
share-media="https://cdn.
|
|
79
|
+
share-media="https://cdn.CoCreateJS.com/docs/fullscreen.png"
|
|
80
80
|
hover="display:block!important"
|
|
81
81
|
hover-query=".social-networks">
|
|
82
82
|
<div class="display:none social-networks">
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
></a>
|
|
115
115
|
</div>
|
|
116
116
|
<a
|
|
117
|
-
href="https://github.com/
|
|
117
|
+
href="https://github.com/CoCreateJS/CoCreate-fullscreen"
|
|
118
118
|
target="_blank"
|
|
119
119
|
class="margin-right:15px"
|
|
120
120
|
><i src="/assets/svg/github.svg"></i
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
<p class="padding:10px_0px line-height:1.5">
|
|
153
153
|
Or you can use cdn link:
|
|
154
154
|
</p>
|
|
155
|
-
<pre><code class="language-html"><script>https://cdn.
|
|
155
|
+
<pre><code class="language-html"><script>https://cdn.CoCreateJS.com/fullscreen/latest/CoCreate-fullscreen.min.js</script></code></pre>
|
|
156
156
|
|
|
157
157
|
<div
|
|
158
158
|
id="fullscreen-usage"
|
|
@@ -343,6 +343,6 @@
|
|
|
343
343
|
</div>
|
|
344
344
|
</main>
|
|
345
345
|
|
|
346
|
-
<script src="https://
|
|
346
|
+
<script src="https://CoCreateJS.com/dist/CoCreate.js"></script>
|
|
347
347
|
</body>
|
|
348
348
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/fullscreen",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Toggle any html element to view in fullscreen mode. Easy configuration and targeting using the fullscreen and target attribute.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fullscreen",
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/
|
|
25
|
+
"url": "git+https://github.com/CoCreateJS/fullscreen.git"
|
|
26
26
|
},
|
|
27
27
|
"author": "CoCreate LLC",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"bugs": {
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/CoCreateJS/fullscreen/issues"
|
|
31
31
|
},
|
|
32
|
-
"homepage": "https://
|
|
32
|
+
"homepage": "https://CoCreateJS.com/docs/fullscreen",
|
|
33
33
|
"funding": {
|
|
34
34
|
"type": "GitHub Sponsors ❤",
|
|
35
|
-
"url": "https://github.com/sponsors/
|
|
35
|
+
"url": "https://github.com/sponsors/CoCreateJS"
|
|
36
36
|
},
|
|
37
37
|
"main": "./src/index.js",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cocreate/observer": "^1.
|
|
40
|
-
"@cocreate/utils": "^1.
|
|
39
|
+
"@cocreate/observer": "^1.23.0",
|
|
40
|
+
"@cocreate/utils": "^1.54.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@cocreate/webpack": "^1.
|
|
43
|
+
"@cocreate/webpack": "^1.9.0"
|
|
44
44
|
},
|
|
45
45
|
"allowScripts": {
|
|
46
46
|
"@cocreate/observer@1.19.0": true,
|
package/src/index.css
CHANGED
package/src/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* https://
|
|
3
|
-
* https://github.com/
|
|
2
|
+
* https://CoCreateJS.com
|
|
3
|
+
* https://github.com/CoCreateJS/Fullscreen_Toggle
|
|
4
4
|
* Released under the MIT license
|
|
5
|
-
* https://github.com/
|
|
5
|
+
* https://github.com/CoCreateJS/Fullscreen_Toggle/blob/master/LICENSE
|
|
6
6
|
*/
|
|
7
7
|
import observer from "@cocreate/observer";
|
|
8
8
|
import { queryElements } from "@cocreate/utils";
|
|
@@ -49,6 +49,11 @@ document.addEventListener("fullscreenchange", (event) => {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
* @environment client
|
|
56
|
+
*/
|
|
52
57
|
function requestFullscreen(element) {
|
|
53
58
|
if (!document.fullscreenElement) {
|
|
54
59
|
if (element.requestFullscreen) {
|
|
@@ -65,6 +70,11 @@ function requestFullscreen(element) {
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
* @environment client
|
|
77
|
+
*/
|
|
68
78
|
function exitFullscreen() {
|
|
69
79
|
if (document.fullscreenElement) {
|
|
70
80
|
if (document.exitFullscreen) {
|
|
@@ -101,3 +111,41 @@ observer.init({
|
|
|
101
111
|
init();
|
|
102
112
|
|
|
103
113
|
export default { requestFullscreen, exitFullscreen };
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @name fullscreen
|
|
118
|
+
* @kind member
|
|
119
|
+
* @attribute
|
|
120
|
+
* @environment client
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @name fullscreen-query
|
|
126
|
+
* @kind member
|
|
127
|
+
* @attribute
|
|
128
|
+
* @environment client
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Toggle any html element to view in fullscreen mode. Easy configuration and targeting using the fullscreen and target attribute.
|
|
133
|
+
*
|
|
134
|
+
* @module fullscreen
|
|
135
|
+
* @environment client
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Declarative selectors recognized by this module.
|
|
140
|
+
*
|
|
141
|
+
* @name declarative-selectors
|
|
142
|
+
* @kind member
|
|
143
|
+
* @selectors
|
|
144
|
+
* @environment client
|
|
145
|
+
* @example
|
|
146
|
+
* ```json
|
|
147
|
+
* [
|
|
148
|
+
* "[fullscreen]"
|
|
149
|
+
* ]
|
|
150
|
+
* ```
|
|
151
|
+
*/
|