qtshadcn 0.0.5__tar.gz

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 (104) hide show
  1. qtshadcn-0.0.5/.editorconfig +46 -0
  2. qtshadcn-0.0.5/.gemini/skills/commit-hygiene/SKILL.md +83 -0
  3. qtshadcn-0.0.5/.gemini/skills/release-notes/SKILL.md +94 -0
  4. qtshadcn-0.0.5/.github/workflows/publish-pypi.yml +55 -0
  5. qtshadcn-0.0.5/.gitignore +48 -0
  6. qtshadcn-0.0.5/.opencode/skills/commit-hygiene/SKILL.md +83 -0
  7. qtshadcn-0.0.5/.opencode/skills/release-notes/SKILL.md +94 -0
  8. qtshadcn-0.0.5/.python-version +1 -0
  9. qtshadcn-0.0.5/AGENTS.md +103 -0
  10. qtshadcn-0.0.5/LICENSE +21 -0
  11. qtshadcn-0.0.5/Makefile +103 -0
  12. qtshadcn-0.0.5/PKG-INFO +239 -0
  13. qtshadcn-0.0.5/README.md +200 -0
  14. qtshadcn-0.0.5/docs/api-reference.md +201 -0
  15. qtshadcn-0.0.5/docs/getting-started.md +173 -0
  16. qtshadcn-0.0.5/docs/index.md +51 -0
  17. qtshadcn-0.0.5/docs/release.md +40 -0
  18. qtshadcn-0.0.5/docs/theme-format.md +150 -0
  19. qtshadcn-0.0.5/examples/gallery.py +9 -0
  20. qtshadcn-0.0.5/examples/widgets/QLineEdit/app.ui +147 -0
  21. qtshadcn-0.0.5/examples/widgets/QLineEdit/main.py +67 -0
  22. qtshadcn-0.0.5/examples/widgets/QPushButton/app.ui +151 -0
  23. qtshadcn-0.0.5/examples/widgets/QPushButton/main.py +76 -0
  24. qtshadcn-0.0.5/examples/widgets/QTextEdit/app.ui +127 -0
  25. qtshadcn-0.0.5/examples/widgets/QTextEdit/main.py +67 -0
  26. qtshadcn-0.0.5/examples/widgets/QToolButton/app.ui +99 -0
  27. qtshadcn-0.0.5/examples/widgets/QToolButton/main.py +78 -0
  28. qtshadcn-0.0.5/mkdocs.yml +58 -0
  29. qtshadcn-0.0.5/pyproject.toml +175 -0
  30. qtshadcn-0.0.5/qtshadcn/__init__.py +19 -0
  31. qtshadcn-0.0.5/qtshadcn/app.py +196 -0
  32. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-Bold.ttf +0 -0
  33. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-BoldItalic.ttf +0 -0
  34. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-ExtraBold.ttf +0 -0
  35. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-ExtraBoldItalic.ttf +0 -0
  36. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-Italic.ttf +0 -0
  37. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-Light.ttf +0 -0
  38. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-LightItalic.ttf +0 -0
  39. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-Medium.ttf +0 -0
  40. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-MediumItalic.ttf +0 -0
  41. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-Regular.ttf +0 -0
  42. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-SemiBold.ttf +0 -0
  43. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans-SemiBoldItalic.ttf +0 -0
  44. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-Bold.ttf +0 -0
  45. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-BoldItalic.ttf +0 -0
  46. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-ExtraBold.ttf +0 -0
  47. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-ExtraBoldItalic.ttf +0 -0
  48. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-Italic.ttf +0 -0
  49. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-Light.ttf +0 -0
  50. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-LightItalic.ttf +0 -0
  51. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-Medium.ttf +0 -0
  52. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-MediumItalic.ttf +0 -0
  53. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-Regular.ttf +0 -0
  54. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-SemiBold.ttf +0 -0
  55. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_Condensed-SemiBoldItalic.ttf +0 -0
  56. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-Bold.ttf +0 -0
  57. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-BoldItalic.ttf +0 -0
  58. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-ExtraBold.ttf +0 -0
  59. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-ExtraBoldItalic.ttf +0 -0
  60. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-Italic.ttf +0 -0
  61. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-Light.ttf +0 -0
  62. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-LightItalic.ttf +0 -0
  63. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-Medium.ttf +0 -0
  64. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-MediumItalic.ttf +0 -0
  65. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-Regular.ttf +0 -0
  66. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-SemiBold.ttf +0 -0
  67. qtshadcn-0.0.5/qtshadcn/fonts/opensans/OpenSans_SemiCondensed-SemiBoldItalic.ttf +0 -0
  68. qtshadcn-0.0.5/qtshadcn/fonts/roboto/LICENSE +201 -0
  69. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Black.ttf +0 -0
  70. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-BlackItalic.ttf +0 -0
  71. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Bold.ttf +0 -0
  72. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-BoldItalic.ttf +0 -0
  73. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Italic.ttf +0 -0
  74. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Light.ttf +0 -0
  75. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-LightItalic.ttf +0 -0
  76. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Medium.ttf +0 -0
  77. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-MediumItalic.ttf +0 -0
  78. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Regular.ttf +0 -0
  79. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-Thin.ttf +0 -0
  80. qtshadcn-0.0.5/qtshadcn/fonts/roboto/Roboto-ThinItalic.ttf +0 -0
  81. qtshadcn-0.0.5/qtshadcn/fonts/roboto/RobotoCondensed-Bold.ttf +0 -0
  82. qtshadcn-0.0.5/qtshadcn/fonts/roboto/RobotoCondensed-BoldItalic.ttf +0 -0
  83. qtshadcn-0.0.5/qtshadcn/fonts/roboto/RobotoCondensed-Italic.ttf +0 -0
  84. qtshadcn-0.0.5/qtshadcn/fonts/roboto/RobotoCondensed-Light.ttf +0 -0
  85. qtshadcn-0.0.5/qtshadcn/fonts/roboto/RobotoCondensed-LightItalic.ttf +0 -0
  86. qtshadcn-0.0.5/qtshadcn/fonts/roboto/RobotoCondensed-Regular.ttf +0 -0
  87. qtshadcn-0.0.5/qtshadcn/models.py +72 -0
  88. qtshadcn-0.0.5/qtshadcn/parser.py +317 -0
  89. qtshadcn-0.0.5/qtshadcn/styles/shadcn.jinja +458 -0
  90. qtshadcn-0.0.5/qtshadcn/themes/default.xml +50 -0
  91. qtshadcn-0.0.5/qtshadcn/tokens/__init__.py +5 -0
  92. qtshadcn-0.0.5/qtshadcn/tokens/colors.py +66 -0
  93. qtshadcn-0.0.5/qtshadcn/tokens/radius.py +68 -0
  94. qtshadcn-0.0.5/qtshadcn/tokens/scale.py +83 -0
  95. qtshadcn-0.0.5/qtshadcn/utils.py +36 -0
  96. qtshadcn-0.0.5/requirements.txt +3 -0
  97. qtshadcn-0.0.5/tests/conftest.py +14 -0
  98. qtshadcn-0.0.5/tests/test_app.py +175 -0
  99. qtshadcn-0.0.5/tests/test_integration.py +110 -0
  100. qtshadcn-0.0.5/tests/test_models.py +93 -0
  101. qtshadcn-0.0.5/tests/test_parser.py +220 -0
  102. qtshadcn-0.0.5/tests/test_renderer.py +301 -0
  103. qtshadcn-0.0.5/tests/test_tokens.py +55 -0
  104. qtshadcn-0.0.5/uv.lock +1426 -0
