defuss-shadcn 0.7.14 → 0.7.19
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/AGENTS.md +122 -7
- package/ARCH.md +10 -7
- package/README.md +22 -11
- package/dist/SKILL.md +559 -0
- package/dist/SKILL_tpl.md +66 -0
- package/dist/components/accordion/component-skill.md +8 -0
- package/dist/components/alert/component-skill.md +8 -0
- package/dist/components/alert-dialog/component-skill.md +8 -0
- package/dist/components/avatar/avatar.css +5 -1
- package/dist/components/avatar/component-skill.md +8 -0
- package/dist/components/badge/component-skill.md +8 -0
- package/dist/components/breadcrumb/breadcrumb.css +3 -0
- package/dist/components/breadcrumb/component-skill.md +8 -0
- package/dist/components/button/component-skill.md +8 -0
- package/dist/components/button-group/component-skill.md +8 -0
- package/dist/components/calendar/component-skill.md +8 -0
- package/dist/components/card/card.css +6 -0
- package/dist/components/card/component-skill.md +8 -0
- package/dist/components/carousel/component-skill.md +8 -0
- package/dist/components/checkbox/component-skill.md +8 -0
- package/dist/components/collapsible/component-skill.md +8 -0
- package/dist/components/color-picker/component-skill.md +8 -0
- package/dist/components/combobox/combobox.css +16 -3
- package/dist/components/combobox/component-skill.md +8 -0
- package/dist/components/command/command.js +4 -2
- package/dist/components/command/component-skill.md +8 -0
- package/dist/components/context-menu/component-skill.md +8 -0
- package/dist/components/context-menu/context-menu.js +49 -8
- package/dist/components/date-picker/component-skill.md +8 -0
- package/dist/components/dialog/component-skill.md +8 -0
- package/dist/components/dialog/dialog.js +4 -1
- package/dist/components/dropdown/component-skill.md +8 -0
- package/dist/components/dropdown/dropdown.css +16 -8
- package/dist/components/file-input/component-skill.md +8 -0
- package/dist/components/form/component-skill.md +8 -0
- package/dist/components/icon/component-skill.md +8 -0
- package/dist/components/image/component-skill.md +8 -0
- package/dist/components/input/component-skill.md +8 -0
- package/dist/components/label/component-skill.md +8 -0
- package/dist/components/navigation-menu/component-skill.md +8 -0
- package/dist/components/number-input/component-skill.md +8 -0
- package/dist/components/pagination/component-skill.md +8 -0
- package/dist/components/popover/component-skill.md +8 -0
- package/dist/components/progress/component-skill.md +8 -0
- package/dist/components/radio/component-skill.md +8 -0
- package/dist/components/scroll-area/component-skill.md +8 -0
- package/dist/components/select/component-skill.md +8 -0
- package/dist/components/separator/component-skill.md +8 -0
- package/dist/components/sheet/component-skill.md +9 -1
- package/dist/components/sheet/sheet.css +11 -0
- package/dist/components/sidebar/component-skill.md +9 -1
- package/dist/components/sidebar/sidebar.css +17 -1
- package/dist/components/skeleton/component-skill.md +8 -0
- package/dist/components/slider/component-skill.md +8 -0
- package/dist/components/sortable/component-skill.md +8 -0
- package/dist/components/spinner/component-skill.md +8 -0
- package/dist/components/statistic/component-skill.md +8 -0
- package/dist/components/steps/component-skill.md +8 -0
- package/dist/components/switch/component-skill.md +8 -0
- package/dist/components/table/component-skill.md +8 -0
- package/dist/components/tabs/component-skill.md +8 -0
- package/dist/components/textarea/component-skill.md +8 -0
- package/dist/components/timeline/component-skill.md +8 -0
- package/dist/components/toast/component-skill.md +11 -0
- package/dist/components/toast/toast.css +21 -0
- package/dist/components/toast/toast.js +14 -1
- package/dist/components/toggle/component-skill.md +8 -0
- package/dist/components/toggle-group/component-skill.md +8 -0
- package/dist/components/toolbar/component-skill.md +8 -0
- package/dist/components/tooltip/component-skill.md +9 -1
- package/dist/components/tooltip/tooltip.css +4 -0
- package/dist/components/tree-view/component-skill.md +8 -0
- package/dist/components/typography/component-skill.md +8 -0
- package/dist/documentation/accessibility.html +3 -2
- package/dist/documentation/accordion.html +3 -2
- package/dist/documentation/alert-dialog.html +3 -2
- package/dist/documentation/alert.html +3 -2
- package/dist/documentation/animations.html +3 -2
- package/dist/documentation/avatar.html +9 -4
- package/dist/documentation/badge.html +3 -2
- package/dist/documentation/breadcrumb.html +6 -2
- package/dist/documentation/button-group.html +3 -2
- package/dist/documentation/button.html +3 -2
- package/dist/documentation/calendar.html +3 -2
- package/dist/documentation/card.html +9 -2
- package/dist/documentation/carousel.html +3 -2
- package/dist/documentation/cascade-layers.html +3 -2
- package/dist/documentation/changelog.html +124 -3
- package/dist/documentation/checkbox.html +3 -2
- package/dist/documentation/collapsible.html +6 -5
- package/dist/documentation/color-picker.html +3 -2
- package/dist/documentation/combobox.html +19 -5
- package/dist/documentation/command.html +7 -4
- package/dist/documentation/component-skills.html +29 -6
- package/dist/documentation/context-menu.html +53 -10
- package/dist/documentation/css/layout.css +46 -12
- package/dist/documentation/dark-mode.html +3 -2
- package/dist/documentation/data-attribute-api.html +3 -2
- package/dist/documentation/date-picker.html +3 -2
- package/dist/documentation/dialog.html +7 -3
- package/dist/documentation/dropdown.html +19 -10
- package/dist/documentation/es-modules.html +7 -4
- package/dist/documentation/file-input.html +3 -2
- package/dist/documentation/form.html +3 -2
- package/dist/documentation/icon.html +3 -2
- package/dist/documentation/image.html +358 -4
- package/dist/documentation/images/favicon.webp +0 -0
- package/dist/documentation/index.html +32 -8
- package/dist/documentation/input.html +3 -2
- package/dist/documentation/installation.html +3 -2
- package/dist/documentation/js/layout.js +132 -59
- package/dist/documentation/js/search-index.js +8 -0
- package/dist/documentation/js/themes.js +144 -57
- package/dist/documentation/label.html +3 -2
- package/dist/documentation/native-web-apis.html +3 -2
- package/dist/documentation/navigation-menu.html +3 -2
- package/dist/documentation/number-input.html +3 -2
- package/dist/documentation/pagination.html +3 -2
- package/dist/documentation/popover.html +3 -2
- package/dist/documentation/progress.html +3 -2
- package/dist/documentation/radio.html +3 -2
- package/dist/documentation/scroll-area.html +3 -2
- package/dist/documentation/select.html +3 -2
- package/dist/documentation/separator.html +3 -2
- package/dist/documentation/sheet.html +26 -14
- package/dist/documentation/sidebar.html +86 -4
- package/dist/documentation/skeleton.html +3 -2
- package/dist/documentation/slider.html +3 -2
- package/dist/documentation/sortable.html +3 -2
- package/dist/documentation/spinner.html +3 -2
- package/dist/documentation/statistic.html +3 -2
- package/dist/documentation/steps.html +3 -2
- package/dist/documentation/switch.html +3 -2
- package/dist/documentation/table.html +6 -5
- package/dist/documentation/tabs.html +3 -2
- package/dist/documentation/textarea.html +3 -2
- package/dist/documentation/theming.html +3 -2
- package/dist/documentation/timeline.html +3 -2
- package/dist/documentation/toast.html +39 -3
- package/dist/documentation/toggle-group.html +3 -2
- package/dist/documentation/toggle.html +3 -2
- package/dist/documentation/toolbar.html +3 -2
- package/dist/documentation/tooltip.html +7 -2
- package/dist/documentation/tree-view.html +3 -2
- package/dist/documentation/typography.html +3 -2
- package/dist/theme/default-semantic-tokens.css +3 -1
- package/docs/{documentation/accessibility.html → accessibility.html} +86 -85
- package/docs/{documentation/accordion.html → accordion.html} +91 -90
- package/docs/{documentation/alert-dialog.html → alert-dialog.html} +89 -88
- package/docs/{documentation/alert.html → alert.html} +88 -87
- package/docs/{documentation/animations.html → animations.html} +86 -85
- package/docs/{documentation/avatar.html → avatar.html} +95 -90
- package/docs/{documentation/badge.html → badge.html} +88 -87
- package/docs/{documentation/breadcrumb.html → breadcrumb.html} +91 -87
- package/docs/{documentation/button-group.html → button-group.html} +88 -87
- package/docs/{documentation/button.html → button.html} +88 -87
- package/docs/{documentation/calendar.html → calendar.html} +89 -88
- package/docs/{documentation/card.html → card.html} +94 -87
- package/docs/{documentation/carousel.html → carousel.html} +89 -88
- package/docs/{documentation/cascade-layers.html → cascade-layers.html} +86 -85
- package/docs/changelog.html +506 -0
- package/docs/{documentation/checkbox.html → checkbox.html} +88 -87
- package/docs/{documentation/collapsible.html → collapsible.html} +91 -90
- package/docs/{documentation/color-picker.html → color-picker.html} +89 -88
- package/docs/{documentation/combobox.html → combobox.html} +105 -91
- package/docs/{documentation/command.html → command.html} +93 -90
- package/docs/component-skills.html +317 -0
- package/docs/{documentation/context-menu.html → context-menu.html} +139 -96
- package/docs/{documentation/css → css}/layout.css +46 -12
- package/docs/{documentation/dark-mode.html → dark-mode.html} +86 -85
- package/docs/{documentation/data-attribute-api.html → data-attribute-api.html} +86 -85
- package/docs/{documentation/date-picker.html → date-picker.html} +88 -87
- package/docs/{documentation/dialog.html → dialog.html} +95 -91
- package/docs/{documentation/dropdown.html → dropdown.html} +105 -96
- package/docs/{documentation/es-modules.html → es-modules.html} +90 -87
- package/docs/{documentation/file-input.html → file-input.html} +88 -87
- package/docs/{documentation/form.html → form.html} +88 -87
- package/docs/{documentation/icon.html → icon.html} +88 -87
- package/docs/{documentation/image.html → image.html} +444 -90
- package/docs/images/favicon.webp +0 -0
- package/docs/{documentation/index.html → index.html} +115 -91
- package/docs/{documentation/input.html → input.html} +88 -87
- package/docs/{documentation/installation.html → installation.html} +86 -85
- package/docs/{documentation/js → js}/layout.js +132 -59
- package/docs/js/search-index.js +8 -0
- package/docs/{documentation/js → js}/themes.js +144 -57
- package/docs/{documentation/label.html → label.html} +88 -87
- package/docs/{documentation/native-web-apis.html → native-web-apis.html} +86 -85
- package/docs/{documentation/navigation-menu.html → navigation-menu.html} +89 -88
- package/docs/{documentation/number-input.html → number-input.html} +89 -88
- package/docs/{documentation/pagination.html → pagination.html} +88 -87
- package/docs/{documentation/popover.html → popover.html} +89 -88
- package/docs/{documentation/progress.html → progress.html} +88 -87
- package/docs/{documentation/radio.html → radio.html} +88 -87
- package/docs/{documentation/scroll-area.html → scroll-area.html} +88 -87
- package/docs/{documentation/select.html → select.html} +88 -87
- package/docs/{documentation/separator.html → separator.html} +88 -87
- package/docs/{documentation/sheet.html → sheet.html} +112 -100
- package/docs/{documentation/sidebar.html → sidebar.html} +172 -90
- package/docs/sitemap.xml +69 -69
- package/docs/{documentation/skeleton.html → skeleton.html} +88 -87
- package/docs/{documentation/slider.html → slider.html} +89 -88
- package/docs/{documentation/sortable.html → sortable.html} +89 -88
- package/docs/{documentation/spinner.html → spinner.html} +88 -87
- package/docs/{documentation/statistic.html → statistic.html} +88 -87
- package/docs/{documentation/steps.html → steps.html} +88 -87
- package/docs/{documentation/switch.html → switch.html} +88 -87
- package/docs/{documentation/table.html → table.html} +91 -90
- package/docs/{documentation/tabs.html → tabs.html} +89 -88
- package/docs/{documentation/textarea.html → textarea.html} +88 -87
- package/docs/{documentation/theming.html → theming.html} +86 -85
- package/docs/{documentation/timeline.html → timeline.html} +88 -87
- package/docs/{documentation/toast.html → toast.html} +125 -89
- package/docs/{documentation/toggle-group.html → toggle-group.html} +89 -88
- package/docs/{documentation/toggle.html → toggle.html} +89 -88
- package/docs/{documentation/toolbar.html → toolbar.html} +89 -88
- package/docs/{documentation/tooltip.html → tooltip.html} +93 -88
- package/docs/{documentation/tree-view.html → tree-view.html} +89 -88
- package/docs/{documentation/typography.html → typography.html} +88 -87
- package/package.json +1 -1
- package/scripts/build.ts +14 -0
- package/scripts/deploy.sh +47 -13
- package/scripts/lib/changelog.ts +144 -0
- package/scripts/lib/contrast.ts +227 -0
- package/scripts/lib/mirror.ts +68 -0
- package/scripts/lib/readme.ts +33 -0
- package/scripts/lib/search-index.ts +99 -0
- package/scripts/lib/skill-files.ts +45 -0
- package/scripts/lib/skill.ts +83 -0
- package/scripts/sync-docs.ts +23 -16
- package/scripts/verify.ts +253 -22
- package/src/SKILL.md +559 -0
- package/src/SKILL_tpl.md +66 -0
- package/src/components/accordion/component-skill.md +8 -0
- package/src/components/alert/component-skill.md +8 -0
- package/src/components/alert-dialog/component-skill.md +8 -0
- package/src/components/avatar/avatar.css +5 -1
- package/src/components/avatar/component-skill.md +8 -0
- package/src/components/badge/component-skill.md +8 -0
- package/src/components/breadcrumb/breadcrumb.css +3 -0
- package/src/components/breadcrumb/component-skill.md +8 -0
- package/src/components/button/component-skill.md +8 -0
- package/src/components/button-group/component-skill.md +8 -0
- package/src/components/calendar/component-skill.md +8 -0
- package/src/components/card/card.css +6 -0
- package/src/components/card/component-skill.md +8 -0
- package/src/components/carousel/component-skill.md +8 -0
- package/src/components/checkbox/component-skill.md +8 -0
- package/src/components/collapsible/component-skill.md +8 -0
- package/src/components/color-picker/component-skill.md +8 -0
- package/src/components/combobox/combobox.css +16 -3
- package/src/components/combobox/component-skill.md +8 -0
- package/src/components/command/command.ts +4 -2
- package/src/components/command/component-skill.md +8 -0
- package/src/components/context-menu/component-skill.md +8 -0
- package/src/components/context-menu/context-menu.ts +50 -8
- package/src/components/date-picker/component-skill.md +8 -0
- package/src/components/dialog/component-skill.md +8 -0
- package/src/components/dialog/dialog.ts +4 -1
- package/src/components/dropdown/component-skill.md +8 -0
- package/src/components/dropdown/dropdown.css +16 -8
- package/src/components/file-input/component-skill.md +8 -0
- package/src/components/form/component-skill.md +8 -0
- package/src/components/icon/component-skill.md +8 -0
- package/src/components/image/component-skill.md +8 -0
- package/src/components/input/component-skill.md +8 -0
- package/src/components/label/component-skill.md +8 -0
- package/src/components/navigation-menu/component-skill.md +8 -0
- package/src/components/number-input/component-skill.md +8 -0
- package/src/components/pagination/component-skill.md +8 -0
- package/src/components/popover/component-skill.md +8 -0
- package/src/components/progress/component-skill.md +8 -0
- package/src/components/radio/component-skill.md +8 -0
- package/src/components/scroll-area/component-skill.md +8 -0
- package/src/components/select/component-skill.md +8 -0
- package/src/components/separator/component-skill.md +8 -0
- package/src/components/sheet/component-skill.md +9 -1
- package/src/components/sheet/sheet.css +11 -0
- package/src/components/sidebar/component-skill.md +9 -1
- package/src/components/sidebar/sidebar.css +17 -1
- package/src/components/skeleton/component-skill.md +8 -0
- package/src/components/slider/component-skill.md +8 -0
- package/src/components/sortable/component-skill.md +8 -0
- package/src/components/spinner/component-skill.md +8 -0
- package/src/components/statistic/component-skill.md +8 -0
- package/src/components/steps/component-skill.md +8 -0
- package/src/components/switch/component-skill.md +8 -0
- package/src/components/table/component-skill.md +8 -0
- package/src/components/tabs/component-skill.md +8 -0
- package/src/components/textarea/component-skill.md +8 -0
- package/src/components/timeline/component-skill.md +8 -0
- package/src/components/toast/component-skill.md +11 -0
- package/src/components/toast/toast.css +21 -0
- package/src/components/toast/toast.ts +15 -1
- package/src/components/toggle/component-skill.md +8 -0
- package/src/components/toggle-group/component-skill.md +8 -0
- package/src/components/toolbar/component-skill.md +8 -0
- package/src/components/tooltip/component-skill.md +9 -1
- package/src/components/tooltip/tooltip.css +4 -0
- package/src/components/tree-view/component-skill.md +8 -0
- package/src/components/typography/component-skill.md +8 -0
- package/src/documentation/accessibility.html +3 -2
- package/src/documentation/accordion.html +3 -2
- package/src/documentation/alert-dialog.html +3 -2
- package/src/documentation/alert.html +3 -2
- package/src/documentation/animations.html +3 -2
- package/src/documentation/avatar.html +9 -4
- package/src/documentation/badge.html +3 -2
- package/src/documentation/breadcrumb.html +6 -2
- package/src/documentation/button-group.html +3 -2
- package/src/documentation/button.html +3 -2
- package/src/documentation/calendar.html +3 -2
- package/src/documentation/card.html +9 -2
- package/src/documentation/carousel.html +3 -2
- package/src/documentation/cascade-layers.html +3 -2
- package/src/documentation/changelog.html +124 -3
- package/src/documentation/checkbox.html +3 -2
- package/src/documentation/collapsible.html +6 -5
- package/src/documentation/color-picker.html +3 -2
- package/src/documentation/combobox.html +19 -5
- package/src/documentation/command.html +7 -4
- package/src/documentation/component-skills.html +29 -6
- package/src/documentation/context-menu.html +53 -10
- package/src/documentation/css/layout.css +46 -12
- package/src/documentation/dark-mode.html +3 -2
- package/src/documentation/data-attribute-api.html +3 -2
- package/src/documentation/date-picker.html +3 -2
- package/src/documentation/dialog.html +7 -3
- package/src/documentation/dropdown.html +19 -10
- package/src/documentation/es-modules.html +7 -4
- package/src/documentation/file-input.html +3 -2
- package/src/documentation/form.html +3 -2
- package/src/documentation/icon.html +3 -2
- package/src/documentation/image.html +358 -4
- package/src/documentation/images/favicon.webp +0 -0
- package/src/documentation/index.html +32 -8
- package/src/documentation/input.html +3 -2
- package/src/documentation/installation.html +3 -2
- package/src/documentation/js/layout.ts +121 -58
- package/src/documentation/js/search-index.js +8 -0
- package/src/documentation/js/themes.ts +144 -57
- package/src/documentation/label.html +3 -2
- package/src/documentation/native-web-apis.html +3 -2
- package/src/documentation/navigation-menu.html +3 -2
- package/src/documentation/number-input.html +3 -2
- package/src/documentation/pagination.html +3 -2
- package/src/documentation/popover.html +3 -2
- package/src/documentation/progress.html +3 -2
- package/src/documentation/radio.html +3 -2
- package/src/documentation/scroll-area.html +3 -2
- package/src/documentation/select.html +3 -2
- package/src/documentation/separator.html +3 -2
- package/src/documentation/sheet.html +26 -14
- package/src/documentation/sidebar.html +86 -4
- package/src/documentation/skeleton.html +3 -2
- package/src/documentation/slider.html +3 -2
- package/src/documentation/sortable.html +3 -2
- package/src/documentation/spinner.html +3 -2
- package/src/documentation/statistic.html +3 -2
- package/src/documentation/steps.html +3 -2
- package/src/documentation/switch.html +3 -2
- package/src/documentation/table.html +6 -5
- package/src/documentation/tabs.html +3 -2
- package/src/documentation/textarea.html +3 -2
- package/src/documentation/theming.html +3 -2
- package/src/documentation/timeline.html +3 -2
- package/src/documentation/toast.html +39 -3
- package/src/documentation/toggle-group.html +3 -2
- package/src/documentation/toggle.html +3 -2
- package/src/documentation/toolbar.html +3 -2
- package/src/documentation/tooltip.html +7 -2
- package/src/documentation/tree-view.html +3 -2
- package/src/documentation/typography.html +3 -2
- package/src/theme/default-semantic-tokens.css +3 -1
- package/src/types/defuss-shadcn.d.ts +19 -0
- package/src/types/raw-import.d.ts +11 -0
- package/tests/changelog.test.ts +150 -0
- package/tests/contrast.test.ts +217 -0
- package/tests/e2e/avatar.e2e-fixture.html +7 -0
- package/tests/e2e/avatar.e2e.ts +20 -0
- package/tests/e2e/breadcrumb.e2e-fixture.html +8 -0
- package/tests/e2e/breadcrumb.e2e.ts +21 -1
- package/tests/e2e/combobox.e2e.ts +28 -0
- package/tests/e2e/context-menu.e2e.ts +15 -0
- package/tests/e2e/documentation.e2e.ts +289 -0
- package/tests/e2e/dropdown.e2e-fixture.html +6 -5
- package/tests/e2e/dropdown.e2e.ts +23 -3
- package/tests/e2e/sheet.e2e-fixture.html +7 -1
- package/tests/e2e/sheet.e2e.ts +36 -0
- package/tests/e2e/sidebar.e2e-fixture.html +26 -3
- package/tests/e2e/sidebar.e2e.ts +39 -0
- package/tests/e2e/toast.e2e.ts +37 -0
- package/tests/e2e/tooltip.e2e-fixture.html +5 -0
- package/tests/e2e/tooltip.e2e.ts +28 -0
- package/tests/readme.test.ts +42 -0
- package/tests/skill.test.ts +117 -0
- package/tests/ui.test.ts +25 -0
- package/dist/documentation/favicon.svg +0 -12
- package/docs/components/accordion/accordion.css +0 -82
- package/docs/components/accordion/accordion.js +0 -138
- package/docs/components/accordion/component-skill.md +0 -165
- package/docs/components/alert/alert.css +0 -67
- package/docs/components/alert/component-skill.md +0 -56
- package/docs/components/alert-dialog/alert-dialog.css +0 -136
- package/docs/components/alert-dialog/alert-dialog.js +0 -132
- package/docs/components/alert-dialog/component-skill.md +0 -56
- package/docs/components/avatar/avatar.css +0 -93
- package/docs/components/avatar/avatar.js +0 -126
- package/docs/components/avatar/component-skill.md +0 -72
- package/docs/components/badge/badge.css +0 -30
- package/docs/components/badge/component-skill.md +0 -40
- package/docs/components/breadcrumb/breadcrumb.css +0 -47
- package/docs/components/breadcrumb/component-skill.md +0 -111
- package/docs/components/button/button.css +0 -141
- package/docs/components/button/component-skill.md +0 -82
- package/docs/components/button-group/button-group.css +0 -98
- package/docs/components/button-group/component-skill.md +0 -67
- package/docs/components/calendar/calendar.css +0 -187
- package/docs/components/calendar/calendar.js +0 -261
- package/docs/components/calendar/component-skill.md +0 -75
- package/docs/components/card/card.css +0 -55
- package/docs/components/card/component-skill.md +0 -121
- package/docs/components/carousel/carousel.css +0 -153
- package/docs/components/carousel/carousel.js +0 -276
- package/docs/components/carousel/component-skill.md +0 -167
- package/docs/components/checkbox/checkbox.css +0 -121
- package/docs/components/checkbox/component-skill.md +0 -100
- package/docs/components/collapsible/collapsible.css +0 -109
- package/docs/components/collapsible/component-skill.md +0 -32
- package/docs/components/color-picker/color-picker.css +0 -42
- package/docs/components/color-picker/color-picker.js +0 -111
- package/docs/components/color-picker/component-skill.md +0 -43
- package/docs/components/combobox/combobox.css +0 -177
- package/docs/components/combobox/combobox.js +0 -231
- package/docs/components/combobox/component-skill.md +0 -168
- package/docs/components/command/command.css +0 -73
- package/docs/components/command/command.js +0 -219
- package/docs/components/command/component-skill.md +0 -103
- package/docs/components/context-menu/component-skill.md +0 -35
- package/docs/components/context-menu/context-menu.css +0 -75
- package/docs/components/context-menu/context-menu.js +0 -137
- package/docs/components/date-picker/component-skill.md +0 -40
- package/docs/components/date-picker/date-picker.css +0 -60
- package/docs/components/dialog/component-skill.md +0 -110
- package/docs/components/dialog/dialog.css +0 -73
- package/docs/components/dialog/dialog.js +0 -125
- package/docs/components/dropdown/component-skill.md +0 -162
- package/docs/components/dropdown/dropdown.css +0 -148
- package/docs/components/dropdown/dropdown.js +0 -206
- package/docs/components/file-input/component-skill.md +0 -37
- package/docs/components/file-input/file-input.css +0 -66
- package/docs/components/form/component-skill.md +0 -134
- package/docs/components/form/form.css +0 -135
- package/docs/components/icon/component-skill.md +0 -159
- package/docs/components/icon/icon.css +0 -53
- package/docs/components/image/component-skill.md +0 -184
- package/docs/components/image/image.css +0 -174
- package/docs/components/image/image.js +0 -218
- package/docs/components/input/component-skill.md +0 -137
- package/docs/components/input/input.css +0 -153
- package/docs/components/label/component-skill.md +0 -98
- package/docs/components/label/label.css +0 -56
- package/docs/components/navigation-menu/component-skill.md +0 -88
- package/docs/components/navigation-menu/navigation-menu.css +0 -59
- package/docs/components/navigation-menu/navigation-menu.js +0 -119
- package/docs/components/number-input/component-skill.md +0 -41
- package/docs/components/number-input/number-input.css +0 -86
- package/docs/components/number-input/number-input.js +0 -124
- package/docs/components/pagination/component-skill.md +0 -109
- package/docs/components/pagination/pagination.css +0 -51
- package/docs/components/popover/component-skill.md +0 -90
- package/docs/components/popover/popover.css +0 -87
- package/docs/components/popover/popover.js +0 -114
- package/docs/components/progress/component-skill.md +0 -28
- package/docs/components/progress/progress.css +0 -76
- package/docs/components/radio/component-skill.md +0 -140
- package/docs/components/radio/radio.css +0 -210
- package/docs/components/scroll-area/component-skill.md +0 -44
- package/docs/components/scroll-area/scroll-area.css +0 -21
- package/docs/components/select/component-skill.md +0 -69
- package/docs/components/select/select.css +0 -69
- package/docs/components/separator/component-skill.md +0 -93
- package/docs/components/separator/separator.css +0 -65
- package/docs/components/sheet/component-skill.md +0 -121
- package/docs/components/sheet/sheet.css +0 -222
- package/docs/components/sheet/sheet.js +0 -125
- package/docs/components/sidebar/component-skill.md +0 -188
- package/docs/components/sidebar/sidebar.css +0 -352
- package/docs/components/sidebar/sidebar.js +0 -144
- package/docs/components/skeleton/component-skill.md +0 -34
- package/docs/components/skeleton/skeleton.css +0 -43
- package/docs/components/slider/component-skill.md +0 -122
- package/docs/components/slider/slider.css +0 -178
- package/docs/components/slider/slider.js +0 -118
- package/docs/components/sortable/component-skill.md +0 -138
- package/docs/components/sortable/sortable.css +0 -131
- package/docs/components/sortable/sortable.js +0 -301
- package/docs/components/spinner/component-skill.md +0 -34
- package/docs/components/spinner/spinner.css +0 -48
- package/docs/components/statistic/component-skill.md +0 -45
- package/docs/components/statistic/statistic.css +0 -53
- package/docs/components/steps/component-skill.md +0 -183
- package/docs/components/steps/steps.css +0 -95
- package/docs/components/switch/component-skill.md +0 -77
- package/docs/components/switch/switch.css +0 -153
- package/docs/components/table/component-skill.md +0 -51
- package/docs/components/table/table.css +0 -135
- package/docs/components/tabs/component-skill.md +0 -166
- package/docs/components/tabs/tabs.css +0 -123
- package/docs/components/tabs/tabs.js +0 -177
- package/docs/components/textarea/component-skill.md +0 -41
- package/docs/components/textarea/textarea.css +0 -82
- package/docs/components/timeline/component-skill.md +0 -45
- package/docs/components/timeline/timeline.css +0 -78
- package/docs/components/toast/component-skill.md +0 -140
- package/docs/components/toast/toast.css +0 -214
- package/docs/components/toast/toast.js +0 -225
- package/docs/components/toggle/component-skill.md +0 -100
- package/docs/components/toggle/toggle.css +0 -116
- package/docs/components/toggle/toggle.js +0 -112
- package/docs/components/toggle-group/component-skill.md +0 -164
- package/docs/components/toggle-group/toggle-group.css +0 -125
- package/docs/components/toggle-group/toggle-group.js +0 -167
- package/docs/components/toolbar/component-skill.md +0 -83
- package/docs/components/toolbar/toolbar.css +0 -39
- package/docs/components/toolbar/toolbar.js +0 -146
- package/docs/components/tooltip/component-skill.md +0 -108
- package/docs/components/tooltip/tooltip.css +0 -119
- package/docs/components/tooltip/tooltip.js +0 -174
- package/docs/components/tree-view/component-skill.md +0 -63
- package/docs/components/tree-view/tree-view.css +0 -156
- package/docs/components/tree-view/tree-view.js +0 -164
- package/docs/components/typography/component-skill.md +0 -111
- package/docs/components/typography/typography.css +0 -152
- package/docs/documentation/changelog.html +0 -385
- package/docs/documentation/component-skills.html +0 -294
- package/docs/documentation/favicon.svg +0 -12
- package/docs/theme/default-semantic-tokens.css +0 -137
- package/src/documentation/favicon.svg +0 -12
- /package/docs/{documentation/css → css}/docs-theme.css +0 -0
- /package/docs/{documentation/css → css}/docs-utilities.css +0 -0
- /package/docs/{documentation/fonts → fonts}/fraunces-300.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/fraunces-300i.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/fraunces-400.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/fraunces-400i.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/fraunces-500.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/geist-300.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/geist-400.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/geist-500.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/geist-600.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/geist-mono-400.woff2 +0 -0
- /package/docs/{documentation/fonts → fonts}/geist-mono-500.woff2 +0 -0
- /package/docs/{documentation/js → js}/shiki-highlight.js +0 -0
- /package/docs/{documentation/js → js}/site.js +0 -0
- /package/docs/{documentation/js → js}/theme-switcher.js +0 -0
package/AGENTS.md
CHANGED
|
@@ -16,10 +16,13 @@ must surface as a failure with output, never as an agent hanging forever.
|
|
|
16
16
|
You are working on the **defuss-shadcn** design system repo.
|
|
17
17
|
The consumer-facing system lives in `dist/` — **it is generated**: edit sources in
|
|
18
18
|
`src/` (`bun run build` compiles `.ts` → `.js` and copies everything else 1:1).
|
|
19
|
-
`docs/` is also generated:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
`docs/` is also generated: **only the documentation site** (`dist/documentation/*` +
|
|
20
|
+
`robots.txt`/`sitemap.xml`) published by GitHub Pages — its pages' `../components/…` and
|
|
21
|
+
`../theme/…` references are rewritten to the jsDelivr GitHub CDN (shared transform in
|
|
22
|
+
`scripts/lib/mirror.ts`), so the mirror carries no copies of the component assets.
|
|
23
|
+
Refresh it with `bun run docs` (`make build` does this automatically and `verify`
|
|
24
|
+
fails if the mirror drifts). Never edit `docs/` directly — like `dist/`, it is
|
|
25
|
+
deleted and rebuilt on every `bun run docs`.
|
|
23
26
|
Never edit `dist/` directly; it is deleted and rebuilt on every build.
|
|
24
27
|
|
|
25
28
|
---
|
|
@@ -29,10 +32,11 @@ Never edit `dist/` directly; it is deleted and rebuilt on every build.
|
|
|
29
32
|
```
|
|
30
33
|
defuss-shadcn/
|
|
31
34
|
├── dist/ ← the distributable (drop into any project)
|
|
35
|
+
│ ├── SKILL.md ← agent entry point (generated from src/SKILL_tpl.md + skill frontmatter)
|
|
32
36
|
│ ├── theme/default-semantic-tokens.css ← design tokens (source of truth for colors, radius, shadows)
|
|
33
37
|
│ ├── components/ ← self-contained component folders
|
|
34
38
|
│ │ └── {name}/
|
|
35
|
-
│ │ ├── component-skill.md ← component skill (HTML structure & ARIA reference)
|
|
39
|
+
│ │ ├── component-skill.md ← component skill (frontmatter + HTML structure & ARIA reference)
|
|
36
40
|
│ │ ├── {name}.css ← component stylesheet (edit directly)
|
|
37
41
|
│ │ └── {name}.js ← interaction JS (only for interactive components)
|
|
38
42
|
│ └── documentation/ ← reference implementations + public website
|
|
@@ -54,11 +58,15 @@ defuss-shadcn/
|
|
|
54
58
|
│ └── prompts/ ← reusable prompt files
|
|
55
59
|
│ └── component-review.prompt.md
|
|
56
60
|
│
|
|
57
|
-
├── screenshots/ ← generated
|
|
61
|
+
├── screenshots/ ← generated PNGs per component AND per declared state, light/ + dark/ (`bun run screenshots`, gitignored) — SKILL.md maps state names to these files
|
|
58
62
|
├── scripts/ ← build & maintenance scripts (no one-shot migrations)
|
|
59
63
|
│ ├── build.ts ← src/ → dist/ (tsc type-strip + copy everything else 1:1)
|
|
60
64
|
│ ├── verify.ts ← static consistency gate (runs at end of build; `bun run verify`)
|
|
61
|
-
│ ├── sync-docs.ts ← mirror dist/ → docs/
|
|
65
|
+
│ ├── sync-docs.ts ← mirror dist/documentation → docs/ (CDN-rewritten; `bun run docs`)
|
|
66
|
+
│ ├── lib/mirror.ts ← shared docs/ mirror transform (sync-docs + verify compare against it)
|
|
67
|
+
│ ├── lib/search-index.ts ← docs search index generator (build.ts regenerates it every build)
|
|
68
|
+
│ ├── lib/skill.ts ← SKILL.md generation core: frontmatter parser + index renderer (pure)
|
|
69
|
+
│ ├── lib/skill-files.ts ← dist/SKILL.md index generator from src/SKILL_tpl.md + skill frontmatter (build.ts regenerates every build)
|
|
62
70
|
│ ├── create-screenshots.ts ← parallel default-state screenshots for agent inspection
|
|
63
71
|
│ ├── lib/audit.ts ← undefined-utility audit (used by verify)
|
|
64
72
|
│ ├── lib/snippets.ts ← shared snippet drift/replace logic (syncers + verify)
|
|
@@ -94,6 +102,75 @@ warn-ratchets it still reports, e.g. `STATE_API_LEGACY`, are named migration
|
|
|
94
102
|
debt with an explicit removal path — not permission to ignore them.) The
|
|
95
103
|
full rationale lives in [ARCH.md](ARCH.md).
|
|
96
104
|
|
|
105
|
+
### Each component owns its dialog
|
|
106
|
+
|
|
107
|
+
`dialog.js`'s init claims plain `<dialog>` elements for backdrop-click close —
|
|
108
|
+
via a `dialog:not(.alert-dialog):not(.sheet):not(.command):not([data-init])`
|
|
109
|
+
selector. **Any component that ships its own `<dialog class="…">` with custom
|
|
110
|
+
behavior must be `:not()`-excluded there**, or dialog.js (loaded before every
|
|
111
|
+
component script on all doc pages) stamps `data-init` first and the real
|
|
112
|
+
owner's init silently skips the element — the docs search palette was dead
|
|
113
|
+
exactly this way once. `verify`'s `dialog ownership boundary` gate enforces
|
|
114
|
+
the exclusion list for the three dialog owners (alert-dialog, sheet, command);
|
|
115
|
+
extend the list in both places when a fourth appears.
|
|
116
|
+
|
|
117
|
+
The docs header search is the shipped command component itself: clicking the
|
|
118
|
+
input (or ⌘/Ctrl+K) opens `<dialog class="command" id="docs-palette">`, fed by
|
|
119
|
+
the build-time index (`scripts/lib/search-index.ts` → `js/search-index.js`,
|
|
120
|
+
NAV entries + every page `<h2>` with TOC-compatible ids). The trigger is
|
|
121
|
+
click/Enter only — never `focus`: `dialog.close()` restores focus to the
|
|
122
|
+
opener synchronously, which would bounce the palette open again.
|
|
123
|
+
|
|
124
|
+
### README ↔ index parity
|
|
125
|
+
|
|
126
|
+
`README.md` and `src/documentation/index.html` describe the same system to
|
|
127
|
+
humans and to browser users — **when you update either, update the other in
|
|
128
|
+
the same commit.** They share two claims that drift independently if you
|
|
129
|
+
forget:
|
|
130
|
+
|
|
131
|
+
- **Pillar set** — the README intro bullets (`- **Name** — …`, under "What
|
|
132
|
+
this is" and before "Quick start") and the index pillar cards
|
|
133
|
+
(`<h3 class="card-title">`) must list the same set of pillars.
|
|
134
|
+
- **Hero sentence** — the intro paragraph wording must match
|
|
135
|
+
(`"No build step for consumers — dist/ is committed and ready to use
|
|
136
|
+
as-is."` once diverged to a bare `"No build step."`).
|
|
137
|
+
- **CDN dogfooding** — the index carries the "this site loads its assets
|
|
138
|
+
from the jsDelivr CDN, exactly as README's Via CDN quick start shows — if
|
|
139
|
+
it renders, the CDN install works" note, which must stay true if the CDN
|
|
140
|
+
strategy in [`scripts/lib/mirror.ts`](scripts/lib/mirror.ts) ever changes.
|
|
141
|
+
- **CSS-only count** — the "**N of M components need no JavaScript**" line
|
|
142
|
+
appears in both README.md and the index; `verify`'s
|
|
143
|
+
`README CSS-only stat` / `index CSS-only stat` gates compare it against
|
|
144
|
+
the actual `src/components/` tree (a component `.ts` = ships a `.js`).
|
|
145
|
+
Update both files together whenever a component gains or loses behavior.
|
|
146
|
+
|
|
147
|
+
`verify` enforces the pillar set (`README ↔ index parity`, hard gate) and the
|
|
148
|
+
**`README ↔ index commit window`** gate: if the two files' last-touch commits
|
|
149
|
+
are neither identical nor within **15 minutes** of each other, the build fails
|
|
150
|
+
as "un-synced edit" — forcing you to land them together. Wording parity itself
|
|
151
|
+
is yours to maintain (no automated text diff; the window is the backstop).
|
|
152
|
+
|
|
153
|
+
### Changelog (two-commit rule)
|
|
154
|
+
|
|
155
|
+
Every version in `package.json` needs an entry in
|
|
156
|
+
[`src/documentation/changelog.html`](src/documentation/changelog.html) listing
|
|
157
|
+
**all commit messages** of that release (deploy.sh generates them since the
|
|
158
|
+
last tag; v0.7.14 was the first release after the fork from
|
|
159
|
+
codylindley/shadcn-html, so its entry documents the fork). Each entry shows
|
|
160
|
+
either the release date badge or — once the version is actually **committed** —
|
|
161
|
+
the short git hash of the commit that added the entry, embedded as
|
|
162
|
+
`<code class="changelog-hash">abc1234</code>`. The hash is unknowable before
|
|
163
|
+
that commit exists, so authoring an entry is inherently **two commits**:
|
|
164
|
+
|
|
165
|
+
1. commit the entry (with date badge),
|
|
166
|
+
2. commit that commit's short hash into the entry.
|
|
167
|
+
|
|
168
|
+
`verify`'s `changelog ↔ version` gate fails when the committed `package.json`
|
|
169
|
+
version has no entry (or a hash-less / message-less entry for that version);
|
|
170
|
+
its `fix:` line states the two-commit instruction. `scripts/deploy.sh`
|
|
171
|
+
automates the whole flow. Legacy entries (v0.7.13-alpha and earlier) keep
|
|
172
|
+
date-only badges — the hash requirement applies from this rule onward.
|
|
173
|
+
|
|
97
174
|
### Native web platform first
|
|
98
175
|
|
|
99
176
|
Every component starts from a native HTML element or browser API. If the browser
|
|
@@ -344,6 +421,23 @@ contract grows; never re-declare the globals inside a component file.
|
|
|
344
421
|
Legacy components in its `STATE_API_LEGACY` list warn only until migrated —
|
|
345
422
|
remove a name from the list in the same commit that migrates the component.
|
|
346
423
|
|
|
424
|
+
### Theme radius consistency (REQUIRED)
|
|
425
|
+
|
|
426
|
+
A theme is **one identity, two palettes** — light and dark are the same
|
|
427
|
+
theme, so its shape (`radius`) must be **identical in both modes**. If Doom64
|
|
428
|
+
is hard-square in dark mode it is hard-square in light mode; if ChatGPT is
|
|
429
|
+
pill-round in dark, light is pill-round too. A theme that only declares
|
|
430
|
+
`radius` in one mode silently reverts the other to the default rounding, so
|
|
431
|
+
toggling dark mode "changes the theme's shape" — reported (Doom64, Retro
|
|
432
|
+
Arcade) and now gated.
|
|
433
|
+
|
|
434
|
+
- In `src/documentation/js/themes.ts`, declare `radius` in **both** the
|
|
435
|
+
`light` and `dark` block of every theme, with the same value.
|
|
436
|
+
- `verify`'s `theme radius consistency` gate fails the build otherwise.
|
|
437
|
+
- Same principle for **contrast**: every theme's sidebar text pairs must
|
|
438
|
+
reach WCAG AA (≥ 4.5) in *both* modes — see the `theme sidebar contrast`
|
|
439
|
+
gate. Re-tune one mode's color and you own both.
|
|
440
|
+
|
|
347
441
|
### Tokens are the source of truth for design values
|
|
348
442
|
|
|
349
443
|
`dist/theme/default-semantic-tokens.css` defines all CSS custom properties. These must match
|
|
@@ -547,8 +641,29 @@ status of newer APIs (`popover`, anchor positioning, `@starting-style`, etc.).
|
|
|
547
641
|
Component skills document **how to build the HTML** for a component. CSS and JS live in
|
|
548
642
|
their own files alongside the skill — edit `.css` and `.js` directly.
|
|
549
643
|
|
|
644
|
+
Every component skill **must open with a YAML frontmatter block** — it is the machine-readable
|
|
645
|
+
discovery layer `dist/SKILL.md` (the agent entry point) is generated from. `verify`'s
|
|
646
|
+
`skill frontmatter` gate fails without it, and `SKILL.md ↔ skills` fails when the generated
|
|
647
|
+
index lags (rebuild with `bun run build`):
|
|
648
|
+
|
|
649
|
+
```markdown
|
|
650
|
+
---
|
|
651
|
+
name: Dialog
|
|
652
|
+
why: Native <dialog> + showModal(): focus trap, Escape, ::backdrop, and inert background are browser-provided.
|
|
653
|
+
when: Modals for forms, detail views, or previews — unless the answer is mandatory (then alert-dialog).
|
|
654
|
+
where: dist/components/dialog/dialog.css + dist/components/dialog/dialog.js
|
|
655
|
+
supportedStates: default, open
|
|
656
|
+
---
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
- **name** — display name (Title Case) · **why** — what its native basis buys · **when** — which
|
|
660
|
+
use it for, and when to pick a sibling instead · **where** — the shipped files
|
|
661
|
+
(`dist/components/{name}/{name}.css` + `.js` if interactive) · **supportedStates** — the exact
|
|
662
|
+
State API names (matches `{name}States`, `default` first; CSS-only components: `default`).
|
|
663
|
+
|
|
550
664
|
Every component skill must include these sections in order:
|
|
551
665
|
|
|
666
|
+
0. **Frontmatter** — `name` / `why` / `when` / `where` / `supportedStates` (see above — REQUIRED)
|
|
552
667
|
1. **Native basis** — which HTML element/API it builds on
|
|
553
668
|
2. **Native Web APIs** — bulleted list of significant platform APIs with MDN links (see format below)
|
|
554
669
|
3. **Structure** — complete HTML markup with all attributes
|
package/ARCH.md
CHANGED
|
@@ -21,11 +21,14 @@ layer is for.
|
|
|
21
21
|
## 2. The verifier — the authority layer
|
|
22
22
|
|
|
23
23
|
[`scripts/verify.ts`](scripts/verify.ts) is a custom, code-implemented audit
|
|
24
|
-
of everything prose cannot guarantee: **
|
|
25
|
-
tree — skills exist, doc pages exist, tokens are
|
|
26
|
-
match source, dist is a 1:1 build of src, every
|
|
27
|
-
screenshot/skill/doc/e2e artifact, cross-page imports are
|
|
28
|
-
resolve, paths are portable, the working tree is committed,
|
|
24
|
+
of everything prose cannot guarantee: **41 check groups** over the shipped
|
|
25
|
+
tree — skills exist (with discovery frontmatter), doc pages exist, tokens are
|
|
26
|
+
tweakcn-compatible, snippets match source, dist is a 1:1 build of src, every
|
|
27
|
+
declared state has a screenshot/skill/doc/e2e artifact, cross-page imports are
|
|
28
|
+
complete, links resolve, paths are portable, the working tree is committed, the
|
|
29
|
+
committed version has a changelog entry carrying its commit hash (AGENTS.md
|
|
30
|
+
"Changelog"), the generated dist/SKILL.md agent index matches the skills,
|
|
31
|
+
and more. Each
|
|
29
32
|
check reads the *actual* files and computes the truth; nothing is taken on
|
|
30
33
|
word.
|
|
31
34
|
|
|
@@ -75,7 +78,7 @@ The verifier checks *consistency*. The loop wraps it with gates that check
|
|
|
75
78
|
| Lint | oxlint (`bun run lint`) | src/, tests/, scripts/ stay warning-clean |
|
|
76
79
|
| Type-check | strict `tsc --noEmit` | tests/ and scripts/ compile |
|
|
77
80
|
| Unit/integration | Vitest browser mode (`bun run test:run`) | real doc pages in a real Chromium iframe behave |
|
|
78
|
-
| E2E |
|
|
81
|
+
| E2E | 56 standalone Playwright scripts (`bun run e2e`) | every component's documented surface — interactions, keyboard, computed CSS — plus the doc site itself (renders, SPA nav, search) |
|
|
79
82
|
| Screenshots | `bun run screenshots` | every declared **state × light/dark** PNG exists, is fresh vs. its input fingerprint, and the render manifest hash-detects drift |
|
|
80
83
|
| Git hygiene | verify check #23 | every verified byte is committed — what CI/other agents see is exactly what passed |
|
|
81
84
|
|
|
@@ -105,7 +108,7 @@ flowchart TD
|
|
|
105
108
|
B --> C["make build"]
|
|
106
109
|
subgraph GATES["mechanical quality gates (no human in the loop)"]
|
|
107
110
|
direction LR
|
|
108
|
-
L["oxlint<br/>typecheck"] --> P["compile src → dist<br/>1:1 build"] --> SS["screenshots<br/>every state × light/dark<br/>fingerprint-fresh"] --> V["verify.ts<br/>
|
|
111
|
+
L["oxlint<br/>typecheck"] --> P["compile src → dist<br/>1:1 build"] --> SS["screenshots<br/>every state × light/dark<br/>fingerprint-fresh"] --> V["verify.ts<br/>41 consistency gates<br/>incl. 'working tree committed'"] --> Q["Vitest UI tests<br/>56 Playwright e2e"]
|
|
109
112
|
end
|
|
110
113
|
C --> GATES
|
|
111
114
|
|
package/README.md
CHANGED
|
@@ -4,17 +4,23 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|

|
|
6
6
|

|
|
7
|
+
[](https://www.npmjs.com/package/defuss-shadcn)
|
|
8
|
+
[](https://www.npmjs.com/package/defuss-shadcn)
|
|
9
|
+
[](https://www.npmjs.com/package/defuss-shadcn)
|
|
10
|
+
[](https://socket.dev/npm/package/defuss-shadcn)
|
|
7
11
|
|
|
8
12
|
**A UI component system that scales with AI.** Themeable components built on semantic HTML, modern CSS, and vanilla JavaScript. No framework. No build step for consumers — `dist/` is committed and ready to use as-is. The simplest possible foundation for AI-driven prototyping.
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
29 of 55 components need no JavaScript — native HTML and modern CSS cover them entirely.
|
|
15
|
+
|
|
16
|
+
**[Documentation & Live Demos →](https://kyr0.github.io/defuss-shadcn/)** · [Architecture (ARCH.md)](ARCH.md) · [Agent integration guide (dist/SKILL.md)](dist/SKILL.md)
|
|
11
17
|
|
|
12
18
|
## What this is
|
|
13
19
|
|
|
14
20
|
A portable UI component system built on the [shadcn/ui](https://ui.shadcn.com) token model.
|
|
15
21
|
|
|
16
22
|
- **Themeable** — full shadcn semantic token model. Swap a [tweakcn](https://tweakcn.com) theme and every component updates instantly
|
|
17
|
-
- **Component Skills** — every component includes a structured skill — markup, variants, ARIA, and wiring conventions — grounded in web standards
|
|
23
|
+
- **Component Skills** — every component includes a structured skill — markup, variants, named states, ARIA, and wiring conventions — grounded in web standards
|
|
18
24
|
- **Observable state** — interactive components expose a State API (`el.api.setState('open')`, `el.api.getState()`), so agents and tests can drive every documented state by name without knowing the implementation
|
|
19
25
|
- **Accessible** — built on native HTML elements and WAI-ARIA patterns. Keyboard navigation, focus management, and screen reader support by default
|
|
20
26
|
- **Framework Free** — runs in any browser, zero dependencies, no build pipeline required
|
|
@@ -39,7 +45,7 @@ A portable UI component system built on the [shadcn/ui](https://ui.shadcn.com) t
|
|
|
39
45
|
|
|
40
46
|
### Self-hosting
|
|
41
47
|
|
|
42
|
-
Download the full system and drop it into any project. All the files are static — no build step, no dependencies. Point an AI at
|
|
48
|
+
Download the full system and drop it into any project. All the files are static — no build step, no dependencies. Point an AI at `dist/SKILL.md` and it has everything it needs: the library's integration guide and philosophy, an index of every component skill (why/when/where + supported states), CSS to include, JS to wire up, and the entire documentation site with working examples of every component.
|
|
43
49
|
|
|
44
50
|
**[Download latest (.zip)](https://github.com/kyr0/defuss-shadcn/archive/refs/heads/main.zip)**
|
|
45
51
|
|
|
@@ -73,7 +79,7 @@ Tokens are compatible with [tweakcn.com](https://tweakcn.com) theme exports. To
|
|
|
73
79
|
|
|
74
80
|
## Components
|
|
75
81
|
|
|
76
|
-
See the **[full component list with live demos →](https://kyr0.github.io/defuss-shadcn/
|
|
82
|
+
See the **[full component list with live demos →](https://kyr0.github.io/defuss-shadcn/)**
|
|
77
83
|
|
|
78
84
|
## Design principles
|
|
79
85
|
|
|
@@ -132,8 +138,11 @@ bun run test:run # run the UI test suite (headless Chromium)
|
|
|
132
138
|
```
|
|
133
139
|
|
|
134
140
|
`src/` is the authoring tree (`.ts` + html/css/md/fonts); `dist/` is its compiled, 1:1
|
|
135
|
-
mirror, committed and the only thing that ships. `docs/` is
|
|
136
|
-
`dist/` that GitHub Pages publishes —
|
|
141
|
+
mirror, committed and the only thing that ships. `docs/` is the generated **documentation
|
|
142
|
+
site** (only `dist/documentation/` + the SEO files) that GitHub Pages publishes — the
|
|
143
|
+
pages' `../components/…` / `../theme/…` references are rewritten to the jsDelivr GitHub
|
|
144
|
+
CDN by the mirror ([scripts/lib/mirror.ts](scripts/lib/mirror.ts)), so docs/ carries no
|
|
145
|
+
copies of the component assets. Refresh with `bun run docs`, never edit it directly.
|
|
137
146
|
|
|
138
147
|
A `Makefile` wraps the common tasks: `make setup` (install deps + Playwright browsers),
|
|
139
148
|
`make dev`, `make test-run`, `make coverage`, `make e2e`, `make lint` (oxlint),
|
|
@@ -145,7 +154,7 @@ the same loop CI runs.
|
|
|
145
154
|
of every build) and the contract every coding agent must satisfy. It checks, among others:
|
|
146
155
|
|
|
147
156
|
- **structure** — component skills, doc pages, CSS/JS imports on every page, sidebar links,
|
|
148
|
-
`.preview` blocks, `dist/` freshness (1:1 with `src/`), `docs/` mirror
|
|
157
|
+
`.preview` blocks, `dist/` freshness (1:1 with `src/`), `docs/` mirror current (CDN-rewritten)
|
|
149
158
|
- **consistency** — inline source snippets match the real files (and are properly escaped),
|
|
150
159
|
skill ↔ docs ↔ CSS variant parity, State API contract + per-state coverage across
|
|
151
160
|
screenshots/docs/skill/e2e, changelog & version markers, doc command references
|
|
@@ -153,7 +162,8 @@ of every build) and the contract every coding agent must satisfy. It checks, amo
|
|
|
153
162
|
- **quality** — token boundary rule (only tweakcn-defined `var(--*)`), undefined utility
|
|
154
163
|
classes, `prefers-reduced-motion` coverage, init idempotency (double-binding guard),
|
|
155
164
|
dead links (parsed with linkedom), portable paths (no machine-absolute paths),
|
|
156
|
-
strict typecheck, render drift (screenshot pixels changed without input changes)
|
|
165
|
+
strict typecheck, render drift (screenshot pixels changed without input changes),
|
|
166
|
+
theme sidebar contrast (every preset's nav text reaches WCAG AA on its real background)
|
|
157
167
|
- **hygiene** — working tree committed, so a green build is a committed build
|
|
158
168
|
|
|
159
169
|
Every failing check prints the offending files **and the exact fix** — the verifier is
|
|
@@ -182,9 +192,10 @@ fixture page using the component in **all** of its documented configurations (ev
|
|
|
182
192
|
variant, size, and State API state), driven by plain Playwright against the unmodified
|
|
183
193
|
files in `dist/` (`bun run e2e`). This is the verification loop a coding agent runs
|
|
184
194
|
after touching any component — the shipped files themselves are asserted, so "it
|
|
185
|
-
compiles" is never mistaken for "it works".
|
|
186
|
-
|
|
187
|
-
|
|
195
|
+
compiles" is never mistaken for "it works". Every component ships one (the gate is
|
|
196
|
+
hard), and its parity rule keeps fixture, docs and code in lockstep as they change.
|
|
197
|
+
The documentation site itself is covered too ([`tests/e2e/documentation.e2e.ts`](tests/e2e/documentation.e2e.ts)):
|
|
198
|
+
the intro page renders, the SPA router navigates, and the header search opens the command palette (generated index, page + section results).
|
|
188
199
|
|
|
189
200
|
## Credits
|
|
190
201
|
|