@jskit-ai/auth-web 0.2.21 → 0.2.23

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/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The sign-in, registration and reset-password fields have no margin under them, since each keeps its supporting-text line (`@jskit-ai/material-web` no longer sets `hideDetails: "auto"`): an email or password error shown on blur appears in place instead of pushing the form down.
5
6
  - `loginRequestAsExistingUser(request, options)` (new, `@jskit-ai/auth-web/test/playwright`) signs a Playwright APIRequestContext in, as `loginAsExistingUser()` signs a page's context in: a browser test `signIn` module uses it to sign each worker in once.
6
7
  - `loginAsExistingUser(page, { email | userId, secret })` from `@jskit-ai/auth-web/test/playwright` signs in on the test's own server: with no `baseURL`, its requests go to the page context's `baseURL`, so each Playwright worker signs in on its own server (`browserTestConfig()`), instead of `PLAYWRIGHT_BASE_URL` or `127.0.0.1:${PLAYWRIGHT_PORT || 4173}`, which sent every worker's sign-in to the first worker's server. The dev-auth secret still goes only to a local server: the one a given `baseURL` names, or the one that answered the session request; a managed `PLAYWRIGHT_BASE_URL` is still refused before any request.
7
8
  - The `auth/auth-surface` pattern shows the app's identity on its sign-in, reset and sign-out screens: its pages render the app's view wrappers (`src/views/auth/LoginView.vue`, `ResetPasswordView.vue`, `SignOutView.vue`) instead of the default views, and each wrapper fills the `brand` slot with the new `src/components/AppBrand.vue`, the app's name as `index.html`'s `<title>` spells it (a `text-title-large` wordmark in the wide pane, a `text-title-medium` row on phones, no heading). The foundations' rename step renames it with the `<title>`. Upgrading: an app whose `src/pages/auth/*.vue` render the default views directly makes them render its wrappers, and gives the wrappers its brand.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/auth-web",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "jskit test"
@@ -25,10 +25,10 @@
25
25
  "./locales/en.json": "./locales/en.json"
26
26
  },
27
27
  "peerDependencies": {
28
- "@jskit-ai/auth-core": "0.2.15",
29
- "@jskit-ai/http-runtime": "0.2.15",
30
- "@jskit-ai/kernel": "0.2.15",
31
- "@jskit-ai/shell-web": "0.2.19",
28
+ "@jskit-ai/auth-core": "0.2.17",
29
+ "@jskit-ai/http-runtime": "0.2.17",
30
+ "@jskit-ai/kernel": "0.2.17",
31
+ "@jskit-ai/shell-web": "0.2.21",
32
32
  "@tanstack/vue-query": "^5.90.5",
33
33
  "pinia": "^4.0.3",
34
34
  "vue": "^3.5.44",
@@ -305,6 +305,6 @@
305
305
  }
306
306
  },
307
307
  "devDependencies": {
308
- "@jskit-ai/material-web": "0.1.4"
308
+ "@jskit-ai/material-web": "0.1.5"
309
309
  }
310
310
  }
@@ -200,7 +200,6 @@
200
200
  autocomplete="email"
201
201
  :error-messages="emailErrorMessages"
202
202
  @blur="emailTouched = true"
203
- class="mb-3"
204
203
  />
205
204
 
206
205
  <v-text-field
@@ -215,7 +214,6 @@
215
214
  :append-inner-icon="showPassword ? '$visibilityOff' : '$visibility'"
216
215
  @click:append-inner="togglePasswordVisibility"
217
216
  @blur="passwordTouched = true"
218
- class="mb-3"
219
217
  />
220
218
 
221
219
  <v-text-field
@@ -230,7 +228,6 @@
230
228
  :append-inner-icon="showConfirmPassword ? '$visibilityOff' : '$visibility'"
231
229
  @click:append-inner="toggleConfirmPasswordVisibility"
232
230
  @blur="confirmPasswordTouched = true"
233
- class="mb-3"
234
231
  />
235
232
 
236
233
  <v-text-field
@@ -242,7 +239,6 @@
242
239
  autocomplete="one-time-code"
243
240
  :error-messages="otpCodeErrorMessages"
244
241
  @blur="otpCodeTouched = true"
245
- class="mb-3"
246
242
  />
247
243
 
248
244
  <div v-if="isLogin && (canRequestPasswordRecovery || canUseOtp)" class="aux-links d-flex justify-end mb-4">
@@ -34,7 +34,6 @@
34
34
  autocomplete="new-password"
35
35
  :append-inner-icon="showPassword ? '$visibilityOff' : '$visibility'"
36
36
  :error-messages="passwordError"
37
- class="mb-3"
38
37
  @click:append-inner="showPassword = !showPassword"
39
38
  />
40
39
  <v-text-field
@@ -46,7 +45,6 @@
46
45
  autocomplete="new-password"
47
46
  :append-inner-icon="showConfirmPassword ? '$visibilityOff' : '$visibility'"
48
47
  :error-messages="confirmPasswordError"
49
- class="mb-4"
50
48
  @click:append-inner="showConfirmPassword = !showConfirmPassword"
51
49
  />
52
50
  <v-btn block color="primary" size="large" type="submit" :loading="loading" :disabled="!canSubmit">
@@ -152,6 +152,20 @@ test("password sign-in opens the requested page, remembers the account, and sign
152
152
  await finish(api);
153
153
  });
154
154
 
155
+ test("an email error shown on blur appears in the field's own line, so the fields below it stay put", options, async () => {
156
+ const api = await openApp();
157
+ const { page } = api;
158
+ await page.goto("/auth/login");
159
+ await expect(page.getByTestId("auth-mode-register")).toBeVisible();
160
+ const password = page.getByLabel("Password", { exact: true });
161
+ const before = await password.boundingBox();
162
+ await page.getByLabel("Email").fill("not-an-email");
163
+ await page.getByLabel("Email").blur();
164
+ await expect(page.locator(".v-messages__message").first()).toBeVisible();
165
+ assert.deepEqual(await password.boundingBox(), before);
166
+ await finish(api);
167
+ });
168
+
155
169
  test("a refused sign-in reports the server's error and leaves the form usable", options, async () => {
156
170
  const api = await openApp({ routes: { "POST /api/login": deny(401, "Invalid email or password.") } });
157
171
  const { page } = api;