@mxmweb/zui 1.1.2 → 1.1.10

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 (127) hide show
  1. package/README.md +0 -4
  2. package/package.json +14 -39
  3. package/.editorconfig +0 -38
  4. package/.prettierignore +0 -16
  5. package/.prettierrc +0 -17
  6. package/.releaserc.json +0 -36
  7. package/CHANGELOG.md +0 -58
  8. package/CONTRIBUTING.md +0 -111
  9. package/NPMREADME.md +0 -0
  10. package/bash.exe.stackdump +0 -40
  11. package/components.json +0 -21
  12. package/dist/README.md +0 -0
  13. package/dist/package.json +0 -26
  14. package/eslint.config.js +0 -92
  15. package/index.html +0 -13
  16. package/postcss.config.cjs +0 -19
  17. package/public/mock.csv +0 -16
  18. package/public/mock_/345/211/257/346/234/254.csv +0 -16
  19. package/public/vite.svg +0 -1
  20. package/src/Preview.tsx +0 -15
  21. package/src/assets/img/excel.png +0 -0
  22. package/src/assets/img/img.png +0 -0
  23. package/src/assets/img/pdf.png +0 -0
  24. package/src/assets/img/ppt.png +0 -0
  25. package/src/assets/img/txt.png +0 -0
  26. package/src/assets/img/word.png +0 -0
  27. package/src/containers/DashboardContainer.tsx +0 -507
  28. package/src/containers/DockContainer.tsx +0 -186
  29. package/src/containers/style.css +0 -37
  30. package/src/elements/Button.tsx +0 -118
  31. package/src/elements/CustomDock.tsx +0 -287
  32. package/src/elements/DropDownButton.tsx +0 -249
  33. package/src/elements/DropdownMenu.tsx +0 -184
  34. package/src/elements/GoggleNavbar.tsx +0 -184
  35. package/src/elements/Uploader/README.md +0 -249
  36. package/src/elements/Uploader/UploadItem.tsx +0 -298
  37. package/src/elements/Uploader/example.tsx +0 -95
  38. package/src/elements/Uploader/index.tsx +0 -702
  39. package/src/elements/Uploader/styles.tsx +0 -291
  40. package/src/elements/Uploader/types.ts +0 -119
  41. package/src/elements/Uploader/utils.ts +0 -200
  42. package/src/elements/Uploader.tsx +0 -3
  43. package/src/examples/DockContainerExample.tsx +0 -237
  44. package/src/icons/Icon.tsx +0 -82
  45. package/src/icons/index.tsx +0 -92
  46. package/src/icons/lazyIndex.tsx +0 -49
  47. package/src/icons/rag/csv.svg +0 -3
  48. package/src/icons/rag/document.svg +0 -3
  49. package/src/icons/rag/excel.svg +0 -3
  50. package/src/icons/rag/file.svg +0 -3
  51. package/src/icons/rag/folder.svg +0 -5
  52. package/src/icons/rag/json.svg +0 -3
  53. package/src/icons/rag/knowledgebase.svg +0 -3
  54. package/src/icons/rag/netretrive.svg +0 -3
  55. package/src/icons/rag/odf.svg +0 -7
  56. package/src/icons/rag/pdf.svg +0 -3
  57. package/src/icons/rag/pic.svg +0 -3
  58. package/src/icons/rag/ppt.svg +0 -3
  59. package/src/icons/rag/think.svg +0 -6
  60. package/src/icons/rag/txt.svg +0 -3
  61. package/src/icons/rag/url.svg +0 -3
  62. package/src/icons/rag/word.svg +0 -3
  63. package/src/icons/rag/wps.svg +0 -3
  64. package/src/icons/rag/zip.svg +0 -7
  65. package/src/lib_enter.ts +0 -27
  66. package/src/main.tsx +0 -11
  67. package/src/style.css +0 -9
  68. package/src/theme/styledTheme.tsx +0 -253
  69. package/src/type.d.ts +0 -0
  70. package/src/types/images.d.ts +0 -12
  71. package/src/types/svg-modules.d.ts +0 -24
  72. package/src/vite-env.d.ts +0 -11
  73. package/tailwind.config.js +0 -170
  74. package/tsconfig.app.json +0 -29
  75. package/tsconfig.app.tsbuildinfo +0 -11
  76. package/tsconfig.json +0 -13
  77. package/tsconfig.node.json +0 -22
  78. package/tsconfig.node.tsbuildinfo +0 -1
  79. package/vite.config.ts +0 -180
  80. /package/{dist/Preview.d.ts → Preview.d.ts} +0 -0
  81. /package/{dist/assets → assets}/style.css +0 -0
  82. /package/{dist/containers → containers}/DashboardContainer.d.ts +0 -0
  83. /package/{dist/containers → containers}/DockContainer.d.ts +0 -0
  84. /package/{dist/elements → elements}/Button.d.ts +0 -0
  85. /package/{dist/elements → elements}/CustomDock.d.ts +0 -0
  86. /package/{dist/elements → elements}/DropDownButton.d.ts +0 -0
  87. /package/{dist/elements → elements}/DropdownMenu.d.ts +0 -0
  88. /package/{dist/elements → elements}/GoggleNavbar.d.ts +0 -0
  89. /package/{dist/elements → elements}/Uploader/UploadItem.d.ts +0 -0
  90. /package/{dist/elements → elements}/Uploader/example.d.ts +0 -0
  91. /package/{dist/elements → elements}/Uploader/index.d.ts +0 -0
  92. /package/{dist/elements → elements}/Uploader/styles.d.ts +0 -0
  93. /package/{dist/elements → elements}/Uploader/types.d.ts +0 -0
  94. /package/{dist/elements → elements}/Uploader/utils.d.ts +0 -0
  95. /package/{dist/elements → elements}/Uploader.d.ts +0 -0
  96. /package/{dist/examples → examples}/DockContainerExample.d.ts +0 -0
  97. /package/{dist/icons → icons}/Icon.d.ts +0 -0
  98. /package/{dist/icons → icons}/Icon.tsx +0 -0
  99. /package/{dist/icons → icons}/index.d.ts +0 -0
  100. /package/{dist/icons → icons}/index.tsx +0 -0
  101. /package/{dist/icons → icons}/lazyIndex.d.ts +0 -0
  102. /package/{dist/icons → icons}/lazyIndex.tsx +0 -0
  103. /package/{dist/icons → icons}/rag/csv.svg +0 -0
  104. /package/{dist/icons → icons}/rag/document.svg +0 -0
  105. /package/{dist/icons → icons}/rag/excel.svg +0 -0
  106. /package/{dist/icons → icons}/rag/file.svg +0 -0
  107. /package/{dist/icons → icons}/rag/folder.svg +0 -0
  108. /package/{dist/icons → icons}/rag/json.svg +0 -0
  109. /package/{dist/icons → icons}/rag/knowledgebase.svg +0 -0
  110. /package/{dist/icons → icons}/rag/netretrive.svg +0 -0
  111. /package/{dist/icons → icons}/rag/odf.svg +0 -0
  112. /package/{dist/icons → icons}/rag/pdf.svg +0 -0
  113. /package/{dist/icons → icons}/rag/pic.svg +0 -0
  114. /package/{dist/icons → icons}/rag/ppt.svg +0 -0
  115. /package/{dist/icons → icons}/rag/think.svg +0 -0
  116. /package/{dist/icons → icons}/rag/txt.svg +0 -0
  117. /package/{dist/icons → icons}/rag/url.svg +0 -0
  118. /package/{dist/icons → icons}/rag/word.svg +0 -0
  119. /package/{dist/icons → icons}/rag/wps.svg +0 -0
  120. /package/{dist/icons → icons}/rag/zip.svg +0 -0
  121. /package/{dist/index.js → index.js} +0 -0
  122. /package/{dist/lib_enter.d.ts → lib_enter.d.ts} +0 -0
  123. /package/{dist/main.d.ts → main.d.ts} +0 -0
  124. /package/{dist/mock.csv → mock.csv} +0 -0
  125. /package/{dist/mock_ → mock_}/345/211/257/346/234/254.csv" +0 -0
  126. /package/{dist/theme → theme}/styledTheme.d.ts +0 -0
  127. /package/{dist/vite.svg → vite.svg} +0 -0
