@ansiversa/components 0.0.144 → 0.0.146

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": "@ansiversa/components",
3
- "version": "0.0.144",
3
+ "version": "0.0.146",
4
4
  "description": "Shared UI components and layouts for the Ansiversa ecosystem",
5
5
  "type": "module",
6
6
  "exports": {
@@ -15,6 +15,7 @@ const normalizedAppKey = typeof appKey === "string" ? appKey.trim() : "";
15
15
  const meta = normalizedAppKey ? MINI_APP_REGISTRY[normalizedAppKey] : undefined;
16
16
  const appName = meta?.name ?? (normalizedAppKey || "App");
17
17
  const showLogo = normalizedAppKey.length > 0;
18
+ const homeHref = meta?.links?.[0]?.href ?? "/";
18
19
 
19
20
  let menuLinks = links ?? meta?.links ?? [];
20
21
  if (!menuLinks.length) {
@@ -34,11 +35,18 @@ if (normalizedBookmarksHref.length > 0) {
34
35
 
35
36
  <div class="av-mini-app-bar">
36
37
  <div class="av-mini-app-bar__inner">
37
- <div class="av-mini-app-bar__title" title={appName}>
38
- <span class="av-mini-app-bar__name flex items-center gap-2">
39
- {showLogo && <AppLogo appId={normalizedAppKey} size="sm" />}
40
- <span class="truncate">{appName}</span>
41
- </span>
38
+ <div class="av-mini-app-bar__title">
39
+ <a
40
+ href={homeHref}
41
+ class="av-mini-app-bar__title-link"
42
+ title={appName}
43
+ aria-label={`Go to ${appName} home`}
44
+ >
45
+ <span class="av-mini-app-bar__name flex items-center gap-2">
46
+ {showLogo && <AppLogo appId={normalizedAppKey} size="sm" />}
47
+ <span class="truncate">{appName}</span>
48
+ </span>
49
+ </a>
42
50
  </div>
43
51
 
44
52
  <div class="av-mini-app-bar__menu" x-data="{ open: false }">
@@ -22,4 +22,8 @@ export const MINI_APP_REGISTRY: Record<string, MiniAppMeta> = {
22
22
  name: "FlashNote",
23
23
  links: [{ label: "Home", href: "/" }],
24
24
  },
25
+ "study-planner": {
26
+ name: "Study Planner",
27
+ links: [{ label: "Home", href: "/" }],
28
+ },
25
29
  };
@@ -1432,6 +1432,11 @@
1432
1432
  min-width: 0;
1433
1433
  }
1434
1434
 
1435
+ .av-mini-app-bar__title-link {
1436
+ @apply inline-flex items-center rounded-md text-slate-100 transition-colors hover:text-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-400/70 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950;
1437
+ min-width: 0;
1438
+ }
1439
+
1435
1440
  .av-mini-app-bar__name {
1436
1441
  @apply block truncate;
1437
1442
  }