@hagicode/hagilight 0.1.2-dev.9.1.eccbdf8 → 0.2.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.
@@ -115,7 +115,7 @@ const { fallback, locale = Astro.currentLocale ?? 'en' } = Astro.props;
115
115
  display: -webkit-box;
116
116
  overflow: hidden;
117
117
  margin: 0;
118
- color: var(--sl-color-text-high, #111827);
118
+ color: var(--sl-color-text-high, var(--sl-color-gray-1, #111827));
119
119
  font-size: var(--sl-text-sm);
120
120
  font-weight: 600;
121
121
  line-height: 1.35;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hagicode/hagilight",
3
- "version": "0.1.2-dev.9.1.eccbdf8",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "Shared Astro components for HagiCode sites",
6
6
  "repository": {
@@ -25,7 +25,8 @@
25
25
  "pt-BR": "Entrada principal do produto.",
26
26
  "ru-RU": "Основной вход в продукт."
27
27
  },
28
- "url": "https://www.hagicode.com/"
28
+ "url": "https://www.hagicode.com/",
29
+ "supportsLocalePath": true
29
30
  },
30
31
  {
31
32
  "id": "newbe-blog",
@@ -165,7 +166,8 @@
165
166
  "pt-BR": "Galeria com designs web de IA de destaque.",
166
167
  "ru-RU": "Галерея выразительных AI web-дизайнов."
167
168
  },
168
- "url": "https://design.hagicode.com/"
169
+ "url": "https://design.hagicode.com/",
170
+ "supportsLocalePath": true
169
171
  },
170
172
  {
171
173
  "id": "soul-builder",
@@ -237,7 +239,8 @@
237
239
  "pt-BR": "Documentação do OpenSpec",
238
240
  "ru-RU": "Документация OpenSpec"
239
241
  },
240
- "url": "https://openspec.hagicode.com/"
242
+ "url": "https://openspec.hagicode.com/",
243
+ "supportsLocalePath": true
241
244
  },
242
245
  {
243
246
  "id": "omniroute-docs",
@@ -253,6 +256,7 @@
253
256
  "pt-BR": "Documentação do OmniRoute",
254
257
  "ru-RU": "Документация OmniRoute"
255
258
  },
256
- "url": "https://omniroute.hagicode.com/"
259
+ "url": "https://omniroute.hagicode.com/",
260
+ "supportsLocalePath": true
257
261
  }
258
262
  ]
package/site-links.ts CHANGED
@@ -48,6 +48,7 @@ export interface RelatedSite {
48
48
  name: LocalizedText;
49
49
  url: string;
50
50
  description?: LocalizedText;
51
+ supportsLocalePath?: boolean;
51
52
  }
52
53
 
53
54
  export interface SiteLinksOptions {
@@ -322,8 +323,8 @@ export function resolveSiteLinks(localeInput?: string | null, options: SiteLinks
322
323
  const relatedIds = new Set<string>();
323
324
  const relatedUrls = new Set<string>();
324
325
  const relatedSites = (options.relatedSites ?? docsRelatedSites).flatMap((site) => {
325
- const href = site.id === 'hagicode-main' && !options.relatedSites
326
- ? marketingPath(locale, '/')
326
+ const href = site.supportsLocalePath
327
+ ? new URL(`${locale}/`, site.url.endsWith('/') ? site.url : `${site.url}/`).toString()
327
328
  : site.url;
328
329
  const normalizedUrl = normalizeUrl(href);
329
330
  if (site.id === options.siteId || renderedUrls.has(normalizedUrl)