@mayson-org/inject-script 1.0.10 → 1.0.11

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,CA6KvD"}
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,CAkLvD"}
@@ -84,12 +84,12 @@ export function MaysonInstallPrompt() {
84
84
 
85
85
  const shellStyle: React.CSSProperties = {
86
86
  position: 'fixed',
87
+ top: 16,
87
88
  left: '50%',
88
- bottom: 16,
89
89
  zIndex: 2147483646,
90
90
  transform: 'translateX(-50%)',
91
91
  display: 'inline-flex',
92
- alignItems: 'flex-end',
92
+ alignItems: 'center',
93
93
  gap: 8,
94
94
  maxWidth: 'calc(100% - 2rem)',
95
95
  padding: '4px 8px',
@@ -107,25 +107,27 @@ export function MaysonInstallPrompt() {
107
107
  fontWeight: 500,
108
108
  lineHeight: '14px',
109
109
  margin: 0,
110
+ whiteSpace: 'nowrap',
110
111
  };
111
112
 
112
- const actionStyle: React.CSSProperties = {
113
+ const installBtnStyle: React.CSSProperties = {
113
114
  display: 'inline-flex',
114
115
  alignItems: 'center',
115
- gap: 4,
116
- color: '#9D9DA2',
117
- textDecoration: 'none',
116
+ justifyContent: 'center',
118
117
  cursor: 'pointer',
119
118
  outline: 'none',
120
119
  border: 'none',
121
- background: 'transparent',
122
- padding: 0,
120
+ borderRadius: 4,
121
+ background: '#fafafa',
122
+ color: '#171718',
123
+ padding: '2px 8px',
123
124
  margin: 0,
124
125
  fontFamily: 'inherit',
125
126
  fontSize: 12,
126
127
  fontWeight: 500,
127
128
  lineHeight: '14px',
128
129
  whiteSpace: 'nowrap',
130
+ flexShrink: 0,
129
131
  };
130
132
 
131
133
  const dismissStyle: React.CSSProperties = {
@@ -148,17 +150,20 @@ export function MaysonInstallPrompt() {
148
150
  return (
149
151
  <div role="group" aria-label="Install app" style={shellStyle}>
150
152
  {showIOSHint ? (
151
- <p style={{ ...labelStyle, lineHeight: '16px', whiteSpace: 'normal' }}>
153
+ <p style={{ ...labelStyle, whiteSpace: 'normal', lineHeight: '16px' }}>
152
154
  To install: tap Share in Safari, then &quot;Add to Home Screen&quot;.
153
155
  </p>
154
156
  ) : showBrowserHint ? (
155
- <p style={{ ...labelStyle, lineHeight: '16px', whiteSpace: 'normal' }}>
157
+ <p style={{ ...labelStyle, whiteSpace: 'normal', lineHeight: '16px' }}>
156
158
  To install: open your browser menu (⋮) and choose &quot;Install app&quot;.
157
159
  </p>
158
160
  ) : (
159
- <button type="button" onClick={install} style={actionStyle}>
160
- Install app
161
- </button>
161
+ <>
162
+ <span style={labelStyle}>Install this app on your device</span>
163
+ <button type="button" onClick={install} style={installBtnStyle}>
164
+ Install
165
+ </button>
166
+ </>
162
167
  )}
163
168
  <button
164
169
  type="button"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mayson-org/inject-script",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "CLI and library to inject Mayson watermark, ascii, and PWA into Next.js App Router layouts.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",