@shohojdhara/atomix 0.3.3 → 0.3.5
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/README.md +46 -28
- package/dist/atomix.css +15 -9
- package/dist/atomix.css.map +1 -0
- package/dist/atomix.min.css +15108 -11
- package/dist/atomix.min.css.map +1 -0
- package/dist/charts.d.ts +1929 -0
- package/dist/charts.js +6482 -0
- package/dist/charts.js.map +1 -0
- package/dist/core.d.ts +1289 -0
- package/dist/core.js +3357 -0
- package/dist/core.js.map +1 -0
- package/dist/forms.d.ts +1085 -0
- package/dist/forms.js +2450 -0
- package/dist/forms.js.map +1 -0
- package/dist/heavy.d.ts +636 -0
- package/dist/heavy.js +4550 -0
- package/dist/heavy.js.map +1 -0
- package/dist/index.d.ts +5196 -4618
- package/dist/index.esm.js +4240 -2776
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4057 -2571
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/layout.d.ts +300 -0
- package/dist/layout.js +336 -0
- package/dist/layout.js.map +1 -0
- package/dist/theme.d.ts +1992 -0
- package/dist/theme.js +5348 -0
- package/dist/theme.js.map +1 -0
- package/package.json +63 -68
- package/scripts/atomix-cli.js +879 -15
- package/scripts/cli/__tests__/cli-commands.test.js +204 -0
- package/scripts/cli/__tests__/utils.test.js +201 -0
- package/scripts/cli/__tests__/vitest.config.js +26 -0
- package/scripts/cli/interactive-init.js +37 -45
- package/scripts/cli/theme-bridge.js +129 -0
- package/scripts/cli/token-manager.js +32 -7
- package/scripts/cli/utils.js +347 -0
- package/scripts/sync-theme-config.js +22 -22
- package/src/components/Accordion/Accordion.tsx +5 -54
- package/src/components/Accordion/index.ts +1 -1
- package/src/components/Avatar/Avatar.tsx +3 -3
- package/src/components/Badge/Badge.tsx +3 -3
- package/src/components/Breadcrumb/Breadcrumb.tsx +3 -3
- package/src/components/Button/Button.tsx +36 -1
- package/src/components/Card/ElevationCard.tsx +1 -1
- package/src/components/Chart/AnimatedChart.tsx +19 -17
- package/src/components/Chart/AreaChart.tsx +5 -1
- package/src/components/Chart/BarChart.tsx +1 -0
- package/src/components/Chart/BubbleChart.tsx +6 -5
- package/src/components/Chart/ChartToolbar.tsx +1 -0
- package/src/components/Chart/FunnelChart.tsx +1 -1
- package/src/components/Chart/RadarChart.tsx +19 -12
- package/src/components/Chart/ScatterChart.tsx +3 -3
- package/src/components/Chart/TreemapChart.tsx +2 -1
- package/src/components/Chart/WaterfallChart.tsx +0 -1
- package/src/components/Chart/types.ts +12 -2
- package/src/components/Chart/utils.ts +4 -3
- package/src/components/DataTable/DataTable.tsx +3 -3
- package/src/components/Dropdown/Dropdown.tsx +12 -9
- package/src/components/Footer/FooterSection.tsx +3 -3
- package/src/components/Form/Checkbox.tsx +3 -3
- package/src/components/Form/Input.tsx +4 -2
- package/src/components/Form/Radio.tsx +3 -3
- package/src/components/Form/Select.tsx +3 -3
- package/src/components/Form/Textarea.tsx +4 -2
- package/src/components/List/List.stories.tsx +3 -3
- package/src/components/List/List.tsx +3 -3
- package/src/components/List/ListGroup.tsx +3 -1
- package/src/components/Modal/Modal.tsx +3 -3
- package/src/components/Navigation/Menu/MegaMenu.tsx +9 -3
- package/src/components/Navigation/Menu/Menu.tsx +9 -3
- package/src/components/Pagination/Pagination.tsx +6 -5
- package/src/components/PhotoViewer/PhotoViewerImage.tsx +2 -2
- package/src/components/Popover/Popover.tsx +4 -4
- package/src/components/Progress/Progress.tsx +6 -2
- package/src/components/Rating/Rating.tsx +5 -2
- package/src/components/Slider/Slider.tsx +10 -9
- package/src/components/Spinner/Spinner.tsx +3 -3
- package/src/components/Tabs/Tabs.tsx +3 -3
- package/src/components/Tooltip/Tooltip.tsx +3 -3
- package/src/components/index.ts +5 -2
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +2 -2
- package/src/lib/composables/useChartPerformance.ts +102 -78
- package/src/lib/composables/useChartScale.ts +10 -0
- package/src/lib/composables/useHero.ts +9 -2
- package/src/lib/composables/useHeroBackgroundSlider.ts +5 -3
- package/src/lib/composables/useSideMenu.ts +1 -0
- package/src/lib/composables/useVideoPlayer.ts +3 -2
- package/src/lib/config/index.ts +275 -0
- package/src/lib/config/loader.ts +147 -0
- package/src/lib/hooks/index.ts +0 -1
- package/src/lib/hooks/useComponentCustomization.ts +10 -14
- package/src/lib/hooks/usePerformanceMonitor.ts +149 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/patterns/index.ts +2 -2
- package/src/lib/patterns/slots.tsx +2 -2
- package/src/lib/theme/composeTheme.ts +1 -6
- package/src/lib/theme/config/index.ts +1 -1
- package/src/lib/theme/config/loader.ts +75 -41
- package/src/lib/theme/config/types.ts +21 -7
- package/src/lib/theme/config/validator.ts +1 -1
- package/src/lib/theme/constants.ts +12 -2
- package/src/lib/theme/core/ThemeEngine.ts +8 -0
- package/src/lib/theme/core/ThemeValidator.ts +5 -2
- package/src/lib/theme/createTheme.ts +0 -1
- package/src/lib/theme/createThemeFromConfig.ts +132 -0
- package/src/lib/theme/devtools/CLI.ts +161 -76
- package/src/lib/theme/devtools/Comparator.tsx +343 -0
- package/src/lib/theme/devtools/IMPROVEMENTS.md +429 -0
- package/src/lib/theme/devtools/Inspector.tsx +22 -7
- package/src/lib/theme/devtools/LiveEditor.tsx +399 -0
- package/src/lib/theme/devtools/README.md +433 -0
- package/src/lib/theme/devtools/index.ts +12 -11
- package/src/lib/theme/generateCSSVariables.ts +80 -39
- package/src/lib/theme/i18n/rtl.ts +2 -1
- package/src/lib/theme/index.ts +18 -2
- package/src/lib/theme/runtime/ThemeApplicator.ts +28 -11
- package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +3 -3
- package/src/lib/theme/runtime/ThemeManager.test.ts +17 -1
- package/src/lib/theme/runtime/ThemeManager.ts +11 -7
- package/src/lib/theme/types.ts +42 -43
- package/src/lib/theme-tools.ts +8 -68
- package/src/lib/types/components.ts +252 -109
- package/src/lib/types/partProps.ts +0 -16
- package/src/lib/utils/fontPreloader.ts +148 -0
- package/src/lib/utils/index.ts +11 -0
- package/src/lib/utils/memoryMonitor.ts +189 -0
- package/src/styles/01-settings/_settings.fonts.scss +2 -5
- package/src/styles/01-settings/_settings.navbar.scss +1 -1
- package/src/styles/03-generic/_generated-root.css +26 -0
- package/src/styles/06-components/_components.navbar.scss +6 -5
- package/src/themes/README.md +1 -2
- package/src/themes/themes.config.js +30 -181
- package/dist/themes/applemix.css +0 -16576
- package/dist/themes/applemix.css.map +0 -1
- package/dist/themes/applemix.min.css +0 -73
- package/dist/themes/boomdevs.css +0 -16007
- package/dist/themes/boomdevs.css.map +0 -1
- package/dist/themes/boomdevs.min.css +0 -406
- package/dist/themes/esrar.css +0 -18424
- package/dist/themes/esrar.css.map +0 -1
- package/dist/themes/esrar.min.css +0 -221
- package/dist/themes/flashtrade.css +0 -17596
- package/dist/themes/flashtrade.css.map +0 -1
- package/dist/themes/flashtrade.min.css +0 -196
- package/dist/themes/mashroom.css +0 -31082
- package/dist/themes/mashroom.css.map +0 -1
- package/dist/themes/mashroom.min.css +0 -450
- package/dist/themes/shaj-default.css +0 -17200
- package/dist/themes/shaj-default.css.map +0 -1
- package/dist/themes/shaj-default.min.css +0 -502
- package/scripts/build-themes.js +0 -208
- package/src/components/AtomixGlass/atomixGLass.old.tsx +0 -1263
- package/src/lib/theme/__tests__/ThemeBuilder.test.ts +0 -223
- package/src/lib/theme/builders/ThemeBuilder.ts +0 -372
- package/src/lib/theme/errors.test.ts +0 -207
- package/src/lib/theme/generators/CSSGenerator.ts +0 -311
- package/src/lib/theme/generators/ConfigGenerator.ts +0 -287
- package/src/lib/theme/generators/TypeGenerator.ts +0 -228
- package/src/lib/theme/generators/index.ts +0 -21
- package/src/lib/theme/monitoring/ThemeAnalytics.ts +0 -409
- package/src/lib/theme/monitoring/index.ts +0 -17
- package/src/lib/theme/overrides/ComponentOverrides.ts +0 -243
- package/src/lib/theme/overrides/index.ts +0 -15
- package/src/lib/theme/whitelabel/WhiteLabelManager.ts +0 -364
- package/src/lib/theme/whitelabel/index.ts +0 -13
- package/src/themes/THEME_CHECKLIST.md +0 -74
- package/src/themes/applemix/01-settings/_index.scss +0 -24
- package/src/themes/applemix/01-settings/_settings.animations.scss +0 -0
- package/src/themes/applemix/01-settings/_settings.background.scss +0 -6
- package/src/themes/applemix/01-settings/_settings.colors.scss +0 -75
- package/src/themes/applemix/01-settings/_settings.config.scss +0 -15
- package/src/themes/applemix/01-settings/_settings.typography.scss +0 -30
- package/src/themes/applemix/02-tools/_index.scss +0 -4
- package/src/themes/applemix/03-generic/_index.scss +0 -7
- package/src/themes/applemix/04-elements/_index.scss +0 -7
- package/src/themes/applemix/05-objects/_index.scss +0 -7
- package/src/themes/applemix/06-components/_index.scss +0 -15
- package/src/themes/applemix/99-utilities/_index.scss +0 -7
- package/src/themes/applemix/README.md +0 -378
- package/src/themes/applemix/index.scss +0 -33
- package/src/themes/boomdevs/01-settings/_index.scss +0 -38
- package/src/themes/boomdevs/01-settings/_settings.accordion.scss +0 -12
- package/src/themes/boomdevs/01-settings/_settings.animations.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.avatar.scss +0 -9
- package/src/themes/boomdevs/01-settings/_settings.badge.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.border-radius.scss +0 -16
- package/src/themes/boomdevs/01-settings/_settings.border.scss +0 -10
- package/src/themes/boomdevs/01-settings/_settings.box-shadow.scss +0 -14
- package/src/themes/boomdevs/01-settings/_settings.breadcrumb.scss +0 -13
- package/src/themes/boomdevs/01-settings/_settings.breakpoints.scss +0 -15
- package/src/themes/boomdevs/01-settings/_settings.button.scss +0 -9
- package/src/themes/boomdevs/01-settings/_settings.callout.scss +0 -9
- package/src/themes/boomdevs/01-settings/_settings.card.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.checkbox.scss +0 -9
- package/src/themes/boomdevs/01-settings/_settings.colors.scss +0 -145
- package/src/themes/boomdevs/01-settings/_settings.dropdown.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.grid.scss +0 -16
- package/src/themes/boomdevs/01-settings/_settings.input.scss +0 -14
- package/src/themes/boomdevs/01-settings/_settings.link.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.list.scss +0 -10
- package/src/themes/boomdevs/01-settings/_settings.modal.scss +0 -16
- package/src/themes/boomdevs/01-settings/_settings.navbar.scss +0 -16
- package/src/themes/boomdevs/01-settings/_settings.pagination.scss +0 -13
- package/src/themes/boomdevs/01-settings/_settings.progress.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.rating.scss +0 -10
- package/src/themes/boomdevs/01-settings/_settings.spacing.scss +0 -33
- package/src/themes/boomdevs/01-settings/_settings.spinner.scss +0 -11
- package/src/themes/boomdevs/01-settings/_settings.steps.scss +0 -12
- package/src/themes/boomdevs/01-settings/_settings.tabs.scss +0 -12
- package/src/themes/boomdevs/01-settings/_settings.todo.scss +0 -15
- package/src/themes/boomdevs/01-settings/_settings.toggle.scss +0 -14
- package/src/themes/boomdevs/01-settings/_settings.tooltip.scss +0 -13
- package/src/themes/boomdevs/01-settings/_settings.typography.scss +0 -58
- package/src/themes/boomdevs/01-settings/_settings.video-player.scss +0 -12
- package/src/themes/boomdevs/02-tools/_index.scss +0 -7
- package/src/themes/boomdevs/03-generic/_index.scss +0 -7
- package/src/themes/boomdevs/04-elements/_index.scss +0 -7
- package/src/themes/boomdevs/05-objects/_index.scss +0 -7
- package/src/themes/boomdevs/06-components/_components.button.scss +0 -11
- package/src/themes/boomdevs/06-components/_index.scss +0 -11
- package/src/themes/boomdevs/99-utilities/_index.scss +0 -7
- package/src/themes/boomdevs/index.scss +0 -26
- package/src/themes/esrar/01-settings/_index.scss +0 -15
- package/src/themes/esrar/01-settings/_settings.colors.scss +0 -91
- package/src/themes/esrar/02-tools/_index.scss +0 -8
- package/src/themes/esrar/02-tools/_tools.animations.scss +0 -342
- package/src/themes/esrar/06-components/_components.accordion.scss +0 -49
- package/src/themes/esrar/06-components/_components.avatar-group.scss +0 -14
- package/src/themes/esrar/06-components/_components.avatar.scss +0 -61
- package/src/themes/esrar/06-components/_components.badge.scss +0 -117
- package/src/themes/esrar/06-components/_components.breadcrumb.scss +0 -65
- package/src/themes/esrar/06-components/_components.btn-group.scss +0 -19
- package/src/themes/esrar/06-components/_components.button.scss +0 -224
- package/src/themes/esrar/06-components/_components.callout.scss +0 -51
- package/src/themes/esrar/06-components/_components.card.scss +0 -134
- package/src/themes/esrar/06-components/_components.chart.scss +0 -24
- package/src/themes/esrar/06-components/_components.checkbox-group.scss +0 -26
- package/src/themes/esrar/06-components/_components.checkbox.scss +0 -71
- package/src/themes/esrar/06-components/_components.color-mode-toggle.scss +0 -29
- package/src/themes/esrar/06-components/_components.countdown.scss +0 -67
- package/src/themes/esrar/06-components/_components.data-table.scss +0 -22
- package/src/themes/esrar/06-components/_components.datepicker.scss +0 -20
- package/src/themes/esrar/06-components/_components.dropdown.scss +0 -272
- package/src/themes/esrar/06-components/_components.edge-panel.scss +0 -10
- package/src/themes/esrar/06-components/_components.form-group.scss +0 -15
- package/src/themes/esrar/06-components/_components.form.scss +0 -66
- package/src/themes/esrar/06-components/_components.hero.scss +0 -251
- package/src/themes/esrar/06-components/_components.icon.scss +0 -33
- package/src/themes/esrar/06-components/_components.image-gallery.scss +0 -29
- package/src/themes/esrar/06-components/_components.input.scss +0 -91
- package/src/themes/esrar/06-components/_components.list-group.scss +0 -26
- package/src/themes/esrar/06-components/_components.modal.scss +0 -148
- package/src/themes/esrar/06-components/_components.notification.scss +0 -80
- package/src/themes/esrar/06-components/_components.pagination.scss +0 -84
- package/src/themes/esrar/06-components/_components.popover.scss +0 -10
- package/src/themes/esrar/06-components/_components.progress.scss +0 -64
- package/src/themes/esrar/06-components/_components.rating.scss +0 -26
- package/src/themes/esrar/06-components/_components.skeleton.scss +0 -15
- package/src/themes/esrar/06-components/_components.slider.scss +0 -90
- package/src/themes/esrar/06-components/_components.spinner.scss +0 -71
- package/src/themes/esrar/06-components/_components.steps.scss +0 -76
- package/src/themes/esrar/06-components/_components.tab.scss +0 -58
- package/src/themes/esrar/06-components/_components.tag.scss +0 -21
- package/src/themes/esrar/06-components/_components.timeline.scss +0 -19
- package/src/themes/esrar/06-components/_components.toast.scss +0 -91
- package/src/themes/esrar/06-components/_components.toggle.scss +0 -74
- package/src/themes/esrar/06-components/_components.tooltip.scss +0 -45
- package/src/themes/esrar/06-components/_components.upload.scss +0 -102
- package/src/themes/esrar/06-components/_index.scss +0 -42
- package/src/themes/esrar/index.scss +0 -30
- package/src/themes/flashtrade/01-settings/_index.scss +0 -19
- package/src/themes/flashtrade/01-settings/_settings.animations.scss +0 -11
- package/src/themes/flashtrade/01-settings/_settings.background.scss +0 -9
- package/src/themes/flashtrade/01-settings/_settings.colors.scss +0 -79
- package/src/themes/flashtrade/01-settings/_settings.config.scss +0 -16
- package/src/themes/flashtrade/01-settings/_settings.typography.scss +0 -35
- package/src/themes/flashtrade/02-tools/_index.scss +0 -8
- package/src/themes/flashtrade/03-generic/_index.scss +0 -8
- package/src/themes/flashtrade/04-elements/_index.scss +0 -12
- package/src/themes/flashtrade/05-objects/_index.scss +0 -8
- package/src/themes/flashtrade/06-components/_components.badge.scss +0 -156
- package/src/themes/flashtrade/06-components/_components.button.scss +0 -135
- package/src/themes/flashtrade/06-components/_components.card.scss +0 -214
- package/src/themes/flashtrade/06-components/_components.navbar.scss +0 -227
- package/src/themes/flashtrade/06-components/_index.scss +0 -13
- package/src/themes/flashtrade/99-utilities/_index.scss +0 -9
- package/src/themes/flashtrade/99-utilities/_utilities.trading.scss +0 -187
- package/src/themes/flashtrade/README.md +0 -386
- package/src/themes/flashtrade/demo.html +0 -272
- package/src/themes/flashtrade/index.scss +0 -36
- package/src/themes/mashroom/01-settings/_index.scss +0 -69
- package/src/themes/mashroom/01-settings/_settings.accordion.scss +0 -32
- package/src/themes/mashroom/01-settings/_settings.animations.scss +0 -26
- package/src/themes/mashroom/01-settings/_settings.avatar-group.scss +0 -22
- package/src/themes/mashroom/01-settings/_settings.avatar.scss +0 -57
- package/src/themes/mashroom/01-settings/_settings.badge.scss +0 -19
- package/src/themes/mashroom/01-settings/_settings.border-radius.scss +0 -24
- package/src/themes/mashroom/01-settings/_settings.border.scss +0 -14
- package/src/themes/mashroom/01-settings/_settings.box-shadow.scss +0 -40
- package/src/themes/mashroom/01-settings/_settings.breadcrumb.scss +0 -0
- package/src/themes/mashroom/01-settings/_settings.breakpoints.scss +0 -17
- package/src/themes/mashroom/01-settings/_settings.btn-group.scss +0 -5
- package/src/themes/mashroom/01-settings/_settings.button.scss +0 -50
- package/src/themes/mashroom/01-settings/_settings.callout.scss +0 -81
- package/src/themes/mashroom/01-settings/_settings.card.scss +0 -52
- package/src/themes/mashroom/01-settings/_settings.checkbox-group.scss +0 -5
- package/src/themes/mashroom/01-settings/_settings.checkbox.scss +0 -23
- package/src/themes/mashroom/01-settings/_settings.color-mode.scss +0 -7
- package/src/themes/mashroom/01-settings/_settings.colors.scss +0 -180
- package/src/themes/mashroom/01-settings/_settings.config.scss +0 -4
- package/src/themes/mashroom/01-settings/_settings.countdown.scss +0 -20
- package/src/themes/mashroom/01-settings/_settings.data-table.scss +0 -56
- package/src/themes/mashroom/01-settings/_settings.datepicker.scss +0 -45
- package/src/themes/mashroom/01-settings/_settings.design-tokens.scss +0 -3
- package/src/themes/mashroom/01-settings/_settings.dropdown.scss +0 -45
- package/src/themes/mashroom/01-settings/_settings.edge-panel.scss +0 -24
- package/src/themes/mashroom/01-settings/_settings.fonts.scss +0 -8
- package/src/themes/mashroom/01-settings/_settings.form-group.scss +0 -14
- package/src/themes/mashroom/01-settings/_settings.form.scss +0 -6
- package/src/themes/mashroom/01-settings/_settings.grid.scss +0 -23
- package/src/themes/mashroom/01-settings/_settings.hero.scss +0 -41
- package/src/themes/mashroom/01-settings/_settings.input.scss +0 -51
- package/src/themes/mashroom/01-settings/_settings.link.scss +0 -13
- package/src/themes/mashroom/01-settings/_settings.list-group.scss +0 -16
- package/src/themes/mashroom/01-settings/_settings.list.scss +0 -13
- package/src/themes/mashroom/01-settings/_settings.masonry-grid.scss +0 -23
- package/src/themes/mashroom/01-settings/_settings.menu.scss +0 -50
- package/src/themes/mashroom/01-settings/_settings.messages.scss +0 -98
- package/src/themes/mashroom/01-settings/_settings.modal.scss +0 -41
- package/src/themes/mashroom/01-settings/_settings.nav.scss +0 -20
- package/src/themes/mashroom/01-settings/_settings.navbar.scss +0 -54
- package/src/themes/mashroom/01-settings/_settings.pagination.scss +0 -30
- package/src/themes/mashroom/01-settings/_settings.photoviewer.scss +0 -45
- package/src/themes/mashroom/01-settings/_settings.popover.scss +0 -20
- package/src/themes/mashroom/01-settings/_settings.position.scss +0 -9
- package/src/themes/mashroom/01-settings/_settings.progress.scss +0 -17
- package/src/themes/mashroom/01-settings/_settings.rating.scss +0 -11
- package/src/themes/mashroom/01-settings/_settings.river.scss +0 -50
- package/src/themes/mashroom/01-settings/_settings.sectionintro.scss +0 -31
- package/src/themes/mashroom/01-settings/_settings.select.scss +0 -47
- package/src/themes/mashroom/01-settings/_settings.side-menu.scss +0 -79
- package/src/themes/mashroom/01-settings/_settings.skeleton.scss +0 -24
- package/src/themes/mashroom/01-settings/_settings.spacing.scss +0 -66
- package/src/themes/mashroom/01-settings/_settings.spinner.scss +0 -34
- package/src/themes/mashroom/01-settings/_settings.steps.scss +0 -33
- package/src/themes/mashroom/01-settings/_settings.tabs.scss +0 -33
- package/src/themes/mashroom/01-settings/_settings.testimonials.scss +0 -24
- package/src/themes/mashroom/01-settings/_settings.todo.scss +0 -52
- package/src/themes/mashroom/01-settings/_settings.toggle.scss +0 -49
- package/src/themes/mashroom/01-settings/_settings.tooltip.scss +0 -20
- package/src/themes/mashroom/01-settings/_settings.typography.scss +0 -95
- package/src/themes/mashroom/01-settings/_settings.upload.scss +0 -96
- package/src/themes/mashroom/01-settings/_settings.z-layers.scss +0 -19
- package/src/themes/mashroom/02-tools/_index.scss +0 -8
- package/src/themes/mashroom/02-tools/_tools.psychedelic-gradients.scss +0 -78
- package/src/themes/mashroom/02-tools/_tools.trippy-effects.scss +0 -114
- package/src/themes/mashroom/03-generic/_index.scss +0 -6
- package/src/themes/mashroom/04-elements/_index.scss +0 -6
- package/src/themes/mashroom/05-objects/_index.scss +0 -6
- package/src/themes/mashroom/06-components/_components.accordion.scss +0 -187
- package/src/themes/mashroom/06-components/_components.avatar-group.scss +0 -276
- package/src/themes/mashroom/06-components/_components.avatar.scss +0 -114
- package/src/themes/mashroom/06-components/_components.badge.scss +0 -152
- package/src/themes/mashroom/06-components/_components.breadcrumb.scss +0 -162
- package/src/themes/mashroom/06-components/_components.btn-group.scss +0 -404
- package/src/themes/mashroom/06-components/_components.button.scss +0 -160
- package/src/themes/mashroom/06-components/_components.callout.scss +0 -140
- package/src/themes/mashroom/06-components/_components.card.scss +0 -225
- package/src/themes/mashroom/06-components/_components.checkbox.scss +0 -186
- package/src/themes/mashroom/06-components/_components.color-mode-toggle.scss +0 -308
- package/src/themes/mashroom/06-components/_components.countdown.scss +0 -402
- package/src/themes/mashroom/06-components/_components.data-table.scss +0 -354
- package/src/themes/mashroom/06-components/_components.datepicker.scss +0 -349
- package/src/themes/mashroom/06-components/_components.dropdown.scss +0 -334
- package/src/themes/mashroom/06-components/_components.edge-panel.scss +0 -413
- package/src/themes/mashroom/06-components/_components.form-group.scss +0 -433
- package/src/themes/mashroom/06-components/_components.form.scss +0 -358
- package/src/themes/mashroom/06-components/_components.hero.scss +0 -151
- package/src/themes/mashroom/06-components/_components.input.scss +0 -147
- package/src/themes/mashroom/06-components/_components.list-group.scss +0 -456
- package/src/themes/mashroom/06-components/_components.list.scss +0 -145
- package/src/themes/mashroom/06-components/_components.menu.scss +0 -497
- package/src/themes/mashroom/06-components/_components.messages.scss +0 -277
- package/src/themes/mashroom/06-components/_components.modal.scss +0 -264
- package/src/themes/mashroom/06-components/_components.nav.scss +0 -181
- package/src/themes/mashroom/06-components/_components.navbar.scss +0 -538
- package/src/themes/mashroom/06-components/_components.pagination.scss +0 -400
- package/src/themes/mashroom/06-components/_components.photoviewer.scss +0 -498
- package/src/themes/mashroom/06-components/_components.popover.scss +0 -383
- package/src/themes/mashroom/06-components/_components.product-review.scss +0 -408
- package/src/themes/mashroom/06-components/_components.progress.scss +0 -249
- package/src/themes/mashroom/06-components/_components.rating.scss +0 -300
- package/src/themes/mashroom/06-components/_components.river.scss +0 -570
- package/src/themes/mashroom/06-components/_components.sectionintro.scss +0 -546
- package/src/themes/mashroom/06-components/_components.select.scss +0 -455
- package/src/themes/mashroom/06-components/_components.side-menu.scss +0 -635
- package/src/themes/mashroom/06-components/_components.skeleton.scss +0 -447
- package/src/themes/mashroom/06-components/_components.slider.scss +0 -414
- package/src/themes/mashroom/06-components/_components.spinner.scss +0 -198
- package/src/themes/mashroom/06-components/_components.steps.scss +0 -350
- package/src/themes/mashroom/06-components/_components.tabs.scss +0 -269
- package/src/themes/mashroom/06-components/_components.testimonials.scss +0 -561
- package/src/themes/mashroom/06-components/_components.toggle.scss +0 -231
- package/src/themes/mashroom/06-components/_components.tooltip.scss +0 -167
- package/src/themes/mashroom/06-components/_components.upload.scss +0 -537
- package/src/themes/mashroom/06-components/_components.video-player.scss +0 -560
- package/src/themes/mashroom/06-components/_index.scss +0 -55
- package/src/themes/mashroom/99-utilities/_index.scss +0 -6
- package/src/themes/mashroom/index.scss +0 -26
- package/src/themes/shaj-default/01-settings/_index.scss +0 -69
- package/src/themes/shaj-default/01-settings/_settings.accordion.scss +0 -38
- package/src/themes/shaj-default/01-settings/_settings.animations.scss +0 -32
- package/src/themes/shaj-default/01-settings/_settings.avatar-group.scss +0 -28
- package/src/themes/shaj-default/01-settings/_settings.avatar.scss +0 -63
- package/src/themes/shaj-default/01-settings/_settings.badge.scss +0 -25
- package/src/themes/shaj-default/01-settings/_settings.border-radius.scss +0 -24
- package/src/themes/shaj-default/01-settings/_settings.border.scss +0 -20
- package/src/themes/shaj-default/01-settings/_settings.box-shadow.scss +0 -46
- package/src/themes/shaj-default/01-settings/_settings.breadcrumb.scss +0 -0
- package/src/themes/shaj-default/01-settings/_settings.breakpoints.scss +0 -23
- package/src/themes/shaj-default/01-settings/_settings.btn-group.scss +0 -11
- package/src/themes/shaj-default/01-settings/_settings.button.scss +0 -56
- package/src/themes/shaj-default/01-settings/_settings.callout.scss +0 -87
- package/src/themes/shaj-default/01-settings/_settings.card.scss +0 -52
- package/src/themes/shaj-default/01-settings/_settings.checkbox-group.scss +0 -11
- package/src/themes/shaj-default/01-settings/_settings.checkbox.scss +0 -29
- package/src/themes/shaj-default/01-settings/_settings.color-mode.scss +0 -13
- package/src/themes/shaj-default/01-settings/_settings.colors.scss +0 -91
- package/src/themes/shaj-default/01-settings/_settings.config.scss +0 -4
- package/src/themes/shaj-default/01-settings/_settings.countdown.scss +0 -26
- package/src/themes/shaj-default/01-settings/_settings.data-table.scss +0 -62
- package/src/themes/shaj-default/01-settings/_settings.datepicker.scss +0 -51
- package/src/themes/shaj-default/01-settings/_settings.design-tokens.scss +0 -9
- package/src/themes/shaj-default/01-settings/_settings.dropdown.scss +0 -51
- package/src/themes/shaj-default/01-settings/_settings.edge-panel.scss +0 -30
- package/src/themes/shaj-default/01-settings/_settings.fonts.scss +0 -13
- package/src/themes/shaj-default/01-settings/_settings.form-group.scss +0 -20
- package/src/themes/shaj-default/01-settings/_settings.form.scss +0 -12
- package/src/themes/shaj-default/01-settings/_settings.grid.scss +0 -29
- package/src/themes/shaj-default/01-settings/_settings.hero.scss +0 -47
- package/src/themes/shaj-default/01-settings/_settings.input.scss +0 -57
- package/src/themes/shaj-default/01-settings/_settings.link.scss +0 -19
- package/src/themes/shaj-default/01-settings/_settings.list-group.scss +0 -22
- package/src/themes/shaj-default/01-settings/_settings.list.scss +0 -19
- package/src/themes/shaj-default/01-settings/_settings.masonry-grid.scss +0 -29
- package/src/themes/shaj-default/01-settings/_settings.menu.scss +0 -56
- package/src/themes/shaj-default/01-settings/_settings.messages.scss +0 -104
- package/src/themes/shaj-default/01-settings/_settings.modal.scss +0 -47
- package/src/themes/shaj-default/01-settings/_settings.nav.scss +0 -26
- package/src/themes/shaj-default/01-settings/_settings.navbar.scss +0 -60
- package/src/themes/shaj-default/01-settings/_settings.pagination.scss +0 -36
- package/src/themes/shaj-default/01-settings/_settings.photoviewer.scss +0 -51
- package/src/themes/shaj-default/01-settings/_settings.popover.scss +0 -26
- package/src/themes/shaj-default/01-settings/_settings.position.scss +0 -15
- package/src/themes/shaj-default/01-settings/_settings.progress.scss +0 -23
- package/src/themes/shaj-default/01-settings/_settings.rating.scss +0 -17
- package/src/themes/shaj-default/01-settings/_settings.river.scss +0 -56
- package/src/themes/shaj-default/01-settings/_settings.sectionintro.scss +0 -37
- package/src/themes/shaj-default/01-settings/_settings.select.scss +0 -53
- package/src/themes/shaj-default/01-settings/_settings.side-menu.scss +0 -85
- package/src/themes/shaj-default/01-settings/_settings.skeleton.scss +0 -30
- package/src/themes/shaj-default/01-settings/_settings.spacing.scss +0 -72
- package/src/themes/shaj-default/01-settings/_settings.spinner.scss +0 -24
- package/src/themes/shaj-default/01-settings/_settings.steps.scss +0 -39
- package/src/themes/shaj-default/01-settings/_settings.tabs.scss +0 -39
- package/src/themes/shaj-default/01-settings/_settings.testimonials.scss +0 -30
- package/src/themes/shaj-default/01-settings/_settings.todo.scss +0 -58
- package/src/themes/shaj-default/01-settings/_settings.toggle.scss +0 -55
- package/src/themes/shaj-default/01-settings/_settings.tooltip.scss +0 -26
- package/src/themes/shaj-default/01-settings/_settings.typography.scss +0 -101
- package/src/themes/shaj-default/01-settings/_settings.upload.scss +0 -102
- package/src/themes/shaj-default/01-settings/_settings.z-layers.scss +0 -25
- package/src/themes/shaj-default/02-tools/_index.scss +0 -0
- package/src/themes/shaj-default/03-generic/_generic.root.scss +0 -0
- package/src/themes/shaj-default/03-generic/_index.scss +0 -2
- package/src/themes/shaj-default/04-elements/_index.scss +0 -0
- package/src/themes/shaj-default/05-objects/_index.scss +0 -0
- package/src/themes/shaj-default/06-components/_components.button.scss +0 -55
- package/src/themes/shaj-default/06-components/_components.card.scss +0 -57
- package/src/themes/shaj-default/06-components/_components.input.scss +0 -58
- package/src/themes/shaj-default/06-components/_components.navbar.scss +0 -99
- package/src/themes/shaj-default/06-components/_components.tooltip.scss +0 -0
- package/src/themes/shaj-default/06-components/_index.scss +0 -13
- package/src/themes/shaj-default/99-utilities/_index.scss +0 -0
- package/src/themes/shaj-default/index.scss +0 -25
- package/theme.config.ts +0 -360
package/scripts/atomix-cli.js
CHANGED
|
@@ -32,6 +32,15 @@ import {
|
|
|
32
32
|
exportTokens,
|
|
33
33
|
importTokens
|
|
34
34
|
} from './cli/token-manager.js';
|
|
35
|
+
import { createThemeCLIBridge } from './cli/theme-bridge.js';
|
|
36
|
+
import {
|
|
37
|
+
validatePath,
|
|
38
|
+
validateComponentName,
|
|
39
|
+
validateThemeName,
|
|
40
|
+
sanitizeInput,
|
|
41
|
+
fileExists,
|
|
42
|
+
isDebug as checkDebugMode
|
|
43
|
+
} from './cli/utils.js';
|
|
35
44
|
|
|
36
45
|
const __filename = fileURLToPath(import.meta.url);
|
|
37
46
|
const __dirname = dirname(__filename);
|
|
@@ -770,20 +779,36 @@ program
|
|
|
770
779
|
debug(`Generating ${type} with name: ${name}`, options);
|
|
771
780
|
|
|
772
781
|
// Validate name
|
|
773
|
-
|
|
782
|
+
const nameValidation = validateComponentName(name);
|
|
783
|
+
if (!nameValidation.isValid) {
|
|
774
784
|
throw new AtomixCLIError(
|
|
775
|
-
|
|
785
|
+
nameValidation.error,
|
|
776
786
|
'INVALID_NAME',
|
|
777
787
|
[
|
|
778
788
|
'Use PascalCase naming (e.g., MyComponent)',
|
|
779
789
|
'Start with an uppercase letter',
|
|
780
|
-
'Use only letters and numbers'
|
|
790
|
+
'Use only letters and numbers',
|
|
791
|
+
'Avoid reserved words'
|
|
781
792
|
]
|
|
782
793
|
);
|
|
783
794
|
}
|
|
784
795
|
|
|
785
796
|
if (type === 'component' || type === 'c') {
|
|
786
|
-
|
|
797
|
+
// Validate output path
|
|
798
|
+
const pathValidation = validatePath(options.path);
|
|
799
|
+
if (!pathValidation.isValid) {
|
|
800
|
+
throw new AtomixCLIError(
|
|
801
|
+
pathValidation.error,
|
|
802
|
+
'INVALID_PATH',
|
|
803
|
+
[
|
|
804
|
+
'Ensure the path is within the project directory',
|
|
805
|
+
'Avoid using ".." to navigate outside the project',
|
|
806
|
+
'Check for typos in the path'
|
|
807
|
+
]
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
const componentPath = join(pathValidation.safePath, name);
|
|
787
812
|
|
|
788
813
|
// Check if component already exists
|
|
789
814
|
if (existsSync(componentPath) && !options.force) {
|
|
@@ -877,15 +902,103 @@ program
|
|
|
877
902
|
));
|
|
878
903
|
|
|
879
904
|
} else if (type === 'token' || type === 't') {
|
|
880
|
-
// Token generation
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
'
|
|
887
|
-
|
|
888
|
-
|
|
905
|
+
// Token generation
|
|
906
|
+
const validCategories = ['colors', 'spacing', 'typography', 'shadows', 'radius', 'animations'];
|
|
907
|
+
|
|
908
|
+
if (!validCategories.includes(name.toLowerCase())) {
|
|
909
|
+
throw new AtomixCLIError(
|
|
910
|
+
`Invalid token category: ${name}`,
|
|
911
|
+
'INVALID_TOKEN_CATEGORY',
|
|
912
|
+
[
|
|
913
|
+
`Valid categories: ${validCategories.join(', ')}`,
|
|
914
|
+
'Example: atomix generate token colors',
|
|
915
|
+
'Example: atomix g t spacing'
|
|
916
|
+
]
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
const tokenPath = join(process.cwd(), 'src/styles/01-settings');
|
|
921
|
+
|
|
922
|
+
// Check if settings directory exists
|
|
923
|
+
if (!existsSync(tokenPath)) {
|
|
924
|
+
throw new AtomixCLIError(
|
|
925
|
+
'Settings directory not found',
|
|
926
|
+
'MISSING_DIRECTORY',
|
|
927
|
+
[
|
|
928
|
+
'Ensure you are in an Atomix project directory',
|
|
929
|
+
'Create the directory: mkdir -p src/styles/01-settings',
|
|
930
|
+
'Or initialize a new project: atomix init'
|
|
931
|
+
]
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// Generate token file based on category
|
|
936
|
+
let tokenContent = '';
|
|
937
|
+
let filename = '';
|
|
938
|
+
|
|
939
|
+
switch (name.toLowerCase()) {
|
|
940
|
+
case 'colors':
|
|
941
|
+
filename = '_settings.colors.custom.scss';
|
|
942
|
+
tokenContent = generateColorTokens();
|
|
943
|
+
break;
|
|
944
|
+
case 'spacing':
|
|
945
|
+
filename = '_settings.spacing.custom.scss';
|
|
946
|
+
tokenContent = generateSpacingTokens();
|
|
947
|
+
break;
|
|
948
|
+
case 'typography':
|
|
949
|
+
filename = '_settings.typography.custom.scss';
|
|
950
|
+
tokenContent = generateTypographyTokens();
|
|
951
|
+
break;
|
|
952
|
+
case 'shadows':
|
|
953
|
+
filename = '_settings.box-shadow.custom.scss';
|
|
954
|
+
tokenContent = generateShadowTokens();
|
|
955
|
+
break;
|
|
956
|
+
case 'radius':
|
|
957
|
+
filename = '_settings.border-radius.custom.scss';
|
|
958
|
+
tokenContent = generateRadiusTokens();
|
|
959
|
+
break;
|
|
960
|
+
case 'animations':
|
|
961
|
+
filename = '_settings.animations.custom.scss';
|
|
962
|
+
tokenContent = generateAnimationTokens();
|
|
963
|
+
break;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
const filePath = join(tokenPath, filename);
|
|
967
|
+
|
|
968
|
+
// Check if file already exists
|
|
969
|
+
if (existsSync(filePath) && !options.force) {
|
|
970
|
+
throw new AtomixCLIError(
|
|
971
|
+
`Token file already exists: ${filename}`,
|
|
972
|
+
'FILE_EXISTS',
|
|
973
|
+
[
|
|
974
|
+
'Use --force flag to overwrite',
|
|
975
|
+
`Or edit the existing file: ${filePath}`,
|
|
976
|
+
'Or choose a different category'
|
|
977
|
+
]
|
|
978
|
+
);
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
// Write token file
|
|
982
|
+
await writeFile(filePath, tokenContent, 'utf8');
|
|
983
|
+
spinner.succeed(chalk.green(`✓ Created token file: ${filename}`));
|
|
984
|
+
|
|
985
|
+
// Success message
|
|
986
|
+
console.log(boxen(
|
|
987
|
+
chalk.bold.green(`🎨 ${name} tokens generated successfully!\n\n`) +
|
|
988
|
+
chalk.cyan('Next steps:\n') +
|
|
989
|
+
chalk.gray(`1. Customize your tokens:\n`) +
|
|
990
|
+
chalk.white(` Edit ${filePath}\n\n`) +
|
|
991
|
+
chalk.gray(`2. Import in your theme:\n`) +
|
|
992
|
+
chalk.white(` @use '${filename.replace('.scss', '')}' as *;\n\n`) +
|
|
993
|
+
chalk.gray(`3. Build your styles:\n`) +
|
|
994
|
+
chalk.white(` npm run build`),
|
|
995
|
+
{
|
|
996
|
+
padding: 1,
|
|
997
|
+
margin: 1,
|
|
998
|
+
borderStyle: 'round',
|
|
999
|
+
borderColor: 'green'
|
|
1000
|
+
}
|
|
1001
|
+
));
|
|
889
1002
|
} else {
|
|
890
1003
|
throw new AtomixCLIError(
|
|
891
1004
|
`Unknown generation type: ${type}`,
|
|
@@ -1328,6 +1441,328 @@ program
|
|
|
1328
1441
|
}
|
|
1329
1442
|
});
|
|
1330
1443
|
|
|
1444
|
+
/**
|
|
1445
|
+
* Theme Command Group - NEW (Integrated with Theme Devtools)
|
|
1446
|
+
*/
|
|
1447
|
+
const themeCommand = program
|
|
1448
|
+
.command('theme')
|
|
1449
|
+
.description('Theme management commands');
|
|
1450
|
+
|
|
1451
|
+
// Theme validate
|
|
1452
|
+
themeCommand
|
|
1453
|
+
.command('validate')
|
|
1454
|
+
.description('Validate theme configuration')
|
|
1455
|
+
.option('--config <path>', 'Path to theme config file')
|
|
1456
|
+
.option('--strict', 'Enable strict validation')
|
|
1457
|
+
.action(async (options) => {
|
|
1458
|
+
try {
|
|
1459
|
+
const themeCLI = createThemeCLIBridge();
|
|
1460
|
+
await themeCLI.validate(options);
|
|
1461
|
+
} catch (error) {
|
|
1462
|
+
handleError(error);
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
|
|
1466
|
+
// Theme list
|
|
1467
|
+
themeCommand
|
|
1468
|
+
.command('list')
|
|
1469
|
+
.alias('ls')
|
|
1470
|
+
.description('List all available themes')
|
|
1471
|
+
.action(async () => {
|
|
1472
|
+
try {
|
|
1473
|
+
const themeCLI = createThemeCLIBridge();
|
|
1474
|
+
await themeCLI.list();
|
|
1475
|
+
} catch (error) {
|
|
1476
|
+
handleError(error);
|
|
1477
|
+
}
|
|
1478
|
+
});
|
|
1479
|
+
|
|
1480
|
+
// Theme inspect
|
|
1481
|
+
themeCommand
|
|
1482
|
+
.command('inspect <name>')
|
|
1483
|
+
.description('Inspect a specific theme')
|
|
1484
|
+
.option('--json', 'Output as JSON')
|
|
1485
|
+
.action(async (name, options) => {
|
|
1486
|
+
try {
|
|
1487
|
+
const themeCLI = createThemeCLIBridge();
|
|
1488
|
+
await themeCLI.inspect(name, options);
|
|
1489
|
+
} catch (error) {
|
|
1490
|
+
handleError(error);
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
|
|
1494
|
+
// Theme compare
|
|
1495
|
+
themeCommand
|
|
1496
|
+
.command('compare <theme1> <theme2>')
|
|
1497
|
+
.description('Compare two themes')
|
|
1498
|
+
.action(async (theme1, theme2) => {
|
|
1499
|
+
try {
|
|
1500
|
+
const themeCLI = createThemeCLIBridge();
|
|
1501
|
+
await themeCLI.compare(theme1, theme2);
|
|
1502
|
+
} catch (error) {
|
|
1503
|
+
handleError(error);
|
|
1504
|
+
}
|
|
1505
|
+
});
|
|
1506
|
+
|
|
1507
|
+
// Theme export
|
|
1508
|
+
themeCommand
|
|
1509
|
+
.command('export <name>')
|
|
1510
|
+
.description('Export theme to JSON')
|
|
1511
|
+
.option('-o, --output <path>', 'Output file path')
|
|
1512
|
+
.action(async (name, options) => {
|
|
1513
|
+
try {
|
|
1514
|
+
const themeCLI = createThemeCLIBridge();
|
|
1515
|
+
await themeCLI.export(name, options);
|
|
1516
|
+
} catch (error) {
|
|
1517
|
+
handleError(error);
|
|
1518
|
+
}
|
|
1519
|
+
});
|
|
1520
|
+
|
|
1521
|
+
// Theme create - NEW
|
|
1522
|
+
themeCommand
|
|
1523
|
+
.command('create <name>')
|
|
1524
|
+
.description('Create a new theme')
|
|
1525
|
+
.option('-t, --type <type>', 'Theme type (css|js)', 'css')
|
|
1526
|
+
.option('--template <name>', 'Use template (dark|light|high-contrast)')
|
|
1527
|
+
.option('--interactive', 'Interactive mode', false)
|
|
1528
|
+
.option('-o, --output <path>', 'Output directory', './themes')
|
|
1529
|
+
.action(async (name, options) => {
|
|
1530
|
+
const spinner = ora('Creating theme...').start();
|
|
1531
|
+
|
|
1532
|
+
try {
|
|
1533
|
+
debug(`Creating theme: ${name}`, options);
|
|
1534
|
+
|
|
1535
|
+
// Validate name
|
|
1536
|
+
const nameValidation = validateThemeName(name);
|
|
1537
|
+
if (!nameValidation.isValid) {
|
|
1538
|
+
throw new AtomixCLIError(
|
|
1539
|
+
nameValidation.error,
|
|
1540
|
+
'INVALID_NAME',
|
|
1541
|
+
[
|
|
1542
|
+
'Use lowercase letters, numbers, and hyphens',
|
|
1543
|
+
'Start with a letter',
|
|
1544
|
+
'Example: dark-theme, light-mode, custom-theme',
|
|
1545
|
+
'Avoid consecutive or trailing hyphens'
|
|
1546
|
+
]
|
|
1547
|
+
);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
const themePath = join(options.output, name);
|
|
1551
|
+
|
|
1552
|
+
// Check if theme already exists
|
|
1553
|
+
if (existsSync(themePath)) {
|
|
1554
|
+
throw new AtomixCLIError(
|
|
1555
|
+
`Theme ${name} already exists`,
|
|
1556
|
+
'THEME_EXISTS',
|
|
1557
|
+
[
|
|
1558
|
+
`Delete the existing theme at ${themePath}`,
|
|
1559
|
+
'Choose a different theme name',
|
|
1560
|
+
'Use --force flag to overwrite (not yet implemented)'
|
|
1561
|
+
]
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
// Create theme directory
|
|
1566
|
+
await mkdir(themePath, { recursive: true });
|
|
1567
|
+
|
|
1568
|
+
// Generate theme files based on type
|
|
1569
|
+
if (options.type === 'css') {
|
|
1570
|
+
// Create SCSS theme
|
|
1571
|
+
const scssContent = `// Theme: ${name}
|
|
1572
|
+
// =============================================================================
|
|
1573
|
+
|
|
1574
|
+
@import '../../src/styles/01-settings';
|
|
1575
|
+
@import '../../src/styles/02-tools';
|
|
1576
|
+
|
|
1577
|
+
// Theme Variables
|
|
1578
|
+
// =============================================================================
|
|
1579
|
+
:root[data-theme="${name}"] {
|
|
1580
|
+
// Colors
|
|
1581
|
+
--atomix-color-primary: #7AFFD7;
|
|
1582
|
+
--atomix-color-secondary: #FF5733;
|
|
1583
|
+
--atomix-color-success: #4DFF9F;
|
|
1584
|
+
--atomix-color-error: #FF1A1A;
|
|
1585
|
+
--atomix-color-warning: #FFB84D;
|
|
1586
|
+
|
|
1587
|
+
// Background
|
|
1588
|
+
--atomix-color-background: #000000;
|
|
1589
|
+
--atomix-color-surface: #212121;
|
|
1590
|
+
|
|
1591
|
+
// Text
|
|
1592
|
+
--atomix-color-text: #FFFFFF;
|
|
1593
|
+
--atomix-color-text-secondary: rgba(255, 255, 255, 0.8);
|
|
1594
|
+
|
|
1595
|
+
// Border
|
|
1596
|
+
--atomix-color-border: rgba(255, 255, 255, 0.1);
|
|
1597
|
+
|
|
1598
|
+
// Spacing (if needed)
|
|
1599
|
+
// --atomix-space-base: 16px;
|
|
1600
|
+
|
|
1601
|
+
// Typography (if needed)
|
|
1602
|
+
// --atomix-font-family-base: 'Inter', sans-serif;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
// Theme-specific Component Overrides
|
|
1606
|
+
// =============================================================================
|
|
1607
|
+
[data-theme="${name}"] {
|
|
1608
|
+
// Add component-specific overrides here
|
|
1609
|
+
|
|
1610
|
+
.c-button {
|
|
1611
|
+
// Button overrides
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
.c-card {
|
|
1615
|
+
// Card overrides
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
`;
|
|
1619
|
+
|
|
1620
|
+
await writeFile(join(themePath, 'index.scss'), scssContent, 'utf8');
|
|
1621
|
+
spinner.succeed(chalk.green(`✓ Created ${name}/index.scss`));
|
|
1622
|
+
|
|
1623
|
+
} else if (options.type === 'js') {
|
|
1624
|
+
// Create JavaScript theme
|
|
1625
|
+
const jsContent = `/**
|
|
1626
|
+
* Theme: ${name}
|
|
1627
|
+
*/
|
|
1628
|
+
|
|
1629
|
+
import { createTheme } from '@shohojdhara/atomix/theme';
|
|
1630
|
+
|
|
1631
|
+
export const ${name.replace(/-([a-z])/g, (_, c) => c.toUpperCase())}Theme = createTheme({
|
|
1632
|
+
name: '${name}',
|
|
1633
|
+
palette: {
|
|
1634
|
+
primary: {
|
|
1635
|
+
main: '#7AFFD7',
|
|
1636
|
+
light: '#A0FFE6',
|
|
1637
|
+
dark: '#00E6C3',
|
|
1638
|
+
contrastText: '#000000',
|
|
1639
|
+
},
|
|
1640
|
+
secondary: {
|
|
1641
|
+
main: '#FF5733',
|
|
1642
|
+
light: '#FF8A65',
|
|
1643
|
+
dark: '#E64A19',
|
|
1644
|
+
contrastText: '#FFFFFF',
|
|
1645
|
+
},
|
|
1646
|
+
success: {
|
|
1647
|
+
main: '#4DFF9F',
|
|
1648
|
+
light: '#80FFB8',
|
|
1649
|
+
dark: '#00E66B',
|
|
1650
|
+
contrastText: '#000000',
|
|
1651
|
+
},
|
|
1652
|
+
error: {
|
|
1653
|
+
main: '#FF1A1A',
|
|
1654
|
+
light: '#FF5252',
|
|
1655
|
+
dark: '#E60000',
|
|
1656
|
+
contrastText: '#FFFFFF',
|
|
1657
|
+
},
|
|
1658
|
+
warning: {
|
|
1659
|
+
main: '#FFB84D',
|
|
1660
|
+
light: '#FFCC80',
|
|
1661
|
+
dark: '#FF9800',
|
|
1662
|
+
contrastText: '#000000',
|
|
1663
|
+
},
|
|
1664
|
+
background: {
|
|
1665
|
+
default: '#000000',
|
|
1666
|
+
paper: '#212121',
|
|
1667
|
+
},
|
|
1668
|
+
text: {
|
|
1669
|
+
primary: '#FFFFFF',
|
|
1670
|
+
secondary: 'rgba(255, 255, 255, 0.8)',
|
|
1671
|
+
disabled: 'rgba(255, 255, 255, 0.5)',
|
|
1672
|
+
},
|
|
1673
|
+
},
|
|
1674
|
+
typography: {
|
|
1675
|
+
fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
1676
|
+
fontSize: 16,
|
|
1677
|
+
fontWeightLight: 300,
|
|
1678
|
+
fontWeightRegular: 400,
|
|
1679
|
+
fontWeightMedium: 500,
|
|
1680
|
+
fontWeightBold: 700,
|
|
1681
|
+
},
|
|
1682
|
+
spacing: {
|
|
1683
|
+
unit: 8,
|
|
1684
|
+
},
|
|
1685
|
+
shape: {
|
|
1686
|
+
borderRadius: 6,
|
|
1687
|
+
},
|
|
1688
|
+
});
|
|
1689
|
+
|
|
1690
|
+
export default ${name.replace(/-([a-z])/g, (_, c) => c.toUpperCase())}Theme;
|
|
1691
|
+
`;
|
|
1692
|
+
|
|
1693
|
+
await writeFile(join(themePath, 'index.ts'), jsContent, 'utf8');
|
|
1694
|
+
spinner.succeed(chalk.green(`✓ Created ${name}/index.ts`));
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
// Create README
|
|
1698
|
+
const readmeContent = `# ${name} Theme
|
|
1699
|
+
|
|
1700
|
+
## Description
|
|
1701
|
+
|
|
1702
|
+
A custom theme for Atomix Design System.
|
|
1703
|
+
|
|
1704
|
+
## Usage
|
|
1705
|
+
|
|
1706
|
+
### CSS Theme
|
|
1707
|
+
|
|
1708
|
+
\`\`\`scss
|
|
1709
|
+
@import 'themes/${name}';
|
|
1710
|
+
\`\`\`
|
|
1711
|
+
|
|
1712
|
+
### JavaScript Theme
|
|
1713
|
+
|
|
1714
|
+
\`\`\`typescript
|
|
1715
|
+
import { ${name.replace(/-([a-z])/g, (_, c) => c.toUpperCase())}Theme } from './themes/${name}';
|
|
1716
|
+
import { ThemeProvider } from '@shohojdhara/atomix/theme';
|
|
1717
|
+
|
|
1718
|
+
function App() {
|
|
1719
|
+
return (
|
|
1720
|
+
<ThemeProvider theme={${name.replace(/-([a-z])/g, (_, c) => c.toUpperCase())}Theme}>
|
|
1721
|
+
{/* Your app */}
|
|
1722
|
+
</ThemeProvider>
|
|
1723
|
+
);
|
|
1724
|
+
}
|
|
1725
|
+
\`\`\`
|
|
1726
|
+
|
|
1727
|
+
## Customization
|
|
1728
|
+
|
|
1729
|
+
Edit the theme variables in \`index.${options.type === 'css' ? 'scss' : 'ts'}\` to customize colors, typography, spacing, and more.
|
|
1730
|
+
|
|
1731
|
+
## Build
|
|
1732
|
+
|
|
1733
|
+
\`\`\`bash
|
|
1734
|
+
atomix build-theme themes/${name}
|
|
1735
|
+
\`\`\`
|
|
1736
|
+
`;
|
|
1737
|
+
|
|
1738
|
+
await writeFile(join(themePath, 'README.md'), readmeContent, 'utf8');
|
|
1739
|
+
console.log(chalk.green(` ✓ Created ${name}/README.md`));
|
|
1740
|
+
|
|
1741
|
+
// Success message
|
|
1742
|
+
console.log(boxen(
|
|
1743
|
+
chalk.bold.green(`🎨 Theme "${name}" created successfully!\n\n`) +
|
|
1744
|
+
chalk.cyan('Next steps:\n') +
|
|
1745
|
+
chalk.gray(`1. Customize your theme:\n`) +
|
|
1746
|
+
chalk.white(` Edit ${themePath}/index.${options.type === 'css' ? 'scss' : 'ts'}\n\n`) +
|
|
1747
|
+
(options.type === 'css'
|
|
1748
|
+
? chalk.gray(`2. Build your theme:\n`) + chalk.white(` atomix build-theme ${themePath}\n\n`)
|
|
1749
|
+
: chalk.gray(`2. Use in your app:\n`) + chalk.white(` import theme from './themes/${name}';\n\n`)
|
|
1750
|
+
) +
|
|
1751
|
+
chalk.gray(`3. Apply your theme:\n`) +
|
|
1752
|
+
chalk.white(` <ThemeProvider theme="${name}">...</ThemeProvider>`),
|
|
1753
|
+
{
|
|
1754
|
+
padding: 1,
|
|
1755
|
+
margin: 1,
|
|
1756
|
+
borderStyle: 'round',
|
|
1757
|
+
borderColor: 'green'
|
|
1758
|
+
}
|
|
1759
|
+
));
|
|
1760
|
+
|
|
1761
|
+
} catch (error) {
|
|
1762
|
+
handleError(error, spinner);
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1331
1766
|
/**
|
|
1332
1767
|
* Doctor Command - NEW
|
|
1333
1768
|
*/
|
|
@@ -1375,11 +1810,13 @@ program
|
|
|
1375
1810
|
}
|
|
1376
1811
|
|
|
1377
1812
|
// Check for configuration files
|
|
1378
|
-
const configFiles = ['.atomixrc', 'atomix.config.js', 'atomix.config.json'];
|
|
1813
|
+
const configFiles = ['.atomixrc', 'atomix.config.js', 'atomix.config.json', 'theme.config.ts'];
|
|
1379
1814
|
let hasConfig = false;
|
|
1815
|
+
let configFile = null;
|
|
1380
1816
|
for (const file of configFiles) {
|
|
1381
1817
|
if (existsSync(join(process.cwd(), file))) {
|
|
1382
1818
|
hasConfig = true;
|
|
1819
|
+
configFile = file;
|
|
1383
1820
|
break;
|
|
1384
1821
|
}
|
|
1385
1822
|
}
|
|
@@ -1388,10 +1825,23 @@ program
|
|
|
1388
1825
|
name: 'Configuration File',
|
|
1389
1826
|
status: hasConfig ? '✅' : '💡',
|
|
1390
1827
|
message: hasConfig
|
|
1391
|
-
?
|
|
1828
|
+
? `Configuration found (${configFile})`
|
|
1392
1829
|
: 'No config file (using defaults)',
|
|
1393
1830
|
});
|
|
1394
1831
|
|
|
1832
|
+
// Check theme CLI availability
|
|
1833
|
+
const themeCLIAvailable = await import('./cli/theme-bridge.js')
|
|
1834
|
+
.then(m => m.isThemeCLIAvailable())
|
|
1835
|
+
.catch(() => false);
|
|
1836
|
+
|
|
1837
|
+
checks.push({
|
|
1838
|
+
name: 'Theme CLI',
|
|
1839
|
+
status: themeCLIAvailable ? '✅' : '⚠️',
|
|
1840
|
+
message: themeCLIAvailable
|
|
1841
|
+
? 'Available'
|
|
1842
|
+
: 'Theme devtools not found',
|
|
1843
|
+
});
|
|
1844
|
+
|
|
1395
1845
|
spinner.stop();
|
|
1396
1846
|
|
|
1397
1847
|
// Display results
|
|
@@ -1419,6 +1869,420 @@ program
|
|
|
1419
1869
|
}
|
|
1420
1870
|
});
|
|
1421
1871
|
|
|
1872
|
+
// Token generation functions
|
|
1873
|
+
function generateColorTokens() {
|
|
1874
|
+
return `// Custom Color Tokens
|
|
1875
|
+
// Generated by Atomix CLI
|
|
1876
|
+
// =============================================================================
|
|
1877
|
+
|
|
1878
|
+
// Brand Colors
|
|
1879
|
+
// Customize these to match your brand identity
|
|
1880
|
+
$custom-primary-1: #fff9e6 !default;
|
|
1881
|
+
$custom-primary-2: #fff4cc !default;
|
|
1882
|
+
$custom-primary-3: #ffe699 !default;
|
|
1883
|
+
$custom-primary-4: #ffd966 !default;
|
|
1884
|
+
$custom-primary-5: #ffcc33 !default;
|
|
1885
|
+
$custom-primary-6: #ffb800 !default; // Main brand color
|
|
1886
|
+
$custom-primary-7: #e6a600 !default;
|
|
1887
|
+
$custom-primary-8: #cc9400 !default;
|
|
1888
|
+
$custom-primary-9: #b38200 !default;
|
|
1889
|
+
$custom-primary-10: #997000 !default;
|
|
1890
|
+
|
|
1891
|
+
// Semantic Colors
|
|
1892
|
+
$custom-success: #22c55e !default;
|
|
1893
|
+
$custom-warning: #eab308 !default;
|
|
1894
|
+
$custom-error: #ef4444 !default;
|
|
1895
|
+
$custom-info: #3b82f6 !default;
|
|
1896
|
+
|
|
1897
|
+
// Neutral Colors
|
|
1898
|
+
$custom-gray-1: #f9fafb !default;
|
|
1899
|
+
$custom-gray-2: #f3f4f6 !default;
|
|
1900
|
+
$custom-gray-3: #e5e7eb !default;
|
|
1901
|
+
$custom-gray-4: #d1d5db !default;
|
|
1902
|
+
$custom-gray-5: #9ca3af !default;
|
|
1903
|
+
$custom-gray-6: #6b7280 !default;
|
|
1904
|
+
$custom-gray-7: #4b5563 !default;
|
|
1905
|
+
$custom-gray-8: #374151 !default;
|
|
1906
|
+
$custom-gray-9: #1f2937 !default;
|
|
1907
|
+
$custom-gray-10: #111827 !default;
|
|
1908
|
+
|
|
1909
|
+
// Background Colors
|
|
1910
|
+
$custom-body-bg: #ffffff !default;
|
|
1911
|
+
$custom-body-bg-dark: #1f2937 !default;
|
|
1912
|
+
|
|
1913
|
+
// Text Colors
|
|
1914
|
+
$custom-body-color: $custom-gray-10 !default;
|
|
1915
|
+
$custom-body-color-dark: #ffffff !default;
|
|
1916
|
+
|
|
1917
|
+
// Link Colors
|
|
1918
|
+
$custom-link-color: $custom-primary-6 !default;
|
|
1919
|
+
$custom-link-hover-color: $custom-primary-7 !default;
|
|
1920
|
+
|
|
1921
|
+
// Border Colors
|
|
1922
|
+
$custom-border-color: $custom-gray-3 !default;
|
|
1923
|
+
$custom-border-color-dark: $custom-gray-7 !default;
|
|
1924
|
+
|
|
1925
|
+
// Focus Colors
|
|
1926
|
+
$custom-focus-color: $custom-primary-5 !default;
|
|
1927
|
+
$custom-focus-color-dark: $custom-primary-4 !default;
|
|
1928
|
+
|
|
1929
|
+
// Export custom colors to override defaults
|
|
1930
|
+
$primary: $custom-primary-6 !default;
|
|
1931
|
+
$success: $custom-success !default;
|
|
1932
|
+
$warning: $custom-warning !default;
|
|
1933
|
+
$error: $custom-error !default;
|
|
1934
|
+
$info: $custom-info !default;
|
|
1935
|
+
|
|
1936
|
+
// Dark mode overrides
|
|
1937
|
+
$body-bg-dark: $custom-body-bg-dark !default;
|
|
1938
|
+
$body-color-dark: $custom-body-color-dark !default;
|
|
1939
|
+
$border-color-dark: $custom-border-color-dark !default;
|
|
1940
|
+
`;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
function generateSpacingTokens() {
|
|
1944
|
+
return `// Custom Spacing Tokens
|
|
1945
|
+
// Generated by Atomix CLI
|
|
1946
|
+
// =============================================================================
|
|
1947
|
+
|
|
1948
|
+
// Base spacing unit (change this to scale all spacing)
|
|
1949
|
+
$custom-spacing-base: 0.25rem !default; // 4px
|
|
1950
|
+
|
|
1951
|
+
// Spacing scale
|
|
1952
|
+
$custom-spacing-0: 0 !default;
|
|
1953
|
+
$custom-spacing-1: $custom-spacing-base !default; // 4px
|
|
1954
|
+
$custom-spacing-2: calc($custom-spacing-base * 2) !default; // 8px
|
|
1955
|
+
$custom-spacing-3: calc($custom-spacing-base * 3) !default; // 12px
|
|
1956
|
+
$custom-spacing-4: calc($custom-spacing-base * 4) !default; // 16px
|
|
1957
|
+
$custom-spacing-5: calc($custom-spacing-base * 5) !default; // 20px
|
|
1958
|
+
$custom-spacing-6: calc($custom-spacing-base * 6) !default; // 24px
|
|
1959
|
+
$custom-spacing-7: calc($custom-spacing-base * 7) !default; // 28px
|
|
1960
|
+
$custom-spacing-8: calc($custom-spacing-base * 8) !default; // 32px
|
|
1961
|
+
$custom-spacing-9: calc($custom-spacing-base * 9) !default; // 36px
|
|
1962
|
+
$custom-spacing-10: calc($custom-spacing-base * 10) !default; // 40px
|
|
1963
|
+
$custom-spacing-11: calc($custom-spacing-base * 11) !default; // 44px
|
|
1964
|
+
$custom-spacing-12: calc($custom-spacing-base * 12) !default; // 48px
|
|
1965
|
+
$custom-spacing-14: calc($custom-spacing-base * 14) !default; // 56px
|
|
1966
|
+
$custom-spacing-16: calc($custom-spacing-base * 16) !default; // 64px
|
|
1967
|
+
$custom-spacing-20: calc($custom-spacing-base * 20) !default; // 80px
|
|
1968
|
+
$custom-spacing-24: calc($custom-spacing-base * 24) !default; // 96px
|
|
1969
|
+
$custom-spacing-28: calc($custom-spacing-base * 28) !default; // 112px
|
|
1970
|
+
$custom-spacing-32: calc($custom-spacing-base * 32) !default; // 128px
|
|
1971
|
+
$custom-spacing-36: calc($custom-spacing-base * 36) !default; // 144px
|
|
1972
|
+
$custom-spacing-40: calc($custom-spacing-base * 40) !default; // 160px
|
|
1973
|
+
$custom-spacing-44: calc($custom-spacing-base * 44) !default; // 176px
|
|
1974
|
+
$custom-spacing-48: calc($custom-spacing-base * 48) !default; // 192px
|
|
1975
|
+
$custom-spacing-52: calc($custom-spacing-base * 52) !default; // 208px
|
|
1976
|
+
$custom-spacing-56: calc($custom-spacing-base * 56) !default; // 224px
|
|
1977
|
+
$custom-spacing-60: calc($custom-spacing-base * 60) !default; // 240px
|
|
1978
|
+
$custom-spacing-64: calc($custom-spacing-base * 64) !default; // 256px
|
|
1979
|
+
|
|
1980
|
+
// Component-specific spacing
|
|
1981
|
+
$custom-button-padding-x: $custom-spacing-4 !default;
|
|
1982
|
+
$custom-button-padding-y: $custom-spacing-2 !default;
|
|
1983
|
+
$custom-card-padding: $custom-spacing-6 !default;
|
|
1984
|
+
$custom-modal-padding: $custom-spacing-8 !default;
|
|
1985
|
+
|
|
1986
|
+
// Layout spacing
|
|
1987
|
+
$custom-container-padding: $custom-spacing-4 !default;
|
|
1988
|
+
$custom-grid-gap: $custom-spacing-6 !default;
|
|
1989
|
+
$custom-section-spacing: $custom-spacing-16 !default;
|
|
1990
|
+
|
|
1991
|
+
// Export to override defaults
|
|
1992
|
+
$spacing-sizes: (
|
|
1993
|
+
0: $custom-spacing-0,
|
|
1994
|
+
1: $custom-spacing-1,
|
|
1995
|
+
2: $custom-spacing-2,
|
|
1996
|
+
3: $custom-spacing-3,
|
|
1997
|
+
4: $custom-spacing-4,
|
|
1998
|
+
5: $custom-spacing-5,
|
|
1999
|
+
6: $custom-spacing-6,
|
|
2000
|
+
7: $custom-spacing-7,
|
|
2001
|
+
8: $custom-spacing-8,
|
|
2002
|
+
9: $custom-spacing-9,
|
|
2003
|
+
10: $custom-spacing-10,
|
|
2004
|
+
12: $custom-spacing-12,
|
|
2005
|
+
16: $custom-spacing-16,
|
|
2006
|
+
20: $custom-spacing-20,
|
|
2007
|
+
24: $custom-spacing-24,
|
|
2008
|
+
32: $custom-spacing-32,
|
|
2009
|
+
40: $custom-spacing-40,
|
|
2010
|
+
48: $custom-spacing-48,
|
|
2011
|
+
56: $custom-spacing-56,
|
|
2012
|
+
64: $custom-spacing-64,
|
|
2013
|
+
) !default;
|
|
2014
|
+
`;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
function generateTypographyTokens() {
|
|
2018
|
+
return `// Custom Typography Tokens
|
|
2019
|
+
// Generated by Atomix CLI
|
|
2020
|
+
// =============================================================================
|
|
2021
|
+
|
|
2022
|
+
// Font Families
|
|
2023
|
+
$custom-font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
|
|
2024
|
+
$custom-font-family-serif: Georgia, "Times New Roman", Times, serif !default;
|
|
2025
|
+
$custom-font-family-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
|
|
2026
|
+
|
|
2027
|
+
// Font Size Scale
|
|
2028
|
+
$custom-font-size-xs: 0.75rem !default; // 12px
|
|
2029
|
+
$custom-font-size-sm: 0.875rem !default; // 14px
|
|
2030
|
+
$custom-font-size-base: 1rem !default; // 16px
|
|
2031
|
+
$custom-font-size-lg: 1.125rem !default; // 18px
|
|
2032
|
+
$custom-font-size-xl: 1.25rem !default; // 20px
|
|
2033
|
+
$custom-font-size-2xl: 1.5rem !default; // 24px
|
|
2034
|
+
$custom-font-size-3xl: 1.875rem !default; // 30px
|
|
2035
|
+
$custom-font-size-4xl: 2.25rem !default; // 36px
|
|
2036
|
+
$custom-font-size-5xl: 3rem !default; // 48px
|
|
2037
|
+
$custom-font-size-6xl: 3.75rem !default; // 60px
|
|
2038
|
+
$custom-font-size-7xl: 4.5rem !default; // 72px
|
|
2039
|
+
$custom-font-size-8xl: 6rem !default; // 96px
|
|
2040
|
+
|
|
2041
|
+
// Line Heights
|
|
2042
|
+
$custom-line-height-tight: 1.2 !default;
|
|
2043
|
+
$custom-line-height-base: 1.5 !default;
|
|
2044
|
+
$custom-line-height-relaxed: 1.75 !default;
|
|
2045
|
+
$custom-line-height-loose: 2 !default;
|
|
2046
|
+
|
|
2047
|
+
// Font Weights
|
|
2048
|
+
$custom-font-weight-light: 300 !default;
|
|
2049
|
+
$custom-font-weight-normal: 400 !default;
|
|
2050
|
+
$custom-font-weight-medium: 500 !default;
|
|
2051
|
+
$custom-font-weight-semibold: 600 !default;
|
|
2052
|
+
$custom-font-weight-bold: 700 !default;
|
|
2053
|
+
$custom-font-weight-heavy: 800 !default;
|
|
2054
|
+
$custom-font-weight-black: 900 !default;
|
|
2055
|
+
|
|
2056
|
+
// Letter Spacing
|
|
2057
|
+
$custom-letter-spacing-tight: -0.05em !default;
|
|
2058
|
+
$custom-letter-spacing-normal: 0 !default;
|
|
2059
|
+
$custom-letter-spacing-wide: 0.025em !default;
|
|
2060
|
+
$custom-letter-spacing-wider: 0.05em !default;
|
|
2061
|
+
$custom-letter-spacing-widest: 0.1em !default;
|
|
2062
|
+
|
|
2063
|
+
// Heading Sizes
|
|
2064
|
+
$custom-h1-font-size: $custom-font-size-5xl !default;
|
|
2065
|
+
$custom-h2-font-size: $custom-font-size-4xl !default;
|
|
2066
|
+
$custom-h3-font-size: $custom-font-size-3xl !default;
|
|
2067
|
+
$custom-h4-font-size: $custom-font-size-2xl !default;
|
|
2068
|
+
$custom-h5-font-size: $custom-font-size-xl !default;
|
|
2069
|
+
$custom-h6-font-size: $custom-font-size-lg !default;
|
|
2070
|
+
|
|
2071
|
+
// Export to override defaults
|
|
2072
|
+
$font-family-base: $custom-font-family-sans !default;
|
|
2073
|
+
$font-family-monospace: $custom-font-family-mono !default;
|
|
2074
|
+
$font-size-base: $custom-font-size-base !default;
|
|
2075
|
+
$font-size-sm: $custom-font-size-sm !default;
|
|
2076
|
+
$font-size-lg: $custom-font-size-lg !default;
|
|
2077
|
+
$line-height-base: $custom-line-height-base !default;
|
|
2078
|
+
$font-weight-base: $custom-font-weight-normal !default;
|
|
2079
|
+
|
|
2080
|
+
// Heading overrides
|
|
2081
|
+
$h1-font-size: $custom-h1-font-size !default;
|
|
2082
|
+
$h2-font-size: $custom-h2-font-size !default;
|
|
2083
|
+
$h3-font-size: $custom-h3-font-size !default;
|
|
2084
|
+
$h4-font-size: $custom-h4-font-size !default;
|
|
2085
|
+
$h5-font-size: $custom-h5-font-size !default;
|
|
2086
|
+
$h6-font-size: $custom-h6-font-size !default;
|
|
2087
|
+
`;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
function generateShadowTokens() {
|
|
2091
|
+
return `// Custom Box Shadow Tokens
|
|
2092
|
+
// Generated by Atomix CLI
|
|
2093
|
+
// =============================================================================
|
|
2094
|
+
|
|
2095
|
+
// Shadow Colors
|
|
2096
|
+
$custom-shadow-color: rgba(0, 0, 0, 0.1) !default;
|
|
2097
|
+
$custom-shadow-color-dark: rgba(0, 0, 0, 0.2) !default;
|
|
2098
|
+
|
|
2099
|
+
// Shadow Sizes
|
|
2100
|
+
$custom-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !default;
|
|
2101
|
+
$custom-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !default;
|
|
2102
|
+
$custom-shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !default;
|
|
2103
|
+
$custom-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !default;
|
|
2104
|
+
$custom-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !default;
|
|
2105
|
+
$custom-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !default;
|
|
2106
|
+
$custom-shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3) !default;
|
|
2107
|
+
$custom-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !default;
|
|
2108
|
+
$custom-shadow-none: none !default;
|
|
2109
|
+
|
|
2110
|
+
// Component-specific shadows
|
|
2111
|
+
$custom-button-shadow: $custom-shadow-sm !default;
|
|
2112
|
+
$custom-button-shadow-hover: $custom-shadow-md !default;
|
|
2113
|
+
$custom-card-shadow: $custom-shadow-base !default;
|
|
2114
|
+
$custom-dropdown-shadow: $custom-shadow-lg !default;
|
|
2115
|
+
$custom-modal-shadow: $custom-shadow-xl !default;
|
|
2116
|
+
$custom-popover-shadow: $custom-shadow-lg !default;
|
|
2117
|
+
$custom-tooltip-shadow: $custom-shadow-md !default;
|
|
2118
|
+
|
|
2119
|
+
// Dark mode shadows
|
|
2120
|
+
$custom-shadow-xs-dark: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !default;
|
|
2121
|
+
$custom-shadow-sm-dark: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3) !default;
|
|
2122
|
+
$custom-shadow-base-dark: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3) !default;
|
|
2123
|
+
$custom-shadow-lg-dark: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4) !default;
|
|
2124
|
+
$custom-shadow-xl-dark: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !default;
|
|
2125
|
+
|
|
2126
|
+
// Export to override defaults
|
|
2127
|
+
$box-shadow: $custom-shadow-base !default;
|
|
2128
|
+
$box-shadow-xs: $custom-shadow-xs !default;
|
|
2129
|
+
$box-shadow-sm: $custom-shadow-sm !default;
|
|
2130
|
+
$box-shadow-lg: $custom-shadow-lg !default;
|
|
2131
|
+
$box-shadow-xl: $custom-shadow-xl !default;
|
|
2132
|
+
$box-shadow-inset: $custom-shadow-inner !default;
|
|
2133
|
+
|
|
2134
|
+
// Dark mode exports
|
|
2135
|
+
$box-shadow-dark: $custom-shadow-base-dark !default;
|
|
2136
|
+
$box-shadow-xs-dark: $custom-shadow-xs-dark !default;
|
|
2137
|
+
$box-shadow-sm-dark: $custom-shadow-sm-dark !default;
|
|
2138
|
+
$box-shadow-lg-dark: $custom-shadow-lg-dark !default;
|
|
2139
|
+
$box-shadow-xl-dark: $custom-shadow-xl-dark !default;
|
|
2140
|
+
`;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
function generateRadiusTokens() {
|
|
2144
|
+
return `// Custom Border Radius Tokens
|
|
2145
|
+
// Generated by Atomix CLI
|
|
2146
|
+
// =============================================================================
|
|
2147
|
+
|
|
2148
|
+
// Base radius unit
|
|
2149
|
+
$custom-radius-base: 0.25rem !default; // 4px
|
|
2150
|
+
|
|
2151
|
+
// Radius Scale
|
|
2152
|
+
$custom-radius-none: 0 !default;
|
|
2153
|
+
$custom-radius-sm: calc($custom-radius-base * 0.5) !default; // 2px
|
|
2154
|
+
$custom-radius-base: $custom-radius-base !default; // 4px
|
|
2155
|
+
$custom-radius-md: calc($custom-radius-base * 1.5) !default; // 6px
|
|
2156
|
+
$custom-radius-lg: calc($custom-radius-base * 2) !default; // 8px
|
|
2157
|
+
$custom-radius-xl: calc($custom-radius-base * 3) !default; // 12px
|
|
2158
|
+
$custom-radius-2xl: calc($custom-radius-base * 4) !default; // 16px
|
|
2159
|
+
$custom-radius-3xl: calc($custom-radius-base * 6) !default; // 24px
|
|
2160
|
+
$custom-radius-4xl: calc($custom-radius-base * 8) !default; // 32px
|
|
2161
|
+
$custom-radius-full: 9999px !default; // Fully rounded
|
|
2162
|
+
|
|
2163
|
+
// Component-specific radius
|
|
2164
|
+
$custom-button-radius: $custom-radius-md !default;
|
|
2165
|
+
$custom-button-radius-sm: $custom-radius-sm !default;
|
|
2166
|
+
$custom-button-radius-lg: $custom-radius-lg !default;
|
|
2167
|
+
$custom-card-radius: $custom-radius-lg !default;
|
|
2168
|
+
$custom-input-radius: $custom-radius-md !default;
|
|
2169
|
+
$custom-badge-radius: $custom-radius-full !default;
|
|
2170
|
+
$custom-chip-radius: $custom-radius-full !default;
|
|
2171
|
+
$custom-tooltip-radius: $custom-radius-md !default;
|
|
2172
|
+
$custom-modal-radius: $custom-radius-xl !default;
|
|
2173
|
+
$custom-dropdown-radius: $custom-radius-lg !default;
|
|
2174
|
+
|
|
2175
|
+
// Export to override defaults
|
|
2176
|
+
$border-radius: $custom-radius-md !default;
|
|
2177
|
+
$border-radius-sm: $custom-radius-sm !default;
|
|
2178
|
+
$border-radius-lg: $custom-radius-lg !default;
|
|
2179
|
+
$border-radius-xl: $custom-radius-xl !default;
|
|
2180
|
+
$border-radius-xxl: $custom-radius-2xl !default;
|
|
2181
|
+
$border-radius-3xl: $custom-radius-3xl !default;
|
|
2182
|
+
$border-radius-4xl: $custom-radius-4xl !default;
|
|
2183
|
+
$border-radius-pill: $custom-radius-full !default;
|
|
2184
|
+
|
|
2185
|
+
// Component radius exports
|
|
2186
|
+
$btn-border-radius: $custom-button-radius !default;
|
|
2187
|
+
$btn-border-radius-sm: $custom-button-radius-sm !default;
|
|
2188
|
+
$btn-border-radius-lg: $custom-button-radius-lg !default;
|
|
2189
|
+
$card-border-radius: $custom-card-radius !default;
|
|
2190
|
+
$input-border-radius: $custom-input-radius !default;
|
|
2191
|
+
$badge-border-radius: $custom-badge-radius !default;
|
|
2192
|
+
`;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
function generateAnimationTokens() {
|
|
2196
|
+
return `// Custom Animation Tokens
|
|
2197
|
+
// Generated by Atomix CLI
|
|
2198
|
+
// =============================================================================
|
|
2199
|
+
|
|
2200
|
+
// Transition Durations
|
|
2201
|
+
$custom-duration-instant: 0s !default;
|
|
2202
|
+
$custom-duration-fast: 0.15s !default;
|
|
2203
|
+
$custom-duration-base: 0.3s !default;
|
|
2204
|
+
$custom-duration-slow: 0.5s !default;
|
|
2205
|
+
$custom-duration-slower: 0.7s !default;
|
|
2206
|
+
$custom-duration-slowest: 1s !default;
|
|
2207
|
+
|
|
2208
|
+
// Easing Functions
|
|
2209
|
+
$custom-ease-linear: linear !default;
|
|
2210
|
+
$custom-ease-in: cubic-bezier(0.4, 0, 1, 1) !default;
|
|
2211
|
+
$custom-ease-out: cubic-bezier(0, 0, 0.2, 1) !default;
|
|
2212
|
+
$custom-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1) !default;
|
|
2213
|
+
$custom-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55) !default;
|
|
2214
|
+
$custom-ease-smooth: cubic-bezier(0.23, 1, 0.32, 1) !default;
|
|
2215
|
+
|
|
2216
|
+
// Transition Properties
|
|
2217
|
+
$custom-transition-all: all $custom-duration-base $custom-ease-smooth !default;
|
|
2218
|
+
$custom-transition-colors: background-color $custom-duration-base $custom-ease-smooth,
|
|
2219
|
+
border-color $custom-duration-base $custom-ease-smooth,
|
|
2220
|
+
color $custom-duration-base $custom-ease-smooth,
|
|
2221
|
+
fill $custom-duration-base $custom-ease-smooth,
|
|
2222
|
+
stroke $custom-duration-base $custom-ease-smooth !default;
|
|
2223
|
+
$custom-transition-opacity: opacity $custom-duration-base $custom-ease-smooth !default;
|
|
2224
|
+
$custom-transition-shadow: box-shadow $custom-duration-base $custom-ease-smooth !default;
|
|
2225
|
+
$custom-transition-transform: transform $custom-duration-base $custom-ease-smooth !default;
|
|
2226
|
+
|
|
2227
|
+
// Component-specific transitions
|
|
2228
|
+
$custom-button-transition: $custom-transition-colors, $custom-transition-shadow, $custom-transition-transform !default;
|
|
2229
|
+
$custom-link-transition: $custom-transition-colors, text-decoration-color $custom-duration-base $custom-ease-smooth !default;
|
|
2230
|
+
$custom-input-transition: $custom-transition-colors, $custom-transition-shadow !default;
|
|
2231
|
+
$custom-card-transition: $custom-transition-shadow, $custom-transition-transform !default;
|
|
2232
|
+
$custom-modal-transition: $custom-transition-opacity, $custom-transition-transform !default;
|
|
2233
|
+
$custom-dropdown-transition: $custom-transition-opacity, $custom-transition-transform !default;
|
|
2234
|
+
|
|
2235
|
+
// Animation Keyframes (examples)
|
|
2236
|
+
@keyframes custom-fade-in {
|
|
2237
|
+
from { opacity: 0; }
|
|
2238
|
+
to { opacity: 1; }
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
@keyframes custom-slide-in-up {
|
|
2242
|
+
from {
|
|
2243
|
+
transform: translateY(10px);
|
|
2244
|
+
opacity: 0;
|
|
2245
|
+
}
|
|
2246
|
+
to {
|
|
2247
|
+
transform: translateY(0);
|
|
2248
|
+
opacity: 1;
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
@keyframes custom-scale-in {
|
|
2253
|
+
from {
|
|
2254
|
+
transform: scale(0.95);
|
|
2255
|
+
opacity: 0;
|
|
2256
|
+
}
|
|
2257
|
+
to {
|
|
2258
|
+
transform: scale(1);
|
|
2259
|
+
opacity: 1;
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
@keyframes custom-spin {
|
|
2264
|
+
from { transform: rotate(0deg); }
|
|
2265
|
+
to { transform: rotate(360deg); }
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
// Export to override defaults
|
|
2269
|
+
$transition-fast: $custom-transition-all !default;
|
|
2270
|
+
$transition-base: $custom-transition-all !default;
|
|
2271
|
+
$transition-slow: all $custom-duration-slow $custom-ease-smooth !default;
|
|
2272
|
+
|
|
2273
|
+
// Duration exports
|
|
2274
|
+
$transition-duration-fast: $custom-duration-fast !default;
|
|
2275
|
+
$transition-duration-base: $custom-duration-base !default;
|
|
2276
|
+
$transition-duration-slow: $custom-duration-slow !default;
|
|
2277
|
+
|
|
2278
|
+
// Easing exports
|
|
2279
|
+
$easing-base: $custom-ease-smooth !default;
|
|
2280
|
+
$easing-ease-in-out: $custom-ease-in-out !default;
|
|
2281
|
+
$easing-ease-out: $custom-ease-out !default;
|
|
2282
|
+
$easing-ease-in: $custom-ease-in !default;
|
|
2283
|
+
`;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
1422
2286
|
// Parse arguments
|
|
1423
2287
|
program.parse(process.argv);
|
|
1424
2288
|
|