bernova 0.2.0 → 0.2.1
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/CHANGELOG.md +31 -0
- package/README.md +17 -8
- package/dist/bin/declareCssType.js +0 -0
- package/dist/{index.js → index.cjs} +1 -1
- package/dist/index.mjs +14 -0
- package/dist/types/app.d.ts +11 -0
- package/dist/types/constants/compilerType.d.ts +5 -0
- package/dist/types/constants/cssAdvancedSelectors.d.ts +8 -0
- package/dist/types/constants/cssProps.d.ts +276 -0
- package/dist/types/constants/cssPseudoClasses.d.ts +97 -0
- package/dist/types/constants/cssPseudoElements.d.ts +54 -0
- package/dist/types/constants/index.d.ts +7 -0
- package/dist/types/constants/resetCss.d.ts +16 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/lib/compileConfig.d.ts +12 -0
- package/dist/types/lib/compileThemes.d.ts +37 -0
- package/dist/types/lib/copyLocalFonts/copyLocalFonts.utils.d.ts +7 -0
- package/dist/types/lib/copyLocalFonts/generateCssFonts.utils.d.ts +18 -0
- package/dist/types/lib/extractDocFragment/extractDocFragment.utils.d.ts +15 -0
- package/dist/types/lib/fileExists/fileExists.utils.d.ts +13 -0
- package/dist/types/lib/generateBaseCss/generateBaseCss.utils.d.ts +17 -0
- package/dist/types/lib/generateCss/generateCSS.utils.d.ts +12 -0
- package/dist/types/lib/generateCss/helpers/advanceselector/advancedSelectorHandler.utils.d.ts +8 -0
- package/dist/types/lib/generateCss/helpers/attribute/attributeHandler.utils.d.ts +9 -0
- package/dist/types/lib/generateCss/helpers/classnames/formatClassName.utils.d.ts +19 -0
- package/dist/types/lib/generateCss/helpers/classnames/handlerRegister.utils.d.ts +13 -0
- package/dist/types/lib/generateCss/helpers/cssVars/generateVars.utils.d.ts +20 -0
- package/dist/types/lib/generateCss/helpers/dynamicValues/dynamicValues.utils.d.ts +16 -0
- package/dist/types/lib/generateCss/helpers/dynamicValues/processDynamic.utils.d.ts +1 -0
- package/dist/types/lib/generateCss/helpers/filterGenerateCss.utils.d.ts +17 -0
- package/dist/types/lib/generateCss/helpers/foreign/foreignHandler.utils.d.ts +9 -0
- package/dist/types/lib/generateCss/helpers/generateCssStyles.utils.d.ts +14 -0
- package/dist/types/lib/generateCss/helpers/index.d.ts +20 -0
- package/dist/types/lib/generateCss/helpers/mediaqueries/generateMediaQueries.utils.d.ts +1 -0
- package/dist/types/lib/generateCss/helpers/mediaqueries/mediaQueriesHandler.utils.d.ts +7 -0
- package/dist/types/lib/generateCss/helpers/other/declareCssType.utils.d.ts +9 -0
- package/dist/types/lib/generateCss/helpers/other/generateGlobalStyles.utils.d.ts +7 -0
- package/dist/types/lib/generateCss/helpers/pseudo/pseudoHandler.utils.d.ts +8 -0
- package/dist/types/lib/generateCss/helpers/rulename/formatRuleName.utils.d.ts +13 -0
- package/dist/types/lib/generateCss/helpers/utils/extractValues.utils.d.ts +8 -0
- package/dist/types/lib/generateCss/helpers/utils/formattedStatKey.utils.d.ts +17 -0
- package/dist/types/lib/generateCss/helpers/utils/index.d.ts +6 -0
- package/dist/types/lib/generateCss/helpers/utils/processCss.utils.d.ts +10 -0
- package/dist/types/lib/generateCss/helpers/utils/separateStyles.utils.d.ts +13 -0
- package/dist/types/lib/generateCss/helpers/utils/validatePreviouslyExists.utils.d.ts +14 -0
- package/dist/types/lib/generateCssDoc/generateCssDoc.util.d.ts +17 -0
- package/dist/types/lib/generateProvider/generateProvider.utils.d.ts +7 -0
- package/dist/types/lib/generateProvider/template/providerTemplate.d.ts +18 -0
- package/dist/types/lib/generateThemeRegister/generateThemeRegister.utils.d.ts +13 -0
- package/dist/types/lib/generateTools/generateTools.utils.d.ts +24 -0
- package/dist/types/lib/generateTypesTools/generateTypesTools.utils.d.ts +16 -0
- package/dist/types/lib/handlerForeignThemes/handlerForeignThemes.utils.d.ts +12 -0
- package/dist/types/lib/index.d.ts +18 -0
- package/dist/types/lib/processMediaConfig/processMediaConfig.util.d.ts +17 -0
- package/dist/types/lib/readFile/readFile.utils.d.ts +31 -0
- package/dist/types/lib/simplifyName/simplifyName.utils.d.ts +13 -0
- package/dist/types/lib/typingStyles/index.d.ts +2 -0
- package/dist/types/lib/typingStyles/typingStyles.utils.d.ts +3 -0
- package/dist/types/lib/writeDoc/writeDoc.utils.d.ts +8 -0
- package/package.json +38 -33
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ All notable changes to Bernova will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2025-01-30
|
|
9
|
+
|
|
10
|
+
### ✨ New Features
|
|
11
|
+
|
|
12
|
+
- **Modern Build System**: Migrated to Vite 7 with TypeScript configuration for improved build performance
|
|
13
|
+
- **Dual Package Support**: Added ESM (`.mjs`) and CommonJS (`.cjs`) support for better compatibility across different module systems
|
|
14
|
+
- **Custom Build Plugins**: Implemented 4 specialized Vite plugins:
|
|
15
|
+
- `copyCSSPlugin`: Minifies and copies CSS files
|
|
16
|
+
- `copyCLIBinariesPlugin`: Preserves CLI executables with proper shebangs
|
|
17
|
+
- `copySourcePlugin`: Minifies source files with aggressive optimization
|
|
18
|
+
- `removeTestFilesPlugin`: Ensures test files are excluded from distribution
|
|
19
|
+
|
|
20
|
+
### 🚀 Performance Improvements
|
|
21
|
+
|
|
22
|
+
- **Ultra-optimized Bundle**: Reduced package size from 56.4 KB to 41.4 KB (27% reduction)
|
|
23
|
+
- **Aggressive Minification**: Implemented Terser with 3-pass optimization removing all comments
|
|
24
|
+
- **Tree-shaking**: Enhanced dead code elimination for smaller bundles
|
|
25
|
+
- **Zero JSDoc in Distribution**: Removed all TSDoc comments as they're unnecessary for CLI tools
|
|
26
|
+
|
|
27
|
+
### 📚 Documentation
|
|
28
|
+
|
|
29
|
+
- **Professional README**: Added comprehensive badges (npm version, downloads, license, coverage, PRs welcome)
|
|
30
|
+
- **Package Distribution**: Created `.npmignore` to exclude unnecessary files from npm package
|
|
31
|
+
- **Modern Package Exports**: Updated `package.json` with conditional exports for better module resolution
|
|
32
|
+
|
|
33
|
+
### 🔧 Infrastructure
|
|
34
|
+
|
|
35
|
+
- **TypeScript Build Configuration**: Separated development and production TypeScript configs (`tsconfig.build.json`)
|
|
36
|
+
- **Node.js Compatibility**: Maintained Node.js >=20.0.0 target with ES2020 output
|
|
37
|
+
- **Build Validation**: Enhanced CI/CD with proper build verification steps
|
|
38
|
+
|
|
8
39
|
## [0.1.2] - 2025-10-28
|
|
9
40
|
|
|
10
41
|
### 🔧 Changed
|
package/README.md
CHANGED
|
@@ -7,14 +7,23 @@
|
|
|
7
7
|
</a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
<
|
|
11
|
-
<strong>The best way to write CSS with Javascript syntax</strong><br/>
|
|
12
|
-
</p>
|
|
10
|
+
<br />
|
|
13
11
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
<div align="center">
|
|
13
|
+
|
|
14
|
+
[](https://www.npmjs.com/package/bernova)
|
|
15
|
+
[](https://www.npmjs.com/package/bernova)
|
|
16
|
+
[](./LICENSE)
|
|
17
|
+
[](https://github.com/kubit-ui/bernova/stargazers)
|
|
18
|
+
[](https://github.com/kubit-ui/bernova/issues)
|
|
19
|
+
|
|
20
|
+
[](https://www.typescriptlang.org/)
|
|
21
|
+
[](https://nodejs.org/)
|
|
22
|
+
[](https://vitejs.dev/)
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<br />
|
|
18
27
|
|
|
19
28
|
## Related Information
|
|
20
29
|
|
|
@@ -46,7 +55,7 @@
|
|
|
46
55
|
## Installation
|
|
47
56
|
|
|
48
57
|
```bash
|
|
49
|
-
|
|
58
|
+
pnpm add bernova
|
|
50
59
|
```
|
|
51
60
|
|
|
52
61
|
## Configuration
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./lib"),r=require("./constants"),{bernovaStyles:s}=require("./app");module.exports={bernovaStyles:s,...e,...r,lib:e,constants:r};
|
|
1
|
+
"use strict";const e=require("./lib"),r=require("./constants"),{bernovaStyles:s}=require("./app");module.exports={bernovaStyles:s,...e,...r,lib:e,constants:r};
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const lib = require("./lib");
|
|
2
|
+
const constants = require("./constants");
|
|
3
|
+
const { bernovaStyles } = require("./app");
|
|
4
|
+
module.exports = {
|
|
5
|
+
// Main function
|
|
6
|
+
bernovaStyles,
|
|
7
|
+
// Library functions
|
|
8
|
+
...lib,
|
|
9
|
+
// Constants
|
|
10
|
+
...constants,
|
|
11
|
+
// Direct access to modules
|
|
12
|
+
lib,
|
|
13
|
+
constants
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main function to compile Bernova styles based on configuration
|
|
3
|
+
* Processes themes, generates CSS, and creates necessary files for the styling system
|
|
4
|
+
*
|
|
5
|
+
* @param {string} compilerType - The type of compilation to perform:
|
|
6
|
+
* - 'foundationOnly': Generate only foundation styles (variables, base styles)
|
|
7
|
+
* - 'componentOnly': Generate only component/theme styles
|
|
8
|
+
* - 'full': Generate both foundation and component styles (default)
|
|
9
|
+
* @returns {Promise<void>} Resolves when all styles have been compiled and written
|
|
10
|
+
*/
|
|
11
|
+
export function bernovaStyles(compilerType: string): Promise<void>;
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
export namespace cssProps {
|
|
2
|
+
let scrollbar_width: string;
|
|
3
|
+
let scrollbar_color: string;
|
|
4
|
+
let scrollbar_gutter: string;
|
|
5
|
+
let scroll_behavior: string;
|
|
6
|
+
let scroll_margin: string;
|
|
7
|
+
let scroll_padding: string;
|
|
8
|
+
let scroll_snap_align: string;
|
|
9
|
+
let scroll_snap_stop: string;
|
|
10
|
+
let scroll_snap_type: string;
|
|
11
|
+
let webkit_scrollbar: string;
|
|
12
|
+
let scroll_container: string;
|
|
13
|
+
let scrollbar_aria_role: string;
|
|
14
|
+
let background: string;
|
|
15
|
+
let background_color: string;
|
|
16
|
+
let background_image: string;
|
|
17
|
+
let background_position: string;
|
|
18
|
+
let background_repeat: string;
|
|
19
|
+
let background_size: string;
|
|
20
|
+
let background_attachment: string;
|
|
21
|
+
let background_blend_mode: string;
|
|
22
|
+
let background_clip: string;
|
|
23
|
+
let background_origin: string;
|
|
24
|
+
let border: string;
|
|
25
|
+
let border_top: string;
|
|
26
|
+
let border_right: string;
|
|
27
|
+
let border_bottom: string;
|
|
28
|
+
let border_left: string;
|
|
29
|
+
let border_radius: string;
|
|
30
|
+
let border_width: string;
|
|
31
|
+
let border_left_width: string;
|
|
32
|
+
let border_right_width: string;
|
|
33
|
+
let border_top_width: string;
|
|
34
|
+
let border_bottom_width: string;
|
|
35
|
+
let border_color: string;
|
|
36
|
+
let border_left_color: string;
|
|
37
|
+
let border_right_color: string;
|
|
38
|
+
let border_top_color: string;
|
|
39
|
+
let border_bottom_color: string;
|
|
40
|
+
let border_top_left_radius: string;
|
|
41
|
+
let border_top_right_radius: string;
|
|
42
|
+
let border_bottom_left_radius: string;
|
|
43
|
+
let border_bottom_right_radius: string;
|
|
44
|
+
let border_style: string;
|
|
45
|
+
let border_left_style: string;
|
|
46
|
+
let border_top_style: string;
|
|
47
|
+
let border_right_style: string;
|
|
48
|
+
let border_bottom_style: string;
|
|
49
|
+
let outline: string;
|
|
50
|
+
let outline_style: string;
|
|
51
|
+
let outline_color: string;
|
|
52
|
+
let outline_width: string;
|
|
53
|
+
let outline_offset: string;
|
|
54
|
+
let display: string;
|
|
55
|
+
let opacity: string;
|
|
56
|
+
let visibility: string;
|
|
57
|
+
let overflow: string;
|
|
58
|
+
let overflow_x: string;
|
|
59
|
+
let overflow_y: string;
|
|
60
|
+
let overflow_block: string;
|
|
61
|
+
let overflow_inline: string;
|
|
62
|
+
let overflow_clip_margin: string;
|
|
63
|
+
let flex: string;
|
|
64
|
+
let flex_direction: string;
|
|
65
|
+
let flex_wrap: string;
|
|
66
|
+
let flex_flow: string;
|
|
67
|
+
let flex_grow: string;
|
|
68
|
+
let flex_shrink: string;
|
|
69
|
+
let flex_basis: string;
|
|
70
|
+
let justify_content: string;
|
|
71
|
+
let justify_items: string;
|
|
72
|
+
let align_items: string;
|
|
73
|
+
let align_self: string;
|
|
74
|
+
let align_content: string;
|
|
75
|
+
let order: string;
|
|
76
|
+
let gap: string;
|
|
77
|
+
let row_gap: string;
|
|
78
|
+
let column_gap: string;
|
|
79
|
+
let grid: string;
|
|
80
|
+
let grid_area: string;
|
|
81
|
+
let grid_template: string;
|
|
82
|
+
let grid_template_areas: string;
|
|
83
|
+
let grid_template_rows: string;
|
|
84
|
+
let grid_template_columns: string;
|
|
85
|
+
let grid_row: string;
|
|
86
|
+
let grid_row_start: string;
|
|
87
|
+
let grid_row_end: string;
|
|
88
|
+
let grid_column: string;
|
|
89
|
+
let grid_column_start: string;
|
|
90
|
+
let grid_column_end: string;
|
|
91
|
+
let grid_gap: string;
|
|
92
|
+
let grid_row_gap: string;
|
|
93
|
+
let grid_column_gap: string;
|
|
94
|
+
let grid_auto_flow: string;
|
|
95
|
+
let grid_auto_rows: string;
|
|
96
|
+
let grid_auto_columns: string;
|
|
97
|
+
let margin: string;
|
|
98
|
+
let margin_left: string;
|
|
99
|
+
let margin_right: string;
|
|
100
|
+
let margin_top: string;
|
|
101
|
+
let margin_bottom: string;
|
|
102
|
+
let padding: string;
|
|
103
|
+
let padding_left: string;
|
|
104
|
+
let padding_right: string;
|
|
105
|
+
let padding_top: string;
|
|
106
|
+
let padding_bottom: string;
|
|
107
|
+
let box_sizing: string;
|
|
108
|
+
let box_shadow: string;
|
|
109
|
+
let width: string;
|
|
110
|
+
let min_width: string;
|
|
111
|
+
let max_width: string;
|
|
112
|
+
let height: string;
|
|
113
|
+
let min_height: string;
|
|
114
|
+
let max_height: string;
|
|
115
|
+
let position: string;
|
|
116
|
+
let top: string;
|
|
117
|
+
let right: string;
|
|
118
|
+
let bottom: string;
|
|
119
|
+
let left: string;
|
|
120
|
+
let z_index: string;
|
|
121
|
+
let float: string;
|
|
122
|
+
let clear: string;
|
|
123
|
+
let transform: string;
|
|
124
|
+
let transform_origin: string;
|
|
125
|
+
let transform_style: string;
|
|
126
|
+
let translate: string;
|
|
127
|
+
let font: string;
|
|
128
|
+
let font_family: string;
|
|
129
|
+
let font_size: string;
|
|
130
|
+
let font_weight: string;
|
|
131
|
+
let font_style: string;
|
|
132
|
+
let font_variant: string;
|
|
133
|
+
let font_stretch: string;
|
|
134
|
+
let font_size_adjust: string;
|
|
135
|
+
let font_synthesis: string;
|
|
136
|
+
let font_feature_settings: string;
|
|
137
|
+
let font_kerning: string;
|
|
138
|
+
let font_language_override: string;
|
|
139
|
+
let font_optical_sizing: string;
|
|
140
|
+
let font_variant_alternates: string;
|
|
141
|
+
let font_variant_caps: string;
|
|
142
|
+
let font_variant_east_asian: string;
|
|
143
|
+
let font_variant_ligatures: string;
|
|
144
|
+
let font_variant_numeric: string;
|
|
145
|
+
let font_variant_position: string;
|
|
146
|
+
let line_height: string;
|
|
147
|
+
let letter_spacing: string;
|
|
148
|
+
let text_align: string;
|
|
149
|
+
let text_decoration: string;
|
|
150
|
+
let text_transform: string;
|
|
151
|
+
let white_space: string;
|
|
152
|
+
let word_break: string;
|
|
153
|
+
let word_wrap: string;
|
|
154
|
+
let text_overflow: string;
|
|
155
|
+
let text_shadow: string;
|
|
156
|
+
let text_indent: string;
|
|
157
|
+
let text_justify: string;
|
|
158
|
+
let text_orientation: string;
|
|
159
|
+
let text_rendering: string;
|
|
160
|
+
let text_size_adjust: string;
|
|
161
|
+
let text_combine_upright: string;
|
|
162
|
+
let text_emphasis: string;
|
|
163
|
+
let text_emphasis_color: string;
|
|
164
|
+
let text_emphasis_position: string;
|
|
165
|
+
let text_emphasis_style: string;
|
|
166
|
+
let text_decoration_color: string;
|
|
167
|
+
let text_decoration_line: string;
|
|
168
|
+
let text_decoration_skip: string;
|
|
169
|
+
let text_decoration_skip_ink: string;
|
|
170
|
+
let text_decoration_style: string;
|
|
171
|
+
let text_underline_position: string;
|
|
172
|
+
let list_style: string;
|
|
173
|
+
let list_style_type: string;
|
|
174
|
+
let list_style_position: string;
|
|
175
|
+
let list_style_image: string;
|
|
176
|
+
let color: string;
|
|
177
|
+
let accent_color: string;
|
|
178
|
+
let cursor: string;
|
|
179
|
+
let pointer_events: string;
|
|
180
|
+
let vertical_align: string;
|
|
181
|
+
let inset: string;
|
|
182
|
+
let inset_block: string;
|
|
183
|
+
let inset_block_start: string;
|
|
184
|
+
let inset_block_end: string;
|
|
185
|
+
let inset_inline: string;
|
|
186
|
+
let inset_inline_start: string;
|
|
187
|
+
let inset_inline_end: string;
|
|
188
|
+
let transition: string;
|
|
189
|
+
let transition_property: string;
|
|
190
|
+
let transition_duration: string;
|
|
191
|
+
let transition_timing_function: string;
|
|
192
|
+
let transition_delay: string;
|
|
193
|
+
let animation: string;
|
|
194
|
+
let animation_name: string;
|
|
195
|
+
let animation_duration: string;
|
|
196
|
+
let animation_timing_function: string;
|
|
197
|
+
let animation_delay: string;
|
|
198
|
+
let animation_iteration_count: string;
|
|
199
|
+
let animation_direction: string;
|
|
200
|
+
let animation_fill_mode: string;
|
|
201
|
+
let animation_play_state: string;
|
|
202
|
+
let animation_timeline: string;
|
|
203
|
+
let appearance: string;
|
|
204
|
+
let user_select: string;
|
|
205
|
+
let aspect_ratio: string;
|
|
206
|
+
let resize: string;
|
|
207
|
+
let caret: string;
|
|
208
|
+
let caret_animation: string;
|
|
209
|
+
let caret_shape: string;
|
|
210
|
+
let caret_color: string;
|
|
211
|
+
let backdrop_filter: string;
|
|
212
|
+
let backface_visibility: string;
|
|
213
|
+
let block_size: string;
|
|
214
|
+
let writing_mode: string;
|
|
215
|
+
let break_before: string;
|
|
216
|
+
let break_after: string;
|
|
217
|
+
let break_inside: string;
|
|
218
|
+
let clip: string;
|
|
219
|
+
let clip_path: string;
|
|
220
|
+
let clip_rule: string;
|
|
221
|
+
let filter: string;
|
|
222
|
+
let float_offset: string;
|
|
223
|
+
let float_defer: string;
|
|
224
|
+
let hyphens: string;
|
|
225
|
+
let image_rendering: string;
|
|
226
|
+
let image_orientation: string;
|
|
227
|
+
let image_resolution: string;
|
|
228
|
+
let isolation: string;
|
|
229
|
+
let mix_blend_mode: string;
|
|
230
|
+
let object_fit: string;
|
|
231
|
+
let object_position: string;
|
|
232
|
+
let overscroll_behavior: string;
|
|
233
|
+
let overscroll_behavior_x: string;
|
|
234
|
+
let overscroll_behavior_y: string;
|
|
235
|
+
let perspective: string;
|
|
236
|
+
let perspective_origin: string;
|
|
237
|
+
let scroll_snap_margin: string;
|
|
238
|
+
let caption_side: string;
|
|
239
|
+
let empty_cells: string;
|
|
240
|
+
let fill: string;
|
|
241
|
+
let fill_rule: string;
|
|
242
|
+
let flood_color: string;
|
|
243
|
+
let flood_opacity: string;
|
|
244
|
+
let lighting_color: string;
|
|
245
|
+
let marker_end: string;
|
|
246
|
+
let marker_mid: string;
|
|
247
|
+
let marker_start: string;
|
|
248
|
+
let shape_rendering: string;
|
|
249
|
+
let stop_color: string;
|
|
250
|
+
let stop_opacity: string;
|
|
251
|
+
let stroke: string;
|
|
252
|
+
let stroke_dasharray: string;
|
|
253
|
+
let stroke_dashoffset: string;
|
|
254
|
+
let stroke_linecap: string;
|
|
255
|
+
let stroke_linejoin: string;
|
|
256
|
+
let stroke_miterlimit: string;
|
|
257
|
+
let stroke_opacity: string;
|
|
258
|
+
let mask: string;
|
|
259
|
+
let mask_type: string;
|
|
260
|
+
let mask_image: string;
|
|
261
|
+
let mask_mode: string;
|
|
262
|
+
let mask_repeat: string;
|
|
263
|
+
let mask_position: string;
|
|
264
|
+
let mask_clip: string;
|
|
265
|
+
let mask_origin: string;
|
|
266
|
+
let mask_size: string;
|
|
267
|
+
let mask_composite: string;
|
|
268
|
+
let mask_border: string;
|
|
269
|
+
let mask_border_source: string;
|
|
270
|
+
let mask_border_mode: string;
|
|
271
|
+
let mask_border_slice: string;
|
|
272
|
+
let mask_border_width: string;
|
|
273
|
+
let mask_border_outset: string;
|
|
274
|
+
let mask_border_repeat: string;
|
|
275
|
+
let $content: string;
|
|
276
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export namespace cssPseudoClasses {
|
|
2
|
+
export let fullscreen: string;
|
|
3
|
+
export let modal: string;
|
|
4
|
+
export let picture_in_picture: string;
|
|
5
|
+
export let autofill: string;
|
|
6
|
+
export let enabled: string;
|
|
7
|
+
export let disabled: string;
|
|
8
|
+
export let read_only: string;
|
|
9
|
+
export let read_write: string;
|
|
10
|
+
export let placeholder_shown: string;
|
|
11
|
+
let _default: string;
|
|
12
|
+
export { _default as default };
|
|
13
|
+
export let checked: string;
|
|
14
|
+
export let indeterminate: string;
|
|
15
|
+
export let blank: string;
|
|
16
|
+
export let valid: string;
|
|
17
|
+
export let invalid: string;
|
|
18
|
+
export let in_range: string;
|
|
19
|
+
export let out_of_range: string;
|
|
20
|
+
export let required: string;
|
|
21
|
+
export let optional: string;
|
|
22
|
+
export let user_valid: string;
|
|
23
|
+
export let user_invalid: string;
|
|
24
|
+
export let dir: string;
|
|
25
|
+
export let lang: string;
|
|
26
|
+
export let any_link: string;
|
|
27
|
+
export let link: string;
|
|
28
|
+
export let visited: string;
|
|
29
|
+
export let local_link: string;
|
|
30
|
+
export let target: string;
|
|
31
|
+
export let target_within: string;
|
|
32
|
+
export let scope: string;
|
|
33
|
+
export let playing: string;
|
|
34
|
+
export let paused: string;
|
|
35
|
+
export let current: string;
|
|
36
|
+
export let past: string;
|
|
37
|
+
export let future: string;
|
|
38
|
+
export let root: string;
|
|
39
|
+
export let empty: string;
|
|
40
|
+
export let nth_child: string;
|
|
41
|
+
export let nth_last_child: string;
|
|
42
|
+
export let first_child: string;
|
|
43
|
+
export let last_child: string;
|
|
44
|
+
export let only_child: string;
|
|
45
|
+
export let nth_of_type: string;
|
|
46
|
+
export let nth_last_of_type: string;
|
|
47
|
+
export let first_of_type: string;
|
|
48
|
+
export let last_of_type: string;
|
|
49
|
+
export let only_of_type: string;
|
|
50
|
+
export let active: string;
|
|
51
|
+
export let focus: string;
|
|
52
|
+
export let focus_visible: string;
|
|
53
|
+
export let focus_within: string;
|
|
54
|
+
export let hover: string;
|
|
55
|
+
export let is: string;
|
|
56
|
+
export let not: string;
|
|
57
|
+
export let where: string;
|
|
58
|
+
export let has: string;
|
|
59
|
+
export let nth_col: string;
|
|
60
|
+
export let nth_last_col: string;
|
|
61
|
+
export let host: string;
|
|
62
|
+
export let host_context: string;
|
|
63
|
+
export let defined: string;
|
|
64
|
+
export let moz_any: string;
|
|
65
|
+
export let moz_any_link: string;
|
|
66
|
+
export let moz_focusring: string;
|
|
67
|
+
export let moz_full_screen: string;
|
|
68
|
+
export let moz_full_screen_ancestor: string;
|
|
69
|
+
export let moz_full_screen_document: string;
|
|
70
|
+
export let moz_full_screen_element: string;
|
|
71
|
+
export let moz_full_screen_root: string;
|
|
72
|
+
export let moz_placeholder: string;
|
|
73
|
+
export let moz_read_only: string;
|
|
74
|
+
export let moz_read_write: string;
|
|
75
|
+
export let moz_submit_invalid: string;
|
|
76
|
+
export let moz_ui_invalid: string;
|
|
77
|
+
export let moz_ui_valid: string;
|
|
78
|
+
export let webkit_any: string;
|
|
79
|
+
export let webkit_any_link: string;
|
|
80
|
+
export let webkit_autofill: string;
|
|
81
|
+
export let webkit_current: string;
|
|
82
|
+
export let webkit_full_screen: string;
|
|
83
|
+
export let webkit_full_screen_ancestor: string;
|
|
84
|
+
export let webkit_full_screen_document: string;
|
|
85
|
+
export let webkit_full_screen_element: string;
|
|
86
|
+
export let webkit_full_screen_root: string;
|
|
87
|
+
export let webkit_input_placeholder: string;
|
|
88
|
+
export let webkit_read_only: string;
|
|
89
|
+
export let webkit_read_write: string;
|
|
90
|
+
export let webkit_scrollbar: string;
|
|
91
|
+
export let webkit_scrollbar_button: string;
|
|
92
|
+
export let webkit_scrollbar_thumb: string;
|
|
93
|
+
export let webkit_scrollbar_track: string;
|
|
94
|
+
export let webkit_scrollbar_track_piece: string;
|
|
95
|
+
export let webkit_search_cancel_button: string;
|
|
96
|
+
export let webkit_search_results_button: string;
|
|
97
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export namespace cssPseudoElements {
|
|
2
|
+
let before: string;
|
|
3
|
+
let after: string;
|
|
4
|
+
let first_letter: string;
|
|
5
|
+
let first_line: string;
|
|
6
|
+
let selection: string;
|
|
7
|
+
let backdrop: string;
|
|
8
|
+
let placeholder: string;
|
|
9
|
+
let marker: string;
|
|
10
|
+
let spelling_error: string;
|
|
11
|
+
let grammar_error: string;
|
|
12
|
+
let cue: string;
|
|
13
|
+
let cue_region: string;
|
|
14
|
+
let part: string;
|
|
15
|
+
let slotted: string;
|
|
16
|
+
let file_selector_button: string;
|
|
17
|
+
let target_text: string;
|
|
18
|
+
let highlight: string;
|
|
19
|
+
let moz_color_swatch: string;
|
|
20
|
+
let moz_focus_inner: string;
|
|
21
|
+
let moz_list_bullet: string;
|
|
22
|
+
let moz_list_number: string;
|
|
23
|
+
let moz_meter_bar: string;
|
|
24
|
+
let moz_progress_bar: string;
|
|
25
|
+
let moz_range_progress: string;
|
|
26
|
+
let moz_range_thumb: string;
|
|
27
|
+
let moz_range_track: string;
|
|
28
|
+
let webkit_inner_spin_button: string;
|
|
29
|
+
let webkit_meter_even_less_good_value: string;
|
|
30
|
+
let webkit_meter_inner_element: string;
|
|
31
|
+
let webkit_meter_optimum_value: string;
|
|
32
|
+
let webkit_meter_suboptimum_value: string;
|
|
33
|
+
let webkit_progress_bar: string;
|
|
34
|
+
let webkit_progress_inner_element: string;
|
|
35
|
+
let webkit_progress_value: string;
|
|
36
|
+
let webkit_scrollbar: string;
|
|
37
|
+
let webkit_scrollbar_button: string;
|
|
38
|
+
let webkit_scrollbar_thumb: string;
|
|
39
|
+
let webkit_scrollbar_track: string;
|
|
40
|
+
let webkit_scrollbar_track_piece: string;
|
|
41
|
+
let webkit_search_cancel_button: string;
|
|
42
|
+
let webkit_search_results_button: string;
|
|
43
|
+
let webkit_slider_runnable_track: string;
|
|
44
|
+
let webkit_slider_thumb: string;
|
|
45
|
+
let webkit_resizer: string;
|
|
46
|
+
let webkit_input_placeholder: string;
|
|
47
|
+
let placeholder_shown: string;
|
|
48
|
+
let autofill: string;
|
|
49
|
+
let progress_value: string;
|
|
50
|
+
let progress_bar: string;
|
|
51
|
+
let meter_optimum: string;
|
|
52
|
+
let meter_suboptimum: string;
|
|
53
|
+
let meter_sub_suboptimum: string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { cssAdvancedSelectors } from './cssAdvancedSelectors.js';
|
|
2
|
+
import { cssProps } from './cssProps.js';
|
|
3
|
+
import { cssPseudoClasses } from './cssPseudoClasses.js';
|
|
4
|
+
import { cssPseudoElements } from './cssPseudoElements.js';
|
|
5
|
+
import { resetCss } from './resetCss.js';
|
|
6
|
+
import { compilerTypeValid } from './compilerType.js';
|
|
7
|
+
export { cssAdvancedSelectors, cssProps, cssPseudoClasses, cssPseudoElements, resetCss, compilerTypeValid };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Reset for Bernova
|
|
3
|
+
*
|
|
4
|
+
* Provides a comprehensive CSS reset that normalizes default browser styles.
|
|
5
|
+
* Based on modern reset principles, ensures consistent cross-browser rendering.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Removes default margins and padding
|
|
9
|
+
* - Sets consistent box-sizing
|
|
10
|
+
* - Normalizes form elements
|
|
11
|
+
* - Resets list styles
|
|
12
|
+
* - Standardizes table presentation
|
|
13
|
+
*
|
|
14
|
+
* This reset is optional and can be enabled via the `resetCss` flag in theme configuration.
|
|
15
|
+
*/
|
|
16
|
+
export const resetCss: "\nhtml {\n margin: 0;\n padding: 0;\n vertical-align: baseline;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0;\n margin-inline-end: 0;\n box-sizing: border-box;\n background-color: transparent;\n border: 0;\n}\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo,\ndialog,\ninput,\nbutton {\n margin: 0;\n padding: 0;\n vertical-align: baseline;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0;\n margin-inline-end: 0;\n box-sizing: border-box;\n background-color: transparent;\n border: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\nsection {\n display: block;\n}\nbody {\n line-height: 1;\n}\nol,\nul {\n list-style: none;\n}\nblockquote,\nq {\n quotes: none;\n}\nblockquote::before,\nblockquote::after,\nq::before,\nq::after {\n content: \"\";\n content: none;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\n@supports (font: -apple-system-body) {\n html {\n font: -apple-system-body;\n }\n}\n@supports (font: system-ui) {\n html {\n font: system-ui;\n }\n}\n";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Type definitions for Bernova
|
|
2
|
+
export interface BernovaConfig {
|
|
3
|
+
themes: any[];
|
|
4
|
+
provider?: {
|
|
5
|
+
path: string;
|
|
6
|
+
name: string;
|
|
7
|
+
declarationHelp?: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BernovaTheme {
|
|
12
|
+
name: string;
|
|
13
|
+
stylesPath?: string;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Main Bernova function
|
|
18
|
+
export function bernovaStyles(compilerType?: string): Promise<void>;
|
|
19
|
+
|
|
20
|
+
// Library exports
|
|
21
|
+
export const lib: any;
|
|
22
|
+
export const constants: any;
|
|
23
|
+
|
|
24
|
+
// Default export
|
|
25
|
+
declare const bernova: {
|
|
26
|
+
bernovaStyles: typeof bernovaStyles;
|
|
27
|
+
lib: typeof lib;
|
|
28
|
+
constants: typeof constants;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default bernova;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compiles and validates the Bernova configuration from bernova.config.json
|
|
3
|
+
* Sets up TypeScript path mapping if configured
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} params - The parameters object
|
|
6
|
+
* @param {string} params.dir - The project directory containing the configuration file
|
|
7
|
+
* @returns {Promise<Object>} Configuration object containing themes and provider settings
|
|
8
|
+
* @throws {Error} When configuration file is invalid or missing
|
|
9
|
+
*/
|
|
10
|
+
export function compileConfig({ dir }: {
|
|
11
|
+
dir: string;
|
|
12
|
+
}): Promise<any>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compiles a theme configuration by loading and validating theme files
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} params - Compilation parameters
|
|
5
|
+
* @param {Object} params.themeConfig - Theme configuration object
|
|
6
|
+
* @param {string} params.themeConfig.name - Theme name (defaults to 'bernova')
|
|
7
|
+
* @param {string} params.themeConfig.prefix - CSS variable prefix
|
|
8
|
+
* @param {Object} params.themeConfig.theme - Theme styles configuration
|
|
9
|
+
* @param {Object} params.themeConfig.foundations - Foundation styles configuration
|
|
10
|
+
* @param {Object} params.themeConfig.globalStyles - Global styles configuration
|
|
11
|
+
* @param {Object} params.themeConfig.mediaQueries - Media queries configuration
|
|
12
|
+
* @param {string} params.themeConfig.stylesPath - Output path for generated styles
|
|
13
|
+
* @param {Array} params.themeConfig.fonts - Font configurations
|
|
14
|
+
* @param {boolean} params.themeConfig.resetCss - Whether to include CSS reset
|
|
15
|
+
* @param {Object} params.themeConfig.bvTools - Development tools configuration
|
|
16
|
+
* @param {Object} params.themeConfig.typesTools - TypeScript tools configuration
|
|
17
|
+
* @param {Array} params.themeConfig.foreignThemes - External theme integrations
|
|
18
|
+
* @param {string} params.dir - Base directory for resolving relative paths
|
|
19
|
+
* @returns {Object} Compiled theme data and configuration
|
|
20
|
+
*/
|
|
21
|
+
export function compileThemes({ themeConfig: { name, prefix, theme, foundations, globalStyles, mediaQueries, stylesPath, fonts, resetCss, bvTools, typesTools, foreignThemes, }, dir, }: {
|
|
22
|
+
themeConfig: {
|
|
23
|
+
name: string;
|
|
24
|
+
prefix: string;
|
|
25
|
+
theme: any;
|
|
26
|
+
foundations: any;
|
|
27
|
+
globalStyles: any;
|
|
28
|
+
mediaQueries: any;
|
|
29
|
+
stylesPath: string;
|
|
30
|
+
fonts: any[];
|
|
31
|
+
resetCss: boolean;
|
|
32
|
+
bvTools: any;
|
|
33
|
+
typesTools: any;
|
|
34
|
+
foreignThemes: any[];
|
|
35
|
+
};
|
|
36
|
+
dir: string;
|
|
37
|
+
}): any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copies local font files to the output directory.
|
|
3
|
+
*
|
|
4
|
+
* @param {Array} localFonts - The local fonts configuration.
|
|
5
|
+
* @param {string} outputDir - The output directory.
|
|
6
|
+
*/
|
|
7
|
+
export function copyLocalFonts(localFonts: any[], outputDir: string): Promise<void>;
|