@vllnt/ui 0.2.1-canary.8b618ce → 0.2.1-canary.eeb2ef1
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 +21 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
| `Alert` | `{ Alert, AlertTitle, AlertDescription, alertVariants }` | Static alert banner |
|
|
219
219
|
| `Badge` | `{ Badge, badgeVariants }` | Inline status label. Variants: default, secondary, destructive, outline |
|
|
220
220
|
| `Skeleton` | `{ Skeleton }` | Loading placeholder |
|
|
221
|
-
| `Spinner` | `{ Spinner }` |
|
|
221
|
+
| `Spinner` | `{ Spinner, UnicodeSpinner }` | Styled spinner + ASCII-art `UnicodeSpinner` for terminals / code blocks |
|
|
222
222
|
|
|
223
223
|
### Navigation
|
|
224
224
|
|
|
@@ -242,7 +242,7 @@ import {
|
|
|
242
242
|
| `BarChart` | `{ BarChart }` | Chart component |
|
|
243
243
|
| `LineChart` | `{ LineChart }` | Chart component |
|
|
244
244
|
| `CodeBlock` | `{ CodeBlock }` | Syntax-highlighted code via `react-syntax-highlighter` |
|
|
245
|
-
| `FlowDiagram` | `{ FlowDiagram }` | Flow diagram via `@xyflow/react` |
|
|
245
|
+
| `FlowDiagram` | `{ FlowDiagram, FlowControls, FlowFullscreen, FlowErrorBoundary, useFlowDiagram }` | Flow diagram via `@xyflow/react`. Extras: custom controls, fullscreen wrapper, error boundary, and the `useFlowDiagram` hook for imperative access. |
|
|
246
246
|
| `TableOfContents` | `{ TableOfContents }` | Page table of contents |
|
|
247
247
|
|
|
248
248
|
### App Components
|
|
@@ -276,7 +276,10 @@ import {
|
|
|
276
276
|
| `Flashcard` | `{ Flashcard }` | Flip-card for spaced repetition |
|
|
277
277
|
| `Stepper` | `{ Stepper }` | Linear progress stepper |
|
|
278
278
|
| `Tour` | `{ Tour }` | Guided product tour |
|
|
279
|
-
| `Annotation` | `{ Annotation }` | Inline annotation
|
|
279
|
+
| `Annotation` | `{ Annotation, Highlight }` | Inline annotation block + inline `Highlight` span for in-prose emphasis |
|
|
280
|
+
| `LearningObjectives` | `{ LearningObjectives, Prerequisites, Summary }` | Objectives list plus companion `Prerequisites` and `Summary` blocks |
|
|
281
|
+
| `KeyConcept` | `{ KeyConcept, Glossary }` | Concept callout + `Glossary` term list |
|
|
282
|
+
| `Comparison` | `{ Comparison, BeforeAfter }` | Side-by-side compare block + `BeforeAfter` slider |
|
|
280
283
|
| `CompletionDialog` | `{ CompletionDialog }` | End-of-flow celebration dialog |
|
|
281
284
|
| `TruncatedText` | `{ TruncatedText }` | Expand-on-overflow text block |
|
|
282
285
|
| `TableOfContentsPanel` | `{ TableOfContentsPanel }` | Sidebar TOC panel |
|
|
@@ -334,7 +337,7 @@ import {
|
|
|
334
337
|
| `BorderBeam` | `{ BorderBeam }` | Animated gradient border |
|
|
335
338
|
| `Marquee` | `{ Marquee }` | Infinite scroll marquee |
|
|
336
339
|
| `NumberTicker` | `{ NumberTicker }` | Animated number counter |
|
|
337
|
-
| `Spinner` | `{ Spinner }` |
|
|
340
|
+
| `Spinner` | `{ Spinner, UnicodeSpinner }` | Styled spinner + ASCII-art `UnicodeSpinner` for terminals / code blocks |
|
|
338
341
|
|
|
339
342
|
### Form Additions
|
|
340
343
|
|
|
@@ -386,10 +389,22 @@ import { cn } from "@vllnt/ui";
|
|
|
386
389
|
<div className={cn("p-4 bg-primary", isActive && "bg-accent", className)} />
|
|
387
390
|
```
|
|
388
391
|
|
|
392
|
+
### Hooks
|
|
393
|
+
|
|
394
|
+
| Hook | Purpose |
|
|
395
|
+
|------|---------|
|
|
396
|
+
| `useDebounce(value, delayMs)` | Returns the value after `delayMs` of idle — ideal for search inputs. |
|
|
397
|
+
| `useHorizontalScroll(ref)` | Drives the behavior used by `HorizontalScrollRow` — wheel → horizontal scroll, scroll-snap helpers. |
|
|
398
|
+
| `useMobile(breakpoint?)` | Boolean for "viewport is below breakpoint" (default `768`). SSR-safe. |
|
|
399
|
+
| `useSidebar()` | Reads `SidebarProvider` state — `{ open, setOpen, toggle }`. Throws outside a provider. |
|
|
400
|
+
| `useFlowDiagram(options)` | Imperative controller for `FlowDiagram` — fit view, zoom, export to PNG. |
|
|
401
|
+
| `useSocialFab()` | Drives the open/close state of `SocialFab`. |
|
|
402
|
+
|
|
389
403
|
```tsx
|
|
390
|
-
import { useDebounce } from "@vllnt/ui";
|
|
404
|
+
import { useDebounce, useMobile } from "@vllnt/ui";
|
|
391
405
|
|
|
392
|
-
const
|
|
406
|
+
const query = useDebounce(input, 300);
|
|
407
|
+
const isMobile = useMobile();
|
|
393
408
|
```
|
|
394
409
|
|
|
395
410
|
## Types
|
package/package.json
CHANGED