@easy-editor/materials-dashboard-scroll-list 0.0.3 → 0.0.5
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.
- package/CHANGELOG.md +27 -13
- package/easypack.config.ts +10 -0
- package/package.json +4 -8
- package/src/component.tsx +46 -14
- package/src/configure.ts +189 -439
- package/src/index.tsx +7 -7
- package/src/meta.ts +2 -2
- package/src/snippets.ts +76 -64
- package/tsconfig.json +20 -9
- package/.vite/plugins/vite-plugin-external-deps.ts +0 -224
- package/.vite/plugins/vite-plugin-material-dev.ts +0 -218
- package/dist/component.esm.js +0 -182
- package/dist/component.esm.js.map +0 -1
- package/dist/component.js +0 -191
- package/dist/component.js.map +0 -1
- package/dist/component.min.js +0 -2
- package/dist/component.min.js.map +0 -1
- package/dist/index.cjs +0 -675
- package/dist/index.cjs.map +0 -1
- package/dist/index.esm.js +0 -672
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -680
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/dist/meta.esm.js +0 -494
- package/dist/meta.esm.js.map +0 -1
- package/dist/meta.js +0 -505
- package/dist/meta.js.map +0 -1
- package/dist/meta.min.js +0 -2
- package/dist/meta.min.js.map +0 -1
- package/dist/src/component.d.ts +0 -51
- package/dist/src/configure.d.ts +0 -7
- package/dist/src/constants.d.ts +0 -16
- package/dist/src/index.d.ts +0 -6
- package/dist/src/meta.d.ts +0 -7
- package/dist/src/snippets.d.ts +0 -7
- package/rollup.config.js +0 -222
- package/tsconfig.build.json +0 -12
- package/tsconfig.test.json +0 -7
- package/vite.config.ts +0 -54
package/dist/src/component.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scroll List Component
|
|
3
|
-
* 滚动列表组件 - 用于展示排行榜、数据列表等
|
|
4
|
-
*/
|
|
5
|
-
import type { CSSProperties, Ref } from 'react';
|
|
6
|
-
export interface ScrollListItem {
|
|
7
|
-
rank: number;
|
|
8
|
-
name: string;
|
|
9
|
-
value: number;
|
|
10
|
-
}
|
|
11
|
-
export interface ScrollListProps {
|
|
12
|
-
ref?: Ref<HTMLDivElement>;
|
|
13
|
-
/** 列表数据 */
|
|
14
|
-
data?: ScrollListItem[];
|
|
15
|
-
/** 最大显示条数 */
|
|
16
|
-
maxItems?: number;
|
|
17
|
-
/** 是否显示排名 */
|
|
18
|
-
showRank?: boolean;
|
|
19
|
-
/** 是否显示奖牌图标 */
|
|
20
|
-
showMedal?: boolean;
|
|
21
|
-
/** 是否显示进度条 */
|
|
22
|
-
progressBarEnable?: boolean;
|
|
23
|
-
/** 是否使用渐变进度条 */
|
|
24
|
-
progressBarGradient?: boolean;
|
|
25
|
-
/** 进度条颜色 [起始色, 结束色] */
|
|
26
|
-
progressBarColors?: [string, string];
|
|
27
|
-
/** 数值格式化 */
|
|
28
|
-
valueFormat?: 'number' | 'currency' | 'percent';
|
|
29
|
-
/** 数值前缀 */
|
|
30
|
-
valuePrefix?: string;
|
|
31
|
-
/** 数值后缀 */
|
|
32
|
-
valueSuffix?: string;
|
|
33
|
-
/** 名称颜色 */
|
|
34
|
-
nameColor?: string;
|
|
35
|
-
/** 数值颜色 */
|
|
36
|
-
valueColor?: string;
|
|
37
|
-
/** 背景颜色 */
|
|
38
|
-
backgroundColor?: string;
|
|
39
|
-
/** 边框颜色 */
|
|
40
|
-
borderColor?: string;
|
|
41
|
-
/** 行背景颜色 */
|
|
42
|
-
itemBackgroundColor?: string;
|
|
43
|
-
/** 行边框颜色 */
|
|
44
|
-
itemBorderColor?: string;
|
|
45
|
-
/** 是否显示发光效果 */
|
|
46
|
-
glowEnable?: boolean;
|
|
47
|
-
/** 外部样式 */
|
|
48
|
-
style?: CSSProperties;
|
|
49
|
-
}
|
|
50
|
-
export declare const ScrollList: React.FC<ScrollListProps>;
|
|
51
|
-
export default ScrollList;
|
package/dist/src/configure.d.ts
DELETED
package/dist/src/constants.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 物料常量配置
|
|
3
|
-
* 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* UMD 全局变量基础名称
|
|
7
|
-
* 用于构建:
|
|
8
|
-
* - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsRankingListMeta)
|
|
9
|
-
* - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsRankingListComponent)
|
|
10
|
-
* - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsRankingList)
|
|
11
|
-
*/
|
|
12
|
-
export declare const COMPONENT_NAME = "EasyEditorMaterialsScrollList";
|
|
13
|
-
/**
|
|
14
|
-
* 包名
|
|
15
|
-
*/
|
|
16
|
-
export declare const PACKAGE_NAME = "@easy-editor/materials-dashboard-scroll-list";
|
package/dist/src/index.d.ts
DELETED
package/dist/src/meta.d.ts
DELETED
package/dist/src/snippets.d.ts
DELETED
package/rollup.config.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import babel from '@rollup/plugin-babel'
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs'
|
|
3
|
-
import nodeResolve from '@rollup/plugin-node-resolve'
|
|
4
|
-
import json from '@rollup/plugin-json'
|
|
5
|
-
import { terser } from 'rollup-plugin-terser'
|
|
6
|
-
import cleanup from 'rollup-plugin-cleanup'
|
|
7
|
-
import postcss from 'rollup-plugin-postcss'
|
|
8
|
-
import pkg from './package.json' with { type: 'json' }
|
|
9
|
-
|
|
10
|
-
const GLOBAL_NAME = 'EasyEditorMaterialsScrollList'
|
|
11
|
-
|
|
12
|
-
// 外部依赖(不打包进组件)
|
|
13
|
-
const external = ['react', 'react-dom', 'react/jsx-runtime', '@easy-editor/core']
|
|
14
|
-
|
|
15
|
-
const globals = {
|
|
16
|
-
react: 'React',
|
|
17
|
-
'react-dom': 'ReactDOM',
|
|
18
|
-
'react/jsx-runtime': 'jsxRuntime',
|
|
19
|
-
'@easy-editor/core': 'EasyEditorCore',
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const plugins = [
|
|
23
|
-
nodeResolve({
|
|
24
|
-
extensions: ['.js', '.ts', '.jsx', '.tsx'],
|
|
25
|
-
}),
|
|
26
|
-
commonjs(),
|
|
27
|
-
json(),
|
|
28
|
-
postcss({
|
|
29
|
-
modules: {
|
|
30
|
-
generateScopedName: '[name]__[local]___[hash:base64:5]',
|
|
31
|
-
},
|
|
32
|
-
autoModules: true,
|
|
33
|
-
minimize: true,
|
|
34
|
-
inject: true,
|
|
35
|
-
}),
|
|
36
|
-
babel({
|
|
37
|
-
extensions: ['.js', '.ts', '.jsx', '.tsx'],
|
|
38
|
-
exclude: 'node_modules/**',
|
|
39
|
-
babelrc: false,
|
|
40
|
-
babelHelpers: 'bundled',
|
|
41
|
-
presets: [
|
|
42
|
-
['@babel/preset-react', { runtime: 'automatic' }],
|
|
43
|
-
[
|
|
44
|
-
'@babel/preset-typescript',
|
|
45
|
-
{
|
|
46
|
-
allowDeclareFields: true,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
],
|
|
50
|
-
}),
|
|
51
|
-
cleanup({
|
|
52
|
-
comments: ['some', /PURE/],
|
|
53
|
-
extensions: ['.js', '.ts'],
|
|
54
|
-
}),
|
|
55
|
-
]
|
|
56
|
-
|
|
57
|
-
export default [
|
|
58
|
-
/* ---------------------------------- 元数据构建 --------------------------------- */
|
|
59
|
-
// 元数据 ESM 构建(用于动态 import)
|
|
60
|
-
{
|
|
61
|
-
input: 'src/meta.ts',
|
|
62
|
-
output: [
|
|
63
|
-
{
|
|
64
|
-
file: 'dist/meta.esm.js',
|
|
65
|
-
format: 'esm',
|
|
66
|
-
sourcemap: true,
|
|
67
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (meta, esm) */`,
|
|
68
|
-
exports: 'named',
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
plugins,
|
|
72
|
-
external,
|
|
73
|
-
},
|
|
74
|
-
// 元数据 UMD 构建(备用方案)
|
|
75
|
-
{
|
|
76
|
-
input: 'src/meta.ts',
|
|
77
|
-
output: [
|
|
78
|
-
{
|
|
79
|
-
file: 'dist/meta.js',
|
|
80
|
-
format: 'umd',
|
|
81
|
-
name: `${GLOBAL_NAME}Meta`,
|
|
82
|
-
globals,
|
|
83
|
-
sourcemap: true,
|
|
84
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (meta) */`,
|
|
85
|
-
exports: 'named',
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
plugins,
|
|
89
|
-
external,
|
|
90
|
-
},
|
|
91
|
-
// 元数据压缩版本(UMD,备用方案)
|
|
92
|
-
{
|
|
93
|
-
input: 'src/meta.ts',
|
|
94
|
-
output: [
|
|
95
|
-
{
|
|
96
|
-
file: 'dist/meta.min.js',
|
|
97
|
-
format: 'umd',
|
|
98
|
-
name: `${GLOBAL_NAME}Meta`,
|
|
99
|
-
globals,
|
|
100
|
-
sourcemap: true,
|
|
101
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (meta, minified) */`,
|
|
102
|
-
exports: 'named',
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
plugins: [...plugins, terser()],
|
|
106
|
-
external,
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
/* ---------------------------------- 组件构建 ---------------------------------- */
|
|
110
|
-
// 组件 ESM 构建(用于动态 import)
|
|
111
|
-
{
|
|
112
|
-
input: 'src/component.tsx',
|
|
113
|
-
output: [
|
|
114
|
-
{
|
|
115
|
-
file: 'dist/component.esm.js',
|
|
116
|
-
format: 'esm',
|
|
117
|
-
sourcemap: true,
|
|
118
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (component, esm) */`,
|
|
119
|
-
exports: 'named',
|
|
120
|
-
},
|
|
121
|
-
],
|
|
122
|
-
plugins,
|
|
123
|
-
external,
|
|
124
|
-
},
|
|
125
|
-
// 组件 UMD 构建(备用方案)
|
|
126
|
-
{
|
|
127
|
-
input: 'src/component.tsx',
|
|
128
|
-
output: [
|
|
129
|
-
{
|
|
130
|
-
file: 'dist/component.js',
|
|
131
|
-
format: 'umd',
|
|
132
|
-
name: `${GLOBAL_NAME}Component`,
|
|
133
|
-
globals,
|
|
134
|
-
sourcemap: true,
|
|
135
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (component) */`,
|
|
136
|
-
exports: 'named',
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
plugins,
|
|
140
|
-
external,
|
|
141
|
-
},
|
|
142
|
-
// 组件压缩版本(UMD,备用方案)
|
|
143
|
-
{
|
|
144
|
-
input: 'src/component.tsx',
|
|
145
|
-
output: [
|
|
146
|
-
{
|
|
147
|
-
file: 'dist/component.min.js',
|
|
148
|
-
format: 'umd',
|
|
149
|
-
name: `${GLOBAL_NAME}Component`,
|
|
150
|
-
globals,
|
|
151
|
-
sourcemap: true,
|
|
152
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (component, minified) */`,
|
|
153
|
-
exports: 'named',
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
plugins: [...plugins, terser()],
|
|
157
|
-
external,
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
/* ---------------------------------- 完整构建 ---------------------------------- */
|
|
161
|
-
// UMD 构建(用于 CDN 和浏览器)
|
|
162
|
-
{
|
|
163
|
-
input: 'src/index.tsx',
|
|
164
|
-
output: [
|
|
165
|
-
{
|
|
166
|
-
file: 'dist/index.js',
|
|
167
|
-
format: 'umd',
|
|
168
|
-
name: GLOBAL_NAME,
|
|
169
|
-
globals,
|
|
170
|
-
sourcemap: true,
|
|
171
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} */`,
|
|
172
|
-
exports: 'named',
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
plugins,
|
|
176
|
-
external,
|
|
177
|
-
},
|
|
178
|
-
// ESM 构建(用于现代打包工具)
|
|
179
|
-
{
|
|
180
|
-
input: 'src/index.tsx',
|
|
181
|
-
output: [
|
|
182
|
-
{
|
|
183
|
-
file: 'dist/index.esm.js',
|
|
184
|
-
format: 'esm',
|
|
185
|
-
sourcemap: true,
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
plugins,
|
|
189
|
-
external,
|
|
190
|
-
},
|
|
191
|
-
// CJS 构建(用于 Node.js)
|
|
192
|
-
{
|
|
193
|
-
input: 'src/index.tsx',
|
|
194
|
-
output: [
|
|
195
|
-
{
|
|
196
|
-
file: 'dist/index.cjs',
|
|
197
|
-
format: 'cjs',
|
|
198
|
-
sourcemap: true,
|
|
199
|
-
exports: 'named',
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
plugins,
|
|
203
|
-
external,
|
|
204
|
-
},
|
|
205
|
-
// 压缩版本(用于生产环境)
|
|
206
|
-
{
|
|
207
|
-
input: 'src/index.tsx',
|
|
208
|
-
output: [
|
|
209
|
-
{
|
|
210
|
-
file: 'dist/index.min.js',
|
|
211
|
-
format: 'umd',
|
|
212
|
-
name: GLOBAL_NAME,
|
|
213
|
-
globals,
|
|
214
|
-
sourcemap: true,
|
|
215
|
-
banner: `/* @easy-editor/materials-dashboard-scroll-list v${pkg.version} (minified) */`,
|
|
216
|
-
exports: 'named',
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
plugins: [...plugins, terser()],
|
|
220
|
-
external,
|
|
221
|
-
},
|
|
222
|
-
]
|
package/tsconfig.build.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"jsx": "react-jsx",
|
|
5
|
-
"strictPropertyInitialization": false,
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"allowSyntheticDefaultImports": true
|
|
10
|
-
},
|
|
11
|
-
"include": ["./src"]
|
|
12
|
-
}
|
package/tsconfig.test.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vite Configuration for Material Development
|
|
3
|
-
* 物料开发 Vite 配置
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { defineConfig } from 'vite'
|
|
7
|
-
import react from '@vitejs/plugin-react'
|
|
8
|
-
import { materialDevPlugin } from './.vite/plugins/vite-plugin-material-dev'
|
|
9
|
-
import { externalDeps } from './.vite/plugins/vite-plugin-external-deps'
|
|
10
|
-
|
|
11
|
-
export default defineConfig({
|
|
12
|
-
plugins: [
|
|
13
|
-
react(),
|
|
14
|
-
// 外部化 React/ReactDOM,使用父应用提供的实例
|
|
15
|
-
externalDeps({
|
|
16
|
-
externals: ['react', 'react-dom', 'react/jsx-runtime', '@easy-editor/core'],
|
|
17
|
-
globals: {
|
|
18
|
-
react: 'React',
|
|
19
|
-
'react-dom': 'ReactDOM',
|
|
20
|
-
'react/jsx-runtime': 'jsxRuntime',
|
|
21
|
-
'@easy-editor/core': 'EasyEditorCore',
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
materialDevPlugin({
|
|
25
|
-
entry: '/src/index.tsx',
|
|
26
|
-
}),
|
|
27
|
-
],
|
|
28
|
-
server: {
|
|
29
|
-
port: 5001,
|
|
30
|
-
host: 'localhost',
|
|
31
|
-
cors: true,
|
|
32
|
-
hmr: {
|
|
33
|
-
port: 5001,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
build: {
|
|
37
|
-
target: 'esnext',
|
|
38
|
-
rollupOptions: {
|
|
39
|
-
// 确保生产构建也外部化这些依赖
|
|
40
|
-
external: ['react', 'react-dom', 'react/jsx-runtime', '@easy-editor/core'],
|
|
41
|
-
output: {
|
|
42
|
-
globals: {
|
|
43
|
-
react: 'React',
|
|
44
|
-
'react-dom': 'ReactDOM',
|
|
45
|
-
'react/jsx-runtime': 'jsxRuntime',
|
|
46
|
-
'@easy-editor/core': 'EasyEditorCore',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
resolve: {
|
|
52
|
-
dedupe: ['react', 'react-dom'],
|
|
53
|
-
},
|
|
54
|
-
})
|