spoko-design-system 1.30.0 → 1.30.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.
Files changed (100) hide show
  1. package/.claude/settings.json +48 -48
  2. package/.github/dependabot.yml +11 -11
  3. package/.github/todo.yml +3 -3
  4. package/.github/workflows/claude.yml +37 -37
  5. package/.github/workflows/code-quality.yml +72 -72
  6. package/.github/workflows/deploy.yml +42 -43
  7. package/.github/workflows/release.yml +1 -1
  8. package/.husky/README.md +41 -41
  9. package/.husky/commit-msg +1 -1
  10. package/.husky/pre-commit +41 -41
  11. package/.nvmrc +1 -0
  12. package/.prettierignore +14 -14
  13. package/.prettierrc +30 -30
  14. package/.stackblitzrc +5 -5
  15. package/.vscode/extensions.json +4 -4
  16. package/.vscode/launch.json +11 -11
  17. package/.vscode/settings.json +25 -25
  18. package/CHANGELOG.md +665 -659
  19. package/CLAUDE.md +290 -290
  20. package/LICENSE +21 -21
  21. package/MIGRATION-COLORS.md +110 -110
  22. package/README.md +303 -303
  23. package/TOOLTIPS.md +236 -236
  24. package/astro.config.mjs +85 -84
  25. package/commitlint.config.js +3 -3
  26. package/dev-dist/sw.js +91 -91
  27. package/dev-dist/workbox-c676b6d3.js +3391 -3391
  28. package/eslint.config.js +69 -69
  29. package/icon.config.ts +348 -348
  30. package/index.ts +78 -78
  31. package/netlify.toml +6 -0
  32. package/package.json +164 -164
  33. package/public/arrow-bottom.svg +7 -7
  34. package/public/fonts/lg.svg +53 -53
  35. package/public/fonts/vwhead-bold-demo.html +549 -549
  36. package/public/fonts/vwhead-regular-demo.html +549 -549
  37. package/public/fonts/vwtext-bold-demo.html +549 -549
  38. package/public/fonts/vwtext-regular-demo.html +549 -549
  39. package/public/github.svg +3 -3
  40. package/public/grid_dot.svg +4 -4
  41. package/public/linkedin.svg +44 -44
  42. package/public/make-scrollable-code-focusable.js +3 -3
  43. package/public/pagefind.yml +3 -3
  44. package/public/polo.blue.svg +29 -29
  45. package/public/spoko.space.svg +71 -71
  46. package/public/twitter.svg +46 -46
  47. package/renovate.json +6 -6
  48. package/sandbox.config.json +11 -11
  49. package/sonar-project.properties +26 -26
  50. package/src/components/Product/ProductGallery.astro +320 -322
  51. package/src/components/Product/product-gallery.css +61 -60
  52. package/src/components/Product/product-gallery.ts +19 -0
  53. package/src/layouts/partials/HeadCommon.astro +2 -2
  54. package/src/pages/components/badges.mdx +57 -57
  55. package/src/pages/components/breadcrumbs.mdx +168 -168
  56. package/src/pages/components/buttons.mdx +359 -359
  57. package/src/pages/components/card.mdx +294 -294
  58. package/src/pages/components/carousel.mdx +62 -62
  59. package/src/pages/components/copyright.mdx +42 -42
  60. package/src/pages/components/details-list.mdx +207 -207
  61. package/src/pages/components/features-list.mdx +37 -37
  62. package/src/pages/components/flags.mdx +49 -49
  63. package/src/pages/components/fuck-russia.mdx +39 -39
  64. package/src/pages/components/hand-drive.mdx +78 -78
  65. package/src/pages/components/headline.mdx +337 -337
  66. package/src/pages/components/image.mdx +513 -513
  67. package/src/pages/components/input.mdx +367 -367
  68. package/src/pages/components/jumbotron.mdx +530 -530
  69. package/src/pages/components/modal.mdx +212 -212
  70. package/src/pages/components/post-header.mdx +64 -64
  71. package/src/pages/components/pr-code.mdx +213 -213
  72. package/src/pages/components/product-engine.mdx +418 -418
  73. package/src/pages/components/product-gallery.mdx +179 -179
  74. package/src/pages/components/product-number.mdx +66 -66
  75. package/src/pages/components/product-tile.mdx +51 -51
  76. package/src/pages/components/quote.mdx +33 -33
  77. package/src/pages/components/slimbanner.mdx +260 -260
  78. package/src/pages/components/table.mdx +108 -108
  79. package/src/pages/core/colors.mdx +21 -21
  80. package/src/pages/core/grid.mdx +193 -193
  81. package/src/pages/core/introduction.mdx +77 -77
  82. package/src/pages/core/tooltips.mdx +491 -491
  83. package/src/pages/patterns/introduction.mdx +60 -60
  84. package/src/styles/_variables.scss +70 -70
  85. package/tailwind.config.cjs +8 -8
  86. package/tsconfig.json +28 -28
  87. package/uno-config/index.ts +301 -301
  88. package/uno-config/theme/breakpoints.ts +9 -9
  89. package/uno-config/theme/colors.ts +69 -69
  90. package/uno-config/theme/dimensions.ts +17 -17
  91. package/uno-config/theme/effects.ts +15 -15
  92. package/uno-config/theme/grid.ts +10 -10
  93. package/uno-config/theme/index.ts +26 -26
  94. package/uno-config/theme/shortcuts/buttons.ts +53 -53
  95. package/uno-config/theme/shortcuts/components.ts +125 -125
  96. package/uno-config/theme/shortcuts/index.ts +20 -20
  97. package/uno-config/theme/shortcuts/jumbotron.ts +71 -71
  98. package/uno-config/theme/shortcuts/layout.ts +75 -75
  99. package/uno-config/theme/typography.ts +29 -29
  100. package/uno.config.ts +2 -2
