@cocreate/pwa 1.27.0 → 2.0.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/.github/FUNDING.yml +1 -1
- package/.github/workflows/automated.yml +47 -22
- package/CHANGELOG.md +362 -317
- package/CONTRIBUTING.md +6 -6
- package/CoCreate.config.js +2 -2
- package/README.md +17 -17
- package/demo/index.html +17 -78
- package/docs/index.html +18 -228
- package/package.json +7 -7
- package/src/index.js +92 -155
- package/demo/geolocation.html +0 -73
- package/demo/offline.html +0 -34
- package/src/badging.js +0 -10
- package/src/contact-picker.js +0 -11
- package/src/file-share.js +0 -15
- package/src/geolocation.js +0 -92
- package/src/offline.html +0 -34
- package/src/service-worker.js +0 -280
- package/src/theme.js +0 -57
- package/src/wakeLock.js +0 -9
- package/src/web-share.js +0 -90
package/CONTRIBUTING.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Contributing to CoCreate-pwa
|
|
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/pwa/graphs/contributors).
|
|
4
|
+
You're encouraged to submit [pull requests](https://github.com/CoCreateJS/pwa/pulls),
|
|
5
|
+
[propose features and discuss issues](https://github.com/CoCreateJS/pwa/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/pwa) and check out your copy.
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
git pwa https://github.com/contributor/CoCreate-pwa.git
|
|
15
15
|
cd CoCreate-pwa
|
|
16
|
-
git remote add upstream https://
|
|
16
|
+
git remote add upstream https://github.com/CoCreateJS/pwa.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/pwa](https://github.com/CoCreateJS/pwa) 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/CoCreate.config.js
CHANGED
|
@@ -12,8 +12,8 @@ module.exports = {
|
|
|
12
12
|
"pathname": "/docs/pwa/index.html",
|
|
13
13
|
"src": "{{./docs/index.html}}",
|
|
14
14
|
"host": [
|
|
15
|
-
"
|
|
16
|
-
"general.
|
|
15
|
+
"CoCreateJS.com",
|
|
16
|
+
"general.CoCreateJS.com"
|
|
17
17
|
],
|
|
18
18
|
"directory": "pwa",
|
|
19
19
|
"content-type": "{{content-type}}",
|
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# CoCreate-pwa
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A focused install component for Progressive Web Apps. It captures the browser install prompt and lets an application present its own install button. Service workers and other browser APIs are separate CoCreate components. Take it for a spin in our [playground!](https://CoCreateJS.com/docs/pwa)
|
|
4
4
|
|
|
5
|
-

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
9
|
|
|
10
|
-

|
|
11
11
|
|
|
12
|
-
## [Docs & Demo](https://
|
|
12
|
+
## [Docs & Demo](https://CoCreateJS.com/docs/pwa)
|
|
13
13
|
|
|
14
|
-
For a complete guide and working demo refer to the [doumentation](https://
|
|
14
|
+
For a complete guide and working demo refer to the [doumentation](https://CoCreateJS.com/docs/pwa)
|
|
15
15
|
|
|
16
16
|
## CDN
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<script src="https://cdn.
|
|
19
|
+
<script src="https://cdn.CoCreateJS.com/pwa/latest/CoCreate-pwa.min.js"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
```html
|
|
23
|
-
<script src="https://cdn.
|
|
23
|
+
<script src="https://cdn.CoCreateJS.com/pwa/latest/CoCreate-pwa.min.css"></script>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
## NPM
|
|
@@ -42,13 +42,13 @@ $ npm install @cocreate/pwa
|
|
|
42
42
|
|
|
43
43
|
# Announcements
|
|
44
44
|
|
|
45
|
-
All updates to this library are documented in our [CHANGELOG](https://github.com/
|
|
45
|
+
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreateJS/pwa/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreateJS/pwa/releases). You may also subscribe to email for releases and breaking changes.
|
|
46
46
|
|
|
47
47
|
<a name="roadmap"></a>
|
|
48
48
|
|
|
49
49
|
# Roadmap
|
|
50
50
|
|
|
51
|
-
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/
|
|
51
|
+
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreateJS/pwa/issues) and [pull requests](https://github.com/CoCreateJS/pwa/pulls). We would love to hear your feedback.
|
|
52
52
|
|
|
53
53
|
<a name="about"></a>
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ If you are interested in the future direction of this project, please take a loo
|
|
|
56
56
|
|
|
57
57
|
CoCreate-pwa is guided and supported by the CoCreate Developer Experience Team.
|
|
58
58
|
|
|
59
|
-
Please Email the Developer Experience Team [here](mailto:develop@
|
|
59
|
+
Please Email the Developer Experience Team [here](mailto:develop@CoCreateJS.com) in case of any queries.
|
|
60
60
|
|
|
61
61
|
CoCreate-pwa is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
|
|
62
62
|
|
|
@@ -64,9 +64,9 @@ CoCreate-pwa is maintained and funded by CoCreate. The names and logos for CoCre
|
|
|
64
64
|
|
|
65
65
|
# How to Contribute
|
|
66
66
|
|
|
67
|
-
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/
|
|
67
|
+
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreateJS/pwa/blob/master/CONTRIBUTING.md) guide for details.
|
|
68
68
|
|
|
69
|
-
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/
|
|
69
|
+
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/pwa/issues) and [pull requests](https://github.com/CoCreateJS/pwa/pulls) or merely upvote or comment on existing issues or pull requests.
|
|
70
70
|
|
|
71
71
|
We appreciate your continued support, thank you!
|
|
72
72
|
|
|
@@ -76,8 +76,8 @@ We appreciate your continued support, thank you!
|
|
|
76
76
|
|
|
77
77
|
This software is dual-licensed under the GNU Affero General Public License version 3 (AGPLv3) and a commercial license.
|
|
78
78
|
|
|
79
|
-
- **Open Source Use**: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the [LICENSE file](https://github.com/
|
|
79
|
+
- **Open Source Use**: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the [LICENSE file](https://github.com/CoCreateJS/pwa/blob/master/LICENSE).
|
|
80
80
|
|
|
81
|
-
- **Commercial Use**: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our [website](https://
|
|
81
|
+
- **Commercial Use**: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our [website](https://CoCreateJS.com). This license permits proprietary use and modification of the software without the copyleft requirements of the AGPLv3. It is ideal for integrating this software into proprietary commercial products and applications.
|
|
82
82
|
|
|
83
83
|
If you have not purchased a commercial license and intend to use this software for commercial purposes, you are required to sign up for an API key on our website.
|
package/demo/index.html
CHANGED
|
@@ -1,78 +1,17 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<!--<non-transparent PNG icon sized at 180 by 180 >-->
|
|
20
|
-
<link rel="apple-touch-icon" href="/images/icons/ios.png" />
|
|
21
|
-
|
|
22
|
-
<meta name="mobile-web-app-capable" content="yes" />
|
|
23
|
-
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
24
|
-
<!--<hides status bar for a full screen experience omn ios only>-->
|
|
25
|
-
<meta
|
|
26
|
-
name="apple-mobile-web-app-status-bar-style"
|
|
27
|
-
content="black-translucent" />
|
|
28
|
-
|
|
29
|
-
<link rel="apple-touch-startup-image" href="ios-startup.png" />
|
|
30
|
-
|
|
31
|
-
<link
|
|
32
|
-
rel="apple-touch-startup-image"
|
|
33
|
-
href="ios-startup.png"
|
|
34
|
-
media="orientation: portrait" />
|
|
35
|
-
<link
|
|
36
|
-
rel="apple-touch-startup-image"
|
|
37
|
-
href="ios-startup-landscape.png"
|
|
38
|
-
media="orientation: landscape" />
|
|
39
|
-
|
|
40
|
-
<link rel="manifest" href="/manifest.webmanifest" />
|
|
41
|
-
</head>
|
|
42
|
-
|
|
43
|
-
<body>
|
|
44
|
-
<nav class="navbar navbar-expand-sm bg-dark">
|
|
45
|
-
<!-- Links -->
|
|
46
|
-
<ul class="navbar-nav">
|
|
47
|
-
<li class="nav-item active">
|
|
48
|
-
<a class="nav-link" href="#">Home</a>
|
|
49
|
-
</li>
|
|
50
|
-
<li class="nav-item">
|
|
51
|
-
<a class="nav-link" href="./pages/test1.html">Test1</a>
|
|
52
|
-
</li>
|
|
53
|
-
<li class="nav-item">
|
|
54
|
-
<a class="nav-link" href="./pages/test2.html">Test 2</a>
|
|
55
|
-
</li>
|
|
56
|
-
<li class="nav-item">
|
|
57
|
-
<a class="nav-link" href="./pages/test3.html">Test 3</a>
|
|
58
|
-
</li>
|
|
59
|
-
</ul>
|
|
60
|
-
</nav>
|
|
61
|
-
<p id="requireHTTPS" class="hidden">
|
|
62
|
-
<b>STOP!</b> This page <b>must</b> be served over HTTPS. Please
|
|
63
|
-
<a>reload this page via HTTPS</a>.
|
|
64
|
-
</p>
|
|
65
|
-
|
|
66
|
-
<p>To Make me installable, follow the</p>
|
|
67
|
-
|
|
68
|
-
<button id="cacheBtn">Uncache</button>
|
|
69
|
-
|
|
70
|
-
<!-- Install button, hidden by default -->
|
|
71
|
-
|
|
72
|
-
<button actions="install" type="button" hidden>Install</button>
|
|
73
|
-
|
|
74
|
-
<!-- <script src="../src/index.js" defer></script> -->
|
|
75
|
-
<!-- <script src="../dist/CoCreate-pwa.js" defer></script> -->
|
|
76
|
-
<!-- <script src="https://CoCreate.app/dist/CoCreate.js"></script> -->
|
|
77
|
-
</body>
|
|
78
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>CoCreate PWA Install Demo</title>
|
|
7
|
+
<link rel="manifest" href="./manifest.webmanifest">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main>
|
|
11
|
+
<h1>Install this app</h1>
|
|
12
|
+
<p>The install button appears when the browser offers an install prompt.</p>
|
|
13
|
+
<button actions="install" type="button" hidden>Install</button>
|
|
14
|
+
</main>
|
|
15
|
+
<script src="../dist/CoCreate-pwa.js"></script>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
package/docs/index.html
CHANGED
|
@@ -1,228 +1,18 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<meta name="robots" content="index,follow" />
|
|
20
|
-
|
|
21
|
-
<link rel="manifest" href="/manifest.webmanifest" />
|
|
22
|
-
</head>
|
|
23
|
-
|
|
24
|
-
<body>
|
|
25
|
-
<div array="" object="" key="" id="cocreate-pwa">
|
|
26
|
-
<div
|
|
27
|
-
class="display:flex flex-wrap:wrap justify-content:space-between margin:10px">
|
|
28
|
-
<div class="display:flex align-items:center">
|
|
29
|
-
<h2>CoCreate-pwa</h2>
|
|
30
|
-
</div>
|
|
31
|
-
<div
|
|
32
|
-
class="display:flex align-items:center font-size:20px"
|
|
33
|
-
share-height="600"
|
|
34
|
-
share-width="500"
|
|
35
|
-
share-media="https://via.placeholder.com/300/09f/fff.png">
|
|
36
|
-
<a
|
|
37
|
-
href="https://github.com/CoCreate-app/CoCreate-pwa"
|
|
38
|
-
target="_blank"
|
|
39
|
-
class="margin-right:15px"
|
|
40
|
-
><i src="/assets/svg/github.svg"></i
|
|
41
|
-
></a>
|
|
42
|
-
<a
|
|
43
|
-
class="margin-right:15px share"
|
|
44
|
-
share-network="twitter"
|
|
45
|
-
title="Share on twitter"
|
|
46
|
-
><i src="/assets/svg/twitter.svg"></i
|
|
47
|
-
></a>
|
|
48
|
-
<a
|
|
49
|
-
class="margin-right:15px share"
|
|
50
|
-
share-network="facebook"
|
|
51
|
-
title="Share on Facebook"
|
|
52
|
-
><i src="/assets/svg/facebook.svg"></i
|
|
53
|
-
></a>
|
|
54
|
-
<a
|
|
55
|
-
class="margin-right:15px share"
|
|
56
|
-
share-network="instagram"
|
|
57
|
-
title="Share on instagram"
|
|
58
|
-
><i src="/assets/svg/instagram.svg"></i
|
|
59
|
-
></a>
|
|
60
|
-
<a
|
|
61
|
-
class="margin-right:15px share"
|
|
62
|
-
share-network="share"
|
|
63
|
-
title="Share on share"
|
|
64
|
-
><i src="/assets/svg/share-alt.svg"></i
|
|
65
|
-
></a>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
<h1 class="max-width:500px margin:20px_10px">
|
|
69
|
-
A simple HTML5, CSS and pure javascript component. Easy
|
|
70
|
-
configuration using data-attributes and highly styleable.
|
|
71
|
-
</h1>
|
|
72
|
-
<div id="pwa-section" class="display:flex flex-wrap:wrap">
|
|
73
|
-
<div class="flex-grow:1 width:300px padding:20px_10px">
|
|
74
|
-
<h2
|
|
75
|
-
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
|
76
|
-
Install
|
|
77
|
-
</h2>
|
|
78
|
-
<pre
|
|
79
|
-
class="margin-top:15px"><code class="language-javascript">npm install cocreate-pwa</code></pre>
|
|
80
|
-
<p class="padding:10px_0px">Or you can use cdn link:</p>
|
|
81
|
-
<pre><code class="language-javascript">https://cdn.cocreate.app/js/CoCreate-pwa.min.js</code></pre>
|
|
82
|
-
|
|
83
|
-
<h2
|
|
84
|
-
class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
|
|
85
|
-
Usage
|
|
86
|
-
</h2>
|
|
87
|
-
<p class="padding:10px_0px">pwa usage content</p>
|
|
88
|
-
<pre><code class="language-html"><div></div></code></pre>
|
|
89
|
-
|
|
90
|
-
<h2
|
|
91
|
-
class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
|
|
92
|
-
Reference
|
|
93
|
-
</h2>
|
|
94
|
-
<p class="padding:10px_0px">
|
|
95
|
-
This is pwa reference content
|
|
96
|
-
</p>
|
|
97
|
-
<pre><code class="language-javascript"><div></div></code></pre>
|
|
98
|
-
<p class="padding:10px_0px">
|
|
99
|
-
This is pwa reference content
|
|
100
|
-
</p>
|
|
101
|
-
|
|
102
|
-
<h2
|
|
103
|
-
class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
|
|
104
|
-
Attributes
|
|
105
|
-
</h2>
|
|
106
|
-
<ul class="list-style-type:none">
|
|
107
|
-
<li
|
|
108
|
-
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
109
|
-
<h4>
|
|
110
|
-
<span>pwa</span>
|
|
111
|
-
<span class="cocreate-badge success"
|
|
112
|
-
>string</span
|
|
113
|
-
>
|
|
114
|
-
<span class="cocreate-badge warning"
|
|
115
|
-
>optional</span
|
|
116
|
-
>
|
|
117
|
-
</h4>
|
|
118
|
-
<p>pwa-attribute</p>
|
|
119
|
-
</li>
|
|
120
|
-
<li
|
|
121
|
-
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
122
|
-
<h4>
|
|
123
|
-
<span>pwa</span>
|
|
124
|
-
<span class="cocreate-badge success"
|
|
125
|
-
>string</span
|
|
126
|
-
>
|
|
127
|
-
<span class="cocreate-badge warning"
|
|
128
|
-
>optional</span
|
|
129
|
-
>
|
|
130
|
-
</h4>
|
|
131
|
-
<p>pwa-attribute</p>
|
|
132
|
-
</li>
|
|
133
|
-
</ul>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
<div
|
|
137
|
-
class="flex-grow:1 width:300px padding:0px_10px margin:20px_0px border-bottom:1px_solid_lightgrey">
|
|
138
|
-
<!-- SandBox -->
|
|
139
|
-
<h2
|
|
140
|
-
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
|
141
|
-
Demo
|
|
142
|
-
</h2>
|
|
143
|
-
<div
|
|
144
|
-
class="position:sticky top:0 padding:10px_0px height:100vh">
|
|
145
|
-
<!-- SandBox -->
|
|
146
|
-
<div
|
|
147
|
-
class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
|
|
148
|
-
id="playground">
|
|
149
|
-
<div
|
|
150
|
-
id="demo-code"
|
|
151
|
-
resizable
|
|
152
|
-
class="position:relative height:50%">
|
|
153
|
-
<textarea
|
|
154
|
-
type="code"
|
|
155
|
-
lang="html"
|
|
156
|
-
array="demos"
|
|
157
|
-
object=""
|
|
158
|
-
key="demo"
|
|
159
|
-
save="false"
|
|
160
|
-
id="demo"
|
|
161
|
-
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
162
|
-
<div
|
|
163
|
-
resize="bottom"
|
|
164
|
-
class="background:lightgrey"></div>
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
<div
|
|
168
|
-
id="demo-preview"
|
|
169
|
-
class="position:relative overflow:auto background-color:white">
|
|
170
|
-
<div class="demopreview padding:20px"></div>
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
<div
|
|
174
|
-
class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
|
175
|
-
<a
|
|
176
|
-
class="margin-right:10px"
|
|
177
|
-
id="eye"
|
|
178
|
-
show="#eye-slash"
|
|
179
|
-
hide="#eye, #demo-preview"
|
|
180
|
-
toggle="code-height"
|
|
181
|
-
toggle-query="#demo-code"
|
|
182
|
-
><i
|
|
183
|
-
class="height:18px"
|
|
184
|
-
src="/assets/svg/eye.svg"></i
|
|
185
|
-
></a>
|
|
186
|
-
<a
|
|
187
|
-
class="margin-right:10px"
|
|
188
|
-
hidden
|
|
189
|
-
id="eye-slash"
|
|
190
|
-
show="#eye, #demo-preview"
|
|
191
|
-
hide="#eye-slash"
|
|
192
|
-
toggle="code-height"
|
|
193
|
-
toggle-query="#demo-code"
|
|
194
|
-
><i src="/assets/svg/eye-slash.svg"></i
|
|
195
|
-
></a>
|
|
196
|
-
<a
|
|
197
|
-
class="margin-right:10px"
|
|
198
|
-
id="code"
|
|
199
|
-
show="#code-slash"
|
|
200
|
-
hide="#code, #demo-code"
|
|
201
|
-
><i src="/assets/svg/code.svg"></i
|
|
202
|
-
></a>
|
|
203
|
-
<a
|
|
204
|
-
class="margin-right:10px"
|
|
205
|
-
hidden
|
|
206
|
-
id="code-slash"
|
|
207
|
-
show="#code, #demo-code"
|
|
208
|
-
hide="#code-slash"
|
|
209
|
-
><i
|
|
210
|
-
class="height:18px"
|
|
211
|
-
src="/assets/svg/code.svg"></i
|
|
212
|
-
></a>
|
|
213
|
-
<a
|
|
214
|
-
class="margin-right:5px"
|
|
215
|
-
fullscreen
|
|
216
|
-
fullscreen-query="#playground"></a>
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
<!-- End SandBox -->
|
|
220
|
-
</div>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
|
|
225
|
-
<!--CoCreateJS-->
|
|
226
|
-
<script src="https://CoCreate.app/dist/CoCreate.js"></script>
|
|
227
|
-
</body>
|
|
228
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>CoCreate PWA Install | CoCreateJS</title>
|
|
7
|
+
<meta name="description" content="Capture the browser install prompt and present an application-owned install button.">
|
|
8
|
+
<link rel="manifest" href="/manifest.webmanifest">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<main>
|
|
12
|
+
<h1>CoCreate PWA Install</h1>
|
|
13
|
+
<p>CoCreate PWA handles the browser install prompt. Service workers, storage, notifications, and other browser capabilities are separate components.</p>
|
|
14
|
+
<button actions="install" type="button" hidden>Install this app</button>
|
|
15
|
+
</main>
|
|
16
|
+
<script src="../dist/CoCreate-pwa.js"></script>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/pwa",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A simple pwa component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "git+https://
|
|
26
|
+
"url": "git+https://github.com/CoCreateJS/pwa.git"
|
|
27
27
|
},
|
|
28
28
|
"author": "CoCreate LLC",
|
|
29
29
|
"license": "AGPL-3.0",
|
|
30
30
|
"bugs": {
|
|
31
|
-
"url": "https://github.com/
|
|
31
|
+
"url": "https://github.com/CoCreateJS/pwa/issues"
|
|
32
32
|
},
|
|
33
|
-
"homepage": "https://
|
|
33
|
+
"homepage": "https://CoCreateJS.com/docs/pwa",
|
|
34
34
|
"funding": {
|
|
35
35
|
"type": "GitHub Sponsors ❤",
|
|
36
|
-
"url": "https://github.com/sponsors/
|
|
36
|
+
"url": "https://github.com/sponsors/CoCreateJS"
|
|
37
37
|
},
|
|
38
38
|
"main": "./src/index.js",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@cocreate/
|
|
40
|
+
"@cocreate/observer": "^2.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@cocreate/webpack": "^
|
|
43
|
+
"@cocreate/webpack": "^2.0.0"
|
|
44
44
|
},
|
|
45
45
|
"allowScripts": {
|
|
46
46
|
"@cocreate/actions@1.21.4": true,
|