@autobusal/routes-order 1.33.10 → 1.34.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.34.0 (2026-08-29)
4
+
5
+ - The bare /bus-lines form suggests an origin near the visitor and no longer pre-fills a destination; a URL that names one still wins.
6
+
3
7
  ## 1.33.10 (2026-08-29)
4
8
 
5
9
  - The return date falls back to the outbound when the URL carries no real one ('none' on a one-way link), so switching a collapsed search to Round Trip opens the calendar on the month being travelled and cannot offer a day before the departure.
package/Step1/Step1.tsx CHANGED
@@ -59,6 +59,7 @@ const Step1 = ({ value, redirected, t, onSave }: Props): JSX.Element => {
59
59
  to={ `${ prepared.to }${ prepared.stop_to ? `:${ prepared.stop_to }` : '' }` }
60
60
  departure={ prepared.departure }
61
61
  _return={ prepared._return ?? '' }
62
+ suggest
62
63
  adultsNo={ prepared.adults }
63
64
  childrenNo={ prepared.children }
64
65
  babiesNo={ prepared.babies }
package/Step1/prepare.ts CHANGED
@@ -15,7 +15,16 @@ const prepare = (
15
15
  const type = params.type === 'return' ? 'return' : 'departure';
16
16
 
17
17
  const from = params.from ?? defaultLocations.from;
18
- const to = params.to ?? defaultLocations.to;
18
+ /*
19
+ * Edited: Claude - Date: 2026-08-29
20
+ *
21
+ * No default DESTINATION. A URL that names one is honoured; a bare form
22
+ * is left empty, because the destination is the one thing only the
23
+ * visitor knows and a pre-filled wrong one has to be noticed before it
24
+ * can be corrected. The origin still defaults - see the search form's
25
+ * `suggest`, which opens it near the visitor.
26
+ */
27
+ const to = params.to ?? '';
19
28
 
20
29
  const departure = params.departure?.replace(/-/g, '/') ?? futureDate(1);
21
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/routes-order",
3
- "version": "1.33.10",
3
+ "version": "1.34.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"