bernova 0.3.0 → 1.0.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 +24 -1
- package/README.md +72 -4
- package/dist/bin/bernova.js +1 -1
- package/dist/bin/buildstyle.js +1 -1
- package/dist/bin/createConfigFile.js +1 -1
- package/dist/bin/declareCssType.js +1 -1
- package/dist/index.mjs +14 -1
- package/dist/src/app.js +1 -1
- package/dist/src/constants/compilerType.js +1 -1
- package/dist/src/constants/cssAdvancedSelectors.js +1 -1
- package/dist/src/constants/cssProps.js +1 -1
- package/dist/src/constants/cssPseudoClasses.js +1 -1
- package/dist/src/constants/cssPseudoElements.js +1 -1
- package/dist/src/constants/index.js +1 -1
- package/dist/src/constants/resetCss.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/lib/buildRelativePath/buildRelativePath.utils.js +1 -0
- package/dist/src/lib/compileConfig.js +1 -1
- package/dist/src/lib/compileThemes.js +1 -1
- package/dist/src/lib/copyLocalFonts/copyLocalFonts.utils.js +1 -1
- package/dist/src/lib/copyLocalFonts/generateCssFonts.utils.js +1 -1
- package/dist/src/lib/extractDocFragment/extractDocFragment.utils.js +1 -1
- package/dist/src/lib/fileExists/fileExists.utils.js +1 -1
- package/dist/src/lib/generateBaseCss/generateBaseCss.utils.js +1 -1
- package/dist/src/lib/generateCss/generateCSS.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/advanceselector/advancedSelectorHandler.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/attribute/attributeHandler.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/classnames/formatClassName.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/classnames/handlerRegister.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/cssVars/generateVars.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/dynamicValues/dynamicValues.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/dynamicValues/processDynamic.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/filterGenerateCss.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/foreign/foreignHandler.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/generateCssStyles.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/index.js +1 -1
- package/dist/src/lib/generateCss/helpers/mediaqueries/generateMediaQueries.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/mediaqueries/mediaQueriesHandler.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/other/declareCssType.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/other/generateGlobalStyles.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/pseudo/pseudoHandler.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/rulename/formatRuleName.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/utils/extractValues.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/utils/formattedStatKey.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/utils/index.js +1 -1
- package/dist/src/lib/generateCss/helpers/utils/processCss.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/utils/separateStyles.utils.js +1 -1
- package/dist/src/lib/generateCss/helpers/utils/validatePreviouslyExists.utils.js +1 -1
- package/dist/src/lib/generateCssDoc/generateCssDoc.util.js +1 -1
- package/dist/src/lib/generateProvider/generateProvider.utils.js +1 -1
- package/dist/src/lib/generateProvider/template/providerTemplate.js +1 -1
- package/dist/src/lib/generateThemeRegister/generateThemeRegister.utils.js +1 -1
- package/dist/src/lib/generateTools/generateTools.utils.js +1 -1
- package/dist/src/lib/generateTypesTools/generateTypesTools.utils.js +1 -1
- package/dist/src/lib/handlerForeignThemes/handlerForeignThemes.utils.js +1 -1
- package/dist/src/lib/index.js +1 -1
- package/dist/src/lib/processMediaConfig/processMediaConfig.util.js +1 -1
- package/dist/src/lib/readFile/readFile.utils.js +1 -1
- package/dist/src/lib/simplifyName/simplifyName.utils.js +1 -1
- package/dist/src/lib/typingStyles/index.js +1 -1
- package/dist/src/lib/typingStyles/typingStyles.utils.js +1 -1
- package/dist/src/lib/writeDoc/writeDoc.utils.js +1 -1
- 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 -29
- package/dist/types/lib/buildRelativePath/buildRelativePath.utils.d.ts +12 -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 +17 -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 +13 -0
- package/dist/types/lib/index.d.ts +19 -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 +61 -75
- package/src/app.js +187 -0
- package/src/constants/__tests__/compilerType.test.js +20 -0
- package/src/constants/__tests__/cssAdvancedSelectors.test.js +38 -0
- package/src/constants/__tests__/cssProps.test.js +331 -0
- package/src/constants/__tests__/cssPseudoClasses.test.js +48 -0
- package/src/constants/compilerType.js +14 -0
- package/src/constants/cssAdvancedSelectors.js +32 -0
- package/src/constants/cssProps.js +325 -0
- package/src/constants/cssPseudoClasses.js +138 -0
- package/src/constants/cssPseudoElements.js +83 -0
- package/src/constants/index.js +15 -0
- package/src/constants/resetCss.js +171 -0
- package/src/index.d.ts +31 -0
- package/src/index.js +20 -0
- package/src/lib/buildRelativePath/buildRelativePath.utils.js +30 -0
- package/src/lib/compileConfig.js +59 -0
- package/src/lib/compileThemes.js +118 -0
- package/src/lib/copyLocalFonts/copyLocalFonts.utils.js +42 -0
- package/src/lib/copyLocalFonts/generateCssFonts.utils.js +56 -0
- package/src/lib/extractDocFragment/extractDocFragment.utils.js +27 -0
- package/src/lib/fileExists/fileExists.utils.js +31 -0
- package/src/lib/generateBaseCss/generateBaseCss.utils.js +51 -0
- package/src/lib/generateCss/generateCSS.utils.js +42 -0
- package/src/lib/generateCss/helpers/advanceselector/advancedSelectorHandler.utils.js +22 -0
- package/src/lib/generateCss/helpers/attribute/attributeHandler.utils.js +47 -0
- package/src/lib/generateCss/helpers/classnames/formatClassName.utils.js +28 -0
- package/src/lib/generateCss/helpers/classnames/handlerRegister.utils.js +124 -0
- package/src/lib/generateCss/helpers/cssVars/generateVars.utils.js +73 -0
- package/src/lib/generateCss/helpers/dynamicValues/dynamicValues.utils.js +72 -0
- package/src/lib/generateCss/helpers/dynamicValues/processDynamic.utils.js +10 -0
- package/src/lib/generateCss/helpers/filterGenerateCss.utils.js +73 -0
- package/src/lib/generateCss/helpers/foreign/foreignHandler.utils.js +85 -0
- package/src/lib/generateCss/helpers/generateCssStyles.utils.js +249 -0
- package/src/lib/generateCss/helpers/index.js +53 -0
- package/src/lib/generateCss/helpers/mediaqueries/generateMediaQueries.utils.js +9 -0
- package/src/lib/generateCss/helpers/mediaqueries/mediaQueriesHandler.utils.js +181 -0
- package/src/lib/generateCss/helpers/other/declareCssType.utils.js +120 -0
- package/src/lib/generateCss/helpers/other/generateGlobalStyles.utils.js +30 -0
- package/src/lib/generateCss/helpers/pseudo/pseudoHandler.utils.js +56 -0
- package/src/lib/generateCss/helpers/rulename/formatRuleName.utils.js +163 -0
- package/src/lib/generateCss/helpers/utils/extractValues.utils.js +44 -0
- package/src/lib/generateCss/helpers/utils/formattedStatKey.utils.js +43 -0
- package/src/lib/generateCss/helpers/utils/index.js +15 -0
- package/src/lib/generateCss/helpers/utils/processCss.utils.js +93 -0
- package/src/lib/generateCss/helpers/utils/separateStyles.utils.js +43 -0
- package/src/lib/generateCss/helpers/utils/validatePreviouslyExists.utils.js +65 -0
- package/src/lib/generateCssDoc/generateCssDoc.util.js +47 -0
- package/src/lib/generateProvider/generateProvider.utils.js +283 -0
- package/src/lib/generateProvider/template/providerTemplate.d.ts +60 -0
- package/src/lib/generateProvider/template/providerTemplate.js +161 -0
- package/src/lib/generateThemeRegister/generateThemeRegister.utils.js +136 -0
- package/src/lib/generateTools/generateTools.utils.js +181 -0
- package/src/lib/generateTypesTools/generateTypesTools.utils.js +59 -0
- package/src/lib/handlerForeignThemes/handlerForeignThemes.utils.js +104 -0
- package/src/lib/index.js +63 -0
- package/src/lib/processMediaConfig/processMediaConfig.util.js +32 -0
- package/src/lib/readFile/readFile.utils.js +112 -0
- package/src/lib/simplifyName/__tests__/simplifyName.utils.test.js +87 -0
- package/src/lib/simplifyName/simplifyName.utils.js +28 -0
- package/src/lib/typingStyles/index.js +3 -0
- package/src/lib/typingStyles/typingStyles.utils.js +144 -0
- package/src/lib/writeDoc/writeDoc.utils.js +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,30 @@ 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.
|
|
8
|
+
## [1.0.1] - 2026-01-12
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Semantic problem solved**: change target for targets
|
|
13
|
+
|
|
14
|
+
### Documentatation
|
|
15
|
+
|
|
16
|
+
- **Added the bernova build script example**: Added the bv-build example.
|
|
17
|
+
- **Added the instalation examples with anothers packages manager**: Added examples for `'npm'` and `'yarn`
|
|
18
|
+
|
|
19
|
+
## [1.0.0] - 2026-01-08
|
|
20
|
+
|
|
21
|
+
### New Features
|
|
22
|
+
|
|
23
|
+
- **Improve library styles and tools build/dist**: Complete the buildStyle.js cli function.
|
|
24
|
+
- **Improve provider router hanler**: Improve the Bernova provider for handler relative doc routes.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Fixed the doc routes**: Change the absolute routes for relative routes into provides's stats.
|
|
29
|
+
- **Fixed Error in partial transpilation**: Fixed the function for the flags --foundationsOnly and --componentsOnly.
|
|
30
|
+
|
|
31
|
+
## [0.3.0] - 2026-01-01
|
|
9
32
|
|
|
10
33
|
### ✨ New Features
|
|
11
34
|
|
package/README.md
CHANGED
|
@@ -51,11 +51,21 @@
|
|
|
51
51
|
- [Multi themes](#using-multi-themes)
|
|
52
52
|
- [Provider](#library-provider)
|
|
53
53
|
- [Foreign CSS documents](#foreign-css-documents)
|
|
54
|
+
- [Compiler Options](#compiler-options)
|
|
54
55
|
|
|
55
56
|
## Installation
|
|
56
57
|
|
|
58
|
+
You can install Bernova using your preferred package manager:
|
|
59
|
+
|
|
57
60
|
```bash
|
|
61
|
+
# Using npm
|
|
62
|
+
npm install bernova
|
|
63
|
+
|
|
64
|
+
# Using yarn
|
|
58
65
|
yarn add bernova
|
|
66
|
+
|
|
67
|
+
# Using pnpm (recommended)
|
|
68
|
+
pnpm add bernova
|
|
59
69
|
```
|
|
60
70
|
|
|
61
71
|
## Configuration
|
|
@@ -645,7 +655,7 @@ const BUTTON = {
|
|
|
645
655
|
},
|
|
646
656
|
hover: {
|
|
647
657
|
background_color: '#e94141',
|
|
648
|
-
}
|
|
658
|
+
},
|
|
649
659
|
focus: {
|
|
650
660
|
border_color: '#0000ff',
|
|
651
661
|
}
|
|
@@ -1485,7 +1495,10 @@ The tools generated by the library are in JavaScript format, but they have decla
|
|
|
1485
1495
|
{
|
|
1486
1496
|
//... rest of the config
|
|
1487
1497
|
"typesTools": {
|
|
1488
|
-
"stylesTypes": {
|
|
1498
|
+
"stylesTypes": {
|
|
1499
|
+
"name": "stylesTypes",
|
|
1500
|
+
"path": "./src/styles/types"
|
|
1501
|
+
},
|
|
1489
1502
|
"componentsTypes": {
|
|
1490
1503
|
"name": "componentsTypes",
|
|
1491
1504
|
"path": "./src/styles/default/tools"
|
|
@@ -1746,12 +1759,12 @@ You probably already have CSS documents with highly customized rules and want to
|
|
|
1746
1759
|
"name": "theme-1",
|
|
1747
1760
|
"foreignThemes": [
|
|
1748
1761
|
{
|
|
1749
|
-
"
|
|
1762
|
+
"position": "before",
|
|
1750
1763
|
"name": "teams",
|
|
1751
1764
|
"path": "./fixture/teams.css"
|
|
1752
1765
|
},
|
|
1753
1766
|
{
|
|
1754
|
-
"
|
|
1767
|
+
"position": "after",
|
|
1755
1768
|
"name": "reset",
|
|
1756
1769
|
"path": "./fixture/reset.css"
|
|
1757
1770
|
}
|
|
@@ -1785,3 +1798,58 @@ export const LOGIN_BUTTON = {
|
|
|
1785
1798
|
background_color: ThemeProvider.variables.color_teams_primary, // <-- This is from ':root' into teams.css document
|
|
1786
1799
|
};
|
|
1787
1800
|
```
|
|
1801
|
+
|
|
1802
|
+
## Compiler Options
|
|
1803
|
+
|
|
1804
|
+
There is a script provided by the library to generate a build/dist bundler is:
|
|
1805
|
+
|
|
1806
|
+
```bash
|
|
1807
|
+
npx bv-build
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
When publishing our projects, depending of the packager configuration, it is necessary to move static files or other types of documents not originalle included. Bernova manages the files necessary for proper operation in production.
|
|
1811
|
+
|
|
1812
|
+
```json
|
|
1813
|
+
{
|
|
1814
|
+
// ...rest of the config
|
|
1815
|
+
"compilerOptions": {
|
|
1816
|
+
"baseOutDir": "./dist",
|
|
1817
|
+
"rootDir": "./src",
|
|
1818
|
+
"minifyCss": true,
|
|
1819
|
+
"minifyJS": true,
|
|
1820
|
+
"preventMoveJS": false,
|
|
1821
|
+
"preventMoveDTS": false,
|
|
1822
|
+
"types": ["cjs", "esm"],
|
|
1823
|
+
"customOutDirs": {
|
|
1824
|
+
"css": "./custom/outdir/css",
|
|
1825
|
+
"provider": "./custom/outdir/provider",
|
|
1826
|
+
"tools": "./custom/outdir/tools"
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
// ...rest of the config
|
|
1830
|
+
}
|
|
1831
|
+
```
|
|
1832
|
+
|
|
1833
|
+
### Compiler Options Properties
|
|
1834
|
+
|
|
1835
|
+
- **baseOutDir**: Specifies the base output directory where all compiled files will be placed. This is the root folder for your distribution files.
|
|
1836
|
+
|
|
1837
|
+
- **rootDir**: Defines the root directory of your source code. Used as a reference point to maintain the relative structure of the files when copying them to the output directory.
|
|
1838
|
+
|
|
1839
|
+
- **minifyCss**: When set to `true`, CSS files will be minified to reduce file size. The minified files will have the `.min.css` extension.
|
|
1840
|
+
|
|
1841
|
+
- **minifyJS**: When set to `true`, JavaScript files will be minified using Terser. This reduces file size by compressing the code, removing dead code, and dropping debbuger statements.
|
|
1842
|
+
|
|
1843
|
+
- **preventMoveJS**: When set to `true`, JavaScript file will remain in their original location instead of being copied to the output directory. Useful if you want to manage JS file separately.
|
|
1844
|
+
|
|
1845
|
+
- **preventMoveDTS**: When set to `true`, TypeScript declaration files (.d.ts) will not be copied to the output directory. Set this to `true` if you're handling type definitions through another process.
|
|
1846
|
+
|
|
1847
|
+
- **types**: An array that specifies the module formats to generate. Accepts `"cjs"` (Commonjs) and/or `"esm"` (ES Modules). For each type specified, Bernova will create a separate folder and transpile the code accordingly.
|
|
1848
|
+
|
|
1849
|
+
- `"cjs"`: Generate CommonJS modules for node.js compability.
|
|
1850
|
+
- `"esm"`: Generate ES Modules for modern JavaScript environments
|
|
1851
|
+
|
|
1852
|
+
- **customOutDirs**: An optional object that allows you to specify custom output directories for different file types, overriding the default structure:
|
|
1853
|
+
- `"css"`: Custom output path for CSS files
|
|
1854
|
+
- `"provider"`: Custom output path for provider file
|
|
1855
|
+
- `"tools"`: Custom output path for tools files (cssVars, cssClasses, etc)
|
package/dist/bin/bernova.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const{bernovaStyles:
|
|
2
|
+
const{bernovaStyles:e}=require("../src/app.js"),{compilerTypeValid:r}=require("../src/constants/compilerType.js");(async()=>{const{default:o}=await import("ora"),s=o("Starting Bernova compilation process...").start();try{const o=(process.argv.find(e=>e===`--${r.full}`||e===`--${r.foundationOnly}`||e===`--${r.componentOnly}`)||`--${r.full}`).replace("--","");await e(o),s.succeed("Bernova compilation process completed successfully.")}catch(e){s.fail("An error occurred during the Bernova compilation process."),console.error("Error details:",e.message),process.exit(1)}})();
|
package/dist/bin/buildstyle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const e=require("fs").promises,s=require("path"),t=require("@babel/core"),{minify:a}=require("terser"),{extractDocFragment:r,writeDoc:n,fileExists:o,readConfigData:i,buildRelativePath:c}=require("../src/lib");async function m({baseOutPath:t,jsFile:a,rootDir:i,customOutDirs:m,dir:l,minifyJS:p,preventMoveJS:f,provider:d,type:y=""}){const b=s.resolve(l,a.path,a.name);if(!o(l,b))return void console.error(`File not found: ${b}`);let D=await e.readFile(b,"utf8");if("stats.js"===a.name&&m?.css){const e=r({section:"CssThemes",doc:D}),t=e.replace(/export const cssThemes\s*=\s*/,""),a=new Function(`return (${t})`)(),n=s.relative(i||"",d.path),o=v({cssThemes:a,cssOutPath:c({from:s.resolve(n),to:s.resolve(l,m.css)})});D=D.replace(e,`export const cssThemes = {\n${o}};\n`)}"cjs"===y&&(D=await u(D,b,!0)),"esm"===y&&(D=await u(D,b)),p&&(D=await h(D));const O=s.relative(i||"",a.path),g=f?b:s.resolve(t,O,a.name);await n(g,D,a.name)}async function l({baseOutPath:t,cssFiles:a,rootDir:r,customOutDirs:i,dir:c}){for(const m of a){const a=(()=>r&&i?.css?s.relative(r,m.path):i?.css?i.css:m.path)(),l=s.resolve(c,m.path,m.name);if(o(c,l)){const r=await e.readFile(l,"utf8");await n(s.resolve(t,a,m.name),r,m.name)}}}function p({baseOutDir:e,type:t="-"}){const a=(()=>{switch(t){case"cjs":return"cjs";case"esm":return"esm";default:return""}})();return s.join(e,a)}async function u(e,s,a=!1){const r=!!a&&"commonjs";return(await t.transformAsync(e,{filename:s,presets:[["@babel/preset-env",{modules:r,targets:{node:"current"}}]]})).code}async function h(e){return(await a(e,{compress:{dead_code:!0,drop_console:!1,drop_debugger:!0,keep_classnames:!1,keep_fargs:!0,keep_fnames:!1,keep_infinity:!1},mangle:{toplevel:!1},format:{comments:!1}})).code}function f({themes:e,minifyCss:t}){return e&&Array.isArray(e)&&e.length>0?e.reduce((e,a)=>{const{name:r,stylesPath:n,foreignThemes:o}=a;r&&n&&y(e,{name:t?`${r}.min.css`:`${r}.css`,path:n}),o&&Array.isArray(o)&&o.length>0&&o.forEach(t=>{const a=s.basename(t),r=t.replace(a,"").trim();y(e,{name:a,path:r})})},[]):[]}function d({provider:e,themes:s,preventMoveDTS:t=!1}){const a=s&&s.bvTools?s.reduce((e,{bvTools:s})=>{const{path:a,declarationHelp:r,cssVariables:n,cssClassNames:o,cssMediaQueries:i,cssGlobalStyles:c,availableComponents:m}=s,l=r&&!t;return n&&(y(e,{name:"cssVars.js",path:a}),l&&y(e,{name:"cssVars.d.ts",path:a})),o&&(y(e,{name:"cssClasses.js",path:a}),l&&y(e,{name:"cssClasses.d.ts",path:a})),i&&(y(e,{name:"cssMediaQueries.js",path:a}),l&&y(e,{name:"cssMediaQueries.d.ts",path:a})),c&&(y(e,{name:"cssGlobalStyles.js",path:a}),l&&y(e,{name:"cssGlobalStyles.d.ts",path:a})),m&&(y(e,{name:"cssAvailableComponents.js",path:a}),l&&y(e,{name:"cssAvailableComponents.d.js",path:a})),e},[]):[];return e&&(y(a,{name:`${e.name.toLocaleLowerCase()}.js`,path:e.path}),y(a,{name:"stats.js",path:`${e.path}/stats`}),e.declarationHelp&&!t&&(y(a,{name:`${e.name.toLocaleLowerCase()}.d.ts`,path:e.path}),y(a,{name:"stats.d.ts",path:`${e.path}/stats`}))),a}function v({cssThemes:e,cssOutPath:t}){return Object.entries(e).reduce((e,[a,{foreign:r}])=>{const{before:n,after:o}=r;n&&Array.isArray(n)&&n.length>0&&n.reduce((e,a,r)=>{const n=s.basename(a);return r>0&&(e+=", "),e+`'${t}${n}'`},""),o&&Array.isArray(o)&&o.length>0&&o.reduce((e,a,r)=>{const n=s.basename(a);return r>0&&(e+=", "),e+`'${t}${n}'`},"")},"")}function y(e,s){e.some(e=>e.name===s.name&&e.path===s.path)||e.push(s)}(async()=>{const e=process.cwd(),t=await i(s.resolve(e,"bernova.config.json")),{compilerOptions:a,provider:r,themes:n}=t;a&&r&&n||(console.error("Invalid configuration: Missing compilerOptions, themes or provider"),process.exit(1));const{baseOutDir:o,rootDir:c,minifyCss:u,minifyJS:h,preventMoveJS:v,preventMoveDTS:y,types:b,customOutDirs:D}=a,O=f({themes:n,minifyCss:u}),g=d({provider:r,themes:n,preventMoveDTS:y});if(b&&Array.isArray(b)&&b.length>0)for(const s of b){const t=p({baseOutDir:o,type:s});if(O&&O.length>0&&await l({baseOutPath:t,cssFiles:O,rootDir:c,customOutDirs:D,dir:e}),g&&g.length>0)for(const a of g)await m({baseOutPath:t,jsFile:a,rootDir:c,customOutDirs:D,dir:e,minifyJS:h,preventMoveJS:v,provider:r,type:s})}else{const s=p({baseOutDir:o});if(O&&O.length>0&&await l({baseOutPath:s,cssFiles:O,rootDir:c,customOutDirs:D,dir:e}),g&&g.length>0)for(const t of g)await m({baseOutPath:s,jsFile:t,rootDir:c,customOutDirs:D,dir:e,minifyJS:h,preventMoveJS:v,provider:r})}})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const e=require("fs").promises,t=require("path"),s={themes:[{name:"default",foundations:{name:"FOUNDATIONS",path:"./src/design/foundations.ts"},theme:{name:"BERNOVA_STYLES",path:"./src/design/theme.ts"},globalStyles:{name:"GLOBAL_STYLES",path:"./src/design/globalStyles.ts"},mediaQueries:{name:"MEDIA_QUERIES",path:"./src/design/mediaQueries.ts"},resetCss:!1,prefix:"kb",stylesPath:"./src/styles/default"}]},o=t.resolve(process.cwd(),"bernova.config.json"),a=async(t,s)=>{const{default:o}=await import("ora"),a=o("Creating Bernova configuration file...").start();try{try{return await e.access(t),void a.warn("Configuration file already exists. Skipping creation.")}catch{}const o=JSON.stringify(s,null,2);await e.writeFile(t,o,"utf8"),a.succeed(`Configuration file created successfully at: ${t}`),console.log("\nNext steps:"),console.log("1. Edit the configuration file to match your project structure"),console.log("2. Create the specified design files (foundations.ts, theme.ts, etc.)"),console.log('3. Run "bernova" to compile your styles')}catch(e){a.fail("Failed to create configuration file."),console.error("Error details:",e.message),process.exit(1)}};a(o,s);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s=require("path"),{cssProps:e,cssPseudoClasses:t,cssPseudoElements:n,cssAdvancedSelectors:p}=require("../src/constants/index.js"),{writeDoc:i}=require("../src/lib/writeDoc/writeDoc.utils.js"),y=async()=>{const y=`type LibExtendsType = {\n $extends?: string; \n};\ntype LibRecycleType = {\n $recycle?: string; \n};\ntype ForeignType = {\n $foreign?: { [key: string]: { [key: string]: CssPropsType & CssPseudoJoinedType & CssAddicionalTypes } }; \n};\ntype CssPropsType = LibExtendsType & LibRecycleType & ForeignType & {\n${Object.keys(e).map(s=>`${s}?: string;`).join("\n")}\n}\ntype CssAdvancedSelectorsType = {\n${Object.keys(p).map(s=>`${s}?: CssPropsType & { $target: string }`).join("\n")}\n}\ntype CssPseudoJoinedType = { $pseudoClasses?: CssPseudoClassesType;\n$pseudoElements?: CssPseudoElementsType;\n}\ntype CssAddicionalTypes = {\n$advancedSelectors?: CssAdvancedSelectorsType[];\n $mediaQueries?: MediaQueriesType;\n}\ntype CssPseudoClassesType = {\n${Object.keys(t).map(s=>`${s}?: CssPropsType & { $target?: string } & CssAddicionalTypes & { $attributes?: CssAttributesType } | CssPseudoElementsType & CssAddicionalTypes & { $attributes?: CssAttributesType } | CssPseudoClassesType & CssAddicionalTypes & { $attributes?: CssAttributesType };`).join("\n")}\n}\ntype CssPseudoElementsType = {\n${Object.keys(n).map(s=>`${s}?: CssPropsType & CssAddicionalTypes & { $attributes?: CssAttributesType } | CssPseudoElementsType & CssAddicionalTypes & { $attributes?: CssAttributesType } | CssPseudoClassesType & CssAddicionalTypes & { $attributes?: CssAttributesType };`).join("\n")}\n}\ntype CssAttributesType = {\n [key: string]: CssPropsType & CssAddicionalTypes & CssPseudoJoinedType | {\n [key: string]: CssPropsType & CssAddicionalTypes & CssPseudoJoinedType \n};\n}\nexport type CssGeneratorType = CssPropsType & {\n$pseudoClasses?: CssPseudoClassesType;\n$pseudoElements?: CssPseudoElementsType;\n$mediaQueries?: MediaQueriesType;\n$attributes?: CssAttributesType;\n$advancedSelectors?: CssAdvancedSelectorsType[];\n}\n`,o=s.resolve(__dirname,"../types/generatorType.ts");await i(o,y,"TypeScript declarations"),console.log("✅ TypeScript type definitions generated successfully"),console.log(`📝 Types written to: ${o}`)};y().catch(s=>{console.error("❌ Failed to generate TypeScript declarations:",s.message),process.exit(1)});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
const
|
|
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
|
+
};
|
package/dist/src/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=require("path"),{generateBaseCss:s,compileThemes:o,generateCSS:t,compileConfig:r,writeDoc:i,generateProvider:a,processMediaConfig:l,generateThemeRegister:n,generateCssDoc:c,handlerForeignThemes:d,buildRelativePath:f}=require("./lib"),{validatePreviouslyExists:m,processCssWithPostcss:p}=require("./lib/generateCss/helpers"),{compilerTypeValid:g}=require("./constants"),{generateTypesTools:u}=require("./lib/generateTypesTools/generateTypesTools.utils"),{generateTools:h}=require("./lib/generateTools/generateTools.utils");async function y(y){const T=process.cwd(),v={},{default:D}=await import("ora"),C=D("Starting BernovaStyled process...").start(),{themes:b,provider:w}=await r({dir:T});for(const r of b){const{themeCss:a,fonts:D,resetCss:b,bvTools:$,name:P,stylesPath:S,typesTools:q,foreignThemes:x,prefix:B}=o({themeConfig:r,dir:T}),E=await s({fonts:D,resetCss:b,stylesPath:S}),{theme:F,media:N=[],...R}=a,V=(()=>{switch(y){case g.foundationOnly:return R;case g.componentOnly:return{theme:F,media:N};default:return a}})(),{stylesCss:H,foundationsCss:M,stylesDocs:O,rootDocs:W,globalDocs:j}=await t({source:V,baseCss:E,compilerType:y,prefix:B}),A=S?e.resolve(T,S):e.resolve(T,"styles"),{cssDir:G,cssMinifiedDir:k,oldData:z}=await m({stylesDir:A,compilerType:y,name:P}),I=c({compilerType:y,stylesCss:H,foundationsCss:M,oldData:z}),J=await p(I,!1,null),K=await p(I,!0,null);C.start(`Writing CSS to file for theme: ${P}...`),await i(G,J,"css"),await i(k,K,"css minified"),C.succeed(`CSS written to file for theme: ${P}.`),C.start(`Compiling register for theme: ${P}...`),C.succeed(`Register compiled for theme: ${P}.`),C.start("Verifying types tools..."),q?(C.succeed(`Types tools verified for theme: ${P}.`),await u({dir:T,typesTools:q,mediaConfig:N,stylesDocs:O})):C.succeed(`No types tools found for theme: ${P}.`);const L=N?l({mediaConfig:N}):null;if(C.start(`Processing bvTools for theme: ${P}...`),$?(C.succeed(`bvTools found for theme: ${P}.`),await h({bvTools:$,compilerType:y,name:P,dir:T,stylesDir:A,stylesDocs:O,rootDocs:W,globalDocs:j,mediaDocs:L})):C.succeed(`No bvTools found for theme: ${P}.`),w){C.start(`Generating theme register for theme: ${P}...`);const s=e.resolve(w.path),o=f({from:s,to:e.join(A,`${P}.css`)}),{themeByPosition:t,variablesExtracted:r,classesExtracted:i}=await d({dir:T,providerDir:s,foreignThemes:x});v[P]=n({cssPath:o,rootDocs:W,stylesDocs:O,globalDocs:j,mediaDocs:L,foreignStyles:i,foreignVars:r,foreignBeforeFiles:t.before,foreignAfterFiles:t.after}),C.succeed(`Theme register generated for provider for theme: ${P}`)}}w&&(C.start("Provider configuration found, generating tools..."),await a({dir:e.resolve(T,w.path),providerDocs:v,declarationHelp:w.declarationHelp,providerName:w.name,compilerType:y}),C.succeed("Provider tools generated successfully."))}module.exports={bernovaStyles:y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n={foundationOnly:"foundationOnly",componentOnly:"componentOnly",full:"full"};module.exports={compilerTypeValid:n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c={adjacent:" + ",child:" > ",descendant:" ",near:" ~ ",concat:"",column:" || "};module.exports={cssAdvancedSelectors:c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t={scrollbar_width:"scrollbar-width",scrollbar_color:"scrollbar-color",scrollbar_gutter:"scrollbar-gutter",scroll_behavior:"scroll-behavior",scroll_margin:"scroll-margin",scroll_padding:"scroll-padding",scroll_snap_align:"scroll-snap-align",scroll_snap_stop:"scroll-snap-stop",scroll_snap_type:"scroll-snap-type",webkit_scrollbar:"webkit-scrollbar",scroll_container:"scroll-container",scrollbar_aria_role:"scrollbar-aria-role",background:"background",background_color:"background-color",background_image:"background-image",background_position:"background-position",background_repeat:"background-repeat",background_size:"background-size",background_attachment:"background-attachment",background_blend_mode:"background-blend-mode",background_clip:"background-clip",background_origin:"background-origin",border:"border",border_top:"border-top",border_right:"border-right",border_bottom:"border-bottom",border_left:"border-left",border_radius:"border-radius",border_width:"border-width",border_left_width:"border-left-width",border_right_width:"border-right-width",border_top_width:"border-top-width",border_bottom_width:"border-bottom-width",border_color:"border-color",border_left_color:"border-left-color",border_right_color:"border-right-color",border_top_color:"border-top-color",border_bottom_color:"border-bottom-color",border_top_left_radius:"border-top-left-radius",border_top_right_radius:"border-top-right-radius",border_bottom_left_radius:"border-bottom-left-radius",border_bottom_right_radius:"border-bottom-right-radius",border_style:"border-style",border_left_style:"border-left-style",border_top_style:"border-top-style",border_right_style:"border-right-style",border_bottom_style:"border-bottom-style",outline:"outline",outline_style:"outline-style",outline_color:"outline-color",outline_width:"outline-width",outline_offset:"outline-offset",display:"display",opacity:"opacity",visibility:"visibility",overflow:"overflow",overflow_x:"overflow-x",overflow_y:"overflow-y",overflow_block:"overflow-block",overflow_inline:"overflow-inline",overflow_clip_margin:"overflow-clip-margin",flex:"flex",flex_direction:"flex-direction",flex_wrap:"flex-wrap",flex_flow:"flex-flow",flex_grow:"flex-grow",flex_shrink:"flex-shrink",flex_basis:"flex-basis",justify_content:"justify-content",justify_items:"justify-items",align_items:"align-items",align_self:"align-self",align_content:"align-content",order:"order",gap:"gap",row_gap:"row-gap",column_gap:"column-gap",grid:"grid",grid_area:"grid-area",grid_template:"grid-template",grid_template_areas:"grid-template-areas",grid_template_rows:"grid-template-rows",grid_template_columns:"grid-template-columns",grid_row:"grid-row",grid_row_start:"grid-row-start",grid_row_end:"grid-row-end",grid_column:"grid-column",grid_column_start:"grid-column-start",grid_column_end:"grid-column-end",grid_gap:"grid-gap",grid_row_gap:"grid-row-gap",grid_column_gap:"grid-column-gap",grid_auto_flow:"grid-auto-flow",grid_auto_rows:"grid-auto-rows",grid_auto_columns:"grid-auto-columns",margin:"margin",margin_left:"margin-left",margin_right:"margin-right",margin_top:"margin-top",margin_bottom:"margin-bottom",padding:"padding",padding_left:"padding-left",padding_right:"padding-right",padding_top:"padding-top",padding_bottom:"padding-bottom",box_sizing:"box-sizing",box_shadow:"box-shadow",width:"width",min_width:"min-width",max_width:"max-width",height:"height",min_height:"min-height",max_height:"max-height",position:"position",top:"top",right:"right",bottom:"bottom",left:"left",z_index:"z-index",float:"float",clear:"clear",transform:"transform",transform_origin:"transform-origin",transform_style:"transform-style",translate:"translate",font:"font",font_family:"font-family",font_size:"font-size",font_weight:"font-weight",font_style:"font-style",font_variant:"font-variant",font_stretch:"font-stretch",font_size_adjust:"font-size-adjust",font_synthesis:"font-synthesis",font_feature_settings:"font-feature-settings",font_kerning:"font-kerning",font_language_override:"font-language-override",font_optical_sizing:"font-optical-sizing",font_variant_alternates:"font-variant-alternates",font_variant_caps:"font-variant-caps",font_variant_east_asian:"font-variant-east-asian",font_variant_ligatures:"font-variant-ligatures",font_variant_numeric:"font-variant-numeric",font_variant_position:"font-variant-position",line_height:"line-height",letter_spacing:"letter-spacing",text_align:"text-align",text_decoration:"text-decoration",text_transform:"text-transform",white_space:"white-space",word_break:"word-break",word_wrap:"word-wrap",text_overflow:"text-overflow",text_shadow:"text-shadow",text_indent:"text-indent",text_justify:"text-justify",text_orientation:"text-orientation",text_rendering:"text-rendering",text_size_adjust:"text-size-adjust",text_combine_upright:"text-combine-upright",text_emphasis:"text-emphasis",text_emphasis_color:"text-emphasis-color",text_emphasis_position:"text-emphasis-position",text_emphasis_style:"text-emphasis-style",text_decoration_color:"text-decoration-color",text_decoration_line:"text-decoration-line",text_decoration_skip:"text-decoration-skip",text_decoration_skip_ink:"text-decoration-skip-ink",text_decoration_style:"text-decoration-style",text_underline_position:"text-underline-position",list_style:"list-style",list_style_type:"list-style-type",list_style_position:"list-style-position",list_style_image:"list-style-image",color:"color",accent_color:"accent-color",cursor:"cursor",pointer_events:"pointer-events",vertical_align:"vertical-align",inset:"inset",inset_block:"inset-block",inset_block_start:"inset-block-start",inset_block_end:"inset-block-end",inset_inline:"inset-inline",inset_inline_start:"inset-inline-start",inset_inline_end:"inset-inline-end",transition:"transition",transition_property:"transition-property",transition_duration:"transition-duration",transition_timing_function:"transition-timing-function",transition_delay:"transition-delay",animation:"animation",animation_name:"animation-name",animation_duration:"animation-duration",animation_timing_function:"animation-timing-function",animation_delay:"animation-delay",animation_iteration_count:"animation-iteration-count",animation_direction:"animation-direction",animation_fill_mode:"animation-fill-mode",animation_play_state:"animation-play-state",animation_timeline:"animation-timeline",appearance:"appearance",user_select:"user-select",aspect_ratio:"aspect-ratio",resize:"resize",caret:"caret",caret_animation:"caret-animation",caret_shape:"caret-shape",caret_color:"caret-color",backdrop_filter:"backdrop-filter",backface_visibility:"backface-visibility",block_size:"block-size",writing_mode:"writing-mode",break_before:"break-before",break_after:"break-after",break_inside:"break-inside",clip:"clip",clip_path:"clip-path",clip_rule:"clip-rule",filter:"filter",float_offset:"float-offset",float_defer:"float-defer",hyphens:"hyphens",image_rendering:"image-rendering",image_orientation:"image-orientation",image_resolution:"image-resolution",isolation:"isolation",mix_blend_mode:"mix-blend-mode",object_fit:"object-fit",object_position:"object-position",overscroll_behavior:"overscroll-behavior",overscroll_behavior_x:"overscroll-behavior-x",overscroll_behavior_y:"overscroll-behavior-y",perspective:"perspective",perspective_origin:"perspective-origin",scroll_snap_margin:"scroll-snap-margin",scroll_snap_align:"scroll-snap-align",caption_side:"caption-side",empty_cells:"empty-cells",fill:"fill",fill_rule:"fill-rule",flood_color:"flood-color",flood_opacity:"flood-opacity",lighting_color:"lighting-color",marker_end:"marker-end",marker_mid:"marker-mid",marker_start:"marker-start",shape_rendering:"shape-rendering",stop_color:"stop-color",stop_opacity:"stop-opacity",stroke:"stroke",stroke_dasharray:"stroke-dasharray",stroke_dashoffset:"stroke-dashoffset",stroke_linecap:"stroke-linecap",stroke_linejoin:"stroke-linejoin",stroke_miterlimit:"stroke-miterlimit",stroke_opacity:"stroke-opacity",mask:"mask",mask_type:"mask-type",mask_image:"mask-image",mask_mode:"mask-mode",mask_repeat:"mask-repeat",mask_position:"mask-position",mask_clip:"mask-clip",mask_origin:"mask-origin",mask_size:"mask-size",mask_composite:"mask-composite",mask_border:"mask-border",mask_border_source:"mask-border-source",mask_border_mode:"mask-border-mode",mask_border_slice:"mask-border-slice",mask_border_width:"mask-border-width",mask_border_outset:"mask-border-outset",mask_border_repeat:"mask-border-repeat",$content:"content"};module.exports={cssProps:t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e={fullscreen:"fullscreen",modal:"modal",picture_in_picture:"picture-in-picture",autofill:"autofill",enabled:"enabled",disabled:"disabled",read_only:"read-only",read_write:"read-write",placeholder_shown:"placeholder-shown",default:"default",checked:"checked",indeterminate:"indeterminate",blank:"blank",valid:"valid",invalid:"invalid",in_range:"in-range",out_of_range:"out-of-range",required:"required",optional:"optional",user_valid:"user-valid",user_invalid:"user-invalid",dir:"dir",lang:"lang",any_link:"any-link",link:"link",visited:"visited",local_link:"local-link",target:"target",target_within:"target-within",scope:"scope",playing:"playing",paused:"paused",current:"current",past:"past",future:"future",root:"root",empty:"empty",nth_child:"nth-child",nth_last_child:"nth-last-child",first_child:"first-child",last_child:"last-child",only_child:"only-child",nth_of_type:"nth-of-type",nth_last_of_type:"nth-last-of-type",first_of_type:"first-of-type",last_of_type:"last-of-type",only_of_type:"only-of-type",active:"active",focus:"focus",focus_visible:"focus-visible",focus_within:"focus-within",hover:"hover",is:"is",not:"not",where:"where",has:"has",user_valid:"user-valid",user_invalid:"user-invalid",nth_col:"nth-col",nth_last_col:"nth-last-col",host:"host",host_context:"host-context",defined:"defined",moz_any:"-moz-any",moz_any_link:"-moz-any-link",moz_focusring:"-moz-focusring",moz_full_screen:"-moz-full-screen",moz_full_screen_ancestor:"-moz-full-screen-ancestor",moz_full_screen_document:"-moz-full-screen-document",moz_full_screen_element:"-moz-full-screen-element",moz_full_screen_root:"-moz-full-screen-root",moz_placeholder:"-moz-placeholder",moz_read_only:"-moz-read-only",moz_read_write:"-moz-read-write",moz_submit_invalid:"-moz-submit-invalid",moz_ui_invalid:"-moz-ui-invalid",moz_ui_valid:"-moz-ui-valid",webkit_any:"-webkit-any",webkit_any_link:"-webkit-any-link",webkit_autofill:"-webkit-autofill",webkit_current:"-webkit-current",webkit_full_screen:"-webkit-full-screen",webkit_full_screen_ancestor:"-webkit-full-screen-ancestor",webkit_full_screen_document:"-webkit-full-screen-document",webkit_full_screen_element:"-webkit-full-screen-element",webkit_full_screen_root:"-webkit-full-screen-root",webkit_input_placeholder:"-webkit-input-placeholder",webkit_read_only:"-webkit-read-only",webkit_read_write:"-webkit-read-write",webkit_scrollbar:"-webkit-scrollbar",webkit_scrollbar_button:"-webkit-scrollbar-button",webkit_scrollbar_thumb:"-webkit-scrollbar-thumb",webkit_scrollbar_track:"-webkit-scrollbar-track",webkit_scrollbar_track_piece:"-webkit-scrollbar-track-piece",webkit_search_cancel_button:"-webkit-search-cancel-button",webkit_search_results_button:"-webkit-search-results-button"};module.exports={cssPseudoClasses:e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e={before:"before",after:"after",first_letter:"first-letter",first_line:"first-line",selection:"selection",backdrop:"backdrop",placeholder:"placeholder",marker:"marker",spelling_error:"spelling-error",grammar_error:"grammar-error",cue:"cue",cue_region:"cue-region",part:"part",slotted:"slotted",file_selector_button:"file-selector-button",target_text:"target-text",highlight:"highlight",moz_color_swatch:"-moz-color-swatch",moz_focus_inner:"-moz-focus-inner",moz_list_bullet:"-moz-list-bullet",moz_list_number:"-moz-list-number",moz_meter_bar:"-moz-meter-bar",moz_progress_bar:"-moz-progress-bar",moz_range_progress:"-moz-range-progress",moz_range_thumb:"-moz-range-thumb",moz_range_track:"-moz-range-track",webkit_inner_spin_button:"-webkit-inner-spin-button",webkit_meter_even_less_good_value:"-webkit-meter-even-less-good-value",webkit_meter_inner_element:"-webkit-meter-inner-element",webkit_meter_optimum_value:"-webkit-meter-optimum-value",webkit_meter_suboptimum_value:"-webkit-meter-suboptimum-value",webkit_progress_bar:"-webkit-progress-bar",webkit_progress_inner_element:"-webkit-progress-inner-element",webkit_progress_value:"-webkit-progress-value",webkit_scrollbar:"-webkit-scrollbar",webkit_scrollbar_button:"-webkit-scrollbar-button",webkit_scrollbar_thumb:"-webkit-scrollbar-thumb",webkit_scrollbar_track:"-webkit-scrollbar-track",webkit_scrollbar_track_piece:"-webkit-scrollbar-track-piece",webkit_search_cancel_button:"-webkit-search-cancel-button",webkit_search_results_button:"-webkit-search-results-button",webkit_slider_runnable_track:"-webkit-slider-runnable-track",webkit_slider_thumb:"-webkit-slider-thumb",webkit_resizer:"-webkit-resizer",webkit_input_placeholder:"-webkit-input-placeholder",placeholder_shown:"placeholder-shown",autofill:"autofill",progress_value:"progress-value",progress_bar:"progress-bar",meter_optimum:"meter-optimum",meter_suboptimum:"meter-suboptimum",meter_sub_suboptimum:"meter-sub-suboptimum"};module.exports={cssPseudoElements:e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{cssAdvancedSelectors:
|
|
1
|
+
const{cssAdvancedSelectors:s}=require("./cssAdvancedSelectors.js"),{cssProps:e}=require("./cssProps.js"),{cssPseudoClasses:r}=require("./cssPseudoClasses.js"),{cssPseudoElements:c}=require("./cssPseudoElements.js"),{resetCss:o}=require("./resetCss.js"),{compilerTypeValid:d}=require("./compilerType.js");module.exports={cssAdvancedSelectors:s,cssProps:e,cssPseudoClasses:r,cssPseudoElements:c,resetCss:o,compilerTypeValid:d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n='\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';module.exports={resetCss:n};
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=require("./lib"),r=require("./constants"),{bernovaStyles:s}=require("./app");module.exports={bernovaStyles:s,...e,...r,lib:e,constants:r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("path"),n=({from:n,to:i})=>{const a=e.basename(n),l=e.basename(i),r=a.includes(".")&&n.includes(a)?e.dirname(n):e.normalize(n),s=l.includes(".")&&i.includes(l)?e.dirname(i):e.normalize(i),d=e.relative(r,s),o=l.includes(".")?l:"";return e.join(d,o)};module.exports={buildRelativePath:n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=require("path"),o=require("tsconfig-paths"),{readConfigData:r}=require("./readFile/readFile.utils.js"),t=async({dir:t})=>{try{const i=e.resolve(t,"bernova.config.json"),n=await r(i);if(!n)throw new Error(`Configuration file not found at ${i}`);const{themes:a,provider:s,tsconfigPath:c}=n;if(!a||!Array.isArray(a)||0===a.length)throw new Error("Configuration must include at least one theme");if(c)try{const i=e.resolve(t,c),n=await r(i);n?.compilerOptions?(o.register({baseUrl:n.compilerOptions.baseUrl||t,paths:n.compilerOptions.paths||{}}),console.log(`TypeScript paths configured from ${c}`)):console.warn(`Invalid or empty tsconfig at ${c}`)}catch(e){console.warn(`Failed to load TypeScript configuration: ${e.message}`)}return{themes:a,provider:s}}catch(e){throw console.error("Failed to compile configuration:",e.message),e}};module.exports={compileConfig:t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=require("path"),t=require("fs"),{readThemeData:a}=require("./readFile/readFile.utils"),{fileExists:s}=require("./fileExists/fileExists.utils"),o=({themeConfig:{name:t="bernova",prefix:o,theme:n,foundations:r,globalStyles:h,mediaQueries:i,stylesPath:m,fonts:l,resetCss:p,bvTools:f,typesTools:u,foreignThemes:d},dir:T})=>{const v=(()=>{const t={};return r?.name&&r?.path&&s(T,r.path)&&(t.foundations={path:e.resolve(T,r.path),name:r.name}),n?.name&&n?.path&&s(T,n.path)&&(t.theme={path:e.resolve(T,n.path),name:n.name}),h?.name&&h?.path&&s(T,h.path)&&(t.global={path:e.resolve(T,h.path),name:h.name}),i?.name&&i?.path&&s(T,i.path)&&(t.media={path:e.resolve(T,i.path),name:i.name}),t})();return{themeCss:a(v),fonts:l,resetCss:p,bvTools:f,name:t,stylesPath:m,typesTools:u,prefix:o,foreignThemes:d}};module.exports={compileThemes:o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o=require("path"),e=require("fs").promises,s=async(s,t)=>{if(!s||0===s.length)return void console.log("No local fonts to copy.");const{default:r}=await import("ora"),l=r("Copying local fonts...").start();try{for(const r of s)for(const s in r.files){const c=o.resolve(r.files[s]),a=o.resolve(t,"fonts"),i=o.resolve(a,o.basename(r.files[s]));await e.mkdir(a,{recursive:!0}),await e.copyFile(c,i),l.succeed(`Copied ${c} to ${i}`)}}catch(o){l.fail("Failed to copy local fonts."),console.error(o)}};module.exports={copyLocalFonts:s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=require("path"),t=t=>{let n="";return t?.google?.length&&t.google.forEach(e=>{const t=e.weights.join(";");n+=`@import url('https://fonts.googleapis.com/css2?family=${e.name.replace(/ /g,"+")}:wght@${t}&display=swap');\n`}),t?.local?.length&&t.local.forEach(t=>{Object.entries(t.files).forEach(([o,a])=>{n+=`\n @font-face {\n font-family: '${t.name}';\n src: url('./fonts/${e.basename(a)}') format('truetype');\n font-weight: ${o};\n font-style: normal;\n }\n`})}),n};module.exports={generateCssFonts:t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=({section:t,doc:e,endSection:c})=>{const n=new RegExp(`/\\* ${t} \\*/([\\s\\S]*?)/\\* ${c||t} \\*/`),o=e.match(n);return o?o[1].trim():""};module.exports={extractDocFragment:t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=require("fs"),r=require("path"),s=(s,t)=>{try{if(!s||!t)return!1;const n=r.resolve(s,t);return e.existsSync(n)}catch(e){return console.warn(`Error checking file existence: ${e.message}`),!1}};module.exports={fileExists:s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{resetCss:
|
|
1
|
+
const{resetCss:s}=require("../../constants/resetCss"),{copyLocalFonts:e}=require("../copyLocalFonts/copyLocalFonts.utils"),{generateCssFonts:t}=require("../copyLocalFonts/generateCssFonts.utils"),o=async({fonts:o,resetCss:a,stylesPath:n})=>(o?.local&&Array.isArray(o.local)&&o.local.length>0&&await e(o.local,n),(()=>{let e="";if(o){const s=t(o);s&&(e+=s+"\n")}return a&&(e+=s+"\n"),e})());module.exports={generateBaseCss:o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{filterGenerateCss:
|
|
1
|
+
const{filterGenerateCss:s}=require("./helpers/filterGenerateCss.utils"),e=async({source:e,prefix:o,baseCss:r="",compilerType:t})=>{const{default:c}=await import("ora"),l=c("Generating CSS...").start();try{const{stylesCss:c,foundationsCss:a,stylesDocs:n,rootDocs:i,globalDocs:u}=s({source:e,compilerType:t,baseCss:r,prefix:o});return l.succeed("CSS generation completed successfully."),{stylesCss:c,foundationsCss:a,stylesDocs:n,rootDocs:i,globalDocs:u}}catch(s){throw l.fail("Error generating CSS."),console.error(s),s}};module.exports={generateCSS:e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{cssAdvancedSelectors:
|
|
1
|
+
const{cssAdvancedSelectors:e}=require("../../../../constants/index.js"),t=(t,c,o)=>{t.forEach(t=>{for(const[s,{$target:r,...n}]of Object.entries(t))if(e[s]&&r){const t=e[s];o({source:n,theRule:`${c}${t}${r}`})}})};module.exports={advancedSelectorHandler:t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{separateStyles:
|
|
1
|
+
const{separateStyles:e}=require("../utils/separateStyles.utils.js"),t=({attributes:r,ruleName:s,processSource:o,carry:c})=>{for(const[l,u]of Object.entries(r)){const r=l.toLowerCase(),a=c?`${s}[${c}="${r}"]`:`${s}[${r}="true"]`,{styles:i,lib:n,other:b}=e(u),h=Object.entries(i).length>0,j=Object.entries(n).length>0,p=Object.entries(b).length>0;(h||j)&&o({source:{...i,...n},theRule:a}),p&&t({attributes:b,ruleName:s,processSource:o,carry:r})}};module.exports={attributeHandler:t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=e=>e&&"string"==typeof e?e.toLowerCase().replace(/_/g,"-"):"";module.exports={formatClassName:e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{simplifyName:
|
|
1
|
+
const{simplifyName:e}=require("../../../simplifyName/simplifyName.utils"),o=({register:o,prefix:r})=>{const c=new Set,t=({rg:o,space:s=2,lv:l=1})=>{const n=" ".repeat(s);return Object.entries(o).reduce((o,[p,a])=>{const d=p.replace(`${r}-`,"");if("object"==typeof a){const e=1===l,r=e?d.toUpperCase():d;o.prov.doc+=`${n}${r}: {\n`,o.prov.declare+=`${n}${r}: {\n`,o.comp.simple+=o.comp.simple.length?` | '${r}'`:`'${r}'`,o.comp.object+=e?`${n}${r}: '${r}',\n`:"";const c=s+2,p=l+1,{prov:{doc:$,declare:i},tools:{doc:v,declare:m}}=t({rg:a,space:c,lv:p});o.prov.doc+=$,o.prov.declare+=i,o.prov.doc+=`${n}},\n`,o.prov.declare+=`${n}},\n`,o.tools.doc+=v,o.tools.declare+=m}else if("boolean"==typeof a&&a){const r=e(d);c.has(r)||(c.add(r),o.tools.doc+=` ${r}: '${d}',\n`,o.tools.declare+=` ${d}: string,\n`);const t=d.split("__").at(-1);o.prov.doc+=`${n}${t}: '${d}',\n`,o.prov.declare+=`${n}${t}: string,\n`}else if("string"==typeof a){const t=e(a).replace(`${r}_`,"");c.has(t)||(c.add(t),o.tools.doc+=` ${t}: '${a}',\n`,o.tools.declare+=` ${t}: string,\n`);const s=d.split("__").at(-1);o.prov.doc+=`${n}${s}: '${a}',\n`,o.prov.declare+=`${n}${s}: string,\n`}else"function"==typeof a&&("dynamic_values"===d?o.prov.doc+=`${n}${d}: ${a.toString()},\n`:"dynamic_values_type"===d&&(o.prov.declare+=`${n}dynamic_values: ${a()},\n`));return o},{comp:{simple:"",object:""},prov:{doc:"",declare:""},tools:{doc:"",declare:""}})};return t({rg:o})};module.exports={handlerRegister:o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{simplifyName:
|
|
1
|
+
const{simplifyName:o}=require("../../../simplifyName/simplifyName.utils"),{formatClassName:e}=require("../classnames/formatClassName.utils"),r=({source:s,varName:t="-",prefix:c})=>{const a=Object.entries(s),{root:l,rootDocs:i}=a.reduce((s,[a,l])=>{const i=`${t}-${e(a)}`;if("object"==typeof l&&null!==l){const{root:o,rootDocs:e}=r({source:l,varName:i,prefix:c});s.root+=o,s.rootDocs.doc+=e.doc,s.rootDocs.declare+=e.declare}else{const e=o(i).replace(`${c}_`,"");s.root+=`${i}: ${l};\n`,s.rootDocs.doc+=` ${e}: 'var(${i})',\n`,s.rootDocs.declare+=` ${e}: string;\n`}return s},{root:"",rootDocs:{doc:"",declare:""}});return{root:l,rootDocs:i}};module.exports={generateVars:r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=e=>Object.entries(e).reduce((e,[t,s])=>{const r="--"+t.toLocaleLowerCase().replace("$","");return e.string+=r+": "+s+"; ",e.object[r]=s,e},{string:"",object:{}}),t=e=>`(styles: { ${Object.keys(e).reduce((e,t)=>e+`'${t}': string; `,"")}}) => { string: string; object: object } `,s=({dynamicValues:s,register:r,ruleName:c,prefix:i})=>{const n=c.split("--")[0].split("__")[0].replace(i,"");n in r||(r[n]={}),r[n].dynamic_values=e,r[n].dynamic_values_type=()=>t(s)};module.exports={setDynamicRegister:s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r=r=>{if(Array.isArray(r))return r.reduce((r,e)=>(r[e]=`var(--${e.toLocaleLowerCase().replace("$","")})`,r),{})};module.exports={processDynamicProps:r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{compilerTypeValid:
|
|
1
|
+
const{compilerTypeValid:s}=require("../../../constants"),{generateVars:e}=require("./cssVars/generateVars.utils"),{generateCssStyles:o}=require("./generateCssStyles.utils"),{generateGlobalStyles:t}=require("./other/generateGlobalStyles.utils"),l=({source:l,compilerType:r,baseCss:a,prefix:c})=>{const{foundations:n,theme:i,global:u,media:y}=l,d=r===s.full||r===s.foundationOnly,D=r===s.full||r===s.componentOnly,{foundationsCss:g,rootDocs:f,globalDocs:C}=(()=>{if(!d)return{foundationsCss:"",rootDocs:{doc:"",declare:""},globalDocs:{doc:"",declare:""}};const{root:s,rootDocs:o}=n?e({source:n,varName:c?`--${c}`:"-",prefix:c}):{root:"",rootDocs:{doc:"",declare:""}},{globalStyles:l,globalDocs:r}=u?t(u):{globalStyles:"",globalDocs:{doc:"",declare:""}};return{foundationsCss:`${a}:root{\n${s}}\n${l}`,rootDocs:o,globalDocs:r}})(),{stylesCss:b,stylesDocs:p}=(()=>{if(!D||!i)return{stylesCss:"",stylesDocs:{}};const{styles:s,stylesDocs:e}=o({source:i,mediaConfig:y,prefix:c});return{stylesCss:s,stylesDocs:e}})();return{stylesCss:b,foundationsCss:g,stylesDocs:p,rootDocs:f,globalDocs:C}};module.exports={filterGenerateCss:l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{cssProps:
|
|
1
|
+
const{cssProps:e}=require("../../../../constants/cssProps"),o=({foreign:r,prefix:n})=>Object.entries(r).reduce((r,[t,{component:s,variant:i,name:$=""}])=>{if(!s)return r;let c=!1,a={};const f=$.toLocaleLowerCase(),g=i&&s[i];if(g){const r=i.toLocaleLowerCase();Object.entries(g).forEach(([t,s])=>{if(t in e&&!(t in a)&&(a[f]=`${n}${f}--${r}`),t.startsWith("_")){const e=t.toLocaleLowerCase().substring(1);a[e]=`${n}${f}__${e}--${r}`}if("$foreign"===t){const e=`$_${r}`;e in a||(a[e]={}),a[e]={...a[e],...o({foreign:s,prefix:n})}}})}return Object.entries(s).forEach(([r,t])=>{if(r in e&&!c){const e=f in a?`${n}${f} ${a[f]}`:`${n}${f}`;a[f]=e,c=!0}if(r.startsWith("_")){const e=r.toLocaleLowerCase().substring(1),o=`${f}__${e}`,t=e in a?`${n}${o} ${a[e]}`:`${n}${o}`;a[e]=t}"$foreign"===r&&(a={...a,...o({foreign:t,prefix:n})})}),r[t]=a,r},{});module.exports={foreignHandler:o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const{formatRuleName:
|
|
1
|
+
const{formatRuleName:e,setForeignRegister:r,pseudoHandler:s,foreignHandler:t,attributeHandler:a,advancedSelectorHandler:i,separateStyles:n,extractValues:l,mediaQueriesHandler:o,generateMediaQueries:u,handlerRegister:c,setDynamicRegister:d,processDynamicProps:p}=require("./index.js"),g=({source:g,mediaConfig:m,prefix:f})=>{let y="",R={};const $={},h=f?`${f}-`:"",b=({source:u,parentRule:c,theRule:g})=>{const{styles:f,lib:{$dynamicValues:S,...x},other:N}=n(u),j=Object.entries(f).length>0,D=Object.entries(N).length>0,O=Object.entries(x).length>0,V=S?p(S):void 0,Q=e({theRule:g,parentRule:c,register:R,hasStyles:j,prefix:h});if(j&&(y+=`.${Q} { ${l({styles:f,dynamicValues:V})} }\n`),O){const{$pseudoClasses:e,$pseudoElements:n,$mediaQueries:l,$attributes:u,$advancedSelectors:c,$foreign:p}=x;if(Object.entries(N).length&&b({source:N,parentRule:Q}),e&&s({pseudoData:e,ruleName:Q,processSource:b}),n&&s({pseudoData:n,ruleName:Q,processSource:b}),l&&m&&o({config:m,mediaQueries:l,parentRule:Q,theRule:g,mediaRegister:$}),u&&a({attributes:u,ruleName:Q,processSource:b}),c&&i(c,Q,b),p){const e=t({foreign:p,prefix:h}),s=Q.replace(h,"");r({ruleName:s,foreignRegister:e,register:R})}V&&d({dynamicValues:V,register:R,ruleName:Q,prefix:h})}if(D)for(const[u,f]of Object.entries(N))if("object"==typeof f){const{$pseudoClasses:S,$pseudoElements:x,$mediaQueries:N,$attributes:j,$advancedSelectors:D,$foreign:O,$dynamicValues:V,...Q}=f,{styles:v,other:H}=n(Q),C=Object.entries(v).length>0,E=V?p(V):void 0,k=e({key:u,theRule:g,parentRule:c,register:R,hasStyles:C,prefix:h});if(C&&(y+=`.${k} { ${l({styles:v,dynamicValues:E})} }\n`),Object.entries(H).length&&b({source:H,parentRule:k}),S&&s({pseudoData:S,ruleName:k,processSource:b}),x&&s({pseudoData:x,ruleName:k,processSource:b}),N&&m&&o({config:m,mediaQueries:N,parentRule:k,theRule:g,mediaRegister:$}),j&&a({attributes:j,ruleName:k,processSource:b}),D&&i(D,k,b),O){const e=t({foreign:O,prefix:h}),s=k.replace(h,"");r({ruleName:s,foreignRegister:e,register:R})}E&&d({dynamicValues:E,register:R,ruleName:k,prefix:h})}};b({source:g});const S=c({register:R,prefix:f}),x=u($);return{styles:y.concat(x),stylesDocs:S}};module.exports={generateCssStyles:g};
|