@mxmweb/zui 1.0.3 → 1.0.19

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.
Files changed (132) hide show
  1. package/.editorconfig +38 -0
  2. package/.prettierignore +16 -0
  3. package/.prettierrc +17 -0
  4. package/.releaserc.json +36 -0
  5. package/CHANGELOG.md +58 -0
  6. package/CONTRIBUTING.md +111 -0
  7. package/NPMREADME.md +0 -0
  8. package/README.md +4 -1
  9. package/bash.exe.stackdump +40 -0
  10. package/components.json +21 -0
  11. package/dist/README.md +0 -0
  12. package/dist/assets/style.css +1 -0
  13. package/{containers → dist/containers}/DashboardContainer.d.ts +8 -0
  14. package/dist/containers/DockContainer.d.ts +24 -0
  15. package/{elements → dist/elements}/Button.d.ts +3 -4
  16. package/dist/elements/CustomDock.d.ts +25 -0
  17. package/dist/elements/DropDownButton.d.ts +24 -0
  18. package/{elements → dist/elements}/DropdownMenu.d.ts +2 -4
  19. package/dist/elements/GoggleNavbar.d.ts +31 -0
  20. package/{elements → dist/elements}/Uploader/UploadItem.d.ts +17 -0
  21. package/{elements → dist/elements}/Uploader/styles.d.ts +10 -1
  22. package/dist/elements/Uploader/types.d.ts +87 -0
  23. package/dist/examples/DockContainerExample.d.ts +3 -0
  24. package/dist/icons/Icon.d.ts +7 -0
  25. package/dist/icons/Icon.tsx +82 -0
  26. package/dist/icons/index.d.ts +13 -0
  27. package/dist/icons/index.tsx +92 -0
  28. package/dist/icons/lazyIndex.d.ts +7 -0
  29. package/dist/icons/lazyIndex.tsx +49 -0
  30. package/dist/icons/rag/csv.svg +3 -0
  31. package/dist/icons/rag/document.svg +3 -0
  32. package/dist/icons/rag/excel.svg +3 -0
  33. package/dist/icons/rag/file.svg +3 -0
  34. package/dist/icons/rag/folder.svg +5 -0
  35. package/dist/icons/rag/json.svg +3 -0
  36. package/dist/icons/rag/knowledgebase.svg +3 -0
  37. package/dist/icons/rag/netretrive.svg +3 -0
  38. package/dist/icons/rag/odf.svg +7 -0
  39. package/dist/icons/rag/pdf.svg +3 -0
  40. package/dist/icons/rag/pic.svg +3 -0
  41. package/dist/icons/rag/ppt.svg +3 -0
  42. package/dist/icons/rag/think.svg +6 -0
  43. package/dist/icons/rag/txt.svg +3 -0
  44. package/dist/icons/rag/url.svg +3 -0
  45. package/dist/icons/rag/word.svg +3 -0
  46. package/dist/icons/rag/wps.svg +3 -0
  47. package/dist/icons/rag/zip.svg +7 -0
  48. package/dist/index.js +2299 -0
  49. package/dist/lib_enter.d.ts +13 -0
  50. package/dist/package.json +26 -0
  51. package/{theme → dist/theme}/styledTheme.d.ts +40 -54
  52. package/eslint.config.js +92 -0
  53. package/index.html +13 -0
  54. package/package.json +42 -14
  55. package/postcss.config.cjs +19 -0
  56. package/public/mock.csv +16 -0
  57. package/public/mock_/345/211/257/346/234/254.csv +16 -0
  58. package/public/vite.svg +1 -0
  59. package/src/Preview.tsx +15 -0
  60. package/src/assets/img/excel.png +0 -0
  61. package/src/assets/img/img.png +0 -0
  62. package/src/assets/img/pdf.png +0 -0
  63. package/src/assets/img/ppt.png +0 -0
  64. package/src/assets/img/txt.png +0 -0
  65. package/src/assets/img/word.png +0 -0
  66. package/src/containers/DashboardContainer.tsx +507 -0
  67. package/src/containers/DockContainer.tsx +186 -0
  68. package/src/containers/style.css +37 -0
  69. package/src/elements/Button.tsx +118 -0
  70. package/src/elements/CustomDock.tsx +287 -0
  71. package/src/elements/DropDownButton.tsx +249 -0
  72. package/src/elements/DropdownMenu.tsx +184 -0
  73. package/src/elements/GoggleNavbar.tsx +184 -0
  74. package/src/elements/Uploader/README.md +249 -0
  75. package/src/elements/Uploader/UploadItem.tsx +298 -0
  76. package/src/elements/Uploader/example.tsx +95 -0
  77. package/src/elements/Uploader/index.tsx +702 -0
  78. package/src/elements/Uploader/styles.tsx +291 -0
  79. package/src/elements/Uploader/types.ts +119 -0
  80. package/src/elements/Uploader/utils.ts +200 -0
  81. package/src/elements/Uploader.tsx +3 -0
  82. package/src/examples/DockContainerExample.tsx +237 -0
  83. package/src/icons/Icon.tsx +82 -0
  84. package/src/icons/index.tsx +92 -0
  85. package/src/icons/lazyIndex.tsx +49 -0
  86. package/src/icons/rag/csv.svg +3 -0
  87. package/src/icons/rag/document.svg +3 -0
  88. package/src/icons/rag/excel.svg +3 -0
  89. package/src/icons/rag/file.svg +3 -0
  90. package/src/icons/rag/folder.svg +5 -0
  91. package/src/icons/rag/json.svg +3 -0
  92. package/src/icons/rag/knowledgebase.svg +3 -0
  93. package/src/icons/rag/netretrive.svg +3 -0
  94. package/src/icons/rag/odf.svg +7 -0
  95. package/src/icons/rag/pdf.svg +3 -0
  96. package/src/icons/rag/pic.svg +3 -0
  97. package/src/icons/rag/ppt.svg +3 -0
  98. package/src/icons/rag/think.svg +6 -0
  99. package/src/icons/rag/txt.svg +3 -0
  100. package/src/icons/rag/url.svg +3 -0
  101. package/src/icons/rag/word.svg +3 -0
  102. package/src/icons/rag/wps.svg +3 -0
  103. package/src/icons/rag/zip.svg +7 -0
  104. package/src/lib_enter.ts +27 -0
  105. package/src/main.tsx +11 -0
  106. package/src/style.css +9 -0
  107. package/src/theme/styledTheme.tsx +253 -0
  108. package/src/type.d.ts +0 -0
  109. package/src/types/images.d.ts +12 -0
  110. package/src/types/svg-modules.d.ts +24 -0
  111. package/src/vite-env.d.ts +11 -0
  112. package/tailwind.config.js +170 -0
  113. package/tsconfig.app.json +29 -0
  114. package/tsconfig.app.tsbuildinfo +11 -0
  115. package/tsconfig.json +13 -0
  116. package/tsconfig.node.json +22 -0
  117. package/tsconfig.node.tsbuildinfo +1 -0
  118. package/vite.config.ts +167 -0
  119. package/assets/zui.css +0 -1
  120. package/elements/Uploader/types.d.ts +0 -50
  121. package/index-CgFHm4CL-O5tUkbrp.js +0 -48009
  122. package/index.js +0 -49394
  123. package/lib_enter.d.ts +0 -6
  124. /package/{Preview.d.ts → dist/Preview.d.ts} +0 -0
  125. /package/{elements → dist/elements}/Uploader/example.d.ts +0 -0
  126. /package/{elements → dist/elements}/Uploader/index.d.ts +0 -0
  127. /package/{elements → dist/elements}/Uploader/utils.d.ts +0 -0
  128. /package/{elements → dist/elements}/Uploader.d.ts +0 -0
  129. /package/{main.d.ts → dist/main.d.ts} +0 -0
  130. /package/{mock.csv → dist/mock.csv} +0 -0
  131. /package/{mock_ → dist/mock_}/345/211/257/346/234/254.csv" +0 -0
  132. /package/{vite.svg → dist/vite.svg} +0 -0
