@vegastack/design 0.7.13 → 0.7.14

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": "@vegastack/design",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "VegaStack design system — cn utility, icon runtime, Tailwind v4 preset, and the vegastack-design CLI (tokens ship separately as @vegastack/design-tokens)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -276,6 +276,19 @@ contract.
276
276
  element, so navigation announces as an action. `buttonVariants` comes from a module with no
277
277
  `'use client'`, so a Server Component uses it directly.
278
278
 
279
+ - **Dates & times come from one module** — `@/lib/date-time` (plain functions, server + client)
280
+ and the `RelativeTime` / `DateTime` / `Duration` / `DueLabel` components in
281
+ `@/components/ui/relative-time`. Never `toLocaleString`, a hand-rolled "minutes ago", or a date
282
+ library. Pick by surface: updated/last-activity columns → `formatRelative` ("2m"); created/due
283
+ dates → `formatDate` ("Today", "Mon", "Sep 25"); detail/audit rows → `formatDateTime`
284
+ ("Sep 25 · 2:30 PM", `separator: "comma"` inside sentences); hover tooltips → the components'
285
+ built-in `formatTooltip` ("Sep 25, 2026 · 2:30 PM IST"); due chips → `formatDueLabel` /
286
+ `<DueLabel>` (tone overdue/soon/normal); lengths → `formatDuration` ("1h 15m", `clock` for
287
+ players); schedules → `formatDateRange` / `formatTimeOfDay`; feed/inbox headers → `groupByDay`.
288
+ Pass the viewer's `timeZone` (the `tz` cookie via `getTimeZone(cookie, orgZone)` on the server,
289
+ `useTimeZone()` on the client; render `TimeZoneScript` + `TimeZoneProvider` once at the root).
290
+ API/JSON output stays ISO.
291
+
279
292
  ## Do / Don't
280
293
 
281
294
  **Do**
@@ -3,7 +3,7 @@
3
3
  <!-- GENERATED — do not hand-edit. Regenerated from the design system's component contract,
4
4
  which is the authority for membership and counts. -->
5
5
 
6
- **114 components**, plus 467 animated-icon items, 12 hooks (`use-animation-replay`, `use-announcer`, `use-async-search`, `use-drag-reorder`, `use-file-drop`, `use-inline-edit`, `use-list-nav`, `use-media-query`, `use-mobile`, `use-modal-inert`, `use-overflow`, `use-platform`), 10 starter blocks (`app-shell-01`, `board-01`, `command-search-01`, `list-page-01`, `login-01`, `notifications-01`, `review-split-01`, `settings-01`, `settings-02`, `status-pages-01`), 68 chart blocks across 7 families, and 2 data libs (`geo-data`, `drag-item`) — 673 registry items in total.
6
+ **115 components**, plus 467 animated-icon items, 12 hooks (`use-animation-replay`, `use-announcer`, `use-async-search`, `use-drag-reorder`, `use-file-drop`, `use-inline-edit`, `use-list-nav`, `use-media-query`, `use-mobile`, `use-modal-inert`, `use-overflow`, `use-platform`), 10 starter blocks (`app-shell-01`, `board-01`, `command-search-01`, `list-page-01`, `login-01`, `notifications-01`, `review-split-01`, `settings-01`, `settings-02`, `status-pages-01`), 68 chart blocks across 7 families, and 3 data libs (`date-time`, `geo-data`, `drag-item`) — 675 registry items in total.
7
7
 
8
8
  Install any of them with `shadcn add @vegastack/<name>`. Animated icons install as
9
9
  `@vegastack/icon-<name>`; the bare name is reserved for components, so a component whose name
@@ -68,7 +68,7 @@ starts with `icon-` is a component and never an icon.
68
68
  - **`item`** — A composable row for list and feed content — media, title, description, actions.
69
69
  - **`kbd`** — A keyboard-key chip, and a group that lays several of them out inline.
70
70
  - **`markdown-view`** — Render a markdown string to safe, token-styled HTML — headings, lists, code, blockquotes, links, GFM tables — XSS-safe, no raw HTML.
71
- - **`relative-time`** — Render a date as a human-relative string ("2 hours ago", "yesterday") with native Intl.RelativeTimeFormat — self-updating, with an absolute-date tooltip.
71
+ - **`relative-time`** — One Intl-based dates & times module — formatRelative, formatDuration, formatDate, formatDateTime, formatDateRange, formatTimeOfDay, formatDueLabel, groupByDay, time-zone cookie + provider — and the RelativeTime, DateTime, Duration and DueLabel components with absolute-time tooltips.
72
72
  - **`status-icon`** — A small status indicator icon — todo, in progress, blocked, done — each mapping to a lucide icon and semantic color.
73
73
  - **`table`** — A responsive table component — caption, header, body, footer, row, head and cell parts over semantic table markup.
74
74
  - **`timeline`** — Rail geometry for chronological records — a continuous connector with a node per entry. Rows compose Item parts; separators render through Marker; entries carry content-visibility render skipping.
@@ -138,6 +138,7 @@ starts with `icon-` is a component and never an icon.
138
138
 
139
139
  - **`audio-player`** — A custom audio transport with play/pause, skip, seek, a tappable speed control, and keyboard shortcuts (mute on the M key); a single line on a wide player, two lines with an optional transcript control on a narrow, mobile-width player. Docks to the bottom of a scroll column with a close, resolves a lazy source on first play, and seeks from outside through actionsRef.
140
140
  - **`image`** — A presentational framed image with aspect-ratio, rounding, a loading skeleton, and an error fallback.
141
+ - **`inbox`** — The notification Inbox: frame with header actions, All | Unread chips, sticky day groups, full-bleed rows with avatar or icon, rich titles, action chips, hover read toggle and menu, and empty, loading and error states.
141
142
  - **`media-player-controls`** — The shared media transport — play/pause, skip, seek, elapsed/duration, mute + volume, playback speed, and one keyboard shortcut map (useMediaShortcuts) — composed by Audio Player and Video Player.
142
143
  - **`notification-bell`** — A bell icon button with an unread-count badge overlay, plus the shared NotificationDot unread marker. Presentational — the app supplies the count.
143
144
  - **`video-player`** — A framed video player with the same grouped custom transport controls as Audio Player.