@@ -0,0 +1,46 @@
1
+ root = true
2
+
3
+ [*]
4
+ tab_width = 4
5
+ end_of_line = lf
6
+ max_line_length = 88
7
+ ij_visual_guides = 88
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.{js,py,html}]
12
+ charset = utf-8
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
16
+
17
+ [*.{yml,yaml}]
18
+ indent_style = space
19
+ indent_size = 2
20
+
21
+ [Makefile]
22
+ indent_style = tab
23
+
24
+ [.flake8]
25
+ indent_style = space
26
+ indent_size = 2
27
+
28
+ [*.{py,pyw,ini}]
29
+ indent_style = space
30
+ indent_size = 4
31
+ ij_python_from_import_parentheses_force_if_multiline = true
32
+
33
+ [*.sh]
34
+ end_of_line = lf
35
+ indent_style = space
36
+ indent_size = 2
37
+
38
+ [*.{bat,cmd}]
39
+ end_of_line = crlf
40
+ indent_style = space
41
+ indent_size = 2
42
+
43
+
44
+ [*.{html,htm,css,scss,sass,less,js,jsx,ts,tsx,json,yml,yaml,xml,toml,md}]
45
+ indent_style = space
46
+ indent_size = 2
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: commit-hygiene
3
+ description: "Trigger: commit, git commit, conventional commit, branch cleanup, commit message. Enforce conventional commits and clean history for QtShadcn."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: BugCodeX
7
+ version: "1.0"
8
+ ---
9
+
10
+ # Activation Contract
11
+
12
+ Apply this skill on any commit creation, commit message review, or branch cleanup in the QtShadcn project.
13
+
14
+ ## Hard Rules
15
+
16
+ - NEVER add `Co-Authored-By` or any AI attribution trailers
17
+ - One logical change per commit — no "add X and fix Y and update docs"
18
+ - Use imperative mood: "add" not "added", "fix" not "fixed"
19
+ - Keep subject line ≤ 72 characters
20
+ - Reference issue numbers when relevant: `feat: add border-radius scale to tokens (#12)`
21
+ - Add a body separated by a blank line when the commit needs explanation
22
+ - Use `type!: description` for breaking changes — the `!` signals a semver MAJOR bump
23
+
24
+ ## Format
25
+
26
+ ```text
27
+ type: description
28
+ ```
29
+
30
+ Validated by regex:
31
+
32
+ ```text
33
+ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)!?: .+
34
+ ```
35
+
36
+ ## Valid Types
37
+
38
+ | Type | Use For |
39
+ | ------ | --------- |
40
+ | feat | New feature or behavior |
41
+ | fix | Bug fix |
42
+ | docs | Documentation only |
43
+ | chore | Maintenance, dependencies, tooling |
44
+ | refactor | Restructuring without behavior change |
45
+ | test | Adding or fixing tests |
46
+ | ci | CI/CD pipeline changes |
47
+ | style | Formatting, whitespace, no logic change |
48
+ | perf | Performance improvement |
49
+ | build | Build system, Makefile, pyproject changes |
50
+ | revert | Reverting a previous commit |
51
+
52
+ ## Examples
53
+
54
+ ```text
55
+ feat: add border-radius scale to design tokens
56
+ feat: add dark mode theme variant
57
+ feat!: rename apply_theme() to load_theme() — breaking API change
58
+ fix: handle missing token fallback in QSS output
59
+ fix: resolve widget rendering on high-DPI displays
60
+ refactor: extract token resolver to separate method
61
+ test: add unit tests for missing token fallback
62
+ docs: document token naming convention
63
+ chore: update uv.lock after dependency bump
64
+ build: add coverage target to Makefile
65
+ ```
66
+
67
+ ## Anti-patterns
68
+
69
+ ```text
70
+ # BAD — vague
71
+ update stuff
72
+
73
+ # BAD — AI attribution
74
+ feat: add feature
75
+
76
+ Co-Authored-By: Claude <claude@anthropic.com>
77
+
78
+ # BAD — multiple concerns
79
+ feat: add token scale and fix parser bug and update docs
80
+
81
+ # BAD — past tense
82
+ fix: fixed the missing token fallback
83
+ ```
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: release-notes
3
+ description: "Trigger: release, release notes, changelog, tag, version, what's new. Generate structured release notes for QtShadcn versions."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: BugCodeX
7
+ version: "1.0"
8
+ ---
9
+
10
+ # Activation Contract
11
+
12
+ Apply this skill when creating or updating release notes for any QtShadcn version tag.
13
+
14
+ ## Hard Rules
15
+
16
+ - Read commits since the previous tag: `git log --oneline <prev>...<next>`
17
+ - Group commits by conventional type — never dump a raw commit list
18
+ - Omit `chore` and `ci` from user-facing sections unless they affect the public API
19
+ - Use plain, clear language — this is read by library consumers, not contributors
20
+ - **Omit empty sections entirely** — never write "No fixes in this release" or similar
21
+ - Always include a Verification section with the commands to validate the release
22
+ - Version format: `vMAJOR.MINOR.PATCH` (semver)
23
+
24
+ ## Output Format
25
+
26
+ ```markdown
27
+ # QtShadcn vX.Y.Z
28
+
29
+ ## What's New
30
+ <!-- feat commits: new capabilities the user gains -->
31
+ - Short description of the feature
32
+
33
+ ## Changes
34
+ <!-- refactor, perf, style, build commits with user impact -->
35
+ - Short description of the change
36
+
37
+ ## Fixes
38
+ <!-- fix commits -->
39
+ - Short description of the fix
40
+
41
+ ## Verification
42
+ <!-- always include — commands to validate this release works -->
43
+ \`\`\`bash
44
+ pip install qtshadcn==X.Y.Z
45
+ python -c "import qtshadcn; print(qtshadcn.__version__)"
46
+ make test
47
+ \`\`\`
48
+ ```
49
+
50
+ ## Section Rules
51
+
52
+ | Section | Include | Omit |
53
+ | --------- | --------- | ------ |
54
+ | What's New | `feat` commits | Internal refactors with no API change |
55
+ | Changes | `refactor`, `perf`, `style`, `build` with user impact | Pure internal restructuring |
56
+ | Fixes | `fix` commits | Typo fixes in comments or docs |
57
+ | Verification | Always present | Nothing — this section is mandatory |
58
+
59
+ ## Examples
60
+
61
+ ```markdown
62
+ # QtShadcn v0.0.3
63
+
64
+ ## What's New
65
+ - Added `QToolButton` styling support
66
+
67
+ ## Verification
68
+ \`\`\`bash
69
+ pip install qtshadcn==0.0.3
70
+ python -c "import qtshadcn; print(qtshadcn.__version__)"
71
+ make test
72
+ \`\`\`
73
+ ```
74
+
75
+ ## Anti-patterns
76
+
77
+ ```markdown
78
+ # BAD — raw commit dump
79
+ - 1fe7498 chore: bump version to 0.0.3
80
+ - 0aeeaac feat: add QToolButton styling support
81
+
82
+ # BAD — empty section filler
83
+ ## Fixes
84
+ - No fixes in this release
85
+
86
+ # BAD — missing Verification section
87
+ ## Fixes
88
+ - resolve rendering bug
89
+ (end of notes)
90
+
91
+ # BAD — vague entries
92
+ - Various improvements
93
+ - Bug fixes
94
+ ```
@@ -0,0 +1,55 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ name: Build distributions
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Check out repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.11"
25
+
26
+ - name: Install build backend
27
+ run: python -m pip install --upgrade build
28
+
29
+ - name: Build wheel and sdist
30
+ run: python -m build
31
+
32
+ - name: Upload distributions for inspection
33
+ uses: actions/upload-artifact@v4
34
+ with:
35
+ name: python-package-distributions
36
+ path: dist/*
37
+ if-no-files-found: error
38
+
39
+ publish:
40
+ name: Publish distributions to PyPI
41
+ runs-on: ubuntu-latest
42
+ needs: build
43
+ environment: pypi
44
+ permissions:
45
+ id-token: write
46
+
47
+ steps:
48
+ - name: Download built distributions
49
+ uses: actions/download-artifact@v4
50
+ with:
51
+ name: python-package-distributions
52
+ path: dist
53
+
54
+ - name: Publish to PyPI
55
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,48 @@
1
+ # ── Bytecode ────────────────────────────────────────────────
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+
6
+ # ── Virtual environment ────────────────────────────────────
7
+ .venv/
8
+ venv/
9
+ env/
10
+ *.egg-info/
11
+ *.egg
12
+
13
+ # ── Build artifacts ────────────────────────────────────────
14
+ dist/
15
+ build/
16
+ site/
17
+ *.whl
18
+ .atl/
19
+ *.atl
20
+
21
+ # ── Testing ────────────────────────────────────────────────
22
+ .pytest_cache/
23
+ .coverage
24
+ htmlcov/
25
+ coverage.xml
26
+
27
+ # ── Linting / formatting ───────────────────────────────────
28
+ .ruff_cache/
29
+
30
+ # ── IDE ────────────────────────────────────────────────────
31
+ .vscode/
32
+ .idea/
33
+ *.swp
34
+ *.swo
35
+
36
+ # ── OS ─────────────────────────────────────────────────────
37
+ .DS_Store
38
+ Thumbs.db
39
+
40
+ # ── Environment ────────────────────────────────────────────
41
+ .env
42
+ .env.*
43
+
44
+ # ── CodeGraph index (regenerated locally) ──────────────────
45
+ .codegraph/
46
+
47
+ # ── SDD / planning artifacts (local only) ──────────────────
48
+ openspec/
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: commit-hygiene
3
+ description: "Trigger: commit, git commit, conventional commit, branch cleanup, commit message. Enforce conventional commits and clean history for QtShadcn."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: gentleman-programming
7
+ version: "1.0"
8
+ ---
9
+
10
+ # Activation Contract
11
+
12
+ Apply this skill on any commit creation, commit message review, or branch cleanup in the QtShadcn project.
13
+
14
+ ## Hard Rules
15
+
16
+ - NEVER add `Co-Authored-By` or any AI attribution trailers
17
+ - One logical change per commit — no "add X and fix Y and update docs"
18
+ - Use imperative mood: "add" not "added", "fix" not "fixed"
19
+ - Keep subject line ≤ 72 characters
20
+ - Reference issue numbers when relevant: `feat: add border-radius scale to tokens (#12)`
21
+ - Add a body separated by a blank line when the commit needs explanation
22
+ - Use `type!: description` for breaking changes — the `!` signals a semver MAJOR bump
23
+
24
+ ## Format
25
+
26
+ ```text
27
+ type: description
28
+ ```
29
+
30
+ Validated by regex:
31
+
32
+ ```text
33
+ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)!?: .+
34
+ ```
35
+
36
+ ## Valid Types
37
+
38
+ | Type | Use For |
39
+ | ------ | --------- |
40
+ | feat | New feature or behavior |
41
+ | fix | Bug fix |
42
+ | docs | Documentation only |
43
+ | chore | Maintenance, dependencies, tooling |
44
+ | refactor | Restructuring without behavior change |
45
+ | test | Adding or fixing tests |
46
+ | ci | CI/CD pipeline changes |
47
+ | style | Formatting, whitespace, no logic change |
48
+ | perf | Performance improvement |
49
+ | build | Build system, Makefile, pyproject changes |
50
+ | revert | Reverting a previous commit |
51
+
52
+ ## Examples
53
+
54
+ ```text
55
+ feat: add border-radius scale to design tokens
56
+ feat: add dark mode theme variant
57
+ feat!: rename apply_theme() to load_theme() — breaking API change
58
+ fix: handle missing token fallback in QSS output
59
+ fix: resolve widget rendering on high-DPI displays
60
+ refactor: extract token resolver to separate method
61
+ test: add unit tests for missing token fallback
62
+ docs: document token naming convention
63
+ chore: update uv.lock after dependency bump
64
+ build: add coverage target to Makefile
65
+ ```
66
+
67
+ ## Anti-patterns
68
+
69
+ ```text
70
+ # BAD — vague
71
+ update stuff
72
+
73
+ # BAD — AI attribution
74
+ feat: add feature
75
+
76
+ Co-Authored-By: Claude <claude@anthropic.com>
77
+
78
+ # BAD — multiple concerns
79
+ feat: add token scale and fix parser bug and update docs
80
+
81
+ # BAD — past tense
82
+ fix: fixed the missing token fallback
83
+ ```
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: release-notes
3
+ description: "Trigger: release, release notes, changelog, tag, version, what's new. Generate structured release notes for QtShadcn versions."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: gentleman-programming
7
+ version: "1.0"
8
+ ---
9
+
10
+ # Activation Contract
11
+
12
+ Apply this skill when creating or updating release notes for any QtShadcn version tag.
13
+
14
+ ## Hard Rules
15
+
16
+ - Read commits since the previous tag: `git log --oneline <prev>...<next>`
17
+ - Group commits by conventional type — never dump a raw commit list
18
+ - Omit `chore` and `ci` from user-facing sections unless they affect the public API
19
+ - Use plain, clear language — this is read by library consumers, not contributors
20
+ - **Omit empty sections entirely** — never write "No fixes in this release" or similar
21
+ - Always include a Verification section with the commands to validate the release
22
+ - Version format: `vMAJOR.MINOR.PATCH` (semver)
23
+
24
+ ## Output Format
25
+
26
+ ```markdown
27
+ # QtShadcn vX.Y.Z
28
+
29
+ ## What's New
30
+ <!-- feat commits: new capabilities the user gains -->
31
+ - Short description of the feature
32
+
33
+ ## Changes
34
+ <!-- refactor, perf, style, build commits with user impact -->
35
+ - Short description of the change
36
+
37
+ ## Fixes
38
+ <!-- fix commits -->
39
+ - Short description of the fix
40
+
41
+ ## Verification
42
+ <!-- always include — commands to validate this release works -->
43
+ \`\`\`bash
44
+ pip install qtshadcn==X.Y.Z
45
+ python -c "import qtshadcn; print(qtshadcn.__version__)"
46
+ make test
47
+ \`\`\`
48
+ ```
49
+
50
+ ## Section Rules
51
+
52
+ | Section | Include | Omit |
53
+ | --------- | --------- | ------ |
54
+ | What's New | `feat` commits | Internal refactors with no API change |
55
+ | Changes | `refactor`, `perf`, `style`, `build` with user impact | Pure internal restructuring |
56
+ | Fixes | `fix` commits | Typo fixes in comments or docs |
57
+ | Verification | Always present | Nothing — this section is mandatory |
58
+
59
+ ## Examples
60
+
61
+ ```markdown
62
+ # QtShadcn v0.0.3
63
+
64
+ ## What's New
65
+ - Added `QToolButton` styling support
66
+
67
+ ## Verification
68
+ \`\`\`bash
69
+ pip install qtshadcn==0.0.3
70
+ python -c "import qtshadcn; print(qtshadcn.__version__)"
71
+ make test
72
+ \`\`\`
73
+ ```
74
+
75
+ ## Anti-patterns
76
+
77
+ ```markdown
78
+ # BAD — raw commit dump
79
+ - 1fe7498 chore: bump version to 0.0.3
80
+ - 0aeeaac feat: add QToolButton styling support
81
+
82
+ # BAD — empty section filler
83
+ ## Fixes
84
+ - No fixes in this release
85
+
86
+ # BAD — missing Verification section
87
+ ## Fixes
88
+ - resolve rendering bug
89
+ (end of notes)
90
+
91
+ # BAD — vague entries
92
+ - Various improvements
93
+ - Bug fixes
94
+ ```
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,103 @@
1
+ # AGENTS.md — QtShadcn
2
+
3
+ Modern styling and theming framework for Qt/PySide6 applications, inspired by [shadcn/ui](https://ui.shadcn.com).
4
+
5
+ ---
6
+
7
+ ## Project Overview
8
+
9
+ QtShadcn loads a local **XML theme file** with `<light>` and `<dark>` palettes, resolves design tokens, renders a QSS stylesheet via Jinja2, and applies it to a `QApplication` in one call.
10
+
11
+ - **Language**: Python ≥ 3.11
12
+ - **Package manager**: `uv`
13
+ - **Build backend**: Hatchling
14
+ - **Test runner**: pytest
15
+ - **Linter/formatter**: ruff (line length: 100)
16
+ - **Type checker**: ty
17
+ - **Docs**: MkDocs + Material theme
18
+
19
+ ---
20
+
21
+ ## Repository Structure
22
+
23
+ ```text
24
+ qtshadcn/
25
+ ├── app.py # Public API: apply_theme(), get_theme(), ThemeConfig
26
+ ├── models.py # Pydantic models: ShadcnTheme, ShadcnThemeTokens, ThemeConfig
27
+ ├── parser.py # XML theme parser
28
+ ├── styles/
29
+ │ └── shadcn.jinja # QSS template — the ONLY file for widget styles
30
+ ├── themes/
31
+ │ └── default.xml # Default light/dark token values
32
+ ├── tokens/
33
+ │ ├── colors.py # alpha(), mix() helpers
34
+ │ ├── radius.py # class_px() helper
35
+ │ └── scale.py # spacing_px(), TEXT_*, FONT_WEIGHT_* constants
36
+ └── fonts/ # Bundled font files
37
+ tests/
38
+ ├── test_app.py
39
+ ├── test_integration.py
40
+ ├── test_models.py
41
+ ├── test_parser.py
42
+ ├── test_renderer.py # QSS output assertions
43
+ └── test_tokens.py
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Development Commands
49
+
50
+ ```bash
51
+ make install-dev # set up the virtual environment (uv sync --extra dev)
52
+ make lint # ruff check (report only)
53
+ make format # ruff format + ruff check --fix
54
+ make type-check # ty check
55
+ make test # pytest
56
+ make test-cov # pytest with HTML coverage report
57
+ make docs-serve # live-reload docs at http://127.0.0.1:8000
58
+ make build # wheel + sdist
59
+ make clean # remove dist/, caches, .coverage
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Coding Conventions
65
+
66
+ - **Docstrings**: required on all public modules, classes, and functions (pydocstyle enforced via ruff `D` rules)
67
+ - **Imports**: isort-ordered (`I` rules); no star imports
68
+ - **Quotes**: double quotes
69
+ - **Indent**: spaces
70
+ - **Line length**: 100 characters (E501 ignored in ruff, but keep it reasonable)
71
+ - **Type annotations**: required on all public functions; `ty` must pass with no warnings
72
+ - **Tests**: no docstrings required in `tests/` or `examples/`
73
+
74
+ ---
75
+
76
+ ## Architecture Rules
77
+
78
+ - **Widget styles belong in `qtshadcn/styles/shadcn.jinja` only** — do not create new QSS files
79
+ - **No hardcoded colors or pixel values in the Jinja template** — use tokens and helpers exclusively
80
+ - **Token helpers** (`colors.alpha`, `colors.mix`, `radius.class_px`, `scale.spacing_px`) are the only way to transform token values
81
+ - **Theme tokens are defined in XML** (`themes/default.xml`) — do not add Python-level color constants
82
+ - **Public API surface**: `apply_theme()`, `get_theme()`, `ThemeConfig`, `ShadcnThemeTokens` — keep it minimal
83
+
84
+ ---
85
+
86
+ ## Skills
87
+
88
+ These skills are active for this project. Read the corresponding `SKILL.md` before performing the related task.
89
+
90
+ | Skill | When to use | Path |
91
+ |--------------------|--------------------------------------------------------------|--------------------------------------------------------------|
92
+ | `commit-hygiene` | Any commit creation, message review, or branch cleanup | [SKILL.md](.gemini/skills/commit-hygiene/SKILL.md) |
93
+ | `release-notes` | Creating or updating release notes for any version tag | [SKILL.md](.gemini/skills/release-notes/SKILL.md) |
94
+
95
+ ---
96
+
97
+ ## Versioning
98
+
99
+ Follows [semver](https://semver.org). Version is defined in `pyproject.toml` and must match the git tag (`vMAJOR.MINOR.PATCH`).
100
+
101
+ - `feat!:` commits → MAJOR bump
102
+ - `feat:` commits → MINOR bump
103
+ - `fix:` commits → PATCH bump
qtshadcn-0.0.5/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Christopher Nuñez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.