@sovereignfs/ui 0.107.3 → 0.107.4

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
@@ -5,6 +5,30 @@ versions follow [semver](https://semver.org/). A version's section is written in
5
5
  and becomes the release notes when the version is published. This file starts at 0.96.0; earlier versions are in the repository's
6
6
  history and tags.
7
7
 
8
+ ## [0.107.4] - 2026-11-26
9
+
10
+ ### Security
11
+
12
+ - A password could end up in the address. A form pressed before its script had run, on a slow connection for example,
13
+ was sent by the browser itself: a GET with every named box in the address, which the history and a reverse proxy’s
14
+ access log can keep. The submit button of `AuthButton`, and the buttons of `ChangePasswordForm` and
15
+ `LinkSovereignPanel`, are now off until the page is running, which also stops the Enter key. An app’s own forms that
16
+ use `AuthButton` are covered with it. A form meant to work without a script (`action={serverAction}`) uses `Button`.
17
+ - A script that sends a form itself, past its button, now sends it by POST, with nothing in the address: `AuthForm`,
18
+ `ChangePasswordForm`, `LinkSovereignPanel` and the password step of `TwoFactorPanel`. `AuthForm` is `method="post"`
19
+ only when it is given neither a `method` nor an `action`; an app that counted on the browser’s GET gives it
20
+ `method="get"`.
21
+
22
+ ### Fixed
23
+
24
+ - `SignInForm` sends what is in its boxes. A password manager can fill them without telling the page (AutoFill on iOS, until a box
25
+ is focused), and the form then sent what it had last heard, usually nothing: "The email or password is incorrect" for a password
26
+ that was right. Its boxes are no longer held in React state, so drawing the form again cannot empty what was filled either.
27
+ - `SignUpForm`, `ResetPasswordForm`, `ChangePasswordForm`, `LinkSovereignPanel` and the password step of `TwoFactorPanel` had the
28
+ same fault and are fixed the same way: what is in their boxes is what is sent. What each hands to `onSubmit` is unchanged.
29
+ - `ExportPanel` reads its password box when it needs it. Its button is no longer greyed out while the box is empty, since a box filled
30
+ without a word to the page looked empty to it and left the button dead. Pressed with an empty box, the browser asks for it.
31
+
8
32
  ## [0.107.3] - 2026-11-25
9
33
 
10
34
  This version carries 0.107.1 and 0.107.2, which were set on `develop` and never published.
package/dist/index.d.ts CHANGED
@@ -99,10 +99,18 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
99
99
  */
100
100
  declare function Button({ variant, size, type, loading, disabled, className, children, ...rest }: ButtonProps): react.JSX.Element;
101
101
 
102
- /** The form of a page before sign-in: its boxes one under another. */
103
- declare function AuthForm({ className, ...rest }: FormHTMLAttributes<HTMLFormElement>): react.JSX.Element;
104
- /** A button as wide as the card. A submit button sits a little apart from the box above it. */
105
- declare function AuthButton({ className, type, ...rest }: ButtonProps): react.JSX.Element;
102
+ /**
103
+ * The form of a page before sign-in: its boxes one under another. Its script sends it. Should the browser send it all the same, because
104
+ * someone else's script called `submit()` on it, it goes by POST, so nothing in its boxes is put in the address. A form with a `method`
105
+ * or an `action` of the app's own is left as the app has it.
106
+ */
107
+ declare function AuthForm({ className, action, method, ...rest }: FormHTMLAttributes<HTMLFormElement>): react.JSX.Element;
108
+ /**
109
+ * A button as wide as the card. A submit button sits a little apart from the box above it, and is off until the page is running: these
110
+ * forms are sent by their script, and a browser that sends one itself before that puts what is in it, the password included, in the
111
+ * address. For a form that is meant to work without a script (`action={serverAction}`), use `Button`.
112
+ */
113
+ declare function AuthButton({ className, type, disabled, ...rest }: ButtonProps): react.JSX.Element;
106
114
  /** The line between one way of signing in and another: "or". */
107
115
  declare function AuthDivider({ children }: {
108
116
  children?: ReactNode;
@@ -174,6 +182,9 @@ interface SignInFormProps {
174
182
  /**
175
183
  * The sign-in form of core and every app (auth.md §7): an email, a password, a passkey if the browser has one, and a way to create an
176
184
  * account. It draws and collects; the consumer signs in (`@sovereignfs/auth/client`) and says what happened through its props.
185
+ *
186
+ * The boxes keep their own values and are read when the form is sent. A password manager can fill them without telling the page
187
+ * (AutoFill on iOS, until a box is focused): a copy kept in state would then be sent in their place, and written back over them.
177
188
  */
178
189
  declare function SignInForm({ appName, notice, error, renderUnverified, unverified, pending, passkey, onSubmit, forgotPasswordHref, otherWays, signUpHref, renderLink, }: SignInFormProps): react.JSX.Element;
179
190
 
@@ -209,7 +220,10 @@ interface ResetPasswordFormProps {
209
220
  newLinkHref: string;
210
221
  renderLink?: AuthLinkRenderer;
211
222
  }
212
- /** Setting a new password from an emailed link (auth.md §7), for core and every app. */
223
+ /**
224
+ * Setting a new password from an emailed link (auth.md §7), for core and every app. The boxes are read when the form is sent, as in
225
+ * `SignInForm`: a password manager can fill them without telling the page.
226
+ */
213
227
  declare function ResetPasswordForm({ passwordHint, error, expired, pending, onSubmit, signInHref, newLinkHref, renderLink, }: ResetPasswordFormProps): react.JSX.Element;
214
228
 
215
229
  /** What a sign-up hands over. */
@@ -246,6 +260,9 @@ interface SignUpFormProps {
246
260
  /**
247
261
  * Creating an account (auth.md §7), for core and every app: a name, the address (an invitation's, when there is one), the password
248
262
  * typed twice, and the terms when the app has them. Once a verification link is sent, it says so and waits.
263
+ *
264
+ * The boxes keep their own values and are read when the form is sent, as in `SignInForm`: a password manager can fill them without
265
+ * telling the page.
249
266
  */
250
267
  declare function SignUpForm({ appName, passwordHint, invitedEmail, terms, error, pending, waitingFor, renderWaiting, onSubmit, signInHref, renderLink, }: SignUpFormProps): react.JSX.Element;
251
268
 
@@ -326,7 +343,11 @@ interface ChangePasswordFormProps {
326
343
  next: string;
327
344
  }) => void;
328
345
  }
329
- /** Changing the password (auth.md §7): it asks for the current one, and ends every other session. */
346
+ /**
347
+ * Changing the password (auth.md §7): it asks for the current one, and ends every other session. The boxes are read when the form is
348
+ * sent, as in `SignInForm`: a password manager can fill them without telling the page. The button is off until the page is running,
349
+ * as `AuthButton`'s is, so a browser never sends the passwords itself.
350
+ */
330
351
  declare function ChangePasswordForm({ error, done, pending, onSubmit, }: ChangePasswordFormProps): react.JSX.Element;
331
352
 
332
353
  /** How a link came back from Sovereign: `done`, or why it was refused. */