@easy-editor/materials-dashboard-carousel 0.0.2 → 0.0.4

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/dist/meta.esm.js DELETED
@@ -1,240 +0,0 @@
1
- const MaterialGroup = {
2
- DISPLAY: 'display'};
3
-
4
- const COMPONENT_NAME = 'EasyEditorMaterialsCarousel';
5
- const PACKAGE_NAME = '@easy-editor/materials-dashboard-carousel';
6
-
7
- const configure = {
8
- props: [{
9
- type: 'group',
10
- title: '属性',
11
- setter: 'TabSetter',
12
- items: [{
13
- type: 'group',
14
- key: 'config',
15
- title: '配置',
16
- setter: {
17
- componentName: 'CollapseSetter',
18
- props: {
19
- icon: false
20
- }
21
- },
22
- items: [
23
- {
24
- name: 'id',
25
- title: 'ID',
26
- setter: 'NodeIdSetter',
27
- extraProps: {
28
- label: false
29
- }
30
- }, {
31
- name: 'title',
32
- title: '标题',
33
- setter: 'StringSetter',
34
- extraProps: {
35
- getValue(target) {
36
- return target.getExtraPropValue('title');
37
- },
38
- setValue(target, value) {
39
- target.setExtraPropValue('title', value);
40
- }
41
- }
42
- }, {
43
- type: 'group',
44
- title: '基础属性',
45
- setter: {
46
- componentName: 'CollapseSetter',
47
- props: {
48
- icon: false
49
- }
50
- },
51
- items: [{
52
- name: 'rect',
53
- title: '位置尺寸',
54
- setter: 'RectSetter',
55
- extraProps: {
56
- getValue(target) {
57
- return target.getExtraPropValue('$dashboard.rect');
58
- },
59
- setValue(target, value) {
60
- target.setExtraPropValue('$dashboard.rect', value);
61
- }
62
- }
63
- }]
64
- },
65
- {
66
- type: 'group',
67
- title: '数据',
68
- setter: {
69
- componentName: 'CollapseSetter',
70
- props: {
71
- icon: false
72
- }
73
- },
74
- items: [{
75
- name: 'items',
76
- title: '轮播项',
77
- setter: 'JsonSetter'
78
- }]
79
- }, {
80
- type: 'group',
81
- title: '行为',
82
- setter: {
83
- componentName: 'CollapseSetter',
84
- props: {
85
- icon: false
86
- }
87
- },
88
- items: [{
89
- name: 'autoPlay',
90
- title: '自动播放',
91
- setter: 'SwitchSetter',
92
- extraProps: {
93
- defaultValue: true
94
- }
95
- }, {
96
- name: 'interval',
97
- title: '播放间隔(ms)',
98
- setter: 'NumberSetter',
99
- extraProps: {
100
- defaultValue: 3000
101
- }
102
- }, {
103
- name: 'loop',
104
- title: '循环播放',
105
- setter: 'SwitchSetter',
106
- extraProps: {
107
- defaultValue: true
108
- }
109
- }]
110
- }, {
111
- type: 'group',
112
- title: '显示',
113
- setter: {
114
- componentName: 'CollapseSetter',
115
- props: {
116
- icon: false
117
- }
118
- },
119
- items: [{
120
- name: 'showNav',
121
- title: '显示导航按钮',
122
- setter: 'SwitchSetter',
123
- extraProps: {
124
- defaultValue: true
125
- }
126
- }, {
127
- name: 'showIndicators',
128
- title: '显示指示器',
129
- setter: 'SwitchSetter',
130
- extraProps: {
131
- defaultValue: true
132
- }
133
- }]
134
- }]
135
- }, {
136
- type: 'group',
137
- key: 'data',
138
- title: '数据',
139
- items: [{
140
- name: 'dataBinding',
141
- title: '数据绑定',
142
- setter: 'DataBindingSetter'
143
- }]
144
- }, {
145
- type: 'group',
146
- key: 'advanced',
147
- title: '高级',
148
- items: [{
149
- name: 'condition',
150
- title: '显隐控制',
151
- setter: 'SwitchSetter',
152
- extraProps: {
153
- defaultValue: true,
154
- supportVariable: true
155
- }
156
- }]
157
- }]
158
- }],
159
- component: {},
160
- supports: {},
161
- advanced: {}
162
- };
163
-
164
- const snippets = [{
165
- title: '图片轮播',
166
- screenshot: '',
167
- schema: {
168
- componentName: COMPONENT_NAME,
169
- props: {
170
- items: [{
171
- src: 'https://picsum.photos/800/400?random=1',
172
- alt: 'Slide 1'
173
- }, {
174
- src: 'https://picsum.photos/800/400?random=2',
175
- alt: 'Slide 2'
176
- }, {
177
- src: 'https://picsum.photos/800/400?random=3',
178
- alt: 'Slide 3'
179
- }],
180
- autoPlay: true,
181
- interval: 3000,
182
- showNav: true,
183
- showIndicators: true,
184
- loop: true
185
- },
186
- $dashboard: {
187
- rect: {
188
- width: 600,
189
- height: 300
190
- }
191
- }
192
- }
193
- }, {
194
- title: '手动轮播',
195
- screenshot: '',
196
- schema: {
197
- componentName: COMPONENT_NAME,
198
- props: {
199
- items: [{
200
- src: 'https://picsum.photos/800/400?random=4',
201
- alt: 'Slide 1'
202
- }, {
203
- src: 'https://picsum.photos/800/400?random=5',
204
- alt: 'Slide 2'
205
- }],
206
- autoPlay: false,
207
- showNav: true,
208
- showIndicators: true,
209
- loop: true
210
- },
211
- $dashboard: {
212
- rect: {
213
- width: 600,
214
- height: 300
215
- }
216
- }
217
- }
218
- }];
219
-
220
- var version = "0.0.1";
221
- var pkg = {
222
- version: version};
223
-
224
- const meta = {
225
- componentName: COMPONENT_NAME,
226
- title: '轮播',
227
- group: MaterialGroup.DISPLAY,
228
- devMode: 'proCode',
229
- npm: {
230
- package: PACKAGE_NAME,
231
- version: pkg.version,
232
- globalName: COMPONENT_NAME,
233
- componentName: COMPONENT_NAME
234
- },
235
- snippets,
236
- configure
237
- };
238
-
239
- export { meta as default, meta };
240
- //# sourceMappingURL=meta.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.esm.js","sources":["../../../../shared/src/index.ts","../src/constants.ts","../src/configure.ts","../src/snippets.ts","../src/meta.ts"],"sourcesContent":["/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsButtonMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsButtonComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsButton)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsCarousel'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-carousel'\n","/**\n * Carousel Configure\n * 轮播组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数据',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'items',\n title: '轮播项',\n setter: 'JsonSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '行为',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'autoPlay',\n title: '自动播放',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'interval',\n title: '播放间隔(ms)',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 3000,\n },\n },\n {\n name: 'loop',\n title: '循环播放',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'showNav',\n title: '显示导航按钮',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showIndicators',\n title: '显示指示器',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n","/**\n * Carousel Snippets\n * 轮播组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '图片轮播',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n items: [\n { src: 'https://picsum.photos/800/400?random=1', alt: 'Slide 1' },\n { src: 'https://picsum.photos/800/400?random=2', alt: 'Slide 2' },\n { src: 'https://picsum.photos/800/400?random=3', alt: 'Slide 3' },\n ],\n autoPlay: true,\n interval: 3000,\n showNav: true,\n showIndicators: true,\n loop: true,\n },\n $dashboard: {\n rect: {\n width: 600,\n height: 300,\n },\n },\n },\n },\n {\n title: '手动轮播',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n items: [\n { src: 'https://picsum.photos/800/400?random=4', alt: 'Slide 1' },\n { src: 'https://picsum.photos/800/400?random=5', alt: 'Slide 2' },\n ],\n autoPlay: false,\n showNav: true,\n showIndicators: true,\n loop: true,\n },\n $dashboard: {\n rect: {\n width: 600,\n height: 300,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Carousel Meta\n * 轮播组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '轮播',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n"],"names":["MaterialGroup","INNER","DISPLAY","COMPONENT_NAME","PACKAGE_NAME","configure","props","type","title","setter","items","key","componentName","icon","name","extraProps","label","getValue","target","getExtraPropValue","setValue","value","setExtraPropValue","defaultValue","supportVariable","component","supports","advanced","snippets","screenshot","schema","src","alt","autoPlay","interval","showNav","showIndicators","loop","$dashboard","rect","width","height","meta","group","devMode","npm","package","version","pkg","globalName"],"mappings":"AAMO,MAAMA,aAAa,GAAG;AAE3BC,EAMAC,OAAO,EAAE,SAOX,CAAU;;ACTH,MAAMC,cAAc,GAAG,6BAA6B;AAKpD,MAAMC,YAAY,GAAG,2CAA2C;;ACVhE,MAAMC,SAAoB,GAAG;AAClCC,EAAAA,KAAK,EAAE,CACL;AACEC,IAAAA,IAAI,EAAE,OAAO;AACbC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,MAAM,EAAE,WAAW;AACnBC,IAAAA,KAAK,EAAE,CACL;AACEH,MAAAA,IAAI,EA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AAK,EAAE,GAAG;AACVC,QAAAA,MAAM,EAAE;AACV;AACF;AACF;AACF,CAAC,CACF;;;;;;AC7CM,MAAMC,IAAuB,GAAG;AACrC9B,EAAAA,aAAa,EAAET,cAAc;AAC7BK,EAAAA,KAAK,EAAE,IAAI;EACXmC,KAAK,EAAE3C,aAAa,CAACE,OAAO;AAC5B0C,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,GAAG,EAAE;AACHC,IAAAA,OAAO,EAAE1C,YAAY;IACrB2C,OAAO,EAAEC,GAAG,CAACD,OAAO;AACpBE,IAAAA,UAAU,EAAE9C,cAAc;AAC1BS,IAAAA,aAAa,EAAET;GAChB;EACDyB,QAAQ;AACRvB,EAAAA;AACF;;;;"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Carousel Component
3
- * 轮播组件
4
- */
5
- import { type CSSProperties, type Ref } from 'react';
6
- export interface CarouselItem {
7
- /** 图片地址 */
8
- src: string;
9
- /** 图片描述 */
10
- alt?: string;
11
- /** 点击链接 */
12
- link?: string;
13
- }
14
- export interface CarouselProps {
15
- ref?: Ref<HTMLDivElement>;
16
- /** 轮播项 */
17
- items?: CarouselItem[];
18
- /** 自动播放 */
19
- autoPlay?: boolean;
20
- /** 自动播放间隔(毫秒) */
21
- interval?: number;
22
- /** 是否显示导航按钮 */
23
- showNav?: boolean;
24
- /** 是否显示指示器 */
25
- showIndicators?: boolean;
26
- /** 是否循环播放 */
27
- loop?: boolean;
28
- /** 外部样式 */
29
- style?: CSSProperties;
30
- }
31
- export declare const Carousel: React.FC<CarouselProps>;
32
- export default Carousel;
@@ -1,7 +0,0 @@
1
- /**
2
- * Carousel Configure
3
- * 轮播组件配置
4
- */
5
- import type { Configure } from '@easy-editor/core';
6
- export declare const configure: Configure;
7
- export default configure;
@@ -1,16 +0,0 @@
1
- /**
2
- * 物料常量配置
3
- * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值
4
- */
5
- /**
6
- * UMD 全局变量基础名称
7
- * 用于构建:
8
- * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsButtonMeta)
9
- * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsButtonComponent)
10
- * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsButton)
11
- */
12
- export declare const COMPONENT_NAME = "EasyEditorMaterialsCarousel";
13
- /**
14
- * 包名
15
- */
16
- export declare const PACKAGE_NAME = "@easy-editor/materials-dashboard-carousel";
@@ -1,6 +0,0 @@
1
- /**
2
- * Carousel Entry
3
- * 轮播组件入口
4
- */
5
- export { Carousel as component } from './component';
6
- export { default as meta } from './meta';
@@ -1,7 +0,0 @@
1
- /**
2
- * Carousel Meta
3
- * 轮播组件元数据
4
- */
5
- import type { ComponentMetadata } from '@easy-editor/core';
6
- export declare const meta: ComponentMetadata;
7
- export default meta;
@@ -1,7 +0,0 @@
1
- /**
2
- * Carousel Snippets
3
- * 轮播组件代码片段
4
- */
5
- import type { Snippet } from '@easy-editor/core';
6
- export declare const snippets: Snippet[];
7
- export default snippets;
package/rollup.config.js DELETED
@@ -1,81 +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
-
9
- const GLOBAL_NAME = 'EasyEditorMaterialsCarousel'
10
-
11
- const external = ['react', 'react-dom', 'react/jsx-runtime', '@easy-editor/core']
12
-
13
- const globals = {
14
- react: 'React',
15
- 'react-dom': 'ReactDOM',
16
- 'react/jsx-runtime': 'jsxRuntime',
17
- '@easy-editor/core': 'EasyEditorCore',
18
- }
19
-
20
- const plugins = [
21
- nodeResolve({
22
- extensions: ['.js', '.ts', '.jsx', '.tsx'],
23
- }),
24
- commonjs(),
25
- json(),
26
- postcss({
27
- modules: {
28
- generateScopedName: '[name]__[local]___[hash:base64:5]',
29
- },
30
- autoModules: true,
31
- minimize: true,
32
- inject: true,
33
- }),
34
- babel({
35
- extensions: ['.js', '.ts', '.jsx', '.tsx'],
36
- exclude: 'node_modules/**',
37
- babelrc: false,
38
- babelHelpers: 'bundled',
39
- presets: [
40
- ['@babel/preset-react', { runtime: 'automatic' }],
41
- ['@babel/preset-typescript', { allowDeclareFields: true }],
42
- ],
43
- }),
44
- cleanup({
45
- comments: ['some', /PURE/],
46
- extensions: ['.js', '.ts'],
47
- }),
48
- ]
49
-
50
- export default [
51
- {
52
- input: 'src/meta.ts',
53
- output: [{ file: 'dist/meta.esm.js', format: 'esm', sourcemap: true, exports: 'named' }],
54
- plugins,
55
- external,
56
- },
57
- {
58
- input: 'src/component.tsx',
59
- output: [{ file: 'dist/component.esm.js', format: 'esm', sourcemap: true, exports: 'named' }],
60
- plugins,
61
- external,
62
- },
63
- {
64
- input: 'src/index.tsx',
65
- output: [
66
- { file: 'dist/index.js', format: 'umd', name: GLOBAL_NAME, globals, sourcemap: true, exports: 'named' },
67
- { file: 'dist/index.esm.js', format: 'esm', sourcemap: true },
68
- { file: 'dist/index.cjs', format: 'cjs', sourcemap: true, exports: 'named' },
69
- ],
70
- plugins,
71
- external,
72
- },
73
- {
74
- input: 'src/index.tsx',
75
- output: [
76
- { file: 'dist/index.min.js', format: 'umd', name: GLOBAL_NAME, globals, sourcemap: true, exports: 'named' },
77
- ],
78
- plugins: [...plugins, terser()],
79
- external,
80
- },
81
- ]
@@ -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
- }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "noEmit": true
5
- },
6
- "include": ["./src", "./test"]
7
- }
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
- })