1 line
2.3 KiB
JSON
1 line
2.3 KiB
JSON
|
{"ast":null,"code":"export function getLineHeight(fontSize) {\n return (fontSize + 8) / fontSize;\n}\n// https://zhuanlan.zhihu.com/p/32746810\nexport default function getFontSizes(base) {\n const fontSizes = new Array(10).fill(null).map((_, index) => {\n const i = index - 1;\n const baseSize = base * Math.pow(Math.E, i / 5);\n const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);\n // Convert to even\n return Math.floor(intSize / 2) * 2;\n });\n fontSizes[1] = base;\n return fontSizes.map(size => ({\n size,\n lineHeight: getLineHeight(size)\n }));\n}","map":{"version":3,"names":["getLineHeight","fontSize","getFontSizes","base","fontSizes","Array","fill","map","_","index","i","baseSize","Math","pow","E","intSize","floor","ceil","size","lineHeight"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/theme/themes/shared/genFontSizes.js"],"sourcesContent":["export function getLineHeight(fontSize) {\n return (fontSize + 8) / fontSize;\n}\n// https://zhuanlan.zhihu.com/p/32746810\nexport default function getFontSizes(base) {\n const fontSizes = new Array(10).fill(null).map((_, index) => {\n const i = index - 1;\n const baseSize = base * Math.pow(Math.E, i / 5);\n const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);\n // Convert to even\n return Math.floor(intSize / 2) * 2;\n });\n fontSizes[1] = base;\n return fontSizes.map(size => ({\n size,\n lineHeight: getLineHeight(size)\n }));\n}"],"mappings":"AAAA,OAAO,SAASA,aAAaA,CAACC,QAAQ,EAAE;EACtC,OAAO,CAACA,QAAQ,GAAG,CAAC,IAAIA,QAAQ;AAClC;AACA;AACA,eAAe,SAASC,YAAYA,CAACC,IAAI,EAAE;EACzC,MAAMC,SAAS,GAAG,IAAIC,KAAK,CAAC,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CAACC,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,KAAK;IAC3D,MAAMC,CAAC,GAAGD,KAAK,GAAG,CAAC;IACnB,MAAME,QAAQ,GAAGR,IAAI,GAAGS,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,CAAC,EAAEJ,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAMK,OAAO,GAAGN,KAAK,GAAG,CAAC,GAAGG,IAAI,CAACI,KAAK,CAACL,QAAQ,CAAC,GAAGC,IAAI,CAACK,IAAI,CAACN,QAAQ,CAAC;IACtE;IACA,OAAOC,IAAI,CAACI,KAAK,CAACD,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC;EACpC,CAAC,CAAC;EACFX,SAAS,CAAC,CAAC,CAAC,GAAGD,IAAI;EACnB,OAAOC,SAAS,CAACG,GAAG,CAACW,IAAI,KAAK;IAC5BA,IAAI;IACJC,UAAU,EAAEnB,aAAa,CAACkB,IAAI;EAChC,CAAC,CAAC,CAAC;AACL","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|