@madebywild/wvk 0.1.1 → 0.1.2
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 +13 -0
- package/bin/wvk.mjs +134 -8
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +0 -4
- package/package.json +6 -2
- package/templates/next-app/README.md +55 -0
- package/templates/next-app/eslint.config.mjs +11 -0
- package/templates/next-app/gitignore +41 -0
- package/templates/next-app/next.config.ts +5 -0
- package/templates/next-app/package.json +28 -0
- package/templates/next-app/postcss.config.mjs +7 -0
- package/templates/next-app/src/app/globals.css +8 -0
- package/templates/next-app/src/app/layout.tsx +48 -0
- package/templates/next-app/src/app/page.tsx +48 -0
- package/templates/next-app/src/components/header.tsx +17 -0
- package/templates/next-app/tsconfig.json +29 -0
package/dist/styles.css
CHANGED
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
--color-border: var(--border);
|
|
23
23
|
--color-input: var(--input);
|
|
24
24
|
--color-ring: var(--ring);
|
|
25
|
-
--color-destructive: var(--destructive);
|
|
26
|
-
|
|
27
25
|
/* Semantic surface (Figma: surface/bold, surface/muted, …) */
|
|
28
26
|
--color-wvk-bold: var(--wvk-surface-bold);
|
|
29
27
|
--color-wvk-muted: var(--wvk-surface-muted);
|
|
@@ -142,7 +140,6 @@
|
|
|
142
140
|
--border: var(--wvk-border-default);
|
|
143
141
|
--input: var(--wvk-border-default);
|
|
144
142
|
--ring: var(--wvk-foreground-secondary);
|
|
145
|
-
--destructive: #ff3b30;
|
|
146
143
|
|
|
147
144
|
/*
|
|
148
145
|
* Field chrome (inputs, selects, textareas on blue canvas in dark mode):
|
|
@@ -245,7 +242,6 @@ html.wvk-cursor-style-arrow {
|
|
|
245
242
|
--border: var(--wvk-border-default);
|
|
246
243
|
--input: rgba(255, 255, 255, 0.4);
|
|
247
244
|
--ring: rgba(255, 255, 255, 0.8);
|
|
248
|
-
--destructive: #ff6961;
|
|
249
245
|
|
|
250
246
|
/*
|
|
251
247
|
* Field chrome on blue canvas: frosted surface + white value/placeholder text
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madebywild/wvk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Wireframe kit — components, icons, and design tokens",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
"import": "./dist/icons.js",
|
|
28
28
|
"require": "./dist/icons.cjs"
|
|
29
29
|
},
|
|
30
|
-
"./styles.css":
|
|
30
|
+
"./styles.css": {
|
|
31
|
+
"style": "./dist/styles.css",
|
|
32
|
+
"default": "./dist/styles.css"
|
|
33
|
+
}
|
|
31
34
|
},
|
|
32
35
|
"sideEffects": [
|
|
33
36
|
"./dist/styles.css"
|
|
@@ -35,6 +38,7 @@
|
|
|
35
38
|
"files": [
|
|
36
39
|
"dist",
|
|
37
40
|
"bin",
|
|
41
|
+
"templates",
|
|
38
42
|
"AGENTS.md",
|
|
39
43
|
"README.md"
|
|
40
44
|
],
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# my wvk app
|
|
2
|
+
|
|
3
|
+
A starter Next.js app powered by [`@madebywild/wvk`](https://www.npmjs.com/package/@madebywild/wvk) — wild vibeframe kit components, icons, and design tokens.
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
Install dependencies and run the dev server:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install
|
|
11
|
+
npm run dev
|
|
12
|
+
# or
|
|
13
|
+
pnpm install
|
|
14
|
+
pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) to see the app.
|
|
18
|
+
|
|
19
|
+
## What's included
|
|
20
|
+
|
|
21
|
+
- **Next.js 16** with the App Router
|
|
22
|
+
- **React 19**
|
|
23
|
+
- **Tailwind CSS v4** wired up via `@tailwindcss/postcss`
|
|
24
|
+
- **`@madebywild/wvk`** — components, icons, theme provider, and design tokens
|
|
25
|
+
- A `Header` composition with `ThemeSwitcher` for light/dark toggling
|
|
26
|
+
- Strict TypeScript and Next's recommended ESLint config
|
|
27
|
+
- An `AGENTS.md` carrying the wvk authoring rules — your agent harness (Claude Code, Cursor, Copilot, etc.) will pick it up automatically and constrain code generation to the kit's tokens, components, and styles
|
|
28
|
+
|
|
29
|
+
## Where to look first
|
|
30
|
+
|
|
31
|
+
- `src/app/layout.tsx` — root layout with `ThemeProvider` and the early-paint theme init script.
|
|
32
|
+
- `src/app/globals.css` — imports Tailwind v4 and `@madebywild/wvk/styles.css`, plus the `dark` custom variant. Do not remove the `@source` directive — Tailwind needs it to generate utility classes referenced from the package's `dist/`.
|
|
33
|
+
- `src/app/page.tsx` — example landing page using kit components (`Alert`, `Button`, `Tag`, icons).
|
|
34
|
+
- `src/components/header.tsx` — example `Header` composed from `ThemeSwitcher` and a brand link.
|
|
35
|
+
|
|
36
|
+
## Using the kit
|
|
37
|
+
|
|
38
|
+
Import components and icons from the package:
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { Button, Alert, ThemeSwitcher } from "@madebywild/wvk";
|
|
42
|
+
import { ArrowRight } from "@madebywild/wvk/icons";
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Reach for kit components and semantic tokens (`bg-wvk-surface-primary`, `text-wvk-foreground-secondary`, `border-wvk-border-default`, etc.) before writing one-off styles.
|
|
46
|
+
|
|
47
|
+
## Scripts
|
|
48
|
+
|
|
49
|
+
| Script | Description |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `dev` | Start the Next.js dev server |
|
|
52
|
+
| `build` | Build for production |
|
|
53
|
+
| `start` | Run the production build |
|
|
54
|
+
| `lint` | Lint with `eslint-config-next` |
|
|
55
|
+
| `typecheck` | Run `tsc --noEmit` |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
2
|
+
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
3
|
+
import nextTs from "eslint-config-next/typescript";
|
|
4
|
+
|
|
5
|
+
const eslintConfig = defineConfig([
|
|
6
|
+
...nextVitals,
|
|
7
|
+
...nextTs,
|
|
8
|
+
globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts"]),
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
export default eslintConfig;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.*
|
|
7
|
+
.yarn/*
|
|
8
|
+
!.yarn/patches
|
|
9
|
+
!.yarn/plugins
|
|
10
|
+
!.yarn/releases
|
|
11
|
+
!.yarn/versions
|
|
12
|
+
|
|
13
|
+
# testing
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# next.js
|
|
17
|
+
/.next/
|
|
18
|
+
/out/
|
|
19
|
+
|
|
20
|
+
# production
|
|
21
|
+
/build
|
|
22
|
+
|
|
23
|
+
# misc
|
|
24
|
+
.DS_Store
|
|
25
|
+
*.pem
|
|
26
|
+
|
|
27
|
+
# debug
|
|
28
|
+
npm-debug.log*
|
|
29
|
+
yarn-debug.log*
|
|
30
|
+
yarn-error.log*
|
|
31
|
+
.pnpm-debug.log*
|
|
32
|
+
|
|
33
|
+
# env files (can opt-in for committing if needed)
|
|
34
|
+
.env*
|
|
35
|
+
|
|
36
|
+
# vercel
|
|
37
|
+
.vercel
|
|
38
|
+
|
|
39
|
+
# typescript
|
|
40
|
+
*.tsbuildinfo
|
|
41
|
+
next-env.d.ts
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-wvk-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "eslint",
|
|
10
|
+
"typecheck": "tsc --noEmit"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@madebywild/wvk": "0.1.2",
|
|
14
|
+
"next": "16.2.2",
|
|
15
|
+
"react": "19.2.4",
|
|
16
|
+
"react-dom": "19.2.4"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@tailwindcss/postcss": "^4",
|
|
20
|
+
"@types/node": "^20",
|
|
21
|
+
"@types/react": "^19",
|
|
22
|
+
"@types/react-dom": "^19",
|
|
23
|
+
"eslint": "^9",
|
|
24
|
+
"eslint-config-next": "16.2.2",
|
|
25
|
+
"tailwindcss": "^4",
|
|
26
|
+
"typescript": "^5"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "@madebywild/wvk/styles.css";
|
|
3
|
+
|
|
4
|
+
/* Tailwind v4 needs to scan the kit's compiled output to generate the
|
|
5
|
+
* utility classes referenced by wvk components. Do not remove. */
|
|
6
|
+
@source "../../node_modules/@madebywild/wvk/dist";
|
|
7
|
+
|
|
8
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Metadata, Viewport } from "next";
|
|
2
|
+
import { Inter } from "next/font/google";
|
|
3
|
+
import { ThemeProvider } from "@madebywild/wvk";
|
|
4
|
+
import "./globals.css";
|
|
5
|
+
|
|
6
|
+
const inter = Inter({
|
|
7
|
+
variable: "--font-inter",
|
|
8
|
+
subsets: ["latin"],
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const metadata: Metadata = {
|
|
12
|
+
title: "my wvk app",
|
|
13
|
+
description: "A starter Next.js app powered by @madebywild/wvk.",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const viewport: Viewport = {
|
|
17
|
+
width: "device-width",
|
|
18
|
+
initialScale: 1,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const themeInitScript = `
|
|
22
|
+
(function(){
|
|
23
|
+
try {
|
|
24
|
+
var t = localStorage.getItem('wvk-theme');
|
|
25
|
+
if (t === 'dark') document.documentElement.classList.add('dark');
|
|
26
|
+
else document.documentElement.classList.remove('dark');
|
|
27
|
+
} catch (e) {}
|
|
28
|
+
})();
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export default function RootLayout({
|
|
32
|
+
children,
|
|
33
|
+
}: Readonly<{ children: React.ReactNode }>) {
|
|
34
|
+
return (
|
|
35
|
+
<html
|
|
36
|
+
lang="en"
|
|
37
|
+
className={`${inter.variable} h-full antialiased`}
|
|
38
|
+
suppressHydrationWarning
|
|
39
|
+
>
|
|
40
|
+
<head>
|
|
41
|
+
<script suppressHydrationWarning>{themeInitScript}</script>
|
|
42
|
+
</head>
|
|
43
|
+
<body className="min-h-full bg-background font-sans text-foreground">
|
|
44
|
+
<ThemeProvider>{children}</ThemeProvider>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Alert, Button, Tag } from "@madebywild/wvk";
|
|
2
|
+
import { ArrowRight, Checkmark } from "@madebywild/wvk/icons";
|
|
3
|
+
import { Header } from "@/components/header";
|
|
4
|
+
|
|
5
|
+
export default function Page() {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<Header />
|
|
9
|
+
<main className="min-h-[calc(100vh-65px)] bg-wvk-surface-secondary">
|
|
10
|
+
<section className="mx-auto flex w-full max-w-6xl flex-col gap-8 px-6 py-16">
|
|
11
|
+
<div className="space-y-4">
|
|
12
|
+
<Tag showLeadingIcon leadingIcon="Rocket">
|
|
13
|
+
New project
|
|
14
|
+
</Tag>
|
|
15
|
+
<h1 className="text-4xl font-semibold tracking-tight md:text-5xl">
|
|
16
|
+
Welcome to your wvk app
|
|
17
|
+
</h1>
|
|
18
|
+
<p className="max-w-2xl text-base leading-7 text-wvk-foreground-secondary">
|
|
19
|
+
Edit{" "}
|
|
20
|
+
<code className="rounded bg-wvk-surface-primary px-1.5 py-0.5 text-sm">
|
|
21
|
+
src/app/page.tsx
|
|
22
|
+
</code>{" "}
|
|
23
|
+
to start building. Components, icons, design tokens, and theme support
|
|
24
|
+
are wired up — pick a kit component and compose.
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<Alert
|
|
29
|
+
title="Everything is wired up"
|
|
30
|
+
icon={<Checkmark aria-hidden />}
|
|
31
|
+
>
|
|
32
|
+
<code>ThemeProvider</code> is mounted, design tokens and component styles
|
|
33
|
+
are loaded, and Tailwind v4 is scanning the kit's output. Try
|
|
34
|
+
toggling the theme switcher in the header.
|
|
35
|
+
</Alert>
|
|
36
|
+
|
|
37
|
+
<div className="flex flex-wrap gap-3">
|
|
38
|
+
<Button>
|
|
39
|
+
Read the docs
|
|
40
|
+
<ArrowRight className="size-[var(--wvk-icon-sm)]" aria-hidden />
|
|
41
|
+
</Button>
|
|
42
|
+
<Button variant="ghost">Browse components</Button>
|
|
43
|
+
</div>
|
|
44
|
+
</section>
|
|
45
|
+
</main>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
import { ThemeSwitcher } from "@madebywild/wvk";
|
|
3
|
+
import { Package } from "@madebywild/wvk/icons";
|
|
4
|
+
|
|
5
|
+
export function Header() {
|
|
6
|
+
return (
|
|
7
|
+
<header className="sticky top-0 z-10 border-b border-wvk-border-default bg-wvk-surface-primary">
|
|
8
|
+
<div className="mx-auto flex w-full max-w-6xl items-center justify-between gap-4 px-6 py-4">
|
|
9
|
+
<Link href="/" className="flex items-center gap-2 text-sm font-bold">
|
|
10
|
+
<Package className="size-[var(--wvk-icon-md)]" aria-hidden />
|
|
11
|
+
<span>my wvk app</span>
|
|
12
|
+
</Link>
|
|
13
|
+
<ThemeSwitcher />
|
|
14
|
+
</div>
|
|
15
|
+
</header>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": false,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"incremental": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
"plugins": [{ "name": "next" }],
|
|
17
|
+
"paths": {
|
|
18
|
+
"@/*": ["./src/*"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"include": [
|
|
22
|
+
"next-env.d.ts",
|
|
23
|
+
"**/*.ts",
|
|
24
|
+
"**/*.tsx",
|
|
25
|
+
".next/types/**/*.ts",
|
|
26
|
+
".next/dev/types/**/*.ts"
|
|
27
|
+
],
|
|
28
|
+
"exclude": ["node_modules"]
|
|
29
|
+
}
|