feat: enhance file name transformer with additional options (#555)

- Add v2 badge-style option as alternative to v1 tab-style
- v2 features: border, rounded corners, positioned with CSS custom property
- v1 features: tab-style with rounded top corners, muted background
- Add hideDot option to control green dot indicator visibility
- Include comprehensive JSDoc documentation with usage examples
- Support both styling variants with configuration parameters
This commit is contained in:
Sat Naing
2025-07-09 23:35:41 +07:00
committed by GitHub
parent 5d47275687
commit c863c8219d
4 changed files with 50 additions and 12 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ export default defineConfig({
defaultColor: false,
wrap: false,
transformers: [
transformerFileName(),
transformerFileName({ style: "v2", hideDot: false }),
transformerNotationHighlight(),
transformerNotationWordHighlight(),
transformerNotationDiff({ matchAlgorithm: "v3" }),
@@ -35,7 +35,7 @@ export default defineConfig({
},
},
vite: {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line
// @ts-ignore
// This will be fixed in Astro 6 with Vite 7 support
// See: https://github.com/withastro/astro/issues/14030