@recursica/mantine-adapter 0.9.3 → 0.9.4
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/dist/adapter/generateBorderRadiusType.d.ts +3 -0
- package/dist/adapter/generateBorderRadiusType.d.ts.map +1 -0
- package/dist/adapter/generateColorTypes.d.ts +6 -0
- package/dist/adapter/generateColorTypes.d.ts.map +1 -0
- package/dist/adapter/generateIcons.d.ts +8 -0
- package/dist/adapter/generateIcons.d.ts.map +1 -0
- package/dist/adapter/generateMantineTheme.d.ts +19 -0
- package/dist/adapter/generateMantineTheme.d.ts.map +1 -0
- package/dist/adapter/generatePrettierignore.d.ts +3 -0
- package/dist/adapter/generatePrettierignore.d.ts.map +1 -0
- package/dist/adapter/generateRecursicaObject.d.ts +7 -0
- package/dist/adapter/generateRecursicaObject.d.ts.map +1 -0
- package/dist/adapter/generateRecursicaThemes.d.ts +12 -0
- package/dist/adapter/generateRecursicaThemes.d.ts.map +1 -0
- package/dist/adapter/generateRecursicaTokens.d.ts +3 -0
- package/dist/adapter/generateRecursicaTokens.d.ts.map +1 -0
- package/dist/adapter/generateSpacersType.d.ts +3 -0
- package/dist/adapter/generateSpacersType.d.ts.map +1 -0
- package/dist/adapter/generateUiKit.d.ts +8 -0
- package/dist/adapter/generateUiKit.d.ts.map +1 -0
- package/dist/adapter/generateVanillaExtractThemes.d.ts +12 -0
- package/dist/adapter/generateVanillaExtractThemes.d.ts.map +1 -0
- package/dist/adapter/index.d.ts +44 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +8 -4
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +8 -4
- package/dist/main.js.map +1 -1
- package/dist/shared/processTokens.d.ts +22 -0
- package/dist/shared/processTokens.d.ts.map +1 -0
- package/dist/types.d.ts +62 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/fileCheck.d.ts +8 -0
- package/dist/utils/fileCheck.d.ts.map +1 -0
- package/dist/utils/loadConfig.d.ts +24 -0
- package/dist/utils/loadConfig.d.ts.map +1 -0
- package/dist/webworker.d.ts +2 -0
- package/dist/webworker.d.ts.map +1 -0
- package/dist/webworker.js +8 -4
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateBorderRadiusType.d.ts","sourceRoot":"","sources":["../../adapter/generateBorderRadiusType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EAAE,EACtB,UAAU,EAAE,MAAM,GACjB,eAAe,CAYjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateColorTypes.d.ts","sourceRoot":"","sources":["../../adapter/generateColorTypes.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM;;;;EAQ3E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExportingResult, RecursicaConfigIcons } from "../types";
|
|
2
|
+
export interface GenerateIconsOutput {
|
|
3
|
+
exportedIcons: ExportingResult[];
|
|
4
|
+
iconExports: ExportingResult;
|
|
5
|
+
iconResourceMap: ExportingResult;
|
|
6
|
+
}
|
|
7
|
+
export declare function generateIcons(icons: Record<string, string>, srcPath: string, config: RecursicaConfigIcons | undefined): GenerateIconsOutput;
|
|
8
|
+
//# sourceMappingURL=generateIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateIcons.d.ts","sourceRoot":"","sources":["../../adapter/generateIcons.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjE,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,oBAAoB,GAAG,SAAS,GACvC,mBAAmB,CAwErB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ThemeTokens, ContractTokens, ExportingProps, MantineThemeOverride, ExportingResult } from "../types";
|
|
2
|
+
interface ContractTokensObject {
|
|
3
|
+
tokens: ContractTokens;
|
|
4
|
+
filename: string;
|
|
5
|
+
}
|
|
6
|
+
interface GenerateMantineThemeParams {
|
|
7
|
+
mantineThemeOverride: MantineThemeOverride | undefined;
|
|
8
|
+
tokens: ThemeTokens;
|
|
9
|
+
breakpoints: Record<string, string>;
|
|
10
|
+
contractTokens: ContractTokensObject;
|
|
11
|
+
exportingProps: ExportingProps;
|
|
12
|
+
}
|
|
13
|
+
export interface GenerateMantineThemeOutput {
|
|
14
|
+
mantineTheme: ExportingResult;
|
|
15
|
+
postCss: ExportingResult;
|
|
16
|
+
}
|
|
17
|
+
export declare function generateMantineTheme({ mantineThemeOverride, tokens, breakpoints, contractTokens: { tokens: contractTokens, filename: contractFilename }, exportingProps: { outputPath, project, rootPath }, }: GenerateMantineThemeParams): GenerateMantineThemeOutput;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=generateMantineTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateMantineTheme.d.ts","sourceRoot":"","sources":["../../adapter/generateMantineTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB,UAAU,oBAAoB;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,0BAA0B;IAClC,oBAAoB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACvD,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,cAAc,EAAE,oBAAoB,CAAC;IACrC,cAAc,EAAE,cAAc,CAAC;CAChC;AAeD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,cAAc,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EACtE,cAAc,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,GAClD,EAAE,0BAA0B,GAAG,0BAA0B,CA4FzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatePrettierignore.d.ts","sourceRoot":"","sources":["../../adapter/generatePrettierignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,sBAAsB,IAAI,eAAe,CAWxD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RecursicaConfiguration } from "@recursica/schemas";
|
|
2
|
+
export declare function createRecursicaObject(project: RecursicaConfiguration["project"], outputPath: string): {
|
|
3
|
+
content: string;
|
|
4
|
+
path: string;
|
|
5
|
+
filename: string;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=generateRecursicaObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateRecursicaObject.d.ts","sourceRoot":"","sources":["../../adapter/generateRecursicaObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,EAC1C,UAAU,EAAE,MAAM;;;;EAwBnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExportingResult, Themes } from "../types";
|
|
2
|
+
interface GenerateRecursicaThemesParams {
|
|
3
|
+
outputPath: string;
|
|
4
|
+
themes: Themes;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Generates the RecursicaThemes.ts file that contains the THEMES constant
|
|
8
|
+
* based on the theme dictionary
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateRecursicaThemes({ outputPath, themes, }: GenerateRecursicaThemesParams): ExportingResult;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=generateRecursicaThemes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateRecursicaThemes.d.ts","sourceRoot":"","sources":["../../adapter/generateRecursicaThemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGxD,UAAU,6BAA6B;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,UAAU,EACV,MAAM,GACP,EAAE,6BAA6B,GAAG,eAAe,CAsCjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateRecursicaTokens.d.ts","sourceRoot":"","sources":["../../adapter/generateRecursicaTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG7E,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,WAAW,EACvB,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GACtC,eAAe,CAmBjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateSpacersType.d.ts","sourceRoot":"","sources":["../../adapter/generateSpacersType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EAAE,EACtB,UAAU,EAAE,MAAM,GACjB,eAAe,CASjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ThemeTokens, ExportingProps, ExportingResult } from "../types";
|
|
2
|
+
interface GenerateUiKitParams {
|
|
3
|
+
recursicaTokensFilename: string;
|
|
4
|
+
themeContractFilename: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function generateUiKit(uiKit: ThemeTokens, { recursicaTokensFilename, themeContractFilename }: GenerateUiKitParams, { outputPath, project }: ExportingProps): ExportingResult;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=generateUiKit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateUiKit.d.ts","sourceRoot":"","sources":["../../adapter/generateUiKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EAEd,eAAe,EAChB,MAAM,UAAU,CAAC;AAIlB,UAAU,mBAAmB;IAC3B,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,EAAE,mBAAmB,EACvE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GACtC,eAAe,CAwBjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Themes, ExportingProps, ValueToken, ContractTokens, ThemeTokens, ExportingResult } from "../types";
|
|
2
|
+
export declare function parseValue(value: ValueToken | string, recursicaTokens: string): string;
|
|
3
|
+
export interface VanillaExtractThemesOutput {
|
|
4
|
+
themesFileContent: ExportingResult;
|
|
5
|
+
vanillaExtractThemes: ExportingResult[];
|
|
6
|
+
availableThemes: ExportingResult;
|
|
7
|
+
themeContract: ExportingResult;
|
|
8
|
+
contractTokens: ContractTokens;
|
|
9
|
+
typeDefinitions: ExportingResult;
|
|
10
|
+
}
|
|
11
|
+
export declare function generateVanillaExtractThemes(tokens: ThemeTokens, themes: Themes, recursicaTokensFilename: string, { outputPath, project }: ExportingProps): VanillaExtractThemesOutput;
|
|
12
|
+
//# sourceMappingURL=generateVanillaExtractThemes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateVanillaExtractThemes.d.ts","sourceRoot":"","sources":["../../adapter/generateVanillaExtractThemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,UAAU,EACV,cAAc,EACd,WAAW,EACX,eAAe,EAChB,MAAM,UAAU,CAAC;AAOlB,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,GAAG,MAAM,EAC1B,eAAe,EAAE,MAAM,UAaxB;AAiCD,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,eAAe,CAAC;IACnC,oBAAoB,EAAE,eAAe,EAAE,CAAC;IACxC,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,eAAe,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,EACd,uBAAuB,EAAE,MAAM,EAC/B,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,GACtC,0BAA0B,CA8H5B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RecursicaConfigOverrides, RecursicaConfigIcons, ExportingResult } from "../types";
|
|
2
|
+
import { VanillaExtractThemesOutput } from "./generateVanillaExtractThemes";
|
|
3
|
+
import { GenerateMantineThemeOutput } from "./generateMantineTheme";
|
|
4
|
+
import { GenerateIconsOutput } from "./generateIcons";
|
|
5
|
+
import { ProcessTokens } from "../shared/processTokens";
|
|
6
|
+
import type { RecursicaConfiguration } from "@recursica/schemas";
|
|
7
|
+
interface GenerateThemeFileParams {
|
|
8
|
+
overrides: RecursicaConfigOverrides | undefined;
|
|
9
|
+
rootPath: string;
|
|
10
|
+
srcPath: string;
|
|
11
|
+
project: RecursicaConfiguration["project"];
|
|
12
|
+
icons: Record<string, string>;
|
|
13
|
+
iconsConfig: RecursicaConfigIcons | undefined;
|
|
14
|
+
processTokens: ProcessTokens;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Generates Mantine theme files including:
|
|
18
|
+
* - Generic theme file with base theme and createColorToken function
|
|
19
|
+
* - Individual theme files for each theme variant
|
|
20
|
+
* - CSS variables file
|
|
21
|
+
* - Type declarations for theme colors
|
|
22
|
+
* - Index file exporting all themes
|
|
23
|
+
*
|
|
24
|
+
* @param srcPath - Path to the source directory for type declarations
|
|
25
|
+
* @param tokens - Base theme tokens
|
|
26
|
+
* @param themes - Theme variants
|
|
27
|
+
* @param project - Project name
|
|
28
|
+
*/
|
|
29
|
+
interface RunAdapterOutput {
|
|
30
|
+
recursicaTokens: ExportingResult;
|
|
31
|
+
vanillaExtractThemes: VanillaExtractThemesOutput;
|
|
32
|
+
mantineTheme: GenerateMantineThemeOutput;
|
|
33
|
+
uiKitObject: ExportingResult;
|
|
34
|
+
recursicaObject: ExportingResult;
|
|
35
|
+
colorsType: ExportingResult;
|
|
36
|
+
spacersType: ExportingResult;
|
|
37
|
+
borderRadiusType: ExportingResult;
|
|
38
|
+
iconsObject: GenerateIconsOutput | undefined;
|
|
39
|
+
recursicaThemes: ExportingResult;
|
|
40
|
+
prettierignore: ExportingResult;
|
|
41
|
+
}
|
|
42
|
+
export declare function runAdapter({ rootPath, overrides, srcPath, project, icons, iconsConfig, processTokens, }: GenerateThemeFileParams): RunAdapterOutput;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAEL,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAiB,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAIrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,UAAU,uBAAuB;IAC/B,SAAS,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,UAAU,gBAAgB;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,oBAAoB,EAAE,0BAA0B,CAAC;IACjD,YAAY,EAAE,0BAA0B,CAAC;IACzC,WAAW,EAAE,eAAe,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,eAAe,CAAC;IAC5B,WAAW,EAAE,eAAe,CAAC;IAC7B,gBAAgB,EAAE,eAAe,CAAC;IAClC,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC7C,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,eAAe,CAAC;CACjC;AACD,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,GACd,EAAE,uBAAuB,GAAG,gBAAgB,CA6E5C"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CA8F7C"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { runAdapter } from "./adapter";
|
|
2
|
+
export type { Themes, ThemeTokens, RecursicaConfigOverrides, RecursicaConfigIcons, ExportingResult, JsonContentIcons, } from "./types";
|
|
3
|
+
export { loadConfig } from "./utils/loadConfig";
|
|
4
|
+
export { isFontFamilyToken, isEffectToken, isColorOrFloatToken, capitalize, } from "@recursica/common";
|
|
5
|
+
export { ProcessTokens } from "./shared/processTokens";
|
|
6
|
+
export { processJsonContent } from "./shared/common";
|
|
7
|
+
export { runMain } from "./cli";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,YAAY,EACV,MAAM,EACN,WAAW,EACX,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -370,8 +370,10 @@ function generateIcons(icons, srcPath, config) {
|
|
|
370
370
|
const [iconName, variant] = rawIconName.split("[");
|
|
371
371
|
let cleanIconName = iconName.replaceAll("-", "_");
|
|
372
372
|
// check if the iconName is in the names array, if not, skip
|
|
373
|
-
if (
|
|
374
|
-
|
|
373
|
+
if (config?.include) {
|
|
374
|
+
if (!config?.include?.names?.includes(cleanIconName)) {
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
375
377
|
}
|
|
376
378
|
// detect if the iconName starts with a number, if so, add an underscore to the beginning
|
|
377
379
|
if (cleanIconName.match(/^\d/)) {
|
|
@@ -380,8 +382,10 @@ function generateIcons(icons, srcPath, config) {
|
|
|
380
382
|
const cleanVariant = variant.replace("]", "").replace("Style=", "");
|
|
381
383
|
const codedVariant = cleanVariant.replaceAll(" ", "_");
|
|
382
384
|
// check if the codedVariant is in the variants array, if not, skip
|
|
383
|
-
if (
|
|
384
|
-
|
|
385
|
+
if (config?.include) {
|
|
386
|
+
if (!config?.include?.variants?.includes(codedVariant)) {
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
385
389
|
}
|
|
386
390
|
const finalIconName = `${cleanIconName}_${codedVariant}`;
|
|
387
391
|
exportedIcons.push({
|