@zeyolabs/ui 2026.11.53 → 2026.11.55

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.
@@ -102,8 +102,10 @@
102
102
  <button
103
103
  class="btn secondary"
104
104
  disabled={Boolean(data.turnstileSiteKey) && !turnstileToken}
105
- type="submit">Email me a sign-in link</button
105
+ type="submit"
106
106
  >
107
+ Email me a sign-in link
108
+ </button>
107
109
  </form>
108
110
  {/if}
109
111
 
@@ -106,9 +106,9 @@
106
106
  role="option"
107
107
  tabindex="-1"
108
108
  >
109
- <span class="box"
110
- >{#if on}<Check size={10} />{/if}</span
111
- >
109
+ <span class="box">
110
+ {#if on}<Check size={10} />{/if}
111
+ </span>
112
112
  <span class="text">{option.label}</span>
113
113
  {#if option.count !== undefined}<span class="count">{option.count}</span>{/if}
114
114
  </div>
package/form/Form.svelte CHANGED
@@ -71,6 +71,19 @@
71
71
  hidden ? Object.entries(hidden).filter(([, value]) => value != null && value !== '') : []
72
72
  );
73
73
 
74
+ // A browser extension (autofill, translation) may add its own named inputs to the form, and
75
+ // SvelteKit throws `form_field_unbound` on any field not bound to the remote form. Every
76
+ // `FormData` built from the form fires `formdata` first, so drop those entries there. Bound
77
+ // names end with `/<form id>`; the action carries the id, plus `/<key>` for a `.for(key)` form.
78
+ function dropUnboundFields(event: FormDataEvent) {
79
+ const action = new URLSearchParams(remote.action.split('?')[1] ?? '').get('/remote');
80
+ if (!action) return;
81
+ const suffix = '/' + action.split('/').slice(0, 2).join('/');
82
+ for (const name of new Set(event.formData.keys())) {
83
+ if (!name.replace(/\.[xy]$/, '').endsWith(suffix)) event.formData.delete(name);
84
+ }
85
+ }
86
+
74
87
  // Force enctype after the remote-form spread applies (which sets its own enctype).
75
88
  // Defaults to multipart when the form contains file inputs, so consumers can't forget it.
76
89
  function applyEnctype(node: HTMLFormElement) {
@@ -83,6 +96,7 @@
83
96
  <form
84
97
  class={className}
85
98
  novalidate
99
+ onformdata={dropUnboundFields}
86
100
  oninput={(event) => {
87
101
  remote.validate();
88
102
  dirty = true;
@@ -121,9 +121,9 @@
121
121
  </FieldLabel>
122
122
  {/if}
123
123
  {#if showValue}
124
- <span class="form-slider-value"
125
- >{range ? `${rangeValue[0]} – ${rangeValue[1]}` : singleValue}</span
126
- >
124
+ <span class="form-slider-value">
125
+ {range ? `${rangeValue[0]} – ${rangeValue[1]}` : singleValue}
126
+ </span>
127
127
  {/if}
128
128
  </div>
129
129
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeyolabs/ui",
3
- "version": "2026.11.53",
3
+ "version": "2026.11.55",
4
4
  "description": "Shared Svelte 5 components, form fields and design tokens for SvelteKit 3 apps.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -158,7 +158,7 @@
158
158
  "@eslint/compat": "2.1.1",
159
159
  "@eslint/js": "10.0.1",
160
160
  "@zeyolabs/kit": "2026.11.55",
161
- "@sveltejs/kit": "3.2.0",
161
+ "@sveltejs/kit": "3.4.0",
162
162
  "@types/flickity": "2.2.12",
163
163
  "eslint": "10.15.0",
164
164
  "eslint-config-prettier": "10.1.8",
@@ -167,10 +167,10 @@
167
167
  "eslint-plugin-svelte": "3.24.1",
168
168
  "globals": "17.14.0",
169
169
  "prettier": "3.10.1",
170
- "prettier-plugin-svelte": "4.1.1",
171
- "svelte": "5.57.3",
170
+ "prettier-plugin-svelte": "4.2.0",
171
+ "svelte": "5.59.1",
172
172
  "svelte-check": "4.7.8",
173
- "svelte-eslint-parser": "1.10.1",
173
+ "svelte-eslint-parser": "1.12.0",
174
174
  "typescript": "6.0.3",
175
175
  "typescript-eslint": "8.73.0"
176
176
  },
@@ -34,6 +34,10 @@
34
34
  };
35
35
  widgetId = turnstile.render(container, {
36
36
  callback: (token) => onToken(token),
37
+ // Without it Turnstile throws each failed challenge (e.g. 600010 from a bot or a
38
+ // locked-down browser) as an uncaught error; it retries by itself and the widget
39
+ // shows the failure.
40
+ 'error-callback': () => true,
37
41
  'expired-callback': restart,
38
42
  'response-field': false,
39
43
  sitekey: siteKey,
package/turnstile/load.ts CHANGED
@@ -5,6 +5,8 @@ export type TurnstileApi = {
5
5
  container: HTMLElement,
6
6
  options: {
7
7
  callback: (token: string) => void;
8
+ /** Return true to mark the error handled, so Turnstile doesn't throw it. */
9
+ 'error-callback': (code: string) => boolean;
8
10
  'expired-callback': () => void;
9
11
  'response-field': boolean;
10
12
  sitekey: string;