@vvedantb/ui 0.26.0 → 0.26.1

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/README.md CHANGED
@@ -919,7 +919,7 @@ Setup. The package does not bundle the font. `--font-sans` comes from the packag
919
919
  | Prop | Type | Default | Notes |
920
920
  | --- | --- | --- | --- |
921
921
  | `app` | `"vibot" \| "vmem" \| "verve" \| "velth" \| "vhub"` | required | `ProductAppName`. |
922
- | `size` | `number` | `24` | Text font size in px. The icon is `Math.round(size * 0.875)` px square. Gap is `0.3em`. |
922
+ | `size` | `number` | `24` | Text font size in px. The icon is `Math.round(size * 1.4)` px square (visible glyph about 1.3x the cap height). Gap is `0.2em`. |
923
923
  | `icon` | `boolean` | `true` | `false` renders text only. |
924
924
  | `href` | `string` | none | Root is an `<a>` with a focus ring. Otherwise a `<span>`. |
925
925
  | `className` | `string` | none | On the root. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/ui",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "license": "MIT",
5
5
  "description": "Shared React 19 UI for web apps: one JavaScript entry (primitives, shell pieces, app helpers including the Convex and Clerk provider, VITE env parsing and ensure-user, artifact viewers over the @vvedantb/server artifacts core, native tokens), design-token CSS, shared Tailwind v4 CSS and a Tailwind preset.",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ export type ProductAppName = Exclude<AppName, "projectv">;
9
9
  export type AppWordmarkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "rel" | "aria-label" | "title" | "id"> & {
10
10
  /** Which product app's name to show. The label is always the lowercase app id. */
11
11
  app: ProductAppName;
12
- /** Text font size in px (default 24). The icon is `Math.round(size * 0.875)` px square and the gap is `0.3em`. */
12
+ /** Text font size in px (default 24). The icon is `Math.round(size * 1.4)` px square (larger than the text, so the glyph overhangs the cap height) and the gap is `0.2em`. */
13
13
  size?: number;
14
14
  /** `false` renders the name only (default `true`). */
15
15
  icon?: boolean;
@@ -18,8 +18,12 @@ export type AppWordmarkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "ta
18
18
  className?: string;
19
19
  };
20
20
 
21
- /** Icon size relative to the text font size. */
22
- const ICON_SCALE = 0.875;
21
+ /**
22
+ * Icon frame size relative to the text font size. The glyphs fill about 55-80% of their square frame, so 1.4 makes the
23
+ * visible glyph about 1.3x the Instrument Sans 500 cap height (0.72em): a slight overhang above and below the letters.
24
+ * Stroke glyphs may read light next to weight-500 text. That is an observation only: stroke widths are unchanged.
25
+ */
26
+ const ICON_SCALE = 1.4;
23
27
 
24
28
  const FOCUS_RING =
25
29
  "rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";
@@ -32,8 +36,8 @@ const FOCUS_RING =
32
36
  export function AppWordmark({ app, size = 24, icon = true, href, className, ...rest }: AppWordmarkProps) {
33
37
  const Icon = APP_ICONS[app];
34
38
  const classes = cn("inline-flex flex-row items-center text-foreground", href && FOCUS_RING, className);
35
- // Font size sits on the root so the `0.3em` gap tracks the text size. The text node inherits it.
36
- const style = { fontSize: size, gap: "0.3em" };
39
+ // Font size sits on the root so the `0.2em` gap tracks the text size. The text node inherits it.
40
+ const style = { fontSize: size, gap: "0.2em" };
37
41
  const content = (
38
42
  <>
39
43
  {icon ? <Icon size={Math.round(size * ICON_SCALE)} /> : null}