mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-20 22:36:27 +00:00
The UI package is pkg/ui. CI said pkgs/ui, so three steps ran `cd` into a directory that is not there: /var/run/act/workflow/7: line 2: cd: pkgs/ui: No such file or directory and it called two scripts pkg/ui does not define — build:full and test:coverage. It builds with `build` and tests with `test`. The codecov step uploaded ./pkgs/ui/coverage/lcov.info; pkg/ui has no coverage config and no @vitest/coverage-* dependency, so nothing has ever written that file. Dropped. The typecheck job checks app AND pkg/ui but built only app's dependencies. @hanzo/data is not one of app's, so it stayed unbuilt — and its exports name ./types/index.d.ts, which nothing had produced. Bundler resolution fell through to the next condition, ./src/index.ts, and pkg/ui typechecked another package's source: 90 errors in ../data/src/board/BoardView.tsx and its neighbours. It builds both dependency sets now, and pkg/ui reads declarations. That was invisible until now: the step is one `run:` block under `bash -e`, and `cd app && pnpm run typecheck` failed first, so the pkg/ui line never ran. The ten animation and pattern demos imported @hanzo/ui/animation/* and @hanzo/ui/pattern/*. Neither subpath is in the package's exports, so each was an untyped any: error TS7016: Could not find a declaration file for module '@hanzo/ui/animation/animated-beam' Those components live in this app, at registry/default/ui/, which is where their 390 sibling demos already import from. @hanzo/cd was an optional peer only, but src/gitops.ts re-exports it unconditionally, so typechecking pkg/ui requires it present. It is a devDependency now — the same shape @hanzo/data already had, optional for consumers and present here. ResizablePanelGroup requires a direction; the render test rendered it without one. app/__tests__/hanzo-ui-imports.test.tsx is gone. Fifty-two lines whose three assertions were each expect(true).toBe(true) — it could not fail, so it was not checking the exports its name claims. Verified: install, turbo build of both dependency sets, app typecheck, and pkg/ui tc — all exit 0, zero TS errors.
100 lines
2.5 KiB
TypeScript
100 lines
2.5 KiB
TypeScript
"use client"
|
|
|
|
import { GridPattern, GridPatternPresets } from "@/registry/default/ui/grid-pattern"
|
|
|
|
export function GridPatternHero() {
|
|
return (
|
|
<section className="relative min-h-[600px] overflow-hidden">
|
|
{/* Animated gradient grid background */}
|
|
<GridPattern
|
|
variant="dots"
|
|
size={3}
|
|
gap={30}
|
|
opacity={0.3}
|
|
fade="edges"
|
|
gradient={{
|
|
from: "#ec4899",
|
|
via: "#8b5cf6",
|
|
to: "#3b82f6",
|
|
opacity: 0.15,
|
|
}}
|
|
animation={{
|
|
duration: 20,
|
|
timing: "linear",
|
|
}}
|
|
/>
|
|
|
|
<div className="relative z-10 flex min-h-[600px] items-center justify-center px-4">
|
|
<div className="text-center">
|
|
<h1 className="text-5xl font-bold tracking-tight sm:text-6xl">
|
|
Grid Pattern Background
|
|
</h1>
|
|
<p className="mt-4 text-xl text-muted-foreground">
|
|
Beautiful, customizable grid patterns for your UI
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
export function GridPatternCard() {
|
|
return (
|
|
<div className="relative overflow-hidden rounded-lg border bg-card p-6">
|
|
<GridPattern
|
|
{...GridPatternPresets.blueprint}
|
|
opacity={0.1}
|
|
className="absolute inset-0"
|
|
/>
|
|
<div className="relative z-10">
|
|
<h3 className="text-lg font-semibold">Blueprint Card</h3>
|
|
<p className="mt-2 text-muted-foreground">
|
|
A card with a subtle blueprint grid pattern background
|
|
</p>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export function GridPatternLayered() {
|
|
return (
|
|
<div className="relative h-96 overflow-hidden rounded-lg border">
|
|
{/* Layer 1: Large grid */}
|
|
<GridPattern
|
|
variant="lines"
|
|
gap={100}
|
|
strokeWidth={1.5}
|
|
opacity={0.08}
|
|
color="#3b82f6"
|
|
/>
|
|
|
|
{/* Layer 2: Medium grid */}
|
|
<GridPattern
|
|
variant="lines"
|
|
gap={50}
|
|
strokeWidth={1}
|
|
opacity={0.06}
|
|
color="#8b5cf6"
|
|
/>
|
|
|
|
{/* Layer 3: Fine dots */}
|
|
<GridPattern
|
|
variant="dots"
|
|
size={1.5}
|
|
gap={15}
|
|
opacity={0.04}
|
|
color="#ec4899"
|
|
/>
|
|
|
|
<div className="relative z-10 flex h-full items-center justify-center">
|
|
<div className="text-center">
|
|
<h2 className="text-3xl font-bold">Multi-Layer Grid</h2>
|
|
<p className="mt-2 text-muted-foreground">
|
|
Combining multiple grids creates depth
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|