package/src/style.css ADDED
@@ -0,0 +1,9 @@
1
+ @import 'tailwindcss';
2
+
3
+ /* 额外的全局样式 */
4
+
5
+
6
+ * {
7
+ padding: 0;
8
+ margin: 0;
9
+ }
@@ -0,0 +1,253 @@
1
+ import React, { createContext, useContext } from 'react';
2
+
3
+ // 主题类型定义
4
+ export type SizeType = 'sm' | 'md' | 'lg'
5
+ export type FontWeightType = 'normal' | 'bold' |'thin'
6
+ export type FontFamilyType = 'default' | 'serif' | 'mono'
7
+
8
+
9
+
10
+ export interface ThemeColors {
11
+ primary: string
12
+ secondary: string
13
+ success: string
14
+ warning: string
15
+ error: string
16
+ info: string
17
+ background: string
18
+ text: string
19
+ border: string
20
+ disabled: string
21
+ disabledBackground: string
22
+ disabledText: string
23
+ textSecondary?: string
24
+ textTertiary?: string
25
+ textInverse?: string
26
+ shadow?: string
27
+ appBackground?: string
28
+ listBackground?: string
29
+ dashboardBackground?: string
30
+ // 兼容扩展:主色状态
31
+ primaryHover?: string
32
+ primaryActive?: string
33
+ // 边框强弱
34
+ borderWeak?: string
35
+ // 表面/背景拓展
36
+ surfaceSubtle?: string
37
+ surfaceSelected?: string
38
+ // 按钮常用映射(保证不使用 tokens 也能拿到状态颜色)
39
+ btnPrimaryBg?: string
40
+ btnPrimaryBgHover?: string
41
+ btnPrimaryBgActive?: string
42
+ btnPrimaryBgDisabled?: string
43
+ btnPrimaryText?: string
44
+ btnPrimaryTextDisabled?: string
45
+ btnSecondaryText?: string
46
+ btnSecondaryTextHover?: string
47
+ btnSecondaryTextActive?: string
48
+ btnSecondaryTextDisabled?: string
49
+ btnSecondaryBg?: string
50
+ btnSecondaryBgHover?: string
51
+ btnSecondaryBgActive?: string
52
+ btnSecondaryBgDisabled?: string
53
+ btnSecondaryBorder?: string
54
+ btnSecondaryBorderHover?: string
55
+ btnSecondaryBorderActive?: string
56
+ btnSecondaryBorderDisabled?: string
57
+ btnTextText?: string
58
+ btnTextTextHover?: string
59
+ btnTextTextActive?: string
60
+ btnTextTextDisabled?: string
61
+ [key: string]: any
62
+ }
63
+
64
+ export interface ThemeOthers {
65
+
66
+ }
67
+
68
+ export interface ThemeSpace {
69
+ sidebar: string
70
+ size: string
71
+ radius: string
72
+ padding: string
73
+ margin: string
74
+ shadow: string
75
+ lineHeight: string
76
+ [key: string]: any
77
+ }
78
+
79
+ export interface ThemeFonts {
80
+ body?: {
81
+ size?: string
82
+ weight?: string
83
+ family?: string
84
+ }
85
+ heading?: {
86
+ size?: string
87
+ weight?: string
88
+ family?: string
89
+ }
90
+ }
91
+
92
+ export interface ThemeIcons {
93
+ // aiAvatar: string
94
+ // userAvatar: string
95
+ // pdf: string
96
+ // word: string
97
+ // image: string
98
+ // video: string
99
+ // audio: string
100
+ // excel: string
101
+ // ppt: string
102
+ [key: string]: any
103
+ }
104
+
105
+ export interface AppTheme {
106
+ colors: ThemeColors
107
+ space: ThemeSpace
108
+ icons: ThemeIcons
109
+ fonts?: ThemeFonts
110
+ others?: ThemeOthers
111
+ }
112
+
113
+ // 默认主题实现
114
+ export const defaultTheme: AppTheme = {
115
+ colors: {
116
+ // 兼容旧字段
117
+ primary: '#4E6EF2',
118
+ secondary: '#6D86F5',
119
+ success: '#52C41A',
120
+ warning: '#FAAD14',
121
+ error: '#F5222D',
122
+ info: '#1890FF',
123
+ background: '#F7F8FA',
124
+ text: '#1D2129',
125
+ border: '#DDE0E5',
126
+ disabled: '#C9CDD4',
127
+ disabledBackground: '#F5F7FA',
128
+ disabledText: '#C9CDD4',
129
+ shadow: '0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)',
130
+ appBackground: 'transparent',
131
+ listBackground: '#F2F3F5',
132
+ dashboardBackground: '#FFFFFF',
133
+ textSecondary: '#4E5969',
134
+ textTertiary: '#86909C',
135
+ textInverse: '#FFFFFF',
136
+ // 状态与扩展
137
+ primaryHover: '#6D86F5',
138
+ primaryActive: '#2D4BE0',
139
+ borderWeak: '#E5E6EB',
140
+ surfaceSubtle: '#F2F3F5',
141
+ surfaceSelected: '#EEF3FE',
142
+ // 按钮映射
143
+ btnPrimaryBg: '#4E6EF2',
144
+ btnPrimaryBgHover: '#6D86F5',
145
+ btnPrimaryBgActive: '#2D4BE0',
146
+ btnPrimaryBgDisabled: '#F5F7FA',
147
+ btnPrimaryText: '#FFFFFF',
148
+ btnPrimaryTextDisabled: '#C9CDD4',
149
+ btnSecondaryText: '#4E6EF2',
150
+ btnSecondaryTextHover: '#4E6EF2',
151
+ btnSecondaryTextActive: '#2D4BE0',
152
+ btnSecondaryTextDisabled: '#C9CDD4',
153
+ btnSecondaryBg: '#FFFFFF',
154
+ btnSecondaryBgHover: '#EEF3FE',
155
+ btnSecondaryBgActive: '#EEF3FE',
156
+ btnSecondaryBgDisabled: '#F5F7FA',
157
+ btnSecondaryBorder: '#4E6EF2',
158
+ btnSecondaryBorderHover: '#6D86F5',
159
+ btnSecondaryBorderActive: '#2D4BE0',
160
+ btnSecondaryBorderDisabled: '#E5E6EB',
161
+ btnTextText: '#4E6EF2',
162
+ btnTextTextHover: '#6D86F5',
163
+ btnTextTextActive: '#2D4BE0',
164
+ btnTextTextDisabled: '#C9CDD4',
165
+ },
166
+ space: {
167
+ sidebar: '260px',
168
+ size: '12px',
169
+ radius: '4px',
170
+ padding: '8px',
171
+ margin: '8px',
172
+ shadow: '0 2px 8px rgba(0,0,0,0.1)',
173
+ lineHeight: '1.5',
174
+ },
175
+ fonts: {
176
+ body: {
177
+ size: '14px',
178
+ weight: 'normal',
179
+ family: 'PingFang SC, Microsoft YaHei, Arial, sans-serif',
180
+ },
181
+ heading: {
182
+ size: '16px',
183
+ weight: '600',
184
+ family: 'PingFang SC, Microsoft YaHei, Arial, sans-serif',
185
+ },
186
+ },
187
+ icons: {
188
+ aiAvatar: 'http://10.15.12.13:9000/dev-rag-data/header_pic/JIABINBIN00/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20231212161213.jpg',
189
+ userAvatar: 'http://10.15.12.13:9005/assets/nav-logo-BKaOCDqi.png',
190
+ pdf: 'https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/pdf-icon.png',
191
+ word: 'https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/word-icon.png',
192
+ image: 'https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/image-icon.png',
193
+ video: 'https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/video-icon.png',
194
+ audio: 'https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/audio-icon.png',
195
+ excel: 'https://ai-chat-1326151111.cos.c zap-shanghai.myqcloud.com/excel-icon.png',
196
+ ppt: 'https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/ppt-icon.png',
197
+ },
198
+ others: {
199
+ baseFontWeight: 'normal',
200
+ }
201
+ }
202
+ export const defaultStyles: Styles = {
203
+ theme: defaultTheme,
204
+ mode: 'light',
205
+ }
206
+ export interface Styles {
207
+ theme?: AppTheme
208
+ mode?: 'light' | 'dark'
209
+ [key: string]: any
210
+ }
211
+
212
+ // 深合并 theme 工具
213
+ export function deepMergeTheme(baseStyles: Styles, customStyles?: Partial<Styles>): Styles {
214
+ if (!customStyles) return baseStyles;
215
+
216
+ const mergedStyles = {
217
+ ...baseStyles,
218
+ ...customStyles,
219
+ };
220
+
221
+ // 如果 customStyles 有 theme,则合并 theme
222
+ if (customStyles.theme && baseStyles.theme) {
223
+ mergedStyles.theme = {
224
+ ...baseStyles.theme,
225
+ ...customStyles.theme,
226
+ colors: { ...baseStyles.theme.colors, ...customStyles.theme.colors },
227
+ space: { ...baseStyles.theme.space, ...customStyles.theme.space },
228
+ icons: { ...baseStyles.theme.icons, ...customStyles.theme.icons },
229
+ fonts: { ...baseStyles.theme.fonts, ...customStyles.theme.fonts },
230
+ others: { ...baseStyles.theme.others, ...customStyles.theme.others },
231
+ };
232
+ }
233
+
234
+ return mergedStyles;
235
+ }
236
+
237
+
238
+ export const ThemeContext = createContext<Styles>(defaultStyles);
239
+
240
+ export const useTheme = () => useContext(ThemeContext);
241
+
242
+
243
+ export const ThemeProvider = ({ styles, children }: { styles: Styles; children: React.ReactNode }) => {
244
+ // 这里做一次转换
245
+ const cssTheme = {
246
+ ...styles,
247
+ };
248
+ return (
249
+ <ThemeContext.Provider value={cssTheme}>
250
+ {children}
251
+ </ThemeContext.Provider>
252
+ );
253
+ };
package/src/type.d.ts ADDED
File without changes
@@ -0,0 +1,12 @@
1
+ declare module '*.svg' {
2
+ import * as React from 'react';
3
+ const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
4
+ export default ReactComponent;
5
+ }
6
+
7
+ declare module '*.png' {
8
+ const src: string;
9
+ export default src;
10
+ }
11
+
12
+
@@ -0,0 +1,24 @@
1
+ declare module '*.svg?react' {
2
+ import * as React from 'react';
3
+ const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
4
+ export default ReactComponent;
5
+ }
6
+
7
+ declare module '*.svg?url' {
8
+ const src: string;
9
+ export default src;
10
+ }
11
+
12
+ // 包内子路径导入(发布后给外部项目使用)
13
+ declare module '@mxmweb/zui/icons/*.svg?react' {
14
+ import * as React from 'react';
15
+ const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
16
+ export default ReactComponent;
17
+ }
18
+
19
+ declare module '@mxmweb/zui/icons/*.svg?url' {
20
+ const src: string;
21
+ export default src;
22
+ }
23
+
24
+
@@ -0,0 +1,11 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TITLE: string;
5
+ readonly VITE_API_URL: string;
6
+ readonly VITE_PUBLISH_NAME: string;
7
+ }
8
+
9
+ interface ImportMeta {
10
+ readonly env: ImportMetaEnv;
11
+ }
@@ -0,0 +1,170 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ import typography from '@tailwindcss/typography';
3
+ export default {
4
+ darkMode: ['class'],
5
+ mode: 'jit',
6
+ corePlugins: {
7
+ preflight: false,
8
+ aspectRatio: true,
9
+ divideStyle: true,
10
+ },
11
+ content: ['./src/**/*.{html,ts,tsx,mdx}'],
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ border: 'hsl(var(--border))',
16
+ input: 'hsl(var(--input))',
17
+ ring: 'hsl(var(--ring))',
18
+ background: 'hsl(var(--background))',
19
+ foreground: 'hsl(var(--foreground))',
20
+ primary: {
21
+ DEFAULT: 'hsl(var(--primary))',
22
+ foreground: 'hsl(var(--primary-foreground))',
23
+ },
24
+ secondary: {
25
+ DEFAULT: 'hsl(var(--secondary))',
26
+ foreground: 'hsl(var(--secondary-foreground))',
27
+ },
28
+ destructive: {
29
+ DEFAULT: 'hsl(var(--destructive))',
30
+ foreground: 'hsl(var(--destructive-foreground))',
31
+ },
32
+ muted: {
33
+ DEFAULT: 'hsl(var(--muted))',
34
+ foreground: 'hsl(var(--muted-foreground))',
35
+ },
36
+ accent: {
37
+ DEFAULT: 'hsl(var(--accent))',
38
+ foreground: 'hsl(var(--accent-foreground))',
39
+ },
40
+ popover: {
41
+ DEFAULT: 'hsl(var(--popover))',
42
+ foreground: 'hsl(var(--popover-foreground))',
43
+ },
44
+ card: {
45
+ DEFAULT: 'hsl(var(--card))',
46
+ foreground: 'hsl(var(--card-foreground))',
47
+ },
48
+ chart: {
49
+ 1: 'hsl(var(--chart-1))',
50
+ 2: 'hsl(var(--chart-2))',
51
+ 3: 'hsl(var(--chart-3))',
52
+ 4: 'hsl(var(--chart-4))',
53
+ 5: 'hsl(var(--chart-5))',
54
+ },
55
+ },
56
+ borderRadius: {
57
+ lg: 'var(--radius)',
58
+ md: 'calc(var(--radius) - 2px)',
59
+ sm: 'calc(var(--radius) - 4px)',
60
+ },
61
+ keyframes: {
62
+ 'accordion-down': {
63
+ from: {
64
+ height: '0',
65
+ },
66
+ to: {
67
+ height: 'var(--radix-accordion-content-height)',
68
+ },
69
+ },
70
+ 'accordion-up': {
71
+ from: {
72
+ height: 'var(--radix-accordion-content-height)',
73
+ },
74
+ to: {
75
+ height: '0',
76
+ },
77
+ },
78
+ dot: {
79
+ '0%, 20%': {
80
+ color: 'rgba(0,0,0,0)',
81
+ textShadow: '.25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0)',
82
+ },
83
+ '40%': {
84
+ color: 'black',
85
+ textShadow: '.25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0)',
86
+ },
87
+ '60%': {
88
+ textShadow: '.25em 0 0 black, .5em 0 0 rgba(0,0,0,0)',
89
+ },
90
+ '80%, 100%': {
91
+ textShadow: '.25em 0 0 black, .5em 0 0 black',
92
+ },
93
+ },
94
+ slideDownAndFade: {
95
+ from: {
96
+ opacity: '0',
97
+ transform: 'translateY(-2px)',
98
+ },
99
+ to: {
100
+ opacity: '1',
101
+ transform: 'translateY(0)',
102
+ },
103
+ },
104
+ slideLeftAndFade: {
105
+ from: {
106
+ opacity: '0',
107
+ transform: 'translateX(2px)',
108
+ },
109
+ to: {
110
+ opacity: '1',
111
+ transform: 'translateX(0)',
112
+ },
113
+ },
114
+ slideUpAndFade: {
115
+ from: {
116
+ opacity: '0',
117
+ transform: 'translateY(2px)',
118
+ },
119
+ to: {
120
+ opacity: '1',
121
+ transform: 'translateY(0)',
122
+ },
123
+ },
124
+ slideRightAndFade: {
125
+ from: {
126
+ opacity: '0',
127
+ transform: 'translateX(-2px)',
128
+ },
129
+ to: {
130
+ opacity: '1',
131
+ transform: 'translateX(0)',
132
+ },
133
+ },
134
+ },
135
+ animation: {
136
+ 'accordion-down': 'accordion-down 0.2s ease-out',
137
+ 'accordion-up': 'accordion-up 0.2s ease-out',
138
+ dot: 'dot 1.5s infinite',
139
+ slideDownAndFade: 'slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
140
+ slideLeftAndFade: 'slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
141
+ slideUpAndFade: 'slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
142
+ slideRightAndFade: 'slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
143
+ },
144
+ fontFamily: {
145
+ sans: ['PingFang SC', 'Arial', 'Helvetica', 'sans-serif'],
146
+ },
147
+ fontSize: {
148
+ xs: ['12px', '20px'],
149
+ sm: ['14px', '22px'],
150
+ base: ['16px', '24px'],
151
+ lg: ['18px', '26px'],
152
+ xl: ['24px', '32px'],
153
+ '2xl': ['30px', '38px'],
154
+ '3xl': ['38px', '46px'],
155
+ '4xl': ['46px', '54px'],
156
+ },
157
+ typography: {
158
+ DEFAULT: {
159
+ css: {
160
+ maxWidth: '720px',
161
+ },
162
+ },
163
+ },
164
+ },
165
+ },
166
+ variants: {
167
+ extend: {},
168
+ },
169
+ plugins: [typography, require('tailwindcss-animate')],
170
+ };
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ // "allowImportingTsExtensions": false,
12
+ "isolatedModules": true,
13
+ "moduleDetection": "force",
14
+ "noEmit": false,
15
+ "jsx": "react-jsx",
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+
23
+ "forceConsistentCasingInFileNames": true,
24
+ "declaration": true, // 确保生成类型声明文件
25
+ "outDir": "./dist/types" // 输出类型声明文件的目录
26
+ },
27
+ "include": ["src", "type.d.ts"],
28
+ "exclude": ["node_modules", "dist"]
29
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "root": [
3
+ "./src/preview.tsx",
4
+ "./src/main.tsx",
5
+ "./src/type.d.ts",
6
+ "./src/vite-env.d.ts",
7
+ "./src/application/index.tsx",
8
+ "./src/application/@types/system.ts"
9
+ ],
10
+ "version": "5.6.3"
11
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ],
7
+ "compilerOptions": {
8
+ "baseUrl": ".",
9
+ "paths": {
10
+ "@/*": ["./src/*"]
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2023"],
5
+ "module": "ESNext",
6
+ "skipLibCheck": true,
7
+
8
+ /* Bundler mode */
9
+ "moduleResolution": "bundler",
10
+ "allowImportingTsExtensions": true,
11
+ "isolatedModules": true,
12
+ "moduleDetection": "force",
13
+ "noEmit": true,
14
+
15
+ /* Linting */
16
+ "strict": true,
17
+ "noUnusedLocals": true,
18
+ "noUnusedParameters": true,
19
+ "noFallthroughCasesInSwitch": true
20
+ },
21
+ "include": ["vite.config.ts", "/src/type.d.ts"]
22
+ }
@@ -0,0 +1 @@
1
+ {"root":["./vite.config.ts"],"version":"5.6.3"}