package/vite.config.ts DELETED
@@ -1,180 +0,0 @@
1
- import { defineConfig, loadEnv } from 'vite';
2
- import resolve from '@rollup/plugin-node-resolve';
3
- import commonjs from 'vite-plugin-commonjs';
4
- import svgr from 'vite-plugin-svgr';
5
- import path from 'path';
6
- import react from '@vitejs/plugin-react';
7
- import generatePackageJson from 'rollup-plugin-generate-package-json';
8
- import dts from 'vite-plugin-dts';
9
- import version from 'vite-plugin-package-version';
10
- import pkg from './package.json';
11
- import copy from 'rollup-plugin-copy';
12
- import fs from 'fs';
13
-
14
- function shiftStaticFiles(directories: string[]) {
15
- return {
16
- name: 'shift-static-file',
17
- writeBundle() {
18
- directories.forEach((dir) => {
19
- const targetDir = path.resolve(__dirname, 'dist', dir);
20
- if (fs.existsSync(targetDir)) {
21
- fs.rmSync(targetDir, { recursive: true, force: true });
22
- console.log(`Deleted directory: ${targetDir}`);
23
- } else {
24
- console.warn(`Directory not found: ${targetDir}`);
25
- }
26
- });
27
- },
28
- };
29
- }
30
-
31
- export default ({ mode }: { mode: string }) => {
32
- const env = loadEnv(mode, process.cwd());
33
- console.log(env);
34
-
35
- return defineConfig({
36
- base: './',
37
- plugins: [
38
- resolve(),
39
- commonjs(),
40
- svgr(),
41
- react({
42
- // 启用 styled-components 调试
43
- jsxImportSource: 'react',
44
- babel: {
45
- // 不需要额外配置
46
- }
47
- }),
48
- version(),
49
- dts({
50
- tsconfigPath: './tsconfig.app.json',
51
- insertTypesEntry: true,
52
- include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.d.ts'], // 包含声明文件,导出到依赖方
53
- }),
54
- generatePackageJson({
55
- outputFolder: 'dist',
56
- baseContents: {
57
- name: env.VITE_PUBLISH_NAME || pkg.name,
58
- main: 'index.js',
59
- license: 'MIT',
60
- // @ts-expect-error 这里是因为样式文件可能没有类型定义
61
- style: 'assets/style.css',
62
- types: 'lib_enter.d.ts',
63
- private: false,
64
- version: pkg.version,
65
- author: pkg.author,
66
- type: 'module',
67
- scripts: {
68
- test: 'yarn link',
69
- disconnect: 'yarn unlink',
70
- },
71
- exports: {
72
- '.': {
73
- "types": "./lib_enter.d.ts",
74
- "import": "./index.js",
75
- "default": "./index.js"
76
- },
77
- './style.css': './assets/style.css',
78
- },
79
- },
80
- }),
81
- copy({
82
- targets: [
83
- { src: 'NPMREADME.md', dest: 'dist', rename: 'README.md' },
84
- // 将源码 icons 目录复制到发布目录,供使用端按需引入
85
- { src: 'src/icons', dest: 'dist' },
86
- ],
87
- hook: 'writeBundle',
88
- }),
89
- shiftStaticFiles(['files']),
90
-
91
- ],
92
- resolve: {
93
- alias: {
94
- '@': path.resolve(__dirname, './src'),
95
- },
96
- },
97
- esbuild: {
98
- charset: 'ascii',
99
- },
100
-
101
- // assetsInclude: ['**/*.mjs'], // 确保 Vite 能识别 .mjs 文件为资源
102
- build: {
103
- outDir: 'dist',
104
- lib: {
105
- entry: path.resolve(__dirname, 'src/lib_enter.ts'),
106
- formats: ['es'],
107
- fileName: (format) => `index.${format === 'es' ? 'js' : 'umd.js'}`,
108
- },
109
- rollupOptions: {
110
- external: (id) => {
111
- // 在开发环境中,不外部化 @mxmweb 包,让它们能够正确解析
112
- if (mode === 'development') {
113
- return [
114
- 'react',
115
- 'react-dom',
116
- 'styled-components',
117
- 'animejs',
118
- 'antd',
119
- 'lucide-react',
120
- ].some(pkg => id === pkg || id.startsWith(`${pkg}/`));
121
- }
122
-
123
- // 在生产构建中,外部化所有 @mxmweb 包
124
- return [
125
- 'react',
126
- 'react-dom',
127
- 'styled-components',
128
- 'animejs',
129
- 'antd',
130
- 'lucide-react',
131
- ].some(pkg => id === pkg || id.startsWith(`${pkg}/`))
132
- || /^@mxmweb\//.test(id);
133
- },
134
- input: {
135
- main: path.resolve(__dirname, 'src/lib_enter.ts'),
136
- },
137
- output: {
138
- dir: 'dist', // 确保输出在 dist 根目录
139
- entryFileNames: `index.js`,
140
- assetFileNames: assetInfo => {
141
- if (assetInfo.name && assetInfo.name.endsWith('.css')) {
142
- return 'assets/style.css';
143
- }
144
- return 'assets/[name].[ext]';
145
- },
146
- globals: {
147
- react: 'React',
148
- // 'react-dom': 'ReactDOM',
149
- },
150
- },
151
- // treeshake: true, // 启用 tree-shaking,减少无用代码
152
- },
153
- },
154
- server: {
155
- cors: true,
156
- host: '0.0.0.0',
157
- port: 8888,
158
- open: true, // 自动打开浏览器
159
- proxy: {
160
- '/api_proxy': {
161
- target: 'http://10.15.12.13:9005',
162
- changeOrigin: true,
163
- secure: false,
164
- rewrite: (path) => {
165
- const newPath = path.replace(/^\/api_proxy/, '/proxy/graph');
166
- console.log(`Rewriting path from ${path} to ${newPath}`); // 调试用
167
- return newPath;
168
- },
169
- },
170
- },
171
- },
172
- define: {
173
- // 启用 styled-components 开发模式
174
- __DEV__: mode === 'development',
175
- },
176
- optimizeDeps: {
177
- include: ['styled-components'],
178
- },
179
- });
180
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes