mirror of
https://mirror.skon.top/github.com/langgenius/dify.git
synced 2026-04-20 15:20:15 +08:00
chore: workspace lint (#35331)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6,18 +6,18 @@ This package provides shared design tokens (colors, shadows, typography), the `c
|
||||
|
||||
The Figma design system uses `--radius/*` tokens whose scale is **offset by one step** from Tailwind CSS v4 defaults. When translating Figma specs to code, always use this mapping — never use `radius-*` as a CSS class, and never extend `borderRadius` in the preset.
|
||||
|
||||
| Figma Token | Value | Tailwind Class |
|
||||
|---|---|---|
|
||||
| `--radius/2xs` | 2px | `rounded-xs` |
|
||||
| `--radius/xs` | 4px | `rounded-sm` |
|
||||
| `--radius/sm` | 6px | `rounded-md` |
|
||||
| `--radius/md` | 8px | `rounded-lg` |
|
||||
| `--radius/lg` | 10px | `rounded-[10px]` |
|
||||
| `--radius/xl` | 12px | `rounded-xl` |
|
||||
| `--radius/2xl` | 16px | `rounded-2xl` |
|
||||
| `--radius/3xl` | 20px | `rounded-[20px]` |
|
||||
| `--radius/6xl` | 28px | `rounded-[28px]` |
|
||||
| `--radius/full` | 999px | `rounded-full` |
|
||||
| Figma Token | Value | Tailwind Class |
|
||||
| --------------- | ----- | ---------------- |
|
||||
| `--radius/2xs` | 2px | `rounded-xs` |
|
||||
| `--radius/xs` | 4px | `rounded-sm` |
|
||||
| `--radius/sm` | 6px | `rounded-md` |
|
||||
| `--radius/md` | 8px | `rounded-lg` |
|
||||
| `--radius/lg` | 10px | `rounded-[10px]` |
|
||||
| `--radius/xl` | 12px | `rounded-xl` |
|
||||
| `--radius/2xl` | 16px | `rounded-2xl` |
|
||||
| `--radius/3xl` | 20px | `rounded-[20px]` |
|
||||
| `--radius/6xl` | 28px | `rounded-[28px]` |
|
||||
| `--radius/full` | 999px | `rounded-full` |
|
||||
|
||||
### Rules
|
||||
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
{
|
||||
"name": "@langgenius/dify-ui",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./styles.css": "./src/styles/styles.css",
|
||||
"./tailwind-preset": {
|
||||
"import": "./src/tailwind-preset.ts",
|
||||
"types": "./src/tailwind-preset.ts"
|
||||
"types": "./src/tailwind-preset.ts",
|
||||
"import": "./src/tailwind-preset.ts"
|
||||
},
|
||||
"./cn": {
|
||||
"import": "./src/cn.ts",
|
||||
"types": "./src/cn.ts"
|
||||
"types": "./src/cn.ts",
|
||||
"import": "./src/cn.ts"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"type-check": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "catalog:",
|
||||
"tailwind-merge": "catalog:"
|
||||
@@ -22,8 +25,5 @@
|
||||
"@dify/tsconfig": "workspace:*",
|
||||
"tailwindcss": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
"scripts": {
|
||||
"type-check": "tsc"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"extends": "@dify/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": false,
|
||||
"rootDir": "src",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"noEmit": false,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"sourceMap": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface IconifyJSON {
|
||||
export type IconifyJSON = {
|
||||
prefix: string
|
||||
icons: Record<string, IconifyIcon>
|
||||
aliases?: Record<string, IconifyAlias>
|
||||
@@ -7,7 +7,7 @@ export interface IconifyJSON {
|
||||
lastModified?: number
|
||||
}
|
||||
|
||||
export interface IconifyIcon {
|
||||
export type IconifyIcon = {
|
||||
body: string
|
||||
left?: number
|
||||
top?: number
|
||||
@@ -18,11 +18,11 @@ export interface IconifyIcon {
|
||||
vFlip?: boolean
|
||||
}
|
||||
|
||||
export interface IconifyAlias extends Omit<IconifyIcon, 'body'> {
|
||||
export type IconifyAlias = {
|
||||
parent: string
|
||||
}
|
||||
} & Omit<IconifyIcon, 'body'>
|
||||
|
||||
export interface IconifyInfo {
|
||||
export type IconifyInfo = {
|
||||
prefix: string
|
||||
name: string
|
||||
total: number
|
||||
@@ -40,11 +40,11 @@ export interface IconifyInfo {
|
||||
palette?: boolean
|
||||
}
|
||||
|
||||
export interface IconifyMetaData {
|
||||
export type IconifyMetaData = {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface IconifyChars {
|
||||
export type IconifyChars = {
|
||||
[key: string]: string
|
||||
}
|
||||
|
||||
@@ -52,4 +52,3 @@ export declare const icons: IconifyJSON
|
||||
export declare const info: IconifyInfo
|
||||
export declare const metadata: IconifyMetaData
|
||||
export declare const chars: IconifyChars
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
const chars = require('./chars.json')
|
||||
const icons = require('./icons.json')
|
||||
const info = require('./info.json')
|
||||
const metadata = require('./metadata.json')
|
||||
const chars = require('./chars.json')
|
||||
|
||||
module.exports = { icons, info, metadata, chars }
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import chars from './chars.json' with { type: 'json' }
|
||||
import icons from './icons.json' with { type: 'json' }
|
||||
import info from './info.json' with { type: 'json' }
|
||||
import metadata from './metadata.json' with { type: 'json' }
|
||||
import chars from './chars.json' with { type: 'json' }
|
||||
|
||||
export { icons, info, metadata, chars }
|
||||
|
||||
export { chars, icons, info, metadata }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface IconifyJSON {
|
||||
export type IconifyJSON = {
|
||||
prefix: string
|
||||
icons: Record<string, IconifyIcon>
|
||||
aliases?: Record<string, IconifyAlias>
|
||||
@@ -7,7 +7,7 @@ export interface IconifyJSON {
|
||||
lastModified?: number
|
||||
}
|
||||
|
||||
export interface IconifyIcon {
|
||||
export type IconifyIcon = {
|
||||
body: string
|
||||
left?: number
|
||||
top?: number
|
||||
@@ -18,11 +18,11 @@ export interface IconifyIcon {
|
||||
vFlip?: boolean
|
||||
}
|
||||
|
||||
export interface IconifyAlias extends Omit<IconifyIcon, 'body'> {
|
||||
export type IconifyAlias = {
|
||||
parent: string
|
||||
}
|
||||
} & Omit<IconifyIcon, 'body'>
|
||||
|
||||
export interface IconifyInfo {
|
||||
export type IconifyInfo = {
|
||||
prefix: string
|
||||
name: string
|
||||
total: number
|
||||
@@ -40,11 +40,11 @@ export interface IconifyInfo {
|
||||
palette?: boolean
|
||||
}
|
||||
|
||||
export interface IconifyMetaData {
|
||||
export type IconifyMetaData = {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface IconifyChars {
|
||||
export type IconifyChars = {
|
||||
[key: string]: string
|
||||
}
|
||||
|
||||
@@ -52,4 +52,3 @@ export declare const icons: IconifyJSON
|
||||
export declare const info: IconifyInfo
|
||||
export declare const metadata: IconifyMetaData
|
||||
export declare const chars: IconifyChars
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
const chars = require('./chars.json')
|
||||
const icons = require('./icons.json')
|
||||
const info = require('./info.json')
|
||||
const metadata = require('./metadata.json')
|
||||
const chars = require('./chars.json')
|
||||
|
||||
module.exports = { icons, info, metadata, chars }
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import chars from './chars.json' with { type: 'json' }
|
||||
import icons from './icons.json' with { type: 'json' }
|
||||
import info from './info.json' with { type: 'json' }
|
||||
import metadata from './metadata.json' with { type: 'json' }
|
||||
import chars from './chars.json' with { type: 'json' }
|
||||
|
||||
export { icons, info, metadata, chars }
|
||||
|
||||
export { chars, icons, info, metadata }
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@dify/iconify-collections",
|
||||
"private": true,
|
||||
"version": "0.0.0-private",
|
||||
"private": true,
|
||||
"exports": {
|
||||
"./custom-public": {
|
||||
"types": "./custom-public/index.d.ts",
|
||||
"require": "./custom-public/index.js",
|
||||
"import": "./custom-public/index.mjs"
|
||||
"import": "./custom-public/index.mjs",
|
||||
"require": "./custom-public/index.js"
|
||||
},
|
||||
"./custom-public/icons.json": "./custom-public/icons.json",
|
||||
"./custom-public/info.json": "./custom-public/info.json",
|
||||
@@ -14,8 +14,8 @@
|
||||
"./custom-public/chars.json": "./custom-public/chars.json",
|
||||
"./custom-vender": {
|
||||
"types": "./custom-vender/index.d.ts",
|
||||
"require": "./custom-vender/index.js",
|
||||
"import": "./custom-vender/index.mjs"
|
||||
"import": "./custom-vender/index.mjs",
|
||||
"require": "./custom-vender/index.js"
|
||||
},
|
||||
"./custom-vender/icons.json": "./custom-vender/icons.json",
|
||||
"./custom-vender/info.json": "./custom-vender/info.json",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "migrate-no-unchecked-indexed-access",
|
||||
"private": true,
|
||||
"version": "0.0.0-private",
|
||||
"type": "module",
|
||||
"version": "0.0.0-private",
|
||||
"private": true,
|
||||
"bin": {
|
||||
"migrate-no-unchecked-indexed-access": "./bin/migrate-no-unchecked-indexed-access.js"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user