@gsa-tts/graymatter-ui 0.3.10 → 0.3.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gsa-tts/graymatter-ui",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -373,7 +373,7 @@
373
373
  >
374
374
  <div class="icon-container" part="chat-icon-container">
375
375
  <div class="icon-wrapper">
376
- <ChatIcon isSelected={isNavSelected('chat') as boolean} />
376
+ <ChatIcon isSelected={isNavSelected('chat')} />
377
377
  </div>
378
378
  </div>
379
379
  <span class="nav-text">Chat</span>
@@ -397,7 +397,7 @@
397
397
  >
398
398
  <div class="icon-container" part="console-icon-container">
399
399
  <div class="icon-wrapper">
400
- <ConsoleIcon isSelected={isNavSelected('console') as boolean} />
400
+ <ConsoleIcon isSelected={isNavSelected('console')} />
401
401
  </div>
402
402
  </div>
403
403
  <span class="nav-text">Console</span>
@@ -10,6 +10,9 @@ const defaultDescription =
10
10
  'Accelerating trusted AI adoption across government. Three powerful AI tools. Industry-leading models. One integrated platform.';
11
11
  const defaultOgImage = getUrlFromBase('/common/assets/images/og-preview.webp');
12
12
 
13
+ // Use computed variables instead of direct props to avoid Vite 7 import analysis issues
14
+ const pageTitle = title ? `${title} | USAi` : 'USAi';
15
+ const gtmIDValue = gtmID;
13
16
  const ogTitle = title || siteName;
14
17
  const ogDescription = description || defaultDescription;
15
18
  const ogImage = openGraphImage || defaultOgImage;
@@ -18,13 +21,13 @@ const canonicalUrl = new URL(Astro.url.pathname, siteUrl).href;
18
21
  ---
19
22
 
20
23
  <meta name="viewport" content="width=device-width" />
21
- <title>{title}</title>
24
+ <title>{pageTitle}</title>
22
25
  <script is:inline>
23
26
  if ('performance' in window) {
24
27
  performance.mark('usai:documenthead:start');
25
28
  }
26
29
  </script>
27
- {gtmID && <GoogleTagManager {gtmID} />}
30
+ {gtmIDValue && <GoogleTagManager gtmID={gtmIDValue} />}
28
31
  <script is:inline src=`${getUrlFromBase('uswds/js/uswds-init.min.js')}`
29
32
  ></script>
30
33
  <Font cssVariable="--ai-font-family-sans" preload />
@@ -1,3 +1,2 @@
1
- export * from './meta.js';
2
1
  export * from './url.js';
3
2
  export * from './string-formatters.js';
@@ -2,11 +2,7 @@
2
2
  import '../styles/base/global.css';
3
3
  import Head from '../components/Head.astro';
4
4
  import UsaSkipNav from '../components/UsaSkipNav.svelte';
5
- import { getPageTitle } from '../helpers/meta';
6
- import GoogleTagManager from '../components/GoogleTagManager.astro';
7
- const { description, openGraphImage, gtmID } = Astro.props;
8
-
9
- const title = getPageTitle(Astro);
5
+ const { title, description, openGraphImage, gtmID } = Astro.props;
10
6
  ---
11
7
 
12
8
  <!doctype html>
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  import BaseLayout from '@gsa-tts/graymatter-ui/layouts/BaseLayout.astro';
3
3
  import '../styles/base/global.css';
4
- import { getPageTitle } from '@gsa-tts/graymatter-ui/helpers';
5
4
  import DesktopSideNav from '../components/DesktopSideNav.svelte';
6
5
  import DesktopHeader from '../components/DesktopHeader.svelte';
7
6
  import MobileTopNav from '../components/MobileTopNav.svelte';
@@ -1,5 +0,0 @@
1
- import type { AstroGlobal } from 'astro';
2
-
3
- export const getPageTitle = (astro: Pick<AstroGlobal, 'props'>): string => {
4
- return astro.props?.title ? `${astro.props?.title} | USAi` : 'USAi';
5
- };