算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
angular-spa【设计与创意】Angular 21.x SPA development skill with TailwindCSS 4.x and daisyUI 5.5.5. Use when building Angular standalone components, services, lazy-loaded routes, unit tests, or creating UI with TailwindCSS + daisyUI. Covers component scaffolding, UI/UX design, accessibility audits, and design systems.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
NO ANGULAR CODE WITHOUT READING reference/angular-conventions.md FIRST — conventions, folder structure, and daisyUI token rules are all there
STYLE LAW: Strictly follow https://angular.dev/style-guide for ALL naming, file structure, and code organization. See reference/angular-conventions.md for the quick reference.
ANIMATION LAW: Use @angular/animations for ALL interactive animations. Never raw CSS transitions on stateful elements. See reference/angular-animations.md.
Tech Stack: Angular 21+, TailwindCSS 4.x, daisyUI 5.5.5
For code conventions, styling rules, design principles, key patterns, folder structure, and common commands, read
reference/angular-conventions.md
Before generating code, consult these sources for current syntax and APIs:
| Source | URL / Tool | Purpose |
|---|---|---|
| Angular v21 | angular-cli MCP (ng mcp) | Workspace-aware help, schematics, builds, best practices |
| Angular v21 | https://angular.dev/assets/context/llms-full.txt | Static docs bundle — API reference, deprecated features |
| daisyUI v5.5.5 | https://daisyui.com/llms.txt | Component reference, color system, themes |
| TailwindCSS / RxJS | Context7 MCP | Latest syntax, utilities, operators |
| Angular + Tailwind official guide | https://angular.dev/guide/tailwind | Canonical install steps, ng add tailwindcss, build integration |
Cross-check all Angular APIs and CLI flags against fetched docs — do NOT use deprecated or removed features.
For Angular & TypeScript best practices, read reference/angular-best-practices.md
npx @angular/cli@latest new my-app --style=scss --ssr=false
cd my-app
Do NOT pass --standalone (removed/default since v19). Verify flags against fetched docs.
Before creating or modifying any component template or styles:
reference/daisyui-v5-components.md — for semantic color tokens and component patternsreference/tailwind-v4-config.md — for TailwindCSS 4.x setup constraintsbg-primary, text-base-content), spacing base (4px), and typography approach you will use?reference/accessibility-checklist.md before adding interactive elementssrc/app/features/<feature-name>/reference/angular-templates.md for templates; create with signals-based statereference/angular-templates.md for service template; implement API calls with HttpClient + RxJSloadComponent in app.routes.ts or feature routesreference/angular-templates.md for test templates; write unit tests with zoneless TestBedng build to ensure no compilation errorsDetailed patterns are in reference/:
angular-best-practices.md — TypeScript, component, template, state management, services, forms, zoneless, accessibility, and testing best practicesangular-templates.md — Standalone component, service, lazy routes, app.config, interceptor, guard, and test templatesangular-troubleshooting.md — Common errors (NG0908, NullInjectorError, blank screen), CLI commands, and best practicestailwind-v4-config.md — TailwindCSS 4.x setup, breaking changes from v3daisyui-v5-components.md — Full component reference, color system, themes, quick setup patternsangular-forms-fields.md — Input fields, select, textarea, checkbox, radio patternsangular-forms-validation.md — Validation patterns, error messages, async validatorsangular-forms-advanced.md — Multi-step forms, dynamic fields, form arraysangular-ui-tables.md — Table and grid patterns with sorting, filtering, paginationangular-ui-lists.md — List, card, and feed UI patternsangular-ui-navigation.md — Navigation, breadcrumbs, tabs, and sidebar patternsangular-ui-feedback-components.md — Toasts, dialogs, themes, error handling, utilitiesaccessibility-checklist.md — WCAG 2.1 AA checklist, ARIA patterns, test protocolangular-aria.md — Angular CDK accessible headless components (FocusTrap, ListKeyManager, LiveAnnouncer, Accordion, Combobox)component-harnesses.md — Angular CDK component harnesses for stable UI testingtesting-vitest.md — Vitest setup, zoneless TestBed, testing Signals and resource(), migration from Karmae2e-cypress.md — Cypress E2E setup, component testing, custom commands, data-cy conventionsmart-dumb-components.md — Smart (container) vs Dumb (presentational) component pattern, decision tree, signal-based examples, hard rules, file location enforcementangular-animations.md — Angular Animations API (animate.enter/animate.leave, trigger(), state(), keyframes(), stagger()), timing standards, animation rulesuser-research.md — Persona templates, journey mapping, usability testing, SUS surveyNgModule — Angular 21 is fully standalone; all components, pipes, and directives are standalone by default@Input() / @Output() decorators for new code — use input(), output(), and model() signals (Angular 21 standard)BehaviorSubject for component state — use signal() and computed()ChangeDetectionStrategy.Default) — always use OnPush with signals*ngIf, *ngFor, *ngSwitch structural directives — use @if, @for, @switch control flow (Angular 17+, standard in v21)CommonModule in standalone components — it is a compatibility shim; import nothing or use control flow syntaxinject() function in Angular 21HttpClientModule — use provideHttpClient() in app.config.ts (functional API)takeUntilDestroyed(destroyRef) — memory leaks in long-lived componentsngOnDestroy to unsubscribe — use DestroyRef and takeUntilDestroyed() insteaddocument.getElementById or direct DOM manipulation — use viewChild() signal or Angular CDKstyle="" attributes — use TailwindCSS utilities or SCSSstyle="color: #3B82F6" inline — use class="text-primary"bg-blue-500 — use semantic bg-primarystyle="padding: 16px" — use class="p-4"style="font-size: 16px" — use class="text-base"Build failures (NG0908, NullInjectorError): Read reference/angular-troubleshooting.md for common errors and fixes.
TailwindCSS not applied: Verify .postcssrc.json exists (not postcss.config.js) and global styles use .css (not .scss).
Blank screen on load: Check browser console for lazy-loading errors. Verify route paths and loadComponent imports.
ng serve # Dev server (http://localhost:4200)
ng test --watch=false # Run unit tests once (no watch)
ng test # Run unit tests in watch mode
ng build # Production build
ng lint # ESLint check
ng generate component features/my-feature/my-component --standalone # Scaffold component
ng generate service features/my-feature/my-service # Scaffold service
Full token definitions are in .claude/skills/ui-standards-tokens/reference/ui-design-tokens.md. This section covers Angular-specific usage.
Primitive → Semantic → Component
/* Primitive */
--color-blue-500: #3B82F6;
/* Semantic */
--color-primary: var(--color-blue-500);
/* Component */
--button-bg-primary: var(--color-primary);
Never use primitive tokens directly in component CSS. Components reference component tokens; component tokens reference semantic tokens.
| Category | daisyUI / Tailwind classes |
|---|---|
| Colors | bg-primary, text-base-content, bg-base-100/200/300, text-error, bg-success |
| Spacing | p-2 = 8px, p-4 = 16px, p-6 = 24px (4px base scale) |
| Typography | text-sm, text-base, text-lg, font-semibold, font-bold |
| Borders | rounded-sm, rounded-md, rounded-lg, rounded-full, border border-base-300 |
| Shadows | shadow-sm, shadow-md, shadow-xl |
| Motion | transition-all duration-200 |
| Z-index | custom CSS vars: --z-dropdown: 1000, --z-modal: 1050, --z-tooltip: 1070 |
// theme.service.ts
import { Injectable } from '@angular/core';
@Injectable({ providedIn: 'root' })
export class ThemeService {
setTheme(theme: 'light' | 'dark' | 'custom'): void {
document.documentElement.setAttribute('data-theme', theme);
localStorage.setItem('theme', theme);
}
getTheme(): string {
return localStorage.getItem('theme') ?? 'light';
}
}
daisyUI v5.5.5 uses the data-theme attribute on <html>. All daisyUI semantic classes switch automatically — no additional CSS is needed per component.
ng serve # Starts at http://localhost:4200 — no errors in terminal
ng test --watch=false # All unit tests pass
ng build # Exit code 0, no NG build errors
npx ng lint # Zero lint violations
tsc --noEmit)shared/components/ have zero inject() calls (dumb rule)pages/ or features/ (smart rule)