@seamless-auth/vue 0.0.0-stage → 0.1.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.
@@ -0,0 +1,260 @@
1
+ /*
2
+ * Styles for the bundled Seamless Auth screens of the Angular and Vue bindings
3
+ * (and those that follow). One file, so the screens look the same in every
4
+ * framework. Theme them with the same --seamless-* custom properties the React
5
+ * screens read, or override the .sa-* classes. Every rule is scoped under
6
+ * .sa-auth.
7
+ */
8
+
9
+ .sa-auth {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ color: var(--seamless-text, white);
14
+ font-family: inherit;
15
+ }
16
+
17
+ .sa-auth *,
18
+ .sa-auth *::before,
19
+ .sa-auth *::after {
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ .sa-auth .sa-card {
24
+ background-color: var(--seamless-surface, #1f2937);
25
+ padding: 2rem;
26
+ border-radius: 0.5rem;
27
+ box-shadow: 0 4px 6px var(--seamless-shadow, rgba(0, 0, 0, 0.1));
28
+ width: 100%;
29
+ max-width: 28rem;
30
+ }
31
+
32
+ .sa-auth .sa-heading {
33
+ font-size: 1.5rem;
34
+ font-weight: bold;
35
+ margin: 0 0 1.5rem;
36
+ text-align: center;
37
+ color: var(--seamless-text, white);
38
+ }
39
+
40
+ .sa-auth .sa-subtitle,
41
+ .sa-auth .sa-description {
42
+ color: var(--seamless-text-muted, #d1d5db);
43
+ text-align: center;
44
+ margin: 0 0 1rem;
45
+ }
46
+
47
+ .sa-auth .sa-input-group {
48
+ margin-bottom: 1rem;
49
+ }
50
+
51
+ .sa-auth .sa-label {
52
+ display: block;
53
+ color: var(--seamless-text-muted, #d1d5db);
54
+ }
55
+
56
+ .sa-auth .sa-input {
57
+ width: 100%;
58
+ padding: 0.5rem;
59
+ color: inherit;
60
+ background-color: var(--seamless-surface-raised, #4b5563);
61
+ border: 1px solid var(--seamless-border, #d1d5db);
62
+ border-radius: 0.375rem;
63
+ margin-top: 0.25rem;
64
+ }
65
+
66
+ .sa-auth .sa-input:focus,
67
+ .sa-auth .sa-otp-input:focus {
68
+ outline: none;
69
+ box-shadow: 0 0 0 2px var(--seamless-accent, #3b82f6);
70
+ }
71
+
72
+ .sa-auth .sa-helper-text {
73
+ font-size: 0.75rem;
74
+ color: var(--seamless-text-muted, #9ca3af);
75
+ margin-top: 0.5rem;
76
+ }
77
+
78
+ .sa-auth .sa-error {
79
+ color: var(--seamless-danger, #f87171);
80
+ font-size: 0.875rem;
81
+ }
82
+
83
+ .sa-auth .sa-success {
84
+ color: var(--seamless-success, #68d391);
85
+ font-size: 0.875rem;
86
+ }
87
+
88
+ .sa-auth .sa-button {
89
+ width: 100%;
90
+ border: none;
91
+ background-color: var(--seamless-accent, #2563eb);
92
+ color: var(--seamless-accent-contrast, white);
93
+ padding: 0.5rem;
94
+ border-radius: 0.375rem;
95
+ transition:
96
+ background-color 0.3s,
97
+ opacity 0.3s;
98
+ cursor: pointer;
99
+ margin-top: 1rem;
100
+ font: inherit;
101
+ }
102
+
103
+ .sa-auth .sa-button:hover:not(:disabled) {
104
+ background-color: var(--seamless-accent-hover, #1d4ed8);
105
+ }
106
+
107
+ .sa-auth .sa-button:disabled {
108
+ opacity: 0.6;
109
+ cursor: not-allowed;
110
+ }
111
+
112
+ .sa-auth .sa-secondary {
113
+ width: 100%;
114
+ margin-top: 0.75rem;
115
+ padding: 0.5rem;
116
+ border-radius: 0.375rem;
117
+ background: transparent;
118
+ color: var(--seamless-text, white);
119
+ border: 1px solid var(--seamless-border, #d1d5db);
120
+ cursor: pointer;
121
+ font: inherit;
122
+ }
123
+
124
+ .sa-auth .sa-submit-hint {
125
+ font-size: 0.75rem;
126
+ color: var(--seamless-text-muted, #9ca3af);
127
+ margin-top: 0.5rem;
128
+ text-align: center;
129
+ }
130
+
131
+ .sa-auth .sa-link {
132
+ margin-top: 1rem;
133
+ width: 100%;
134
+ font-size: 0.875rem;
135
+ color: var(--seamless-accent-soft, #60a5fa);
136
+ text-align: center;
137
+ background: none;
138
+ border: none;
139
+ cursor: pointer;
140
+ font-family: inherit;
141
+ }
142
+
143
+ .sa-auth .sa-link:disabled {
144
+ opacity: 0.6;
145
+ cursor: not-allowed;
146
+ }
147
+
148
+ .sa-auth .sa-fallback {
149
+ margin-top: 18px;
150
+ padding: 18px;
151
+ border-radius: 12px;
152
+ background: var(--seamless-surface-raised, rgba(255, 255, 255, 0.04));
153
+ border: 1px solid var(--seamless-border, rgba(255, 255, 255, 0.08));
154
+ display: flex;
155
+ flex-direction: column;
156
+ gap: 14px;
157
+ }
158
+
159
+ .sa-auth .sa-fallback-header {
160
+ font-weight: 600;
161
+ }
162
+
163
+ .sa-auth .sa-fallback-description {
164
+ margin: 0;
165
+ font-size: 0.875rem;
166
+ color: var(--seamless-text-muted, #9ca3af);
167
+ }
168
+
169
+ .sa-auth .sa-actions {
170
+ display: flex;
171
+ flex-direction: column;
172
+ gap: 10px;
173
+ margin-top: 1rem;
174
+ }
175
+
176
+ .sa-auth .sa-action {
177
+ display: flex;
178
+ flex-direction: column;
179
+ align-items: flex-start;
180
+ gap: 2px;
181
+ width: 100%;
182
+ padding: 12px 14px;
183
+ border-radius: 10px;
184
+ background: var(--seamless-surface, rgba(255, 255, 255, 0.02));
185
+ border: 1px solid var(--seamless-border, rgba(255, 255, 255, 0.12));
186
+ color: var(--seamless-text, white);
187
+ cursor: pointer;
188
+ text-align: left;
189
+ font: inherit;
190
+ }
191
+
192
+ .sa-auth .sa-action:hover {
193
+ border-color: var(--seamless-accent, #3b82f6);
194
+ }
195
+
196
+ .sa-auth .sa-action-title {
197
+ font-weight: 600;
198
+ }
199
+
200
+ .sa-auth .sa-action-subtext {
201
+ font-size: 0.8rem;
202
+ color: var(--seamless-text-muted, #9ca3af);
203
+ }
204
+
205
+ .sa-auth .sa-otp {
206
+ display: flex;
207
+ gap: 0.5rem;
208
+ justify-content: center;
209
+ margin: 0.75rem 0;
210
+ }
211
+
212
+ .sa-auth .sa-otp-input {
213
+ width: 2.75rem;
214
+ height: 3rem;
215
+ text-align: center;
216
+ font-size: 1.25rem;
217
+ color: inherit;
218
+ background-color: var(--seamless-surface-raised, #4b5563);
219
+ border: 1px solid var(--seamless-border, #d1d5db);
220
+ border-radius: 0.375rem;
221
+ }
222
+
223
+ .sa-auth .sa-timer {
224
+ font-size: 0.75rem;
225
+ color: var(--seamless-warning, #facc15);
226
+ }
227
+
228
+ .sa-auth .sa-identifier {
229
+ margin: 0.75rem auto;
230
+ padding: 0.25rem 0.75rem;
231
+ width: fit-content;
232
+ border-radius: 999px;
233
+ background: var(--seamless-surface-raised, #4b5563);
234
+ }
235
+
236
+ .sa-auth .sa-center {
237
+ text-align: center;
238
+ }
239
+
240
+ .sa-auth .sa-spinner {
241
+ width: 2rem;
242
+ height: 2rem;
243
+ margin: 1rem auto;
244
+ border: 3px solid var(--seamless-border, rgba(255, 255, 255, 0.2));
245
+ border-top-color: var(--seamless-accent, #3b82f6);
246
+ border-radius: 50%;
247
+ animation: sa-spin 0.9s linear infinite;
248
+ }
249
+
250
+ @keyframes sa-spin {
251
+ to {
252
+ transform: rotate(360deg);
253
+ }
254
+ }
255
+
256
+ @media (prefers-reduced-motion: reduce) {
257
+ .sa-auth .sa-spinner {
258
+ animation: none;
259
+ }
260
+ }
package/package.json CHANGED
@@ -1,6 +1,71 @@
1
1
  {
2
2
  "name": "@seamless-auth/vue",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Vue bindings for Seamless Auth: a plugin and composable for session state, route guards, and optional sign-in screens.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js"
10
+ },
11
+ "./router": {
12
+ "types": "./dist/router/index.d.ts",
13
+ "import": "./dist/router.js"
14
+ },
15
+ "./seamless-auth.css": "./dist/seamless-auth.css"
16
+ },
17
+ "types": "./dist/index.d.ts",
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "CHANGELOG.md",
22
+ "LICENSE"
23
+ ],
24
+ "engines": {
25
+ "node": ">=22",
26
+ "npm": ">=9.0.0 <13.0.0"
27
+ },
28
+ "scripts": {
29
+ "build": "node ../../scripts/clean-dist.mjs && rollup -c && tsc-alias -p tsconfig.build.json && node ../../scripts/check-vue-dist.mjs",
30
+ "typecheck": "tsc --noEmit -p tsconfig.dev.json",
31
+ "check-npm-build": "npm pack --dry-run"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/fells-code/seamless-auth-react.git",
36
+ "directory": "packages/vue"
37
+ },
38
+ "author": "Fells Code, LLC",
39
+ "license": "Apache-2.0",
40
+ "bugs": {
41
+ "url": "https://github.com/fells-code/seamless-auth-react/issues"
42
+ },
43
+ "homepage": "https://github.com/fells-code/seamless-auth-react/tree/main/packages/vue#readme",
44
+ "keywords": [
45
+ "vue",
46
+ "authentication",
47
+ "passkeys",
48
+ "webauthn",
49
+ "seamless-auth"
50
+ ],
51
+ "publishConfig": {
52
+ "access": "public",
53
+ "registry": "https://registry.npmjs.org/",
54
+ "provenance": true
55
+ },
56
+ "peerDependencies": {
57
+ "vue": "^3.5.0",
58
+ "vue-router": "^4.4.0 || ^5.0.0"
59
+ },
60
+ "peerDependenciesMeta": {
61
+ "vue-router": {
62
+ "optional": true
63
+ }
64
+ },
65
+ "dependencies": {
66
+ "@seamless-auth/client": "^0.5.0"
67
+ },
68
+ "sideEffects": [
69
+ "*.css"
70
+ ]
71
+ }