@autobusal/providers 1.12.0 → 1.13.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
@@ -7,6 +7,15 @@ adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
7
7
  > Note: 1.8.0 through 1.11.0 were published without changelog entries. The
8
8
  > gap is left as-is rather than reconstructed after the fact.
9
9
 
10
+ ## [1.13.0] - 2026-08-01
11
+
12
+ ### Removed
13
+
14
+ - **`CityData.booking_id`.** The only thing it ever fed was the Booking.com
15
+ affiliate banner on the results page, which is gone (see
16
+ `@autobusal/routes-order` 1.12.0), along with the `cities.booking_id`
17
+ column behind it. Type-only change; nothing read the field at runtime.
18
+
10
19
  ## [1.12.0] - 2026-08-01
11
20
 
12
21
  ### Added
@@ -1,9 +1,9 @@
1
1
  import { useNavigate } from 'react-router-dom';
2
- import { Button, Meta } from '@autobusal/common';
2
+ import { Button, Meta, Road } from '@autobusal/common';
3
3
  import { useSystemTheme } from '@autobusal/hooks';
4
4
  import { getLanguage } from '../Setup/languages';
5
5
  import errors from '@lang/errors';
6
- import { Background, Container, Logo, Description } from './styles';
6
+ import { Background, Container, Logo, Code, Description, Detail } from './styles';
7
7
  import { useGetSettings } from '../services';
8
8
 
9
9
  interface Props {
@@ -24,9 +24,29 @@ const Message = ({ type }: Props): JSX.Element => {
24
24
  // `undefined` and crash the error page on `.not_found`/`.system`.
25
25
  const translations = errors[language as keyof typeof errors] ?? errors.en;
26
26
 
27
+ /**
28
+ * Edited: Ferjolt Ozuni - Date: 2026-08-01
29
+ *
30
+ * Each error now says what went wrong AND what to do next. One generic
31
+ * line told the reader nothing and left a Back button as their only idea;
32
+ * a missing page and a server fault are different problems and deserve
33
+ * different suggestions.
34
+ */
35
+ const notFound = type === 'not_found';
36
+
37
+ const heading = notFound ? translations.not_found : translations.system;
38
+
39
+ const detail = notFound ? translations.not_found_detail : translations.system_detail;
40
+
27
41
  return (
28
- <Meta title={ type === 'not_found' ? translations.not_found : translations.system } noIndex={ true }>
29
- <Background />
42
+ <Meta title={ heading } noIndex={ true }>
43
+ <Background>
44
+ { /* decorative: the road and the bus carry no information, so the
45
+ whole scene is hidden from assistive technology */ }
46
+ <div aria-hidden="true">
47
+ <Road url={ data.url } />
48
+ </div>
49
+ </Background>
30
50
 
31
51
  <Container className="box">
32
52
  <Logo
@@ -43,9 +63,11 @@ const Message = ({ type }: Props): JSX.Element => {
43
63
  <img src={ `${ data.url }/logo-${ theme }.svg` } alt={ translations.home } />
44
64
  </Logo>
45
65
 
46
- <Description>
47
- { type === 'not_found' ? translations.not_found : translations.system }
48
- </Description>
66
+ <Code>{ notFound ? '404' : '500' }</Code>
67
+
68
+ <Description>{ heading }</Description>
69
+
70
+ <Detail>{ detail }</Detail>
49
71
 
50
72
  <Button
51
73
  type="button"
@@ -58,4 +80,4 @@ const Message = ({ type }: Props): JSX.Element => {
58
80
  );
59
81
  };
60
82
 
61
- export default Message;
83
+ export default Message;
package/Errors/styles.ts CHANGED
@@ -1,35 +1,47 @@
1
- import styled from 'styled-components';
1
+ import styled, { keyframes } from 'styled-components';
2
+
3
+ /**
4
+ * Edited: Ferjolt Ozuni - Date: 2026-08-01
5
+ *
6
+ * The error page was a line of text and a button on a blank field. It now
7
+ * borrows the road treatment from the under-construction holding page and
8
+ * sends a bus along it, with the explanation boxed in the middle - so a
9
+ * dead end still looks like part of the product rather than a crash.
10
+ */
11
+ const rise = keyframes`
12
+ from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); }
13
+ to { opacity: 1; transform: translate(-50%, -50%); }
14
+ `;
2
15
 
3
16
  export const Background = styled.div`
4
17
  position: fixed;
5
- top: 0;
6
- left: 0;
7
- right: 0;
8
- bottom: 0;
18
+ inset: 0;
9
19
  z-index: 10000;
20
+ overflow: hidden;
10
21
  background: ${ props => props.theme.background.normal };
11
22
  `;
12
23
 
13
24
  export const Container = styled.div`
14
25
  position: fixed;
15
26
  top: 50%;
16
- right: 50%;
27
+ left: 50%;
17
28
  z-index: 10001;
18
- max-width: 400px;
29
+ width: calc(100% - 40px);
30
+ max-width: 560px;
19
31
  display: flex;
20
32
  flex-direction: column;
21
- justify-content: center;
22
33
  align-items: center;
23
- transform: translate(50%, -50%);
34
+ transform: translate(-50%, -50%);
35
+ animation: ${ rise } 0.5s ease-out both;
24
36
  `;
25
37
 
26
38
  export const Logo = styled.div`
27
- margin-bottom: 20px;
39
+ margin-bottom: 22px;
28
40
  display: inline-block;
29
41
 
30
42
  & > img {
31
43
  display: block;
32
- width: 250px;
44
+ width: 210px;
33
45
  cursor: pointer;
34
46
  }
35
47
 
@@ -39,9 +51,26 @@ export const Logo = styled.div`
39
51
  }
40
52
  `;
41
53
 
42
- export const Description = styled.div`
43
- margin-bottom: 20px;
54
+ export const Code = styled.div`
55
+ margin-bottom: 6px;
56
+ font-weight: 700;
57
+ letter-spacing: 3px;
58
+ text-transform: uppercase;
59
+ font-size: ${ props => props.theme.size.xs };
60
+ color: ${ props => props.theme.primary.normal };
61
+ `;
62
+
63
+ export const Description = styled.h1`
64
+ margin-bottom: 10px;
44
65
  font-weight: 700;
45
66
  text-align: center;
46
- font-size: ${ props => props.theme.size.xxl };
47
- `;
67
+ font-size: clamp(20px, 3vw, 28px);
68
+ `;
69
+
70
+ export const Detail = styled.p`
71
+ margin: 0 0 22px;
72
+ text-align: center;
73
+ line-height: 1.6;
74
+ color: ${ props => props.theme.font.faded };
75
+ `;
76
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
@@ -63,7 +63,6 @@ export interface CityData {
63
63
  country?: CountryData
64
64
  link?: string
65
65
  image_url?: string
66
- booking_id?: string
67
66
  stops?: StopData[]
68
67
  front?: number
69
68
  front_order?: number