@codewizard-dt/bootstrap 2.10.0
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/.github/workflows/build.yml +88 -0
- package/.github/workflows/security.yml +24 -0
- package/.gitleaks.toml +15 -0
- package/README.md +472 -0
- package/bin/cli.js +47 -0
- package/lib/README.md +27 -0
- package/lib/hooks/README.md +316 -0
- package/lib/hooks/env-file-guard.js +45 -0
- package/lib/hooks/git-protected-ops-block.js +77 -0
- package/lib/hooks/lib/serena-languages.js +158 -0
- package/lib/hooks/lib/serena.js +787 -0
- package/lib/hooks/mv-absolute-path-block.js +53 -0
- package/lib/hooks/serena-bash-grep-block.js +501 -0
- package/lib/hooks/serena-edit-guard.js +74 -0
- package/lib/hooks/serena-first-glob-guard.js +94 -0
- package/lib/hooks/serena-first-guard.js +74 -0
- package/lib/hooks/serena-first-read-guard.js +167 -0
- package/lib/hooks/serena-pre-delegation.js +117 -0
- package/lib/hooks/serena-session-reset.js +45 -0
- package/lib/hooks/serena-usage-tracker.js +186 -0
- package/lib/hooks/serena-write-guard.js +58 -0
- package/lib/prompts/README.md +16 -0
- package/lib/prompts/migrate-wiki.md +111 -0
- package/lib/prompts/setup-deployment.md +322 -0
- package/lib/prompts/setup-design-system.md +162 -0
- package/lib/prompts/setup-strict-typechecks.md +139 -0
- package/lib/scripts/README.md +49 -0
- package/lib/scripts/bootstrap-serena.sh +145 -0
- package/lib/scripts/build-mcp-guide.sh +108 -0
- package/lib/scripts/install-global.sh +78 -0
- package/lib/scripts/install-mcps.sh +131 -0
- package/lib/scripts/lib.sh +154 -0
- package/lib/scripts/merge-gitignore.sh +65 -0
- package/lib/scripts/migrate-project.sh +273 -0
- package/lib/scripts/setup-deployment.sh +104 -0
- package/lib/scripts/setup-project.sh +55 -0
- package/lib/scripts/setup-runner.sh +99 -0
- package/lib/scripts/setup-strict-typechecks.sh +29 -0
- package/lib/scripts/startup.sh +42 -0
- package/lib/scripts/sync-wiki-scaffold.sh +104 -0
- package/lib/scripts/templates/CLAUDE-env-safety.md +3 -0
- package/lib/scripts/templates/CLAUDE-wiki.md +60 -0
- package/lib/scripts/templates/gitignore +136 -0
- package/lib/scripts/templates/guides/stubs/00-header.md +15 -0
- package/lib/scripts/templates/guides/stubs/brave-search.md +20 -0
- package/lib/scripts/templates/guides/stubs/context7.md +26 -0
- package/lib/scripts/templates/guides/stubs/playwright.md +26 -0
- package/lib/scripts/templates/guides/stubs/serena.md +219 -0
- package/lib/scripts/templates/wiki/conventions.md +100 -0
- package/lib/scripts/templates/wiki/dashboard.html +1733 -0
- package/lib/scripts/templates/wiki/hot.md +21 -0
- package/lib/scripts/templates/wiki/index.md +46 -0
- package/lib/scripts/templates/wiki/knowledge/concepts/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/knowledge/entities/components/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/knowledge/entities/organisations/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/knowledge/entities/people/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/knowledge/entities/tools/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/knowledge/sources/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/log.md +14 -0
- package/lib/scripts/templates/wiki/work/bugs/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/work/bugs/archive/index.md +6 -0
- package/lib/scripts/templates/wiki/work/bugs/index.md +12 -0
- package/lib/scripts/templates/wiki/work/bugs/lifecycle.md +39 -0
- package/lib/scripts/templates/wiki/work/decisions/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/work/decisions/archive/index.md +6 -0
- package/lib/scripts/templates/wiki/work/decisions/index.md +12 -0
- package/lib/scripts/templates/wiki/work/decisions/lifecycle.md +42 -0
- package/lib/scripts/templates/wiki/work/requirements/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/work/requirements/archive/index.md +6 -0
- package/lib/scripts/templates/wiki/work/requirements/index.md +12 -0
- package/lib/scripts/templates/wiki/work/requirements/lifecycle.md +34 -0
- package/lib/scripts/templates/wiki/work/roadmaps/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/work/roadmaps/archive/index.md +6 -0
- package/lib/scripts/templates/wiki/work/roadmaps/index.md +12 -0
- package/lib/scripts/templates/wiki/work/roadmaps/lifecycle.md +32 -0
- package/lib/scripts/templates/wiki/work/tasks/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/work/tasks/archive/index.md +6 -0
- package/lib/scripts/templates/wiki/work/tasks/index.md +12 -0
- package/lib/scripts/templates/wiki/work/tasks/lifecycle.md +39 -0
- package/lib/scripts/templates/wiki/work/uat/.gitkeep +0 -0
- package/lib/scripts/templates/wiki/work/uat/archive/index.md +6 -0
- package/lib/scripts/templates/wiki/work/uat/index.md +12 -0
- package/lib/scripts/templates/wiki/work/uat/lifecycle.md +48 -0
- package/lib/scripts/templates/wiki/work/uat/screenshots/.gitkeep +0 -0
- package/lib/scripts/update-project.sh +75 -0
- package/lib/scripts/wiki-dashboard-server.js +146 -0
- package/lib/skills/README.md +146 -0
- package/lib/skills/anti-slop/SKILL.md +183 -0
- package/lib/skills/bug-close/SKILL.md +136 -0
- package/lib/skills/bug-file/SKILL.md +114 -0
- package/lib/skills/bug-triage/SKILL.md +140 -0
- package/lib/skills/company-align/SKILL.md +203 -0
- package/lib/skills/debug-logs/SKILL.md +129 -0
- package/lib/skills/decision-create/SKILL.md +220 -0
- package/lib/skills/decision-finalize/SKILL.md +181 -0
- package/lib/skills/decision-next/SKILL.md +129 -0
- package/lib/skills/decision-walkthrough/SKILL.md +169 -0
- package/lib/skills/demo/SKILL.md +183 -0
- package/lib/skills/elevator-pitch/SKILL.md +125 -0
- package/lib/skills/eval-create/SKILL.md +344 -0
- package/lib/skills/eval-gap/SKILL.md +150 -0
- package/lib/skills/eval-run/SKILL.md +214 -0
- package/lib/skills/extract-feature/SKILL.md +344 -0
- package/lib/skills/flashcard/SKILL.md +513 -0
- package/lib/skills/frontend-taste/SKILL.md +184 -0
- package/lib/skills/gap-assess/SKILL.md +97 -0
- package/lib/skills/git-commit/SKILL.md +164 -0
- package/lib/skills/lint/SKILL.md +99 -0
- package/lib/skills/marp-slideshow/SKILL.md +212 -0
- package/lib/skills/mermaid-flowchart/SKILL.md +194 -0
- package/lib/skills/now/SKILL.md +36 -0
- package/lib/skills/port-feature/SKILL.md +315 -0
- package/lib/skills/power-mode/SKILL.md +184 -0
- package/lib/skills/primer/SKILL.md +84 -0
- package/lib/skills/project-readme/SKILL.md +166 -0
- package/lib/skills/req-compile/SKILL.md +131 -0
- package/lib/skills/req-create/SKILL.md +124 -0
- package/lib/skills/req-extract-decisions/SKILL.md +241 -0
- package/lib/skills/req-finalize/SKILL.md +251 -0
- package/lib/skills/req-retire/SKILL.md +185 -0
- package/lib/skills/req-update/SKILL.md +265 -0
- package/lib/skills/research/SKILL.md +250 -0
- package/lib/skills/research-company/SKILL.md +345 -0
- package/lib/skills/roadmap-add/SKILL.md +238 -0
- package/lib/skills/roadmap-create/SKILL.md +223 -0
- package/lib/skills/roadmap-next/SKILL.md +132 -0
- package/lib/skills/security-audit/SKILL.md +246 -0
- package/lib/skills/serena-config/SKILL.md +92 -0
- package/lib/skills/simplify/SKILL.md +227 -0
- package/lib/skills/tackle/SKILL.md +156 -0
- package/lib/skills/task-add/SKILL.md +208 -0
- package/lib/skills/task-audit/SKILL.md +294 -0
- package/lib/skills/task-trash/SKILL.md +115 -0
- package/lib/skills/task-update/SKILL.md +136 -0
- package/lib/skills/uat-auto/SKILL.md +69 -0
- package/lib/skills/uat-auto-plus/SKILL.md +115 -0
- package/lib/skills/uat-generate/SKILL.md +289 -0
- package/lib/skills/uat-skip/SKILL.md +169 -0
- package/lib/skills/uat-walk/SKILL.md +164 -0
- package/lib/skills/uat-walk/UAT-CORE.md +140 -0
- package/lib/skills/update-docs/SKILL.md +75 -0
- package/lib/skills/wiki-archive/SKILL.md +96 -0
- package/lib/skills/wiki-ingest/SKILL.md +139 -0
- package/lib/skills/wiki-lint/SKILL.md +131 -0
- package/lib/skills/wiki-query/SKILL.md +71 -0
- package/lib/skills/wiki-rotate-log/SKILL.md +90 -0
- package/lib/skills/wiki-tidy/SKILL.md +107 -0
- package/package.json +32 -0
- package/raw/.gitkeep +0 -0
- package/raw/design-principles.md +65 -0
- package/raw/guides/command-anti-patterns.md +79 -0
- package/raw/guides/deployment-strategy.md +448 -0
- package/raw/guides/evals-framework.md +452 -0
- package/raw/guides/mcp-tools.md +335 -0
- package/raw/guides/task-spec.md +79 -0
- package/raw/guides/type-checking-templates/README.md +112 -0
- package/raw/guides/type-checking-templates/eslint/eslint.config.ts +105 -0
- package/raw/guides/type-checking-templates/python/mypy.ini +69 -0
- package/raw/guides/type-checking-templates/python/pyproject.toml +164 -0
- package/raw/guides/type-checking-templates/python/pyrightconfig.json +67 -0
- package/raw/guides/type-checking-templates/tsconfig/tsconfig.app.jsonc +45 -0
- package/raw/guides/type-checking-templates/tsconfig/tsconfig.lib.jsonc +44 -0
- package/raw/guides/type-checking-templates/tsconfig/tsconfig.node-esm.jsonc +40 -0
- package/raw/guides/type-checking-templates/tsconfig/tsconfig.node.jsonc +34 -0
- package/raw/guides/type-checking-templates/tsconfig/tsconfig.vite-root.json +8 -0
- package/raw/harness-notes.md +20 -0
- package/raw/house-style/components/Badge.tsx +16 -0
- package/raw/house-style/components/Button.tsx +32 -0
- package/raw/house-style/components/Card.tsx +26 -0
- package/raw/house-style/components/Chip.tsx +57 -0
- package/raw/house-style/components/IconButton.tsx +67 -0
- package/raw/house-style/components/Modal.tsx +18 -0
- package/raw/house-style/components/Stepper.tsx +141 -0
- package/raw/house-style/components/icons.tsx +128 -0
- package/raw/house-style/preview/src/index.css +46 -0
- package/raw/house-style/tokens/tailwind.preset.ts +49 -0
- package/raw/house-style/tokens/tokens.json +62 -0
- package/raw/llm-wiki-2.md +162 -0
- package/raw/llm-wiki.md +75 -0
- package/raw/research/dark-mode-theme/index.md +85 -0
- package/raw/research/dark-mode-theme/sources.md +49 -0
- package/raw/research/serena-mcp-disconnect/index.md +81 -0
- package/raw/research/serena-mcp-disconnect/sources.md +87 -0
- package/raw/research/wiki-tooling-improvements/index.md +126 -0
- package/raw/research/wiki-tooling-improvements/sources.md +73 -0
- package/raw/software-factory-case-study.pdf +0 -0
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flashcard
|
|
3
|
+
description: Turn markdown/research files into a self-contained interactive flashcard HTML page
|
|
4
|
+
category: researching
|
|
5
|
+
model: claude-sonnet-4-6
|
|
6
|
+
argument-hint: "<file1> [file2 ...] [-- <what's important>]"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Flashcard
|
|
10
|
+
|
|
11
|
+
Turn one or more markdown or research files into a **single self-contained HTML page** of interactive flashcards. The page lives in one file — no build step, no external assets except the Inter Tight font (gracefully offline-degraded). Cards flip on click or Space, navigate with arrow keys, and can be shuffled.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
**Arguments**: $ARGUMENTS
|
|
16
|
+
|
|
17
|
+
Split on ` -- ` (literal space-dash-dash-space):
|
|
18
|
+
- **Left side** — space-separated file paths. Verify each exists (use `Read` to open it).
|
|
19
|
+
- **Right side** (optional) — a focus instruction describing what the user considers "important" (e.g., `-- API methods and their parameters`).
|
|
20
|
+
- If no `--` is present, the entire arguments string is treated as file paths.
|
|
21
|
+
- Derive a **slug** from the first file's stem (e.g., `llm-wiki` from `llm-wiki.md`). Use it in the output filename: `<slug>-flashcards.html`. If multiple files and no clear lead, use `flashcards.html`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Phase 1 — Load House-Style Design Tokens
|
|
26
|
+
|
|
27
|
+
Read `~/code/house-style/tokens.json` to get the canonical values used by the `/frontend-taste` skill. Extract exactly these values for embedding in the HTML:
|
|
28
|
+
|
|
29
|
+
| Token | Value |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `--canvas` | `#f6f7f9` |
|
|
32
|
+
| `--surface` | `#ffffff` |
|
|
33
|
+
| `--ink` | `#0b0b0d` |
|
|
34
|
+
| `--ink-2` | `#3a3a40` |
|
|
35
|
+
| `--muted` | `#6b7280` |
|
|
36
|
+
| `--line` | `#e4e5e8` |
|
|
37
|
+
| `--accent` | `#4f5a78` |
|
|
38
|
+
| `--accent-green` | `#4a7c59` |
|
|
39
|
+
| `--radius-card` | `14px` |
|
|
40
|
+
| `--radius-pill` | `999px` |
|
|
41
|
+
| Font | Inter Tight, `-0.011em` tracking, `font-feature-settings: "ss01" "cv11" "cv02"` |
|
|
42
|
+
| Animations | `popIn 220ms cubic-bezier(0.34,1.56,0.64,1)`, `riseIn 500ms ease` |
|
|
43
|
+
|
|
44
|
+
If `~/code/house-style/tokens.json` cannot be read, fall back to the values in the table above — they are the canonical defaults.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Phase 2 — Read Source Files
|
|
49
|
+
|
|
50
|
+
Use the `Read` tool to read every file path parsed from the arguments. Do not use Serena for this — these are typically markdown documents, not code files.
|
|
51
|
+
|
|
52
|
+
For each file, note:
|
|
53
|
+
- Its **filename stem** (used as the deck label)
|
|
54
|
+
- Its **full text content**
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Phase 3 — Extract Flashcard Content
|
|
59
|
+
|
|
60
|
+
For each source file, extract cards using the extraction hierarchy below. Apply the focus string (if provided) as a filter: extract only content that matches the focus topic and skip unrelated sections.
|
|
61
|
+
|
|
62
|
+
### Extraction hierarchy (priority order)
|
|
63
|
+
|
|
64
|
+
| Pattern | Front | Back |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `## Heading` or `### Heading` | "What is `<heading>`?" | First 2–4 sentences of the section body (strip sub-headings) |
|
|
67
|
+
| `**Bold term**` followed by ` — ` or `:` and a definition | `<bold term>` | The definition text |
|
|
68
|
+
| Numbered list under a heading | "How do you `<heading>`?" | The numbered steps as a clean list |
|
|
69
|
+
| Fenced code block with surrounding context | "When/how do you use this pattern?" (derived from the preceding heading or comment) | The code block, trimmed to ≤ 12 lines |
|
|
70
|
+
| Table rows where the first column is a label | `<first column value>` | Remaining columns joined as prose |
|
|
71
|
+
| Standalone factual sentence containing "is", "are", "means", "refers to" | A cloze prompt: replace the key noun/value with `___` | The original sentence |
|
|
72
|
+
|
|
73
|
+
**Limits:**
|
|
74
|
+
- Target 10–40 cards per source file.
|
|
75
|
+
- If a file yields more, keep the highest-level headings and first-occurrence bold terms; discard redundant sub-sections.
|
|
76
|
+
- Deduplicate: if two cards have near-identical fronts, keep only the richer one.
|
|
77
|
+
|
|
78
|
+
### Card data shape (used internally to build the HTML)
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"id": 1,
|
|
83
|
+
"deck": "llm-wiki",
|
|
84
|
+
"front": "What is the LLM Wiki pattern?",
|
|
85
|
+
"back": "A three-layer structure (raw/, wiki/, CLAUDE.md) …",
|
|
86
|
+
"source": "llm-wiki.md"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Collect all cards from all files into a single array. Preserve deck labels for the filter UI.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Phase 4 — Generate the HTML
|
|
95
|
+
|
|
96
|
+
Produce a **single `<!DOCTYPE html>` document** with all CSS and JS inline. The only network dependency is the Google Fonts `@import` for Inter Tight — everything else is self-contained.
|
|
97
|
+
|
|
98
|
+
### Full HTML template
|
|
99
|
+
|
|
100
|
+
Use this structure exactly, substituting real values:
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<!DOCTYPE html>
|
|
104
|
+
<html lang="en">
|
|
105
|
+
<head>
|
|
106
|
+
<meta charset="UTF-8">
|
|
107
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
108
|
+
<title>Flashcards — {TITLE}</title>
|
|
109
|
+
<style>
|
|
110
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap');
|
|
111
|
+
|
|
112
|
+
:root {
|
|
113
|
+
--canvas: #f6f7f9;
|
|
114
|
+
--surface: #ffffff;
|
|
115
|
+
--ink: #0b0b0d;
|
|
116
|
+
--ink-2: #3a3a40;
|
|
117
|
+
--muted: #6b7280;
|
|
118
|
+
--line: #e4e5e8;
|
|
119
|
+
--accent: #4f5a78;
|
|
120
|
+
--accent-green:#4a7c59;
|
|
121
|
+
--radius-card: 14px;
|
|
122
|
+
--radius-pill: 999px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
126
|
+
|
|
127
|
+
body {
|
|
128
|
+
font-family: 'Inter Tight', system-ui, sans-serif;
|
|
129
|
+
font-feature-settings: "ss01" "cv11" "cv02";
|
|
130
|
+
letter-spacing: -0.011em;
|
|
131
|
+
background: var(--canvas);
|
|
132
|
+
color: var(--ink);
|
|
133
|
+
min-height: 100dvh;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
align-items: center;
|
|
137
|
+
padding: 2rem 1rem 4rem;
|
|
138
|
+
gap: 1.5rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Header */
|
|
142
|
+
header {
|
|
143
|
+
width: 100%;
|
|
144
|
+
max-width: 640px;
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 0.75rem;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
h1 {
|
|
151
|
+
font-size: 1.125rem;
|
|
152
|
+
font-weight: 600;
|
|
153
|
+
color: var(--ink);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.controls-top {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
gap: 0.75rem;
|
|
160
|
+
flex-wrap: wrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
select {
|
|
164
|
+
font-family: inherit;
|
|
165
|
+
font-size: 0.8125rem;
|
|
166
|
+
font-feature-settings: "ss01" "cv11" "cv02";
|
|
167
|
+
color: var(--ink-2);
|
|
168
|
+
background: var(--surface);
|
|
169
|
+
border: 1px solid var(--line);
|
|
170
|
+
border-radius: var(--radius-pill);
|
|
171
|
+
padding: 0.3rem 0.9rem 0.3rem 0.75rem;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
appearance: none;
|
|
174
|
+
-webkit-appearance: none;
|
|
175
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
|
|
176
|
+
background-repeat: no-repeat;
|
|
177
|
+
background-position: right 0.6rem center;
|
|
178
|
+
padding-right: 1.75rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.progress {
|
|
182
|
+
font-size: 0.8125rem;
|
|
183
|
+
color: var(--muted);
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
font-variant-numeric: tabular-nums;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Card stage */
|
|
189
|
+
.stage {
|
|
190
|
+
width: 100%;
|
|
191
|
+
max-width: 640px;
|
|
192
|
+
perspective: 1200px;
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
user-select: none;
|
|
195
|
+
-webkit-user-select: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.card-inner {
|
|
199
|
+
position: relative;
|
|
200
|
+
width: 100%;
|
|
201
|
+
height: clamp(260px, 45vh, 520px);
|
|
202
|
+
transform-style: preserve-3d;
|
|
203
|
+
transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
|
|
204
|
+
border-radius: var(--radius-card);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.card-inner.flipped {
|
|
208
|
+
transform: rotateY(180deg);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.card-face {
|
|
212
|
+
position: absolute;
|
|
213
|
+
inset: 0;
|
|
214
|
+
backface-visibility: hidden;
|
|
215
|
+
-webkit-backface-visibility: hidden;
|
|
216
|
+
border-radius: var(--radius-card);
|
|
217
|
+
background: var(--surface);
|
|
218
|
+
border: 1px solid var(--line);
|
|
219
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-direction: column;
|
|
222
|
+
padding: 2rem;
|
|
223
|
+
gap: 0.5rem;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.card-face.back {
|
|
227
|
+
transform: rotateY(180deg);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.card-label {
|
|
231
|
+
font-size: 0.6875rem;
|
|
232
|
+
font-weight: 500;
|
|
233
|
+
letter-spacing: 0.06em;
|
|
234
|
+
text-transform: uppercase;
|
|
235
|
+
color: var(--muted);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.card-text {
|
|
239
|
+
flex: 1;
|
|
240
|
+
min-height: 0;
|
|
241
|
+
overflow-y: auto;
|
|
242
|
+
scrollbar-width: thin;
|
|
243
|
+
scrollbar-color: var(--line) transparent;
|
|
244
|
+
display: flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
font-size: 1.0625rem;
|
|
247
|
+
font-weight: 500;
|
|
248
|
+
line-height: 1.5;
|
|
249
|
+
color: var(--ink);
|
|
250
|
+
white-space: pre-wrap;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.card-face.back .card-text {
|
|
254
|
+
font-size: 0.9375rem;
|
|
255
|
+
font-weight: 400;
|
|
256
|
+
color: var(--ink-2);
|
|
257
|
+
align-items: flex-start;
|
|
258
|
+
padding-top: 0.25rem;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.card-source {
|
|
262
|
+
font-size: 0.6875rem;
|
|
263
|
+
color: var(--muted);
|
|
264
|
+
text-align: right;
|
|
265
|
+
margin-top: auto;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* Hint text */
|
|
269
|
+
.flip-hint {
|
|
270
|
+
font-size: 0.75rem;
|
|
271
|
+
color: var(--muted);
|
|
272
|
+
text-align: center;
|
|
273
|
+
opacity: 0.7;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Navigation controls */
|
|
277
|
+
.controls-bottom {
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
gap: 0.75rem;
|
|
281
|
+
flex-wrap: wrap;
|
|
282
|
+
justify-content: center;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
button {
|
|
286
|
+
font-family: inherit;
|
|
287
|
+
font-size: 0.8125rem;
|
|
288
|
+
font-feature-settings: "ss01" "cv11" "cv02";
|
|
289
|
+
font-weight: 500;
|
|
290
|
+
letter-spacing: -0.011em;
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
border: 1px solid var(--line);
|
|
293
|
+
border-radius: var(--radius-pill);
|
|
294
|
+
padding: 0.4rem 1rem;
|
|
295
|
+
background: var(--surface);
|
|
296
|
+
color: var(--ink-2);
|
|
297
|
+
transition: background 0.12s, border-color 0.12s, color 0.12s;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
button:hover {
|
|
301
|
+
background: var(--canvas);
|
|
302
|
+
border-color: var(--accent);
|
|
303
|
+
color: var(--accent);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
button:active {
|
|
307
|
+
transform: scale(0.97);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
button.primary {
|
|
311
|
+
background: var(--accent);
|
|
312
|
+
border-color: var(--accent);
|
|
313
|
+
color: #fff;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
button.primary:hover {
|
|
317
|
+
background: #3d4760;
|
|
318
|
+
border-color: #3d4760;
|
|
319
|
+
color: #fff;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Card enter animation */
|
|
323
|
+
@keyframes popIn {
|
|
324
|
+
from { opacity: 0; transform: scale(0.96) translateY(6px); }
|
|
325
|
+
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.card-inner.entering {
|
|
329
|
+
animation: popIn 220ms cubic-bezier(0.34,1.56,0.64,1) both;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* Progress bar */
|
|
333
|
+
.progress-bar-wrap {
|
|
334
|
+
width: 100%;
|
|
335
|
+
max-width: 640px;
|
|
336
|
+
height: 3px;
|
|
337
|
+
background: var(--line);
|
|
338
|
+
border-radius: var(--radius-pill);
|
|
339
|
+
overflow: hidden;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.progress-bar-fill {
|
|
343
|
+
height: 100%;
|
|
344
|
+
background: var(--accent);
|
|
345
|
+
border-radius: var(--radius-pill);
|
|
346
|
+
transition: width 0.25s ease;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* Responsive */
|
|
350
|
+
@media (max-width: 480px) {
|
|
351
|
+
body { padding: 1.25rem 0.75rem 3rem; }
|
|
352
|
+
.card-face { padding: 1.5rem; }
|
|
353
|
+
.card-text { font-size: 0.9375rem; }
|
|
354
|
+
}
|
|
355
|
+
</style>
|
|
356
|
+
</head>
|
|
357
|
+
<body>
|
|
358
|
+
|
|
359
|
+
<header>
|
|
360
|
+
<h1>{TITLE}</h1>
|
|
361
|
+
<div class="controls-top">
|
|
362
|
+
<select id="deckFilter" aria-label="Filter by deck">
|
|
363
|
+
<option value="all">All decks</option>
|
|
364
|
+
{DECK_OPTIONS}
|
|
365
|
+
</select>
|
|
366
|
+
<span class="progress" id="progressText">1 / {TOTAL}</span>
|
|
367
|
+
</div>
|
|
368
|
+
</header>
|
|
369
|
+
|
|
370
|
+
<div class="progress-bar-wrap">
|
|
371
|
+
<div class="progress-bar-fill" id="progressBar" style="width:{FIRST_PCT}%"></div>
|
|
372
|
+
</div>
|
|
373
|
+
|
|
374
|
+
<div class="stage" id="stage" role="button" tabindex="0" aria-label="Flashcard — click to flip">
|
|
375
|
+
<div class="card-inner" id="cardInner">
|
|
376
|
+
<div class="card-face front">
|
|
377
|
+
<span class="card-label">Question</span>
|
|
378
|
+
<div class="card-text" id="frontText"></div>
|
|
379
|
+
</div>
|
|
380
|
+
<div class="card-face back">
|
|
381
|
+
<span class="card-label">Answer</span>
|
|
382
|
+
<div class="card-text" id="backText"></div>
|
|
383
|
+
<div class="card-source" id="cardSource"></div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
<p class="flip-hint">Click card or press <kbd>Space</kbd> to flip · <kbd>←</kbd> <kbd>→</kbd> to navigate</p>
|
|
389
|
+
|
|
390
|
+
<div class="controls-bottom">
|
|
391
|
+
<button id="btnPrev" onclick="navigate(-1)">← Prev</button>
|
|
392
|
+
<button class="primary" id="btnFlip" onclick="flip()">Flip</button>
|
|
393
|
+
<button id="btnNext" onclick="navigate(1)">Next →</button>
|
|
394
|
+
<button id="btnShuffle" onclick="shuffle()">Shuffle</button>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
<script>
|
|
398
|
+
const ALL_CARDS = {CARDS_JSON};
|
|
399
|
+
|
|
400
|
+
let deck = [...ALL_CARDS];
|
|
401
|
+
let idx = 0;
|
|
402
|
+
let flipped = false;
|
|
403
|
+
|
|
404
|
+
const cardInner = document.getElementById('cardInner');
|
|
405
|
+
const frontText = document.getElementById('frontText');
|
|
406
|
+
const backText = document.getElementById('backText');
|
|
407
|
+
const cardSource = document.getElementById('cardSource');
|
|
408
|
+
const progressText = document.getElementById('progressText');
|
|
409
|
+
const progressBar = document.getElementById('progressBar');
|
|
410
|
+
const deckFilter = document.getElementById('deckFilter');
|
|
411
|
+
|
|
412
|
+
function render(animate) {
|
|
413
|
+
if (animate) {
|
|
414
|
+
cardInner.classList.remove('entering');
|
|
415
|
+
void cardInner.offsetWidth; // reflow
|
|
416
|
+
cardInner.classList.add('entering');
|
|
417
|
+
}
|
|
418
|
+
flipped = false;
|
|
419
|
+
cardInner.classList.remove('flipped');
|
|
420
|
+
const c = deck[idx];
|
|
421
|
+
frontText.textContent = c.front;
|
|
422
|
+
backText.textContent = c.back;
|
|
423
|
+
cardSource.textContent = c.source;
|
|
424
|
+
const pct = deck.length > 1 ? ((idx + 1) / deck.length) * 100 : 100;
|
|
425
|
+
progressText.textContent = `${idx + 1} / ${deck.length}`;
|
|
426
|
+
progressBar.style.width = pct + '%';
|
|
427
|
+
document.getElementById('btnPrev').disabled = idx === 0;
|
|
428
|
+
document.getElementById('btnNext').disabled = idx === deck.length - 1;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function flip() {
|
|
432
|
+
flipped = !flipped;
|
|
433
|
+
cardInner.classList.toggle('flipped', flipped);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
function navigate(dir) {
|
|
437
|
+
const next = idx + dir;
|
|
438
|
+
if (next < 0 || next >= deck.length) return;
|
|
439
|
+
idx = next;
|
|
440
|
+
render(true);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
function shuffle() {
|
|
444
|
+
for (let i = deck.length - 1; i > 0; i--) {
|
|
445
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
446
|
+
[deck[i], deck[j]] = [deck[j], deck[i]];
|
|
447
|
+
}
|
|
448
|
+
idx = 0;
|
|
449
|
+
render(true);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
cardInner.addEventListener('animationend', () => {
|
|
453
|
+
cardInner.classList.remove('entering');
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
document.getElementById('stage').addEventListener('click', flip);
|
|
457
|
+
document.getElementById('stage').addEventListener('keydown', e => {
|
|
458
|
+
if (e.key === ' ' || e.key === 'Enter') { e.preventDefault(); flip(); }
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
document.addEventListener('keydown', e => {
|
|
462
|
+
if (e.target.tagName === 'SELECT' || e.target.tagName === 'BUTTON') return;
|
|
463
|
+
if (e.key === 'ArrowLeft') { e.preventDefault(); navigate(-1); }
|
|
464
|
+
if (e.key === 'ArrowRight') { e.preventDefault(); navigate(1); }
|
|
465
|
+
if (e.key === ' ') { e.preventDefault(); flip(); }
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
deckFilter.addEventListener('change', () => {
|
|
469
|
+
const val = deckFilter.value;
|
|
470
|
+
deck = val === 'all' ? [...ALL_CARDS] : ALL_CARDS.filter(c => c.deck === val);
|
|
471
|
+
idx = 0;
|
|
472
|
+
render(true);
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
render(false);
|
|
476
|
+
</script>
|
|
477
|
+
</body>
|
|
478
|
+
</html>
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### Template substitutions
|
|
482
|
+
|
|
483
|
+
| Placeholder | Value |
|
|
484
|
+
|---|---|
|
|
485
|
+
| `{TITLE}` | Title derived from file name(s), e.g. `LLM Wiki Flashcards` |
|
|
486
|
+
| `{DECK_OPTIONS}` | One `<option value="{deck}">{deck}</option>` per unique deck label |
|
|
487
|
+
| `{TOTAL}` | Total card count |
|
|
488
|
+
| `{FIRST_PCT}` | `(1 / total * 100).toFixed(1)` |
|
|
489
|
+
| `{CARDS_JSON}` | The full card array as a JSON literal (use `JSON.stringify`-equivalent formatting; escape backticks and `</script>` in text fields by replacing `</script>` with `<\/script>`) |
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## Phase 5 — Write and Report
|
|
494
|
+
|
|
495
|
+
Write the HTML string to `./<slug>-flashcards.html` using the `Write` tool.
|
|
496
|
+
|
|
497
|
+
Report to the user:
|
|
498
|
+
- Output path
|
|
499
|
+
- Total card count
|
|
500
|
+
- Deck breakdown: `<filename>: N cards` per source file
|
|
501
|
+
- Keyboard shortcuts summary (flip / navigate / shuffle)
|
|
502
|
+
- How to open: `open <filename>-flashcards.html`
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## CRITICAL Rules
|
|
507
|
+
|
|
508
|
+
- The output file must be **fully self-contained** — no `src=""` external scripts, no `href=""` external stylesheets (the Google Fonts `@import` inside `<style>` is the sole allowed network reference).
|
|
509
|
+
- Embed `{CARDS_JSON}` as a raw JS object literal assigned to `const ALL_CARDS`. Ensure all card text is properly JSON-escaped; any `</script>` string inside card text must be split as `<\/script>` to avoid early tag closure.
|
|
510
|
+
- **Do not** use Serena MCP tools for reading the source markdown files — use the standard `Read` tool. Serena is for code files only.
|
|
511
|
+
- **Do** use `Read` (not bash) to open `~/code/house-style/tokens.json`. If the file is absent, fall back to the hardcoded token table in Phase 1.
|
|
512
|
+
- Write the output file with `Write` (not Bash redirect, not Serena).
|
|
513
|
+
- Keep the generated HTML clean — no `<!-- comments -->` in the output.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-taste
|
|
3
|
+
description: Wire the house-style design system into the current project — copies tokens/tailwind.preset.ts + tokens.json, components/*.tsx patterns, and the base CSS layer from ~/code/house-style; wires the Tailwind preset and Inter Tight font; matches the calm technical editorial aesthetic described in ~/code/house-style/README.md. Use when starting any new frontend feature, UI component, or screen that should match the design language.
|
|
4
|
+
category: executing
|
|
5
|
+
model: claude-sonnet-4-6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Frontend Taste
|
|
9
|
+
|
|
10
|
+
This skill wires the house-style design system into the current project.
|
|
11
|
+
Source: `~/code/house-style` — a portable UI kit extracted from a production app.
|
|
12
|
+
Run this once per project when you first need UI components; after that, extend in-place.
|
|
13
|
+
|
|
14
|
+
## Design language (read first)
|
|
15
|
+
|
|
16
|
+
**Calm, technical, light-mode editorial — a tool, not a consumer app. Clarity over decoration.**
|
|
17
|
+
|
|
18
|
+
- **Surfaces:** Off-white canvas `#f6f7f9`, white cards, near-black ink `#0b0b0d`. Color = meaning only (interactive affordances, semantic state), never decoration.
|
|
19
|
+
- **Depth:** 14px radii, 1px hairline borders `#e7e8ea`, whisper-soft shadows. No gloss, no dark surfaces unless a feature demands them.
|
|
20
|
+
- **Type:** Inter Tight globally, `-0.011em` tracking, stylistic sets `ss01 cv11 cv02` on. Uppercase micro-labels with `~0.08em` expanded tracking; monospace for codes/IDs.
|
|
21
|
+
- **Motion:** Snappy entrances (`popIn` 220ms), gentle rises (`riseIn` 500ms), bouncy ease `cubic-bezier(.22,1,.36,1)`. Press-scale `active:scale-[0.985]` on buttons. No long delays.
|
|
22
|
+
- **Accent:** Muted blue-gray `#4f5a78` — shows up in focus rings, not as a loud primary.
|
|
23
|
+
|
|
24
|
+
Type scale: display ~`15px/600`; uppercase labels `10–12px/600` + `tracking-[0.08em]`; body `13–13.5px` leading-relaxed; button `13px/500`; caption/mono `11px`.
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
### 1. Read the visual reference
|
|
29
|
+
|
|
30
|
+
Before writing any UI, read `~/code/house-style/README.md` for the full design language description. The `preview/` directory is the live visual reference — run `cd ~/code/house-style/preview && npm i && npm run dev` to see the full kit.
|
|
31
|
+
|
|
32
|
+
### 2. Copy tokens
|
|
33
|
+
|
|
34
|
+
Copy these two files into the project under `src/styles/` (or wherever the project keeps design tokens — check for an existing `tokens/` or `styles/` directory first):
|
|
35
|
+
|
|
36
|
+
- `~/code/house-style/tokens/tailwind.preset.ts` → `<project>/src/styles/tailwind.preset.ts`
|
|
37
|
+
- `~/code/house-style/tokens/tokens.json` → `<project>/src/styles/tokens.json`
|
|
38
|
+
|
|
39
|
+
The preset imports `tokens.json` with a relative path (`./tokens.json`) — preserve that relationship.
|
|
40
|
+
|
|
41
|
+
### 3. Wire the Tailwind preset
|
|
42
|
+
|
|
43
|
+
Find the project's Tailwind config (`tailwind.config.ts` / `tailwind.config.js` / `tailwind.config.cjs`).
|
|
44
|
+
Add the preset import and register it:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import houseStyle from "./src/styles/tailwind.preset";
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
presets: [houseStyle],
|
|
51
|
+
// ... rest of config
|
|
52
|
+
};
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If the project already has `theme.extend` entries, they remain — `presets` adds tokens on top of the default theme without clobbering existing overrides.
|
|
56
|
+
|
|
57
|
+
### 4. Apply the base CSS layer
|
|
58
|
+
|
|
59
|
+
Find the project's global CSS entry point (typically `src/index.css`, `src/globals.css`, `app/globals.css`, or wherever `@tailwind base` lives).
|
|
60
|
+
|
|
61
|
+
Add this block after the `@tailwind` directives:
|
|
62
|
+
|
|
63
|
+
```css
|
|
64
|
+
@layer base {
|
|
65
|
+
html {
|
|
66
|
+
@apply bg-canvas text-ink antialiased;
|
|
67
|
+
font-feature-settings: "ss01", "cv11", "cv02";
|
|
68
|
+
-webkit-font-smoothing: antialiased;
|
|
69
|
+
-moz-osx-font-smoothing: grayscale;
|
|
70
|
+
}
|
|
71
|
+
body {
|
|
72
|
+
font-family: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
73
|
+
letter-spacing: -0.011em;
|
|
74
|
+
}
|
|
75
|
+
::selection {
|
|
76
|
+
background: rgba(79, 90, 120, 0.18);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@layer utilities {
|
|
81
|
+
.scrollbar-none {
|
|
82
|
+
scrollbar-width: none;
|
|
83
|
+
}
|
|
84
|
+
.scrollbar-none::-webkit-scrollbar {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
.text-balance {
|
|
88
|
+
text-wrap: balance;
|
|
89
|
+
}
|
|
90
|
+
.dot-grid {
|
|
91
|
+
background-image: radial-gradient(circle, rgba(11, 11, 13, 0.05) 1px, transparent 1.4px);
|
|
92
|
+
background-size: 22px 22px;
|
|
93
|
+
-webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 95%);
|
|
94
|
+
mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 95%);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (prefers-reduced-motion: reduce) {
|
|
99
|
+
.animate-travel,
|
|
100
|
+
.animate-shimmer,
|
|
101
|
+
.animate-breathe,
|
|
102
|
+
.animate-spinSlow {
|
|
103
|
+
animation: none !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
If the base layer block already exists, merge — don't duplicate the `@layer base` wrapper.
|
|
109
|
+
|
|
110
|
+
### 5. Load Inter Tight
|
|
111
|
+
|
|
112
|
+
**Next.js (app router):** In `app/layout.tsx`:
|
|
113
|
+
```tsx
|
|
114
|
+
import { Inter_Tight } from "next/font/google";
|
|
115
|
+
const interTight = Inter_Tight({ subsets: ["latin"], variable: "--font-inter-tight" });
|
|
116
|
+
// Apply: <body className={interTight.className}>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Vite / other:** Add to `index.html` `<head>`:
|
|
120
|
+
```html
|
|
121
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
122
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
123
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap" rel="stylesheet" />
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Or via CSS `@import` at the top of the global stylesheet:
|
|
127
|
+
```css
|
|
128
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap');
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 6. Copy component patterns
|
|
132
|
+
|
|
133
|
+
Copy these files from `~/code/house-style/components/` into the project's components directory (e.g. `src/components/ui/`). They are source patterns — copy and extend freely; each project's copy diverges; the house-style stays canonical.
|
|
134
|
+
|
|
135
|
+
| File | What it is |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `Button.tsx` | Primary dark CTA; optional leading icon tilts+grows on hover |
|
|
138
|
+
| `IconButton.tsx` | Icon + label, `variant` (primary/secondary), `iconMotion` (tilt/spin3d), `loading` spinner swap |
|
|
139
|
+
| `Chip.tsx` | Pill that lifts on hover, presses on click; `tone` (neutral/highlight) + status dot |
|
|
140
|
+
| `Card.tsx` | White card surface; `padded`, `bare` props |
|
|
141
|
+
| `Badge.tsx` | Compact pill label with hover state |
|
|
142
|
+
| `Modal.tsx` | Blurred backdrop overlay with pop-in content |
|
|
143
|
+
| `Stepper.tsx` | Horizontal progress indicator: pending→active→done nodes, traveling dot connector |
|
|
144
|
+
| `icons.tsx` | Inline-SVG icon set (Sparkles, Spinner, Image, Cube, Bolt, Diamond, Expand, ChevronDown, X, Check) |
|
|
145
|
+
|
|
146
|
+
Adjust import paths in each file to match the project's path aliases.
|
|
147
|
+
|
|
148
|
+
### 7. Verify
|
|
149
|
+
|
|
150
|
+
After wiring, confirm:
|
|
151
|
+
- `bg-canvas`, `text-ink`, `border-line`, `rounded-card`, `shadow-card`, `animate-popIn` resolve without Tailwind unknown-class warnings
|
|
152
|
+
- Body text renders in Inter Tight at tight tracking
|
|
153
|
+
- A `<Button>` from the copied component renders dark with press-scale on click
|
|
154
|
+
|
|
155
|
+
## Tokens reference
|
|
156
|
+
|
|
157
|
+
| Token | Value |
|
|
158
|
+
|---|---|
|
|
159
|
+
| `canvas` | `#f6f7f9` |
|
|
160
|
+
| `surface` | `#f1f2f4` |
|
|
161
|
+
| `paper` / `card` | `#ffffff` |
|
|
162
|
+
| `ink` | `#0b0b0d` |
|
|
163
|
+
| `ink-2` | `#33353b` |
|
|
164
|
+
| `muted` | `#6b6e76` |
|
|
165
|
+
| `muted-2` | `#9a9da5` |
|
|
166
|
+
| `line` | `#e7e8ea` |
|
|
167
|
+
| `line-2` | `#f0f1f3` |
|
|
168
|
+
| `accent` | `#4f5a78` |
|
|
169
|
+
| `accent-red` | `#e5484d` |
|
|
170
|
+
| `accent-green` | `#30a46c` |
|
|
171
|
+
| `accent-blue` | `#3b6ef6` |
|
|
172
|
+
| `accent-amber` | `#e0901a` |
|
|
173
|
+
| `accent-violet` | `#8b5cf6` |
|
|
174
|
+
| `radius-card` | `14px` |
|
|
175
|
+
| `radius-pill` | `999px` |
|
|
176
|
+
|
|
177
|
+
Animations: `fadeIn` `riseIn` `popIn` `revealIn` `travel` `shimmer` `breathe` `spinSlow` `drawIn` `bounceSoft` — all keyed on `cubic-bezier(0.22,1,0.36,1)`.
|
|
178
|
+
|
|
179
|
+
## Notes
|
|
180
|
+
|
|
181
|
+
- This is a **copy-from** source, not an npm dependency. Each project owns its copy.
|
|
182
|
+
- The house-style itself lives at `~/code/house-style` — never modify it from a target project.
|
|
183
|
+
- `preview/` in the source kit is the live visual reference for every component and animation.
|
|
184
|
+
- For the component patterns, extend rather than fight the base styles — `className` prop pass-through is already wired on every component.
|