@@ -1,49 +1,49 @@
1
- {
2
- "includeCoAuthoredBy": false,
3
- "permissions": {
4
- "allow": [
5
- "Bash(pnpm dev:*)",
6
- "Bash(pnpm start:*)",
7
- "Bash(pnpm build:*)",
8
- "Bash(pnpm preview:*)",
9
- "Bash(pnpm check:*)",
10
- "Bash(pnpm lint:*)",
11
- "Bash(pnpm format:*)",
12
- "Bash(git status:*)",
13
- "Bash(git diff:*)",
14
- "Bash(git log:*)",
15
- "Bash(git add:*)",
16
- "Bash(git commit:*)",
17
- "Bash(git push:*)"
18
- ],
19
- "deny": [
20
- "Bash(pnpm semantic-release:*)",
21
- "Bash(pnpm publish:*)",
22
- "Bash(npm publish:*)"
23
- ],
24
- "ask": [
25
- "Bash(rm:*)",
26
- "Bash(pnpm install:*)",
27
- "Bash(pnpm add:*)",
28
- "Bash(pnpm remove:*)",
29
- "Bash(git branch:*)",
30
- "Bash(git checkout:*)",
31
- "Bash(git merge:*)",
32
- "Bash(git rebase:*)"
33
- ]
34
- },
35
- "additionalInstructions": "## Project-Specific Instructions\n\n### Component Development\n- When creating new components, always export them from root `index.ts` (not from `src/`)\n- Use the path pattern: `export { default as Name } from './src/components/Name.vue'`\n- Add documentation page in `src/pages/components/` with `.mdx` extension\n- Update `src/config.ts` SIDEBAR array with navigation entry\n\n### UnoCSS Modifications\n- Never edit root `uno.config.ts` directly (it's just a wrapper)\n- Make theme changes in `uno-config/theme/` files\n- Add shortcuts to appropriate file in `uno-config/theme/shortcuts/`\n- When adding icons, update `icon.config.ts` include array\n\n### Commit Messages\n- This project uses semantic-release with conventional commits\n- Format: `<type>[scope]: <description>`\n- Types: feat (minor), fix (patch), docs (patch), chore (no release)\n- Breaking changes: Add `BREAKING CHANGE:` footer for major version\n- Examples:\n - `feat(components): add new Modal component`\n - `fix(Input): resolve floating label z-index issue`\n - `docs: update Button examples`\n\n### Code Quality\n- Run `pnpm lint:fix` before committing\n- Run `pnpm format` to auto-format code\n- Run `pnpm check` for Astro type checking\n- Ensure components work in both contexts: as npm package and in docs site\n\n### Path Conventions\n- Use TypeScript path aliases: `@components/`, `@utils/`, `@types/`\n- In root `index.ts`, always use `./src/` prefix\n- Within `src/`, use aliases or relative paths\n\n### Testing Changes\n- Start dev server with `pnpm dev` (runs on port 1234)\n- Preview production build with `pnpm preview`\n- Check build output with `pnpm build`",
36
- "customInstructions": {
37
- "autoApprove": {
38
- "patterns": [
39
- "*.vue",
40
- "*.astro",
41
- "*.ts",
42
- "*.js",
43
- "*.mdx",
44
- "src/**/*",
45
- "uno-config/**/*"
46
- ]
47
- }
48
- }
1
+ {
2
+ "includeCoAuthoredBy": false,
3
+ "permissions": {
4
+ "allow": [
5
+ "Bash(pnpm dev:*)",
6
+ "Bash(pnpm start:*)",
7
+ "Bash(pnpm build:*)",
8
+ "Bash(pnpm preview:*)",
9
+ "Bash(pnpm check:*)",
10
+ "Bash(pnpm lint:*)",
11
+ "Bash(pnpm format:*)",
12
+ "Bash(git status:*)",
13
+ "Bash(git diff:*)",
14
+ "Bash(git log:*)",
15
+ "Bash(git add:*)",
16
+ "Bash(git commit:*)",
17
+ "Bash(git push:*)"
18
+ ],
19
+ "deny": [
20
+ "Bash(pnpm semantic-release:*)",
21
+ "Bash(pnpm publish:*)",
22
+ "Bash(npm publish:*)"
23
+ ],
24
+ "ask": [
25
+ "Bash(rm:*)",
26
+ "Bash(pnpm install:*)",
27
+ "Bash(pnpm add:*)",
28
+ "Bash(pnpm remove:*)",
29
+ "Bash(git branch:*)",
30
+ "Bash(git checkout:*)",
31
+ "Bash(git merge:*)",
32
+ "Bash(git rebase:*)"
33
+ ]
34
+ },
35
+ "additionalInstructions": "## Project-Specific Instructions\n\n### Component Development\n- When creating new components, always export them from root `index.ts` (not from `src/`)\n- Use the path pattern: `export { default as Name } from './src/components/Name.vue'`\n- Add documentation page in `src/pages/components/` with `.mdx` extension\n- Update `src/config.ts` SIDEBAR array with navigation entry\n\n### UnoCSS Modifications\n- Never edit root `uno.config.ts` directly (it's just a wrapper)\n- Make theme changes in `uno-config/theme/` files\n- Add shortcuts to appropriate file in `uno-config/theme/shortcuts/`\n- When adding icons, update `icon.config.ts` include array\n\n### Commit Messages\n- This project uses semantic-release with conventional commits\n- Format: `<type>[scope]: <description>`\n- Types: feat (minor), fix (patch), docs (patch), chore (no release)\n- Breaking changes: Add `BREAKING CHANGE:` footer for major version\n- Examples:\n - `feat(components): add new Modal component`\n - `fix(Input): resolve floating label z-index issue`\n - `docs: update Button examples`\n\n### Code Quality\n- Run `pnpm lint:fix` before committing\n- Run `pnpm format` to auto-format code\n- Run `pnpm check` for Astro type checking\n- Ensure components work in both contexts: as npm package and in docs site\n\n### Path Conventions\n- Use TypeScript path aliases: `@components/`, `@utils/`, `@types/`\n- In root `index.ts`, always use `./src/` prefix\n- Within `src/`, use aliases or relative paths\n\n### Testing Changes\n- Start dev server with `pnpm dev` (runs on port 1234)\n- Preview production build with `pnpm preview`\n- Check build output with `pnpm build`",
36
+ "customInstructions": {
37
+ "autoApprove": {
38
+ "patterns": [
39
+ "*.vue",
40
+ "*.astro",
41
+ "*.ts",
42
+ "*.js",
43
+ "*.mdx",
44
+ "src/**/*",
45
+ "uno-config/**/*"
46
+ ]
47
+ }
48
+ }
49
49
  }
@@ -1,11 +1,11 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "" # See documentation for possible values
9
- directory: "/" # Location of package manifests
10
- schedule:
11
- interval: "weekly"
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
package/.github/todo.yml CHANGED
@@ -1,3 +1,3 @@
1
- - name: todo-issue
2
- uses: DerJuulsn/todo-issue@v1.1.4
3
-
1
+ - name: todo-issue
2
+ uses: DerJuulsn/todo-issue@v1.1.4
3
+
@@ -1,37 +1,37 @@
1
- name: Claude Code
2
-
3
- on:
4
- issue_comment:
5
- types: [created]
6
- pull_request_review_comment:
7
- types: [created]
8
- issues:
9
- types: [opened, assigned]
10
- pull_request_review:
11
- types: [submitted]
12
-
13
- jobs:
14
- claude:
15
- if: |
16
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
- runs-on: ubuntu-latest
21
- permissions:
22
- contents: write
23
- pull-requests: write
24
- issues: write
25
- id-token: write
26
- actions: read
27
- steps:
28
- - name: Checkout repository
29
- uses: actions/checkout@v6
30
- with:
31
- fetch-depth: 0
32
-
33
- - name: Run Claude Code
34
- id: claude
35
- uses: anthropics/claude-code-action@v1
36
- with:
37
- anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: write
23
+ pull-requests: write
24
+ issues: write
25
+ id-token: write
26
+ actions: read
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v6
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -1,72 +1,72 @@
1
- name: Code Quality & Analysis
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- branches: [ main ]
8
-
9
- jobs:
10
- lint-and-format:
11
- name: Lint and Format Check
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - name: Checkout code
16
- uses: actions/checkout@v6
17
-
18
- - name: Setup pnpm
19
- uses: pnpm/action-setup@v4
20
- with:
21
- version: 10.30.3
22
-
23
- - name: Setup Node.js
24
- uses: actions/setup-node@v6
25
- with:
26
- node-version: '24'
27
- cache: 'pnpm'
28
-
29
- - name: Install dependencies
30
- run: pnpm install --frozen-lockfile
31
-
32
- - name: Check Prettier formatting
33
- run: pnpm run format:check
34
-
35
- - name: Run ESLint
36
- run: pnpm run lint
37
-
38
- - name: Type check
39
- run: pnpm run check
40
-
41
- sonarcloud:
42
- name: SonarCloud Analysis
43
- runs-on: ubuntu-latest
44
-
45
- steps:
46
- - name: Checkout code
47
- uses: actions/checkout@v6
48
- with:
49
- fetch-depth: 0 # Shallow clones should be disabled for better analysis
50
-
51
- - name: Setup pnpm
52
- uses: pnpm/action-setup@v4
53
- with:
54
- version: 10.30.3
55
-
56
- - name: Setup Node.js
57
- uses: actions/setup-node@v6
58
- with:
59
- node-version: '24'
60
- cache: 'pnpm'
61
-
62
- - name: Install dependencies
63
- run: pnpm install --frozen-lockfile
64
-
65
- - name: Build project
66
- run: pnpm run build
67
-
68
- - name: SonarCloud Scan
69
- uses: SonarSource/sonarcloud-github-action@master
70
- env:
71
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
72
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1
+ name: Code Quality & Analysis
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ lint-and-format:
11
+ name: Lint and Format Check
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v6
17
+
18
+ - name: Setup pnpm
19
+ uses: pnpm/action-setup@v4
20
+ with:
21
+ version: 10.32.1
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v6
25
+ with:
26
+ node-version: '24'
27
+ cache: 'pnpm'
28
+
29
+ - name: Install dependencies
30
+ run: pnpm install --frozen-lockfile
31
+
32
+ - name: Check Prettier formatting
33
+ run: pnpm run format:check
34
+
35
+ - name: Run ESLint
36
+ run: pnpm run lint
37
+
38
+ - name: Type check
39
+ run: pnpm run check
40
+
41
+ sonarcloud:
42
+ name: SonarCloud Analysis
43
+ runs-on: ubuntu-latest
44
+
45
+ steps:
46
+ - name: Checkout code
47
+ uses: actions/checkout@v6
48
+ with:
49
+ fetch-depth: 0 # Shallow clones should be disabled for better analysis
50
+
51
+ - name: Setup pnpm
52
+ uses: pnpm/action-setup@v4
53
+ with:
54
+ version: 10.32.1
55
+
56
+ - name: Setup Node.js
57
+ uses: actions/setup-node@v6
58
+ with:
59
+ node-version: '24'
60
+ cache: 'pnpm'
61
+
62
+ - name: Install dependencies
63
+ run: pnpm install --frozen-lockfile
64
+
65
+ - name: Build project
66
+ run: pnpm run build
67
+
68
+ - name: SonarCloud Scan
69
+ uses: SonarSource/sonarcloud-github-action@master
70
+ env:
71
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
72
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -1,44 +1,43 @@
1
- name: Deploy to GitHub Pages
2
-
3
- on:
4
- # Trigger the workflow every time you push to the `main` branch
5
- # Using a different branch name? Replace `main` with your branch's name
6
- push:
7
- branches: [ main ]
8
- # Allows you to run this workflow manually from the Actions tab on GitHub.
9
- workflow_dispatch:
10
-
11
- # Prevent concurrent deployments
12
- concurrency:
13
- group: pages
14
- cancel-in-progress: false
15
-
16
- # Allow this job to clone the repo and create a page deployment
17
- permissions:
18
- contents: read
19
- pages: write
20
- id-token: write
21
-
22
- jobs:
23
- build:
24
- runs-on: ubuntu-latest
25
- steps:
26
- - name: Checkout your repository using git
27
- uses: actions/checkout@v6
28
- - name: Install, build, and upload your site
29
- uses: withastro/action@v5
30
- with:
31
- package-manager: pnpm@10.17.1
32
- # path: . # The root location of your Astro project inside the repository. (optional)
33
- # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
34
-
35
- deploy:
36
- needs: build
37
- runs-on: ubuntu-latest
38
- environment:
39
- name: github-pages
40
- url: ${{ steps.deployment.outputs.page_url }}
41
- steps:
42
- - name: Deploy to GitHub Pages
43
- id: deployment
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ # Trigger the workflow every time you push to the `main` branch
5
+ # Using a different branch name? Replace `main` with your branch's name
6
+ push:
7
+ branches: [ main ]
8
+ # Allows you to run this workflow manually from the Actions tab on GitHub.
9
+ workflow_dispatch:
10
+
11
+ # Prevent concurrent deployments
12
+ concurrency:
13
+ group: pages
14
+ cancel-in-progress: false
15
+
16
+ # Allow this job to clone the repo and create a page deployment
17
+ permissions:
18
+ contents: read
19
+ pages: write
20
+ id-token: write
21
+
22
+ jobs:
23
+ build:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Checkout your repository using git
27
+ uses: actions/checkout@v6
28
+ - name: Install, build, and upload your site
29
+ uses: withastro/action@v5
30
+ with:
31
+ package-manager: pnpm@10.30.3
32
+ node-version: 22
33
+
34
+ deploy:
35
+ needs: build
36
+ runs-on: ubuntu-latest
37
+ environment:
38
+ name: github-pages
39
+ url: ${{ steps.deployment.outputs.page_url }}
40
+ steps:
41
+ - name: Deploy to GitHub Pages
42
+ id: deployment
44
43
  uses: actions/deploy-pages@v4
@@ -29,7 +29,7 @@ jobs:
29
29
  - name: Setup pnpm
30
30
  uses: pnpm/action-setup@v4
31
31
  with:
32
- version: 10.30.3
32
+ version: 10.32.1
33
33
 
34
34
  - name: Setup Node.js
35
35
  uses: actions/setup-node@v6
package/.husky/README.md CHANGED
@@ -1,41 +1,41 @@
1
- # Git Hooks with Husky
2
-
3
- This directory contains Git hooks managed by [Husky](https://typicode.github.io/husky/).
4
-
5
- ## Pre-commit Hook
6
-
7
- The pre-commit hook automatically runs before each commit to ensure code quality:
8
-
9
- 1. **Builds the project** (`pnpm run build`)
10
- - Catches MDX syntax errors
11
- - Validates Vue components
12
- - Ensures all documentation examples work
13
-
14
- If the build fails, the commit will be blocked until errors are fixed.
15
-
16
- ## Setup for Team Members
17
-
18
- Hooks are automatically installed when running:
19
-
20
- ```bash
21
- pnpm install
22
- ```
23
-
24
- The `prepare` script in `package.json` handles this automatically.
25
-
26
- ## Benefits
27
-
28
- ✅ Prevents broken builds from being committed
29
- ✅ Catches errors early in development
30
- ✅ Maintains code quality across the team
31
- ✅ Reduces failed CI/CD builds
32
-
33
- ## Bypassing Hooks (Emergency Only)
34
-
35
- If you absolutely need to bypass the pre-commit hook:
36
-
37
- ```bash
38
- git commit --no-verify -m "your message"
39
- ```
40
-
41
- **Note:** Only use this in emergencies. Your commit may break the build.
1
+ # Git Hooks with Husky
2
+
3
+ This directory contains Git hooks managed by [Husky](https://typicode.github.io/husky/).
4
+
5
+ ## Pre-commit Hook
6
+
7
+ The pre-commit hook automatically runs before each commit to ensure code quality:
8
+
9
+ 1. **Builds the project** (`pnpm run build`)
10
+ - Catches MDX syntax errors
11
+ - Validates Vue components
12
+ - Ensures all documentation examples work
13
+
14
+ If the build fails, the commit will be blocked until errors are fixed.
15
+
16
+ ## Setup for Team Members
17
+
18
+ Hooks are automatically installed when running:
19
+
20
+ ```bash
21
+ pnpm install
22
+ ```
23
+
24
+ The `prepare` script in `package.json` handles this automatically.
25
+
26
+ ## Benefits
27
+
28
+ ✅ Prevents broken builds from being committed
29
+ ✅ Catches errors early in development
30
+ ✅ Maintains code quality across the team
31
+ ✅ Reduces failed CI/CD builds
32
+
33
+ ## Bypassing Hooks (Emergency Only)
34
+
35
+ If you absolutely need to bypass the pre-commit hook:
36
+
37
+ ```bash
38
+ git commit --no-verify -m "your message"
39
+ ```
40
+
41
+ **Note:** Only use this in emergencies. Your commit may break the build.
package/.husky/commit-msg CHANGED
@@ -1 +1 @@
1
- pnpm exec commitlint --edit $1
1
+ pnpm exec commitlint --edit $1
package/.husky/pre-commit CHANGED
@@ -1,41 +1,41 @@
1
- echo "🔍 Running pre-commit checks..."
2
-
3
- # Check for merge conflict markers
4
- if ! git diff --cached --check; then
5
- echo "❌ Found merge conflict markers!"
6
- exit 1
7
- fi
8
-
9
- # Check for console.log (optional warning)
10
- if git diff --cached --name-only | xargs grep -n "console\\.log" 2>/dev/null; then
11
- echo "⚠️ Warning: Found console.log statements"
12
- echo " Consider removing them before committing to production"
13
- fi
14
-
15
- # Auto-format code
16
- echo "🎨 Auto-formatting code..."
17
- pnpm run format
18
-
19
- # Re-add formatted files to staging
20
- git add -u
21
-
22
- echo "✅ Code formatted successfully!"
23
-
24
- # Run linting
25
- echo "🔍 Running linter..."
26
- pnpm run lint
27
- if [ $? -ne 0 ]; then
28
- echo "❌ Lint check failed! Run 'pnpm run lint:fix' to fix."
29
- exit 1
30
- fi
31
-
32
- # Run Astro build to catch MDX and component errors
33
- echo "🏗️ Building project..."
34
- pnpm run build
35
-
36
- if [ $? -eq 0 ]; then
37
- echo "✅ All checks passed! Proceeding with commit..."
38
- else
39
- echo "❌ Build failed! Please fix errors before committing."
40
- exit 1
41
- fi
1
+ echo "🔍 Running pre-commit checks..."
2
+
3
+ # Check for merge conflict markers
4
+ if ! git diff --cached --check; then
5
+ echo "❌ Found merge conflict markers!"
6
+ exit 1
7
+ fi
8
+
9
+ # Check for console.log (optional warning)
10
+ if git diff --cached --name-only | xargs grep -n "console\\.log" 2>/dev/null; then
11
+ echo "⚠️ Warning: Found console.log statements"
12
+ echo " Consider removing them before committing to production"
13
+ fi
14
+
15
+ # Auto-format code
16
+ echo "🎨 Auto-formatting code..."
17
+ pnpm run format
18
+
19
+ # Re-add formatted files to staging
20
+ git add -u
21
+
22
+ echo "✅ Code formatted successfully!"
23
+
24
+ # Run linting
25
+ echo "🔍 Running linter..."
26
+ pnpm run lint
27
+ if [ $? -ne 0 ]; then
28
+ echo "❌ Lint check failed! Run 'pnpm run lint:fix' to fix."
29
+ exit 1
30
+ fi
31
+
32
+ # Run Astro build to catch MDX and component errors
33
+ echo "🏗️ Building project..."
34
+ pnpm run build
35
+
36
+ if [ $? -eq 0 ]; then
37
+ echo "✅ All checks passed! Proceeding with commit..."
38
+ else
39
+ echo "❌ Build failed! Please fix errors before committing."
40
+ exit 1
41
+ fi
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 24
package/.prettierignore CHANGED
@@ -1,15 +1,15 @@
1
- node_modules/
2
- dist/
3
- .astro/
4
- pnpm-lock.yaml
5
- *.md
6
- *.svg
7
- *.png
8
- *.jpg
9
- *.jpeg
10
- *.gif
11
- *.ico
12
- *.woff
13
- *.woff2
14
- *.ttf
1
+ node_modules/
2
+ dist/
3
+ .astro/
4
+ pnpm-lock.yaml
5
+ *.md
6
+ *.svg
7
+ *.png
8
+ *.jpg
9
+ *.jpeg
10
+ *.gif
11
+ *.ico
12
+ *.woff
13
+ *.woff2
14
+ *.ttf
15
15
  *.eot