@autobusal/providers 1.4.0 → 1.5.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
@@ -4,6 +4,30 @@ All notable changes to `@autobusal/providers` are documented here. This project
4
4
  adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.5.0] - 2026-07-30
8
+
9
+ ### Fixed
10
+
11
+ - **`Setup/Preload.tsx` migrated off `react-helmet`** to React 19's native
12
+ `<title>`/`<meta>`/`<link>` hoisting, same root cause and fix as
13
+ `@autobusal/common`'s `Meta.tsx` in this same release - see that
14
+ package's changelog for the full diagnosis. No behavior change intended
15
+ beyond making the title/favicon/theme-color tags this component sets
16
+ actually reach the DOM, which they silently weren't.
17
+
18
+ ## [1.4.1] - 2026-07-30
19
+
20
+ ### Fixed
21
+
22
+ - **`<html lang>` never reflected the active language (`Setup/languages.ts`).**
23
+ `index.html` hardcodes `lang="en"` at build time and nothing updated it
24
+ afterward - every one of the 15 supported languages rendered under the same
25
+ `lang` attribute, a signal both search engines and screen readers rely on.
26
+ `languages()` now sets `document.documentElement.lang` immediately on init
27
+ (using the same `localStorage`-or-default resolution as the i18next `lng`
28
+ option) and keeps it in sync via `i18next.on('languageChanged', ...)`, so it
29
+ tracks every future change regardless of what triggers it.
30
+
7
31
  ## [1.4.0] - 2026-07-30
8
32
 
9
33
  ### Added
package/Setup/Preload.tsx CHANGED
@@ -1,4 +1,3 @@
1
- import { Helmet } from 'react-helmet';
2
1
  import { SettingsData } from '../types/settings';
3
2
  import { useSystemTheme } from '@autobusal/hooks';
4
3
 
@@ -7,6 +6,13 @@ interface Props {
7
6
  children: JSX.Element
8
7
  }
9
8
 
9
+ // React 19 automatically hoists any <title>/<meta>/<link> rendered anywhere
10
+ // in the tree into <head> (deduplicating <title> and meta[name=...], last
11
+ // render wins) - no wrapper component needed. Replaced react-helmet, which
12
+ // had gone silently non-functional under React 19 (see @autobusal/common's
13
+ // Meta.tsx for how this was diagnosed). This <title> is the app-shell
14
+ // fallback rendered above the router; a page's own <Meta title=...> renders
15
+ // deeper in the tree and correctly overrides it once data loads.
10
16
  const Preload = ({ data, children }: Props): JSX.Element => {
11
17
  // we arrange the font family names before inserting them
12
18
  const fontTitle = data.theme.fontFamily.title.replace(/ /g, '+');
@@ -18,21 +24,19 @@ const Preload = ({ data, children }: Props): JSX.Element => {
18
24
 
19
25
  return (
20
26
  <>
21
- <Helmet>
22
- <title>{ data.preferences.company }</title>
23
-
24
- <link rel="apple-touch-icon" sizes="180x180" href={ `${ data.url }/favicons/apple-touch-icon.png` } />
25
- <link rel="icon" type="image/png" sizes="32x32" href={ `${ data.url }/favicons/favicon-32x32.png` } />
26
- <link rel="icon" type="image/png" sizes="16x16" href={ `${ data.url }/favicons/favicon-16x16.png` } />
27
- <link rel="manifest" href={ `${ data.url }/favicons/site.webmanifest` } />
28
- <link rel="mask-icon" href={ `${ data.url }/favicons/safari-pinned-tab.svg` } color={ primaryColor } />
29
- <link rel="shortcut icon" href={ `${ data.url }/favicons/favicon.ico` } />
30
- <meta name="msapplication-TileColor" content={ primaryColor } />
31
- <meta name="msapplication-config" content={ `${ data.url }/favicons/browserconfig.xml` } />
32
- <meta name="theme-color" content={ primaryColor } />
33
-
34
- <link href={ `https://fonts.googleapis.com/css2?family=${ fontTitle }:wght@700&family=${ fontContent }:wght@300;400;700&display=swap` } rel="stylesheet" />
35
- </Helmet>
27
+ <title>{ data.preferences.company }</title>
28
+
29
+ <link rel="apple-touch-icon" sizes="180x180" href={ `${ data.url }/favicons/apple-touch-icon.png` } />
30
+ <link rel="icon" type="image/png" sizes="32x32" href={ `${ data.url }/favicons/favicon-32x32.png` } />
31
+ <link rel="icon" type="image/png" sizes="16x16" href={ `${ data.url }/favicons/favicon-16x16.png` } />
32
+ <link rel="manifest" href={ `${ data.url }/favicons/site.webmanifest` } />
33
+ <link rel="mask-icon" href={ `${ data.url }/favicons/safari-pinned-tab.svg` } color={ primaryColor } />
34
+ <link rel="shortcut icon" href={ `${ data.url }/favicons/favicon.ico` } />
35
+ <meta name="msapplication-TileColor" content={ primaryColor } />
36
+ <meta name="msapplication-config" content={ `${ data.url }/favicons/browserconfig.xml` } />
37
+ <meta name="theme-color" content={ primaryColor } />
38
+
39
+ <link href={ `https://fonts.googleapis.com/css2?family=${ fontTitle }:wght@700&family=${ fontContent }:wght@300;400;700&display=swap` } rel="stylesheet" />
36
40
 
37
41
  { children }
38
42
  </>
@@ -38,6 +38,17 @@ const languages = (type: string, defaultLanguage: string): void => {
38
38
  },
39
39
  ns: type
40
40
  });
41
+
42
+ // <html lang> was otherwise hardcoded at build time (index.html) and never
43
+ // updated again - every locale of every page shared one lang attribute, a
44
+ // basic a11y/SEO signal search engines and screen readers rely on. Set it
45
+ // immediately (don't wait for the async backend fetch) and keep it in sync
46
+ // on every future change, whether triggered by ChangeLanguage or anything
47
+ // else that calls i18next.changeLanguage().
48
+ document.documentElement.lang = getLanguage(defaultLanguage);
49
+ i18next.on('languageChanged', (lng) => {
50
+ document.documentElement.lang = lng;
51
+ });
41
52
  };
42
53
 
43
54
  export default languages;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"