@vllnt/ui 0.4.0-canary.sha29bd7f0 → 0.4.0-canary.sha35357e7

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
@@ -6,8 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- These entries ship in 0.4.0, which is not published yet (the latest release is
10
- 0.3.0). The release cut adds the version heading and its date.
9
+ ### Fixed
10
+
11
+ - **Avatar fallback in dark** - `AvatarFallback` and the `PresenceStack`
12
+ overflow chip fill their disc with `bg-secondary` (#262626). They used
13
+ `bg-muted`, which is the page colour (#000000) in dark, so the disc
14
+ disappeared and only the initials showed. Light mode is unchanged. A test
15
+ fails if either goes back to `bg-muted`. (#686)
16
+
17
+ ## [0.4.0] - 2026-11-20
11
18
 
12
19
  ### Added
13
20
 
@@ -97,6 +104,11 @@ These entries ship in 0.4.0, which is not published yet (the latest release is
97
104
  `@vllnt/ui`. It writes through the Clipboard API, falls back to a temporary
98
105
  textarea and `document.execCommand("copy")` when that API is missing or
99
106
  rejects, and resolves to `false` when neither path works. (#576)
107
+ - **Text `family` prop** - `family="mono"` sets body copy in `--font-mono`
108
+ (JetBrains Mono by default) with the same scale: `size="base"` 16/1.6,
109
+ `size="lead"` 18/1.7. The default stays `family="sans"`. (#666)
110
+ - **`@vllnt/ui/package.json` export** - tools can read the package manifest
111
+ (for example its version) without `ERR_PACKAGE_PATH_NOT_EXPORTED`. (#665)
100
112
 
101
113
  ### Changed
102
114
 
@@ -210,6 +222,12 @@ These entries ship in 0.4.0, which is not published yet (the latest release is
210
222
  the ScrollArea viewport is a tab stop only while its content scrolls.
211
223
  - TreeView supports Home / End, ArrowRight to the first child and ArrowLeft
212
224
  to the parent, and keeps the active row in view.
225
+ - **Core caption and label weights match the Penpot library** -
226
+ `font.weight.caption` is 400 (was 500) and `font.weight.label` /
227
+ `--font-weight-label` is 500 (was 600). No shipped web component reads
228
+ them; read `--font-weight-label` directly and labels get lighter. The Maia
229
+ theme keeps its Ink scale (caption 500, label 600). Radius is unchanged:
230
+ `radius.control` 6 and `radius.surface` 8 are the shared role names. (#669)
213
231
 
214
232
  ### Fixed
215
233
 
@@ -419,6 +437,7 @@ These entries ship in 0.4.0, which is not published yet (the latest release is
419
437
 
420
438
  - Initial public publish to the public npm registry.
421
439
 
440
+ [0.4.0]: https://github.com/vllnt/ui/releases/tag/v0.4.0
422
441
  [0.3.0]: https://github.com/vllnt/ui/releases/tag/v0.3.0
423
442
  [0.2.1]: https://github.com/vllnt/ui/releases/tag/v0.2.1
424
443
  [0.2.0]: https://github.com/vllnt/ui/releases/tag/v0.2.0
@@ -142,7 +142,7 @@ const AvatarFallback = ({
142
142
  AvatarPrimitive.Fallback,
143
143
  {
144
144
  className: cn(
145
- "flex h-full w-full items-center justify-center bg-muted",
145
+ "flex h-full w-full items-center justify-center bg-secondary",
146
146
  avatarShapeVariants({ shape }),
147
147
  className
148
148
  ),
@@ -87,7 +87,7 @@ PresenceStack.displayName = "PresenceStack";
87
87
  const renderOverflow = (input) => {
88
88
  const text = `+${input.count}`;
89
89
  const aria = `${input.count} ${input.labels.overflowSuffix}`;
90
- const className = "relative -ml-2 inline-flex h-7 min-w-7 items-center justify-center rounded-full border-2 border-background bg-muted px-1.5 text-[10px] font-semibold text-muted-foreground shadow-sm";
90
+ const className = "relative -ml-2 inline-flex h-7 min-w-7 items-center justify-center rounded-full border-2 border-background bg-secondary px-1.5 text-[10px] font-semibold text-muted-foreground shadow-sm";
91
91
  if (input.handlerProvided) {
92
92
  return /* @__PURE__ */ jsx(
93
93
  "button",
@@ -1,43 +1,46 @@
1
1
  import { createElement } from "react";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "../../../lib/utils.js";
4
- const textVariants = cva(
5
- "font-[family-name:var(--font-sans)] text-foreground",
6
- {
7
- defaultVariants: {
8
- size: "base",
9
- tone: "default",
10
- weight: "normal"
4
+ const textVariants = cva("text-foreground", {
5
+ defaultVariants: {
6
+ family: "sans",
7
+ size: "base",
8
+ tone: "default",
9
+ weight: "normal"
10
+ },
11
+ variants: {
12
+ family: {
13
+ mono: "font-[family-name:var(--font-mono)]",
14
+ sans: "font-[family-name:var(--font-sans)]"
11
15
  },
12
- variants: {
13
- size: {
14
- base: "text-[length:var(--font-size-body)] leading-[var(--line-height-body)]",
15
- caption: "text-[length:var(--font-size-caption)] leading-[var(--line-height-caption)]",
16
- lead: "text-[length:var(--font-size-body-lg)] leading-[var(--line-height-body-lg)]",
17
- small: "text-[length:var(--font-size-body-sm)] leading-[var(--line-height-body-sm)]"
18
- },
19
- tone: {
20
- default: "",
21
- muted: "text-muted-foreground"
22
- },
23
- weight: {
24
- medium: "font-medium",
25
- normal: "font-normal",
26
- semibold: "font-semibold"
27
- }
16
+ size: {
17
+ base: "text-[length:var(--font-size-body)] leading-[var(--line-height-body)]",
18
+ caption: "text-[length:var(--font-size-caption)] leading-[var(--line-height-caption)]",
19
+ lead: "text-[length:var(--font-size-body-lg)] leading-[var(--line-height-body-lg)]",
20
+ small: "text-[length:var(--font-size-body-sm)] leading-[var(--line-height-body-sm)]"
21
+ },
22
+ tone: {
23
+ default: "",
24
+ muted: "text-muted-foreground"
25
+ },
26
+ weight: {
27
+ medium: "font-medium",
28
+ normal: "font-normal",
29
+ semibold: "font-semibold"
28
30
  }
29
31
  }
30
- );
32
+ });
31
33
  const Text = ({
32
34
  as = "p",
33
35
  className,
36
+ family,
34
37
  ref,
35
38
  size,
36
39
  tone,
37
40
  weight,
38
41
  ...props
39
42
  }) => createElement(as, {
40
- className: cn(textVariants({ size, tone, weight }), className),
43
+ className: cn(textVariants({ family, size, tone, weight }), className),
41
44
  ref,
42
45
  ...props
43
46
  });
package/dist/index.d.ts CHANGED
@@ -14185,6 +14185,7 @@ declare const PanelFooter: {
14185
14185
  * compose the same token-driven styles onto bespoke elements.
14186
14186
  */
14187
14187
  declare const textVariants: (props?: ({
14188
+ family?: "mono" | "sans" | null | undefined;
14188
14189
  size?: "base" | "caption" | "lead" | "small" | null | undefined;
14189
14190
  tone?: "default" | "muted" | null | undefined;
14190
14191
  weight?: "medium" | "normal" | "semibold" | null | undefined;
@@ -14198,17 +14199,21 @@ type TextProps = React.HTMLAttributes<HTMLElement> & VariantProps<typeof textVar
14198
14199
  };
14199
14200
  /**
14200
14201
  * Body text whose family, scale, and weight come from theme-overridable tokens
14201
- * (`--font-sans`, `--font-size-body*`). Polymorphic via `as`. Forwards `ref` to
14202
- * the rendered element.
14202
+ * (`--font-sans` or `--font-mono`, `--font-size-body*`). Polymorphic via `as`.
14203
+ * Forwards `ref` to the rendered element.
14204
+ *
14205
+ * `family="mono"` sets the same scale in the mono family (JetBrains Mono by
14206
+ * default): `size="base"` is 16/1.6 and `size="lead"` 18/1.7.
14203
14207
  *
14204
14208
  * Use `tone="muted"` on the default `background`; on `muted`/`card` surfaces the
14205
14209
  * muted foreground can fall below WCAG AA contrast for body text.
14206
14210
  *
14207
14211
  * @example
14208
14212
  * <Text size="lead" tone="muted">Intro copy</Text>
14213
+ * <Text family="mono" size="lead">Mono intro copy</Text>
14209
14214
  */
14210
14215
  declare const Text: {
14211
- ({ as, className, ref, size, tone, weight, ...props }: TextProps): react.DetailedReactHTMLElement<{
14216
+ ({ as, className, family, ref, size, tone, weight, ...props }: TextProps): react.DetailedReactHTMLElement<{
14212
14217
  children?: react.ReactNode | undefined;
14213
14218
  dangerouslySetInnerHTML?: {
14214
14219
  __html: string | TrustedHTML;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vllnt/ui",
3
- "version": "0.4.0-canary.sha29bd7f0",
3
+ "version": "0.4.0-canary.sha35357e7",
4
4
  "description": "React components on Radix UI and Tailwind CSS, for humans and AI agents. Installs from a shadcn registry. MCP server and llms.txt at ui.vllnt.com.",
5
5
  "license": "MIT",
6
6
  "author": "vllnt",
@@ -49,7 +49,8 @@
49
49
  "./styles.css": "./styles.css",
50
50
  "./themes/default.css": "./themes/default.css",
51
51
  "./themes/presets.css": "./themes/presets.css",
52
- "./themes/products.css": "./themes/products.css"
52
+ "./themes/products.css": "./themes/products.css",
53
+ "./package.json": "./package.json"
53
54
  },
54
55
  "publishConfig": {
55
56
  "registry": "https://registry.npmjs.org",
package/styles.css CHANGED
@@ -47,7 +47,7 @@
47
47
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
48
48
  --font-weight-heading: 600;
49
49
  --font-weight-display: 600;
50
- --font-weight-label: 600;
50
+ --font-weight-label: 500;
51
51
  --font-size-display: 3.75rem;
52
52
  --line-height-display: 1.05;
53
53
  --font-size-h1: 3rem;
@@ -34,7 +34,7 @@
34
34
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
35
35
  --font-weight-heading: 600;
36
36
  --font-weight-display: 600;
37
- --font-weight-label: 600;
37
+ --font-weight-label: 500;
38
38
  --font-size-display: 3.75rem;
39
39
  --line-height-display: 1.05;
40
40
  --font-size-h1: 3rem;