@mayson-org/inject-script 1.0.12 → 1.0.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-prompt.d.ts","sourceRoot":"","sources":["../../../../src/plugins/pwa/templates/install-prompt.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wBAAgB,8BAA8B,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"install-prompt.d.ts","sourceRoot":"","sources":["../../../../src/plugins/pwa/templates/install-prompt.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wBAAgB,8BAA8B,IAAI,MAAM,CA0MvD"}
|
|
@@ -110,8 +110,16 @@ export function MaysonInstallPrompt() {
|
|
|
110
110
|
whiteSpace: 'nowrap',
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
const
|
|
114
|
-
'
|
|
113
|
+
const installRingStyle: React.CSSProperties = {
|
|
114
|
+
display: 'inline-flex',
|
|
115
|
+
flexShrink: 0,
|
|
116
|
+
padding: 1,
|
|
117
|
+
borderRadius: 4,
|
|
118
|
+
background:
|
|
119
|
+
'conic-gradient(from var(--mayson-pwa-install-angle, 0deg), #DBD0F8 0%, #A39FF9 16.24%, #8030F8 29.79%, #AE63FF 45.09%, #A828E8 59.87%, #A39FF9 79.85%, #4500A3 99.46%, #DBD0F8 100%)',
|
|
120
|
+
boxShadow: '0 0 3px 0 #ae63ff55',
|
|
121
|
+
animation: 'mayson-pwa-install-border-spin 2s linear infinite',
|
|
122
|
+
};
|
|
115
123
|
|
|
116
124
|
const installBtnStyle: React.CSSProperties = {
|
|
117
125
|
display: 'inline-flex',
|
|
@@ -119,20 +127,17 @@ export function MaysonInstallPrompt() {
|
|
|
119
127
|
justifyContent: 'center',
|
|
120
128
|
cursor: 'pointer',
|
|
121
129
|
outline: 'none',
|
|
122
|
-
border: '
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
background: 'transparent',
|
|
130
|
+
border: 'none',
|
|
131
|
+
borderRadius: 3,
|
|
132
|
+
background: '#171718',
|
|
126
133
|
color: '#FFFFFF',
|
|
127
|
-
padding: '
|
|
134
|
+
padding: '2px 12px',
|
|
128
135
|
margin: 0,
|
|
129
136
|
fontFamily: 'inherit',
|
|
130
137
|
fontSize: 12,
|
|
131
138
|
fontWeight: 500,
|
|
132
139
|
lineHeight: '14px',
|
|
133
140
|
whiteSpace: 'nowrap',
|
|
134
|
-
flexShrink: 0,
|
|
135
|
-
animation: 'mayson-pwa-install-glow 2.4s ease-in-out infinite',
|
|
136
141
|
};
|
|
137
142
|
|
|
138
143
|
const dismissStyle: React.CSSProperties = {
|
|
@@ -155,16 +160,14 @@ export function MaysonInstallPrompt() {
|
|
|
155
160
|
return (
|
|
156
161
|
<div role="group" aria-label="Install app" style={shellStyle}>
|
|
157
162
|
<style>{\`
|
|
158
|
-
@
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
0 0 8px 2px #a828e8aa,
|
|
167
|
-
0 0 16px 2px #a39ff988;
|
|
163
|
+
@property --mayson-pwa-install-angle {
|
|
164
|
+
syntax: '<angle>';
|
|
165
|
+
initial-value: 0deg;
|
|
166
|
+
inherits: false;
|
|
167
|
+
}
|
|
168
|
+
@keyframes mayson-pwa-install-border-spin {
|
|
169
|
+
to {
|
|
170
|
+
--mayson-pwa-install-angle: 360deg;
|
|
168
171
|
}
|
|
169
172
|
}
|
|
170
173
|
\`}</style>
|
|
@@ -179,9 +182,11 @@ export function MaysonInstallPrompt() {
|
|
|
179
182
|
) : (
|
|
180
183
|
<>
|
|
181
184
|
<span style={labelStyle}>Install this app on your device</span>
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
<span style={installRingStyle}>
|
|
186
|
+
<button type="button" onClick={install} style={installBtnStyle}>
|
|
187
|
+
Install
|
|
188
|
+
</button>
|
|
189
|
+
</span>
|
|
185
190
|
</>
|
|
186
191
|
)}
|
|
187
192
|
<button
|
package/package.json
CHANGED