chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -5,7 +5,7 @@ const plugin = require('tailwindcss/plugin');
|
||||
const lightModeVariables = require('./light');
|
||||
const darkModeVariables = require('./dark');
|
||||
|
||||
// 用于生成 CSS 变量的帮助函数
|
||||
// Helper functions for generating CSS variables
|
||||
function generateCssVariables(variables, theme) {
|
||||
return Object.entries(variables).reduce((acc, [key, value]) => {
|
||||
acc[`--${key}`] = theme ? theme(value) : value;
|
||||
@@ -13,7 +13,7 @@ function generateCssVariables(variables, theme) {
|
||||
}, {});
|
||||
}
|
||||
|
||||
// 样式语义化
|
||||
// style semantics
|
||||
function generateSemanticVariables(semantics, theme, property) {
|
||||
return Object.entries(semantics).map(([key, value]) => ({
|
||||
[`.${key}`]: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// 暗色模式的 CSS 变量
|
||||
// CSS Variables for Dark Mode
|
||||
const darkModeVariables = {
|
||||
background: '2, 8, 23',
|
||||
foreground: '249, 249, 249',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// 消费者和生产者公共的 tailwind 配置和工具函数
|
||||
// Common tailwind configurations and tool functions for consumers and producers
|
||||
|
||||
export function designTokenToTailwindConfig(
|
||||
tokenJson: Record<string, unknown>,
|
||||
@@ -103,6 +103,6 @@ function borderRadiusTransformer(borderRadiusObj: Record<string, string>) {
|
||||
return res;
|
||||
}
|
||||
|
||||
// 获取其他packages,并且拼接上 /src/**/*.{ts,tsx}
|
||||
// Get other packages and splice /src /**/*.{ ts, tsx}
|
||||
|
||||
export { getTailwindContents } from './tailwind-contents';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// 浅色模式的 CSS 变量
|
||||
// CSS Variables for Light Mode
|
||||
const lightModeVariables = {
|
||||
background: '255, 255, 255',
|
||||
foreground: '28, 28, 35',
|
||||
@@ -27,7 +27,7 @@ const lightModeVariables = {
|
||||
'coze-fg-3': '15, 21, 40',
|
||||
'coze-fg-2': '32, 41, 69',
|
||||
'coze-fg-1': '55, 67, 106',
|
||||
// TODO: 需要删除bg9
|
||||
// TODO: need to remove bg9
|
||||
'coze-bg-9': '6, 7, 9',
|
||||
'coze-bg-8': '68, 83, 130',
|
||||
'coze-bg-7': '75, 90, 140',
|
||||
@@ -151,7 +151,7 @@ const lightModeVariables = {
|
||||
'coze-3': '3px',
|
||||
'coze-2': '2px',
|
||||
'coze-1': '1px',
|
||||
// TODO: rspress编译不出来,需要通过一些工具处理,目前没有用到,暂时注释处理
|
||||
// TODO: rspress cannot be compiled, and it needs to be processed by some tools. It is not used at present. Temporary comment processing
|
||||
// 'coze-0.5': '0.5px',
|
||||
'coze-0-5': '0.5px',
|
||||
|
||||
@@ -174,7 +174,7 @@ const lightModeVariables = {
|
||||
'coze-bg-6-alpha': '0.13',
|
||||
'coze-bg-7-alpha': '0.19',
|
||||
'coze-bg-8-alpha': '0.25',
|
||||
// TODO: 需要删除bg9
|
||||
// TODO: need to remove bg9
|
||||
'coze-bg-9-alpha': '0.16',
|
||||
'coze-stroke-5-alpha': '0.13',
|
||||
'coze-stroke-6-alpha': '0.25',
|
||||
|
||||
@@ -46,7 +46,7 @@ export const getTailwindContents = (projectRoot: string) => {
|
||||
.map(location => path.resolve(location, 'src/**/*.{ts,tsx}')),
|
||||
);
|
||||
|
||||
// 兼容 coze-design 内部 tailwind 样式
|
||||
// Compatible with coze-design internal tailwind style
|
||||
contents.push('./node_modules/@coze-arch/coze-design/**/*.{js,jsx}');
|
||||
|
||||
return contents;
|
||||
|
||||
Reference in New Issue
Block a user