@greensight/gts 1.0.0-alpha.13 → 1.0.0-alpha.15
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/classes/TokenManager/index.d.ts +19 -4
- package/classes/TokenManager/index.d.ts.map +1 -1
- package/classes/TokenManager/types/ds.d.ts +23 -12
- package/classes/TokenManager/types/ds.d.ts.map +1 -1
- package/classes/TokenManager/types/figma.d.ts +11 -3
- package/classes/TokenManager/types/figma.d.ts.map +1 -1
- package/commands/generate/index.d.ts.map +1 -1
- package/common/lodash.d.ts +5 -0
- package/common/lodash.d.ts.map +1 -1
- package/index.cjs +30 -5
- package/index.mjs +844 -460
- package/modules/breakpoints/breakpointsFromTokenManager/index.d.ts +2 -0
- package/modules/breakpoints/breakpointsFromTokenManager/index.d.ts.map +1 -0
- package/modules/breakpoints/breakpointsFromTokenManager/module.d.ts +18 -0
- package/modules/breakpoints/breakpointsFromTokenManager/module.d.ts.map +1 -0
- package/modules/breakpoints/breakpointsFromTokenManager/utils.d.ts +22 -0
- package/modules/breakpoints/breakpointsFromTokenManager/utils.d.ts.map +1 -0
- package/modules/breakpoints/breakpointsListFromTokenManager/index.d.ts +2 -0
- package/modules/breakpoints/breakpointsListFromTokenManager/index.d.ts.map +1 -0
- package/modules/breakpoints/breakpointsListFromTokenManager/module.d.ts +14 -0
- package/modules/breakpoints/breakpointsListFromTokenManager/module.d.ts.map +1 -0
- package/modules/breakpoints/breakpointsListFromTokenManager/utils.d.ts +9 -0
- package/modules/breakpoints/breakpointsListFromTokenManager/utils.d.ts.map +1 -0
- package/modules/breakpoints/index.d.ts +4 -0
- package/modules/breakpoints/index.d.ts.map +1 -0
- package/modules/breakpoints/types.d.ts +11 -0
- package/modules/breakpoints/types.d.ts.map +1 -0
- package/modules/breakpoints/utils.d.ts +16 -0
- package/modules/breakpoints/utils.d.ts.map +1 -0
- package/modules/colors/colorsFromTokenManager/index.d.ts +2 -0
- package/modules/colors/colorsFromTokenManager/index.d.ts.map +1 -0
- package/modules/colors/{colorsFromTokenManager.d.ts → colorsFromTokenManager/module.d.ts} +2 -2
- package/modules/colors/colorsFromTokenManager/module.d.ts.map +1 -0
- package/modules/colors/colorsFromTokenManager/utils.d.ts +3 -0
- package/modules/colors/colorsFromTokenManager/utils.d.ts.map +1 -0
- package/modules/colors/index.d.ts +0 -2
- package/modules/colors/index.d.ts.map +1 -1
- package/modules/colors/utils.d.ts +0 -26
- package/modules/colors/utils.d.ts.map +1 -1
- package/modules/container/containerFromTokenManager/index.d.ts +2 -0
- package/modules/container/containerFromTokenManager/index.d.ts.map +1 -0
- package/modules/container/containerFromTokenManager/module.d.ts +16 -0
- package/modules/container/containerFromTokenManager/module.d.ts.map +1 -0
- package/modules/container/index.d.ts +3 -0
- package/modules/container/index.d.ts.map +1 -0
- package/modules/container/types.d.ts +16 -0
- package/modules/container/types.d.ts.map +1 -0
- package/modules/container/utils.d.ts +16 -0
- package/modules/container/utils.d.ts.map +1 -0
- package/modules/index.d.ts +4 -0
- package/modules/index.d.ts.map +1 -1
- package/modules/shadows/index.d.ts +3 -0
- package/modules/shadows/index.d.ts.map +1 -0
- package/modules/shadows/shadowsFromTokenManager.d.ts +17 -0
- package/modules/shadows/shadowsFromTokenManager.d.ts.map +1 -0
- package/modules/shadows/types.d.ts +6 -0
- package/modules/shadows/types.d.ts.map +1 -0
- package/modules/shadows/utils.d.ts +21 -0
- package/modules/shadows/utils.d.ts.map +1 -0
- package/modules/typography/index.d.ts +2 -0
- package/modules/typography/index.d.ts.map +1 -0
- package/modules/typography/types.d.ts +10 -0
- package/modules/typography/types.d.ts.map +1 -0
- package/modules/typography/typographyFromTokenManager/index.d.ts +2 -0
- package/modules/typography/typographyFromTokenManager/index.d.ts.map +1 -0
- package/modules/typography/typographyFromTokenManager/module.d.ts +20 -0
- package/modules/typography/typographyFromTokenManager/module.d.ts.map +1 -0
- package/modules/typography/utils.d.ts +52 -0
- package/modules/typography/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/temporarilyUnnecessary/colorsFromStyles.d.ts +1 -0
- package/temporarilyUnnecessary/colorsFromStyles.d.ts.map +1 -0
- package/temporarilyUnnecessary/colorsFromVariables.d.ts +1 -0
- package/temporarilyUnnecessary/colorsFromVariables.d.ts.map +1 -0
- package/temporarilyUnnecessary/utils.d.ts +1 -0
- package/temporarilyUnnecessary/utils.d.ts.map +1 -0
- package/modules/colors/colorsFromStyles.d.ts +0 -16
- package/modules/colors/colorsFromStyles.d.ts.map +0 -1
- package/modules/colors/colorsFromTokenManager.d.ts.map +0 -1
- package/modules/colors/colorsFromVariables.d.ts +0 -16
- package/modules/colors/colorsFromVariables.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/breakpoints/breakpointsFromTokenManager/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IModule } from '../../types';
|
|
2
|
+
import { TBreakpointExtension } from '../types';
|
|
3
|
+
export interface IBreakpointsFromTokenManagerInput {
|
|
4
|
+
extensions?: TBreakpointExtension[];
|
|
5
|
+
names?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface IBreakpointsFromTokenManagerOutput {
|
|
8
|
+
jsonDir: string;
|
|
9
|
+
stylesDir: string;
|
|
10
|
+
jsonFileName?: string;
|
|
11
|
+
stylesFileName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IBreakpointsFromTokenManagerParams {
|
|
14
|
+
input?: IBreakpointsFromTokenManagerInput;
|
|
15
|
+
output: IBreakpointsFromTokenManagerOutput;
|
|
16
|
+
}
|
|
17
|
+
export declare const breakpointsFromTokenManager: ({ input, output: { jsonDir, stylesDir, jsonFileName, stylesFileName }, }: IBreakpointsFromTokenManagerParams) => IModule;
|
|
18
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/modules/breakpoints/breakpointsFromTokenManager/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAoB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGvE,MAAM,WAAW,iCAAiC;IAC9C,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,kCAAkC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kCAAkC;IAC/C,KAAK,CAAC,EAAE,iCAAiC,CAAC;IAC1C,MAAM,EAAE,kCAAkC,CAAC;CAC9C;AAiCD,eAAO,MAAM,2BAA2B,GAAI,0EAGzC,kCAAkC,KAAG,OAiDtC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IBreakpointToken, TBreakpointExtension } from '../types';
|
|
2
|
+
export declare const formatCSSBlock: (selector: string, variables: string[]) => string;
|
|
3
|
+
export declare const formatSCSSVariables: (variables: string[]) => string;
|
|
4
|
+
export declare const getCSSVariableName: (name: string) => string;
|
|
5
|
+
export declare const getSCSSVariableName: (name: string) => string;
|
|
6
|
+
export declare const buildCSSVariables: (breakpointTokens: IBreakpointToken[]) => string[];
|
|
7
|
+
export declare const buildSCSSVariables: (breakpointTokens: IBreakpointToken[]) => string[];
|
|
8
|
+
export declare const buildCSSContent: (cssVariables: string[]) => string;
|
|
9
|
+
export declare const buildSCSSContent: (scssVariables: string[]) => string;
|
|
10
|
+
export declare const buildJSONContent: (breakpointTokens: IBreakpointToken[]) => string;
|
|
11
|
+
export declare const writeBreakpointFiles: (jsonContent: string, cssContent: string | null, scssContent: string | null, jsonDir: string, stylesDir: string, jsonFileName: string, cssFileName: string | null, scssFileName: string | null) => Promise<void>;
|
|
12
|
+
interface IGenerateFilesParams {
|
|
13
|
+
breakpointTokens: IBreakpointToken[];
|
|
14
|
+
jsonDir: string;
|
|
15
|
+
stylesDir: string;
|
|
16
|
+
jsonFileName: string;
|
|
17
|
+
stylesFileName: string;
|
|
18
|
+
extensions: TBreakpointExtension[];
|
|
19
|
+
}
|
|
20
|
+
export declare const generateBreakpointFiles: ({ breakpointTokens, jsonDir, stylesDir, jsonFileName, stylesFileName, extensions, }: IGenerateFilesParams) => Promise<void>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/modules/breakpoints/breakpointsFromTokenManager/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGvE,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,WAInE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,EAAE,WAGtD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,WAAgB,CAAC;AAEhE,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,WAAe,CAAC;AAEhE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,gBAAgB,EAAE,KAAG,MAAM,EAE9E,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kBAAkB,gBAAgB,EAAE,KAAG,MAAM,EAE/E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,cAAc,MAAM,EAAE,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,eAAe,MAAM,EAAE,KAAG,MAE1D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,kBAAkB,gBAAgB,EAAE,KAAG,MAGvE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,aAAa,MAAM,EACnB,YAAY,MAAM,GAAG,IAAI,EACzB,aAAa,MAAM,GAAG,IAAI,EAC1B,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,aAAa,MAAM,GAAG,IAAI,EAC1B,cAAc,MAAM,GAAG,IAAI,kBAe9B,CAAC;AAEF,UAAU,oBAAoB;IAC1B,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,uBAAuB,GAAU,qFAO3C,oBAAoB,kBAsBtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/breakpoints/breakpointsListFromTokenManager/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IModule } from '../../types';
|
|
2
|
+
export interface IBreakpointListFromTokenManagerInput {
|
|
3
|
+
names?: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface IBreakpointListFromTokenManagerOutput {
|
|
6
|
+
stylesDir: string;
|
|
7
|
+
fileName?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IBreakpointListFromTokenManagerParams {
|
|
10
|
+
input?: IBreakpointListFromTokenManagerInput;
|
|
11
|
+
output: IBreakpointListFromTokenManagerOutput;
|
|
12
|
+
}
|
|
13
|
+
export declare const breakpointsListFromTokenManager: ({ input, output: { stylesDir, fileName }, }: IBreakpointListFromTokenManagerParams) => IModule;
|
|
14
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/modules/breakpoints/breakpointsListFromTokenManager/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAK3C,MAAM,WAAW,oCAAoC;IACjD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,qCAAqC;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qCAAqC;IAClD,KAAK,CAAC,EAAE,oCAAoC,CAAC;IAC7C,MAAM,EAAE,qCAAqC,CAAC;CACjD;AAuBD,eAAO,MAAM,+BAA+B,GAAI,6CAG7C,qCAAqC,KAAG,OA8CzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBreakpointToken } from '../types';
|
|
2
|
+
export declare const buildSCSSMapContent: (breakpointTokens: IBreakpointToken[]) => string;
|
|
3
|
+
export declare const writeBreakpointListFiles: (scssContent: string, stylesDir: string, fileName: string) => Promise<void>;
|
|
4
|
+
export declare const generateBreakpointListFiles: ({ breakpointTokens, stylesDir, fileName, }: {
|
|
5
|
+
breakpointTokens: IBreakpointToken[];
|
|
6
|
+
stylesDir: string;
|
|
7
|
+
fileName: string;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/modules/breakpoints/breakpointsListFromTokenManager/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,eAAO,MAAM,mBAAmB,GAAI,kBAAkB,gBAAgB,EAAE,KAAG,MAY1E,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,aAAa,MAAM,EAAE,WAAW,MAAM,EAAE,UAAU,MAAM,kBAEtG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAU,4CAI/C;IACC,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB,kBAGA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/breakpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const BREAKPOINTS_NAMES: string[];
|
|
2
|
+
export interface IBreakpointToken {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IBreakpointListToken {
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
export type TBreakpointExtension = 'css' | 'scss';
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/breakpoints/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,UAA+D,CAAC;AAE9F,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IBreakpointToken } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Converts breakpoint token value to number
|
|
4
|
+
*/
|
|
5
|
+
export declare const parseBreakpointValue: (token: IBreakpointToken) => number;
|
|
6
|
+
/**
|
|
7
|
+
* Converts array of breakpoint tokens to object with numeric values
|
|
8
|
+
*/
|
|
9
|
+
export declare const tokensToNumericObject: (tokens: IBreakpointToken[]) => Record<string, number>;
|
|
10
|
+
/**
|
|
11
|
+
* Common file operations for breakpoints modules
|
|
12
|
+
*/
|
|
13
|
+
export declare const deleteFile: (fileName: string, directory: string) => Promise<void>;
|
|
14
|
+
export declare const writeFile: (fileName: string, content: string, directory: string) => Promise<void>;
|
|
15
|
+
export declare const deleteAndWriteFile: (fileName: string, content: string, directory: string) => Promise<void>;
|
|
16
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/breakpoints/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,gBAAgB,KAAG,MAE9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,gBAAgB,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAQvF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAU,UAAU,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,IAAI,CAElF,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,UAAU,MAAM,EAAE,SAAS,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,IAAI,CAElG,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,UAAU,MAAM,EAAE,SAAS,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,IAAI,CAG3G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/colors/colorsFromTokenManager/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IModule } from '
|
|
1
|
+
import { IModule } from '../../types';
|
|
2
2
|
export interface IColorsFromTokenManagerInput {
|
|
3
3
|
includeVariables?: string[];
|
|
4
4
|
includeStyles?: boolean;
|
|
@@ -14,4 +14,4 @@ export interface IColorsFromTokenManagerParams {
|
|
|
14
14
|
output: IColorsFromTokenManagerOutput;
|
|
15
15
|
}
|
|
16
16
|
export declare const colorsFromTokenManager: ({ input, output: { jsonDir, stylesDir, jsonFileName, cssFileName }, }: IColorsFromTokenManagerParams) => IModule;
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/modules/colors/colorsFromTokenManager/module.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,4BAA4B;IACzC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,6BAA6B;IAC1C,KAAK,CAAC,EAAE,4BAA4B,CAAC;IACrC,MAAM,EAAE,6BAA6B,CAAC;CACzC;AAyDD,eAAO,MAAM,sBAAsB,GAAI,uEAGpC,6BAA6B,KAAG,OA0EjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/modules/colors/colorsFromTokenManager/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AA8BxG,eAAO,MAAM,oBAAoB,GAAI,OAAO,kBAAkB,CAAC,OAAO,CAAC,WAStE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import { ColorStop, GradientPaint, Paint, Vector } from '@figma/rest-api-spec';
|
|
2
1
|
import { IColorToken } from './types';
|
|
3
|
-
export declare const rgbToHex: ({ r, g, b }: {
|
|
4
|
-
r: number;
|
|
5
|
-
g: number;
|
|
6
|
-
b: number;
|
|
7
|
-
}) => string;
|
|
8
|
-
export declare const getSolidColor: ({ opacity, r, g, b }: {
|
|
9
|
-
opacity: number;
|
|
10
|
-
r: number;
|
|
11
|
-
g: number;
|
|
12
|
-
b: number;
|
|
13
|
-
}) => string;
|
|
14
|
-
export declare const getAngelDeg: (gradientHandlePositions: Vector[], adjustemntDeg?: number) => number;
|
|
15
|
-
export declare const getMappedColors: (gradientStops: ColorStop[]) => string;
|
|
16
|
-
export declare const getGradientCenterCoordinates: (gradientHandlePositions: Vector[]) => {
|
|
17
|
-
centerX: string;
|
|
18
|
-
centerY: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const getGradientLinerColor: (paint: GradientPaint) => string;
|
|
21
|
-
export declare const getGradientRadius: (gradientHandlePositions: Vector[]) => {
|
|
22
|
-
radiusX: string;
|
|
23
|
-
radiusY: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const getGradientRadial: (paint: GradientPaint) => string;
|
|
26
|
-
export declare const getGradientAnugular: (paint: GradientPaint) => string;
|
|
27
|
-
export declare const paintToColorToken: (paint: Paint) => string;
|
|
28
2
|
export declare const formatCSSBlock: (selector: string, variables: string[]) => string;
|
|
29
3
|
export declare const formatModeClassName: (modeName: string) => string;
|
|
30
4
|
export declare const getVariableName: (name: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,WAInE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,WAAsD,CAAC;AAE3G,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAoD,MAAM,CAAC;AACvG,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,WAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,GAAI,aAAa,WAAW,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAkBrF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAG,MAYxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,aAAa,WAAW,EAAE,KAAG,MAG7D,CAAC;AAEF,eAAO,MAAM,eAAe,GACxB,aAAa,MAAM,EACnB,YAAY,MAAM,EAClB,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,aAAa,MAAM,kBAQtB,CAAC;AAEF,UAAU,oBAAoB;IAC1B,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,GAAU,iEAMtC,oBAAoB,kBAMtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/container/containerFromTokenManager/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IModule } from '../../types';
|
|
2
|
+
export interface IContainerFromTokenManagerInput {
|
|
3
|
+
containerWidth?: number;
|
|
4
|
+
layer?: string;
|
|
5
|
+
isModule?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface IContainerFromTokenManagerOutput {
|
|
8
|
+
stylesDir: string;
|
|
9
|
+
fileName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IContainerFromTokenManagerParams {
|
|
12
|
+
input?: IContainerFromTokenManagerInput;
|
|
13
|
+
output: IContainerFromTokenManagerOutput;
|
|
14
|
+
}
|
|
15
|
+
export declare const containerFromTokenManager: ({ input, output: { stylesDir, fileName }, }: IContainerFromTokenManagerParams) => IModule;
|
|
16
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/modules/container/containerFromTokenManager/module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,MAAM,WAAW,+BAA+B;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gCAAgC;IAC7C,KAAK,CAAC,EAAE,+BAA+B,CAAC;IACxC,MAAM,EAAE,gCAAgC,CAAC;CAC5C;AAwED,eAAO,MAAM,yBAAyB,GAAI,6CAGvC,gCAAgC,KAAG,OAgDpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/container/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IContainerValueCenter {
|
|
2
|
+
alignment: 'center';
|
|
3
|
+
width: number;
|
|
4
|
+
margin: 'auto';
|
|
5
|
+
}
|
|
6
|
+
export interface IContainerValueStretch {
|
|
7
|
+
alignment: 'stretch';
|
|
8
|
+
margin: string;
|
|
9
|
+
}
|
|
10
|
+
type TContainerValue = IContainerValueCenter | IContainerValueStretch;
|
|
11
|
+
export interface IContainerToken {
|
|
12
|
+
name: string;
|
|
13
|
+
value: TContainerValue;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/container/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,QAAQ,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,eAAe,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IContainerToken } from './types';
|
|
2
|
+
export declare const formatCSSBlock: (selector: string, rules: string[]) => string;
|
|
3
|
+
export declare const formatMediaQuery: (breakpointValue: number, rules: string[]) => string;
|
|
4
|
+
export declare const buildContainerCSS: (containerTokens: IContainerToken[], layer?: string) => string;
|
|
5
|
+
export declare const writeContainerFile: (content: string, stylesDir: string, fileName: string) => Promise<void>;
|
|
6
|
+
export declare const deleteAndWriteFile: (fileName: string, content: string, directory: string) => Promise<void>;
|
|
7
|
+
interface IGenerateContainerFilesParams {
|
|
8
|
+
containerTokens: IContainerToken[];
|
|
9
|
+
stylesDir: string;
|
|
10
|
+
fileName: string;
|
|
11
|
+
layer?: string;
|
|
12
|
+
isModule?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const generateContainerFiles: ({ containerTokens, stylesDir, fileName, layer, isModule, }: IGenerateContainerFilesParams) => Promise<void>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/container/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,OAAO,MAAM,EAAE,WAI/D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,MAAM,EAAE,OAAO,MAAM,EAAE,KAAG,MAK3E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,eAAe,EAAE,EAAE,QAAQ,MAAM,KAAG,MAkDtF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,SAAS,MAAM,EAAE,WAAW,MAAM,EAAE,UAAU,MAAM,kBAE5F,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,UAAU,MAAM,EAAE,SAAS,MAAM,EAAE,WAAW,MAAM,kBAG5F,CAAC;AAEF,UAAU,6BAA6B;IACnC,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,GAAU,4DAM1C,6BAA6B,kBAK/B,CAAC"}
|
package/modules/index.d.ts
CHANGED
package/modules/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/shadows/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IModule } from '../types';
|
|
2
|
+
export interface IShadowsFromTokenManagerInput {
|
|
3
|
+
includeVariables?: string[];
|
|
4
|
+
includeStyles?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IShadowsFromTokenManagerOutput {
|
|
7
|
+
jsonDir: string;
|
|
8
|
+
stylesDir: string;
|
|
9
|
+
jsonFileName?: string;
|
|
10
|
+
cssFileName?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IShadowsFromTokenManagerParams {
|
|
13
|
+
input?: IShadowsFromTokenManagerInput;
|
|
14
|
+
output: IShadowsFromTokenManagerOutput;
|
|
15
|
+
}
|
|
16
|
+
export declare const shadowsFromTokenManager: ({ input, output: { jsonDir, stylesDir, jsonFileName, cssFileName }, }: IShadowsFromTokenManagerParams) => IModule;
|
|
17
|
+
//# sourceMappingURL=shadowsFromTokenManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadowsFromTokenManager.d.ts","sourceRoot":"","sources":["../../../src/modules/shadows/shadowsFromTokenManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,WAAW,6BAA6B;IAC1C,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,8BAA8B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,8BAA8B;IAC3C,KAAK,CAAC,EAAE,6BAA6B,CAAC;IACtC,MAAM,EAAE,8BAA8B,CAAC;CAC1C;AAyBD,eAAO,MAAM,uBAAuB,GAAI,uEAGrC,8BAA8B,KAAG,OA6DlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/shadows/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhE,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,iBAAiB,CAAC;CAC5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IShadowValue } from '../../classes/TokenManager/types';
|
|
2
|
+
import { IShadowToken } from './types';
|
|
3
|
+
export declare const formatCSSBlock: (selector: string, variables: string[]) => string;
|
|
4
|
+
export declare const formatModeClassName: (modeName: string) => string;
|
|
5
|
+
export declare const getVariableName: (name: string) => string;
|
|
6
|
+
export declare const getCSSVariableName: (name: string) => string;
|
|
7
|
+
export declare const getCSSVariableValue: ({ offsetX, offsetY, blur, spread, color }: IShadowValue) => string;
|
|
8
|
+
export declare const buildShadowCSSVariables: (colorTokens: IShadowToken[]) => Record<string, string[]>;
|
|
9
|
+
export declare const buildShadowCSSContent: (cssVariables: Record<string, string[]>) => string;
|
|
10
|
+
export declare const buildShadowJSONContent: (shadowTokens: IShadowToken[]) => string;
|
|
11
|
+
export declare const writeShadowFiles: (jsonContent: string, cssContent: string, jsonDir: string, stylesDir: string, jsonFileName: string, cssFileName: string) => Promise<void>;
|
|
12
|
+
interface IGenerateShadowFilesParams {
|
|
13
|
+
shadowTokens: IShadowToken[];
|
|
14
|
+
jsonDir: string;
|
|
15
|
+
stylesDir: string;
|
|
16
|
+
jsonFileName: string;
|
|
17
|
+
cssFileName: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const generateShadowFiles: ({ shadowTokens, jsonDir, stylesDir, jsonFileName, cssFileName, }: IGenerateShadowFilesParams) => Promise<void>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/shadows/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,WAInE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,WAAsD,CAAC;AAE3G,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAoD,MAAM,CAAC;AACvG,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,WAAgB,CAAC;AAChE,eAAO,MAAM,mBAAmB,GAAI,2CAA2C,YAAY,WACrC,CAAC;AAEvD,eAAO,MAAM,uBAAuB,GAAI,aAAa,YAAY,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAkB5F,CAAC;AACF,eAAO,MAAM,qBAAqB,GAAI,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAG,MAY9E,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,cAAc,YAAY,EAAE,KAAG,MAGrE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,aAAa,MAAM,EACnB,YAAY,MAAM,EAClB,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,aAAa,MAAM,kBAQtB,CAAC;AAEF,UAAU,0BAA0B;IAChC,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,GAAU,kEAMvC,0BAA0B,kBAM5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/typography/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IDSTokenStyleTypography } from '../../classes/TokenManager/types';
|
|
2
|
+
export interface IResolveValue {
|
|
3
|
+
base: Partial<IDSTokenStyleTypography['value']>;
|
|
4
|
+
breakpoints: Record<string, Partial<IDSTokenStyleTypography['value']>>;
|
|
5
|
+
}
|
|
6
|
+
export interface ITypographyToken {
|
|
7
|
+
name: string;
|
|
8
|
+
value: IResolveValue;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/typography/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/typography/typographyFromTokenManager/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IModule } from '../../types';
|
|
2
|
+
export interface IBreakpoints {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ITypographyFromTokenManagerInput {
|
|
6
|
+
breakpoints: IBreakpoints;
|
|
7
|
+
isModule?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ITypographyFromTokenManagerOutput {
|
|
10
|
+
jsonDir: string;
|
|
11
|
+
stylesDir: string;
|
|
12
|
+
jsonFileName?: string;
|
|
13
|
+
cssFileName?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ITypographyFromTokenManagerParams {
|
|
16
|
+
input: ITypographyFromTokenManagerInput;
|
|
17
|
+
output: ITypographyFromTokenManagerOutput;
|
|
18
|
+
}
|
|
19
|
+
export declare const typographyFromTokenManager: ({ input, output: { jsonDir, stylesDir, jsonFileName, cssFileName }, }: ITypographyFromTokenManagerParams) => IModule;
|
|
20
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/modules/typography/typographyFromTokenManager/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,MAAM,WAAW,YAAY;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gCAAgC;IAC7C,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iCAAiC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iCAAiC;IAC9C,KAAK,EAAE,gCAAgC,CAAC;IACxC,MAAM,EAAE,iCAAiC,CAAC;CAC7C;AAmED,eAAO,MAAM,0BAA0B,GAAI,uEAGxC,iCAAiC,KAAG,OA2DrC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ITypographyValue } from '../../classes/TokenManager/types/figma';
|
|
2
|
+
import { IResolveValue, ITypographyToken } from './types';
|
|
3
|
+
import { IBreakpoints } from './typographyFromTokenManager/module';
|
|
4
|
+
export declare const formatCSSBlock: (selector: string, properties: string[]) => string;
|
|
5
|
+
export declare const getCSSVariableName: (name: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Конвертирует объект ITypographyValue в объект с CSS-совместимыми ключами
|
|
8
|
+
* @param typography - объект типографии из Figma
|
|
9
|
+
* @returns объект с ключами в kebab-case формате
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const typography = {
|
|
13
|
+
* fontFamily: 'Arial',
|
|
14
|
+
* fontSize: '16px',
|
|
15
|
+
* fontWeight: 400,
|
|
16
|
+
* letterSpacing: '0.5px',
|
|
17
|
+
* lineHeight: '1.5',
|
|
18
|
+
* textTransform: 'none',
|
|
19
|
+
* textDecoration: 'none'
|
|
20
|
+
* };
|
|
21
|
+
*
|
|
22
|
+
* const cssProps = convertTypographyToCSSProperties(typography);
|
|
23
|
+
* // Результат: {
|
|
24
|
+
* // 'font-family': 'Arial',
|
|
25
|
+
* // 'font-size': '16px',
|
|
26
|
+
* // 'font-weight': 400,
|
|
27
|
+
* // 'letter-spacing': '0.5px',
|
|
28
|
+
* // 'line-height': '1.5',
|
|
29
|
+
* // 'text-transform': 'none',
|
|
30
|
+
* // 'text-decoration': 'none'
|
|
31
|
+
* // }
|
|
32
|
+
*/
|
|
33
|
+
export declare const convertTypographyToCSSProperties: (typography: Partial<ITypographyValue>) => Record<string, string | number>;
|
|
34
|
+
export declare const getTypographyCSSArray: (token: IResolveValue, breakpoints: IBreakpoints) => {
|
|
35
|
+
breakpoint: number | null;
|
|
36
|
+
css: Partial<ITypographyValue>;
|
|
37
|
+
}[];
|
|
38
|
+
export declare const buildTypographyCSSContent: (typographyTokens: ITypographyToken[], breakpoints: IBreakpoints) => string;
|
|
39
|
+
export declare const buildJSONContent: (typographyTokens: ITypographyToken[]) => string;
|
|
40
|
+
export declare const writeTypographyFiles: (jsonContent: string, cssContent: string, jsonDir: string, stylesDir: string, jsonFileName: string, cssFileName: string) => Promise<void>;
|
|
41
|
+
interface IGenerateTypographyFilesParams {
|
|
42
|
+
typographyTokens: ITypographyToken[];
|
|
43
|
+
jsonDir: string;
|
|
44
|
+
stylesDir: string;
|
|
45
|
+
jsonFileName: string;
|
|
46
|
+
cssFileName: string;
|
|
47
|
+
breakpoints: IBreakpoints;
|
|
48
|
+
isModule?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare const generateTypographyFiles: ({ typographyTokens, jsonDir, stylesDir, jsonFileName, cssFileName, breakpoints, isModule, }: IGenerateTypographyFilesParams) => Promise<void>;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/typography/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAExE,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,EAAE,WAIpE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,WAAgB,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,gCAAgC,GACzC,YAAY,OAAO,CAAC,gBAAgB,CAAC,KACtC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,aAAa,EAAE,aAAa,YAAY;gBAItC,MAAM,GAAG,IAAI;SAAO,OAAO,CAAC,gBAAgB,CAAC;GAsB3F,CAAC;AAWF,eAAO,MAAM,yBAAyB,GAAI,kBAAkB,gBAAgB,EAAE,EAAE,aAAa,YAAY,KAAG,MA0B3G,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,kBAAkB,gBAAgB,EAAE,KAAG,MAGvE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,aAAa,MAAM,EACnB,YAAY,MAAM,EAClB,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,aAAa,MAAM,kBAQtB,CAAC;AAEF,UAAU,8BAA8B;IACpC,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,uBAAuB,GAAU,6FAQ3C,8BAA8B,kBAOhC,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=colorsFromStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorsFromStyles.d.ts","sourceRoot":"","sources":["../../src/temporarilyUnnecessary/colorsFromStyles.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=colorsFromVariables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorsFromVariables.d.ts","sourceRoot":"","sources":["../../src/temporarilyUnnecessary/colorsFromVariables.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/temporarilyUnnecessary/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IModule } from '../types';
|
|
2
|
-
export interface IColorsFromStylesInput {
|
|
3
|
-
variablePaths?: string[];
|
|
4
|
-
}
|
|
5
|
-
export interface IColorsFromStylesOutput {
|
|
6
|
-
jsonDir: string;
|
|
7
|
-
stylesDir: string;
|
|
8
|
-
jsonFileName?: string;
|
|
9
|
-
cssFileName?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IColorsFromStylesParams {
|
|
12
|
-
input?: IColorsFromStylesInput;
|
|
13
|
-
output: IColorsFromStylesOutput;
|
|
14
|
-
}
|
|
15
|
-
export declare const colorsFromStyles: ({ input, output: { jsonDir, stylesDir, jsonFileName, cssFileName }, }: IColorsFromStylesParams) => IModule;
|
|
16
|
-
//# sourceMappingURL=colorsFromStyles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colorsFromStyles.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/colorsFromStyles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC,MAAM,WAAW,sBAAsB;IACnC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,MAAM,EAAE,uBAAuB,CAAC;CACnC;AAED,eAAO,MAAM,gBAAgB,GAAI,uEAG9B,uBAAuB,KAAG,OA4H3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colorsFromTokenManager.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/colorsFromTokenManager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,4BAA4B;IACzC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,6BAA6B;IAC1C,KAAK,CAAC,EAAE,4BAA4B,CAAC;IACrC,MAAM,EAAE,6BAA6B,CAAC;CACzC;AAiFD,eAAO,MAAM,sBAAsB,GAAI,uEAGpC,6BAA6B,KAAG,OAuEjC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IModule } from '../types';
|
|
2
|
-
export interface IColorsFromVariablesInput {
|
|
3
|
-
variablePaths: string[];
|
|
4
|
-
}
|
|
5
|
-
export interface IColorsFromVariablesOutput {
|
|
6
|
-
jsonDir: string;
|
|
7
|
-
stylesDir: string;
|
|
8
|
-
jsonFileName?: string;
|
|
9
|
-
cssFileName?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IColorsFromVariablesParams {
|
|
12
|
-
input: IColorsFromVariablesInput;
|
|
13
|
-
output: IColorsFromVariablesOutput;
|
|
14
|
-
}
|
|
15
|
-
export declare const colorsFromVariables: ({ input: { variablePaths }, output: { jsonDir, stylesDir, jsonFileName, cssFileName }, }: IColorsFromVariablesParams) => IModule;
|
|
16
|
-
//# sourceMappingURL=colorsFromVariables.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colorsFromVariables.d.ts","sourceRoot":"","sources":["../../../src/modules/colors/colorsFromVariables.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,WAAW,yBAAyB;IACtC,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,0BAA0B;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,yBAAyB,CAAC;IACjC,MAAM,EAAE,0BAA0B,CAAC;CACtC;AAED,eAAO,MAAM,mBAAmB,GAAI,0FAGjC,0BAA0B,KAAG,OA2G9B,CAAC"}
|