yootd 0.2.11 → 0.2.13

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.
@@ -1,41 +1,41 @@
1
- export interface PageData<T> {
2
- content: T[];
3
- page: {
4
- number: number;
5
- size: number;
6
- totalElements: number;
7
- totalPages: number;
8
- };
9
- }
10
- type SchoolProps = {
11
- level1?: boolean;
12
- level5?: boolean;
13
- areaType?: number;
14
- areaSubType?: number;
15
- style?: React.CSSProperties;
16
- showSearch?: boolean;
17
- disabled?: boolean;
18
- value?: {
19
- level1?: number;
20
- level2?: number;
21
- level3?: number;
22
- level4?: number;
23
- level5?: number;
24
- };
25
- onChange?: (record: {
26
- level1?: number;
27
- level2?: number;
28
- level3?: number;
29
- level4?: number;
30
- level5?: number;
31
- }) => void;
32
- allowClear?: boolean;
33
- placeholder?: string[];
34
- };
35
- // 查询位置接口返回的数据类型
36
- export interface IareaItem {
37
- areaId: number;
38
- areaLevel: number;
39
- areaName: string;
40
- areaType: number;
41
- }
1
+ export interface PageData<T> {
2
+ content: T[];
3
+ page: {
4
+ number: number;
5
+ size: number;
6
+ totalElements: number;
7
+ totalPages: number;
8
+ };
9
+ }
10
+ type SchoolProps = {
11
+ level1?: boolean;
12
+ level5?: boolean;
13
+ areaType?: number;
14
+ areaSubType?: number;
15
+ style?: React.CSSProperties;
16
+ showSearch?: boolean;
17
+ disabled?: boolean;
18
+ value?: {
19
+ level1?: number;
20
+ level2?: number;
21
+ level3?: number;
22
+ level4?: number;
23
+ level5?: number;
24
+ };
25
+ onChange?: (record: {
26
+ level1?: number;
27
+ level2?: number;
28
+ level3?: number;
29
+ level4?: number;
30
+ level5?: number;
31
+ }) => void;
32
+ allowClear?: boolean;
33
+ placeholder?: string[];
34
+ };
35
+ // 查询位置接口返回的数据类型
36
+ export interface IareaItem {
37
+ areaId: number;
38
+ areaLevel: number;
39
+ areaName: string;
40
+ areaType: number;
41
+ }
@@ -1,40 +1,40 @@
1
- import { TreeSelectProps } from 'antd';
2
-
3
- export interface PageData<T> {
4
- content: T[];
5
- page: {
6
- number: number;
7
- size: number;
8
- totalElements: number;
9
- totalPages: number;
10
- };
11
- }
12
-
13
- // 查询位置树接口返回的数据类型
14
- export interface AreasTreeData {
15
- areaId: number;
16
- areaLevel: number;
17
- areaLevel1Id: number;
18
- areaName: string;
19
- areaSubType: number;
20
- areaType: number;
21
- children?: AreasTreeData[];
22
- }
23
- // 空间树所需数据类型
24
- export interface AreasTreeOptions {
25
- title: string;
26
- value: number;
27
- key: number;
28
- children?: AreasTreeOptions[];
29
- }
30
- // 空间树选择器props
31
- export interface AreasTreeSelectProps extends TreeSelectProps {
32
- level1?: boolean; // 是否显示第一级
33
- depth?: number; // 树节点深度,不传表示到第五级
34
- areaType?: number; // 筛选楼类型
35
- areaSubType?: number; // 筛选楼类型
36
- showSearch?: boolean; // 是否开启搜索
37
- treeCheckable?: boolean; // 是否开启多选
38
- selectable?: boolean; // 是否强制要求选到最底层
39
- treeDefaultExpandedLevel?: number; // 默认展开的层级
40
- }
1
+ import { TreeSelectProps } from 'antd';
2
+
3
+ export interface PageData<T> {
4
+ content: T[];
5
+ page: {
6
+ number: number;
7
+ size: number;
8
+ totalElements: number;
9
+ totalPages: number;
10
+ };
11
+ }
12
+
13
+ // 查询位置树接口返回的数据类型
14
+ export interface AreasTreeData {
15
+ areaId: number;
16
+ areaLevel: number;
17
+ areaLevel1Id: number;
18
+ areaName: string;
19
+ areaSubType: number;
20
+ areaType: number;
21
+ children?: AreasTreeData[];
22
+ }
23
+ // 空间树所需数据类型
24
+ export interface AreasTreeOptions {
25
+ title: string;
26
+ value: number;
27
+ key: number;
28
+ children?: AreasTreeOptions[];
29
+ }
30
+ // 空间树选择器props
31
+ export interface AreasTreeSelectProps extends TreeSelectProps {
32
+ level1?: boolean; // 是否显示第一级
33
+ depth?: number; // 树节点深度,不传表示到第五级
34
+ areaType?: number; // 筛选楼类型
35
+ areaSubType?: number; // 筛选楼类型
36
+ showSearch?: boolean; // 是否开启搜索
37
+ treeCheckable?: boolean; // 是否开启多选
38
+ selectable?: boolean; // 是否强制要求选到最底层
39
+ treeDefaultExpandedLevel?: number; // 默认展开的层级
40
+ }
@@ -30,7 +30,11 @@ var SortableItem = function SortableItem(_ref) {
30
30
  _onClick = _ref.onClick,
31
31
  onEdit = _ref.onEdit,
32
32
  onDel = _ref.onDel,
33
- onSwitch = _ref.onSwitch;
33
+ onSwitch = _ref.onSwitch,
34
+ subId = _ref.subId,
35
+ isSubNode = _ref.isSubNode,
36
+ subNode = _ref.subNode,
37
+ onSubClick = _ref.onSubClick;
34
38
  var _useSortable = useSortable({
35
39
  id: id
36
40
  }),
@@ -49,12 +53,13 @@ var SortableItem = function SortableItem(_ref) {
49
53
  zIndex: 9999
50
54
  } : {});
51
55
  var mb = useBem('SortableItem');
52
- var top = mb.b('content').b('top');
56
+ var top = isSubNode === true ? mb.b('content-no-bg').b('top') : mb.b('content').b('top');
57
+ var subTop = mb.b('sub-content').b('top');
53
58
  return /*#__PURE__*/React.createElement("div", {
54
59
  style: style,
55
60
  className: "".concat(mb)
56
61
  }, /*#__PURE__*/React.createElement("div", {
57
- className: "".concat(mb.b('content'), " ").concat(id === activeKey ? "".concat(mb.e('content-active')) : '', " ").concat(mb.b(statusColor[status !== null && status !== void 0 ? status : ''])),
62
+ className: "".concat(isSubNode === true ? "".concat(mb.b('content-no-bg')) : "".concat(mb.b('content')), " ").concat(id === activeKey && isSubNode === false ? "".concat(mb.e('content-active')) : '', " ").concat(mb.b(statusColor[status !== null && status !== void 0 ? status : ''])),
58
63
  key: id,
59
64
  onClick: function onClick() {
60
65
  _onClick === null || _onClick === void 0 || _onClick(id, {
@@ -62,7 +67,8 @@ var SortableItem = function SortableItem(_ref) {
62
67
  title: title,
63
68
  extra: extra,
64
69
  checked: checked,
65
- data: data
70
+ data: data,
71
+ children: subNode
66
72
  });
67
73
  }
68
74
  }, /*#__PURE__*/React.createElement("div", {
@@ -80,7 +86,7 @@ var SortableItem = function SortableItem(_ref) {
80
86
  })), /*#__PURE__*/React.createElement("div", {
81
87
  className: "".concat(top.b('top-left').b('top-title-wrap'))
82
88
  }, /*#__PURE__*/React.createElement("span", {
83
- className: "".concat(top.b('top-left').b('top-title-wrap').e('top-title')),
89
+ className: "".concat(top.b('top-left').b('top-title-wrap').e('top-title'), " ").concat(id === activeKey ? "".concat(top.b('top-left').b('top-title-wrap').e('top-title-active')) : ''),
84
90
  style: {
85
91
  marginRight: editBtnIcon || delBtnIcon ? '12px' : '0',
86
92
  marginLeft: dragBtnIcon ? '6px' : '0'
@@ -150,6 +156,39 @@ var SortableItem = function SortableItem(_ref) {
150
156
  }
151
157
  }, /*#__PURE__*/React.createElement("span", {
152
158
  className: "".concat(mb.b('content').b('bottom').e('extra'))
153
- }, extra))));
159
+ }, extra))), subNode === null || subNode === void 0 ? void 0 : subNode.map(function (item, index) {
160
+ return /*#__PURE__*/React.createElement("div", {
161
+ style: {
162
+ height: id === activeKey ? '100%' : 0,
163
+ padding: id === activeKey ? '12px 16px 12px 32px' : 0
164
+ },
165
+ key: index,
166
+ className: "".concat(mb.b('sub-content'), " ").concat(id === activeKey && subId === item.key ? "".concat(mb.e('sub-content-active')) : '', " ").concat(mb.b(statusColor[status !== null && status !== void 0 ? status : ''])),
167
+ onClick: function onClick() {
168
+ console.log(id, item.key, _objectSpread({}, item));
169
+ onSubClick === null || onSubClick === void 0 || onSubClick(id, item.key, _objectSpread({}, item));
170
+ }
171
+ }, /*#__PURE__*/React.createElement("div", {
172
+ className: "".concat(subTop)
173
+ }, /*#__PURE__*/React.createElement("div", {
174
+ className: "".concat(subTop.b('top-left'))
175
+ }, /*#__PURE__*/React.createElement("div", {
176
+ className: "".concat(subTop.b('top-left').b('top-title-wrap'))
177
+ }, /*#__PURE__*/React.createElement("span", {
178
+ className: "".concat(subTop.b('top-left').b('top-title-wrap').e('top-title'), " ").concat(subId === item.key ? "".concat(subTop.b('top-left').b('top-title-wrap').e('top-title-active')) : ''),
179
+ style: {
180
+ marginRight: editBtnIcon || delBtnIcon ? '12px' : '0',
181
+ marginLeft: dragBtnIcon ? '6px' : '0'
182
+ }
183
+ }, item.title)))), /*#__PURE__*/React.createElement("div", {
184
+ className: "".concat(mb.b('content').b('bottom')),
185
+ style: {
186
+ marginLeft: dragBtnIcon ? '22px' : '0'
187
+ }
188
+ }, /*#__PURE__*/React.createElement("span", {
189
+ className: "".concat(mb.b('content').b('bottom').e('extra'))
190
+ }, item.extra)));
191
+ }));
154
192
  };
155
- export default SortableItem;
193
+ export default SortableItem;
194
+ /*#__PURE__*/React.createElement("div", null);
@@ -66,6 +66,76 @@
66
66
  }
67
67
  }
68
68
  }
69
+ &-content-no-bg {
70
+ position: relative;
71
+ padding: 12px 16px;
72
+ box-sizing: border-box;
73
+ cursor: pointer;
74
+ background-color: #fff;
75
+ &-top {
76
+ display: flex;
77
+ justify-content: space-between;
78
+ align-items: start;
79
+ &-top-left {
80
+ display: flex;
81
+ align-items: start;
82
+ &-top-drag-btn-icon {
83
+ cursor: move;
84
+ &__drag-btn-icon-svg {
85
+ display: inline-block;
86
+ vertical-align: middle;
87
+ }
88
+ }
89
+ &-top-title-wrap {
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ &__top-title {
94
+ font-size: 16px;
95
+ font-weight: 400;
96
+ line-height: 1.5em;
97
+ overflow: hidden;
98
+ display: -webkit-box; //将元素设为盒子伸缩模型显示
99
+ -webkit-box-orient: vertical; //伸缩方向设为垂直方向
100
+ -webkit-line-clamp: 2; //超出2行隐藏,并显示省略号
101
+ line-clamp: 2;
102
+ }
103
+ &__top-title-active{
104
+ font-weight: bold;
105
+ }
106
+ }
107
+ }
108
+ &-top-middle {
109
+ display: flex;
110
+ align-items: center;
111
+ &-top-edit-btn-icon {
112
+ cursor: pointer;
113
+ &__edit-btn-icon-svg {
114
+ display: inline-block;
115
+ vertical-align: middle;
116
+ }
117
+ }
118
+ &-top-del-btn-icon {
119
+ cursor: pointer;
120
+ margin-left: 12px;
121
+ &__del-btn-icon-svg {
122
+ display: inline-block;
123
+ vertical-align: middle;
124
+ }
125
+ }
126
+ }
127
+ }
128
+ &-bottom {
129
+ text-overflow: ellipsis;
130
+ overflow: hidden;
131
+ white-space: nowrap;
132
+ &__extra {
133
+ font-size: 12px;
134
+ font-weight: 400;
135
+ color: rgba(0, 0, 0, 0.45);
136
+ }
137
+ }
138
+ }
69
139
  &-content:hover {
70
140
  background-color: var(--ant-color-primary-border);
71
141
  transition: all 0.05s ease;
@@ -80,6 +150,16 @@
80
150
  background-color: #e5e5e5;
81
151
  z-index: 100;
82
152
  }
153
+ &-content-no-bg::before{
154
+ content: '';
155
+ position: absolute;
156
+ bottom: -0.5px;
157
+ left: 16px;
158
+ right: 16px;
159
+ height: 1px;
160
+ background-color: #e5e5e5;
161
+ z-index: 100;
162
+ }
83
163
  &__content-active {
84
164
  background-color: var(--ant-color-primary-border);
85
165
  }
@@ -108,4 +188,98 @@
108
188
  border: 4px solid var(--ant-color-error);
109
189
  z-index: 999;
110
190
  }
191
+ &-sub-content {
192
+ position: relative;
193
+ padding: 12px 16px 12px 32px;
194
+ box-sizing: border-box;
195
+ cursor: pointer;
196
+ background-color: #fff;
197
+ border-bottom:1 px solid ;
198
+ &-top {
199
+ display: flex;
200
+ justify-content: space-between;
201
+ align-items: start;
202
+ &-top-left {
203
+ display: flex;
204
+ align-items: start;
205
+ &-top-drag-btn-icon {
206
+ cursor: move;
207
+ &__drag-btn-icon-svg {
208
+ display: inline-block;
209
+ vertical-align: middle;
210
+ }
211
+ }
212
+ &-top-title-wrap {
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ &__top-title {
217
+ font-size: 16px;
218
+ font-weight: 400;
219
+ line-height: 1.5em;
220
+ overflow: hidden;
221
+ display: -webkit-box; //将元素设为盒子伸缩模型显示
222
+ -webkit-box-orient: vertical; //伸缩方向设为垂直方向
223
+ -webkit-line-clamp: 2; //超出2行隐藏,并显示省略号
224
+ line-clamp: 2;
225
+ }
226
+ }
227
+ }
228
+ &-top-middle {
229
+ display: flex;
230
+ align-items: center;
231
+ &-top-edit-btn-icon {
232
+ cursor: pointer;
233
+ &__edit-btn-icon-svg {
234
+ display: inline-block;
235
+ vertical-align: middle;
236
+ }
237
+ }
238
+ &-top-del-btn-icon {
239
+ cursor: pointer;
240
+ margin-left: 12px;
241
+ &__del-btn-icon-svg {
242
+ display: inline-block;
243
+ vertical-align: middle;
244
+ }
245
+ }
246
+ }
247
+ }
248
+ &-bottom {
249
+ text-overflow: ellipsis;
250
+ overflow: hidden;
251
+ white-space: nowrap;
252
+ &__extra {
253
+ font-size: 12px;
254
+ font-weight: 400;
255
+ color: rgba(0, 0, 0, 0.45);
256
+ }
257
+ }
258
+ }
259
+ &-sub-content:hover {
260
+ background-color: var(--ant-color-primary-border);
261
+ transition: all 0.05s ease;
262
+ }
263
+ &-sub-content::before {
264
+ content: '';
265
+ position: absolute;
266
+ bottom: -0.5px;
267
+ left: 16px;
268
+ right: 16px;
269
+ height: 1px;
270
+ background-color: #e5e5e5;
271
+ z-index: 100;
272
+ }
273
+ &__sub-content-active {
274
+ background-color: var(--ant-color-primary-border);
275
+ }
276
+ &__sub-content-active::after {
277
+ content: '';
278
+ position: absolute;
279
+ bottom: 0;
280
+ left: 0;
281
+ width: 4px;
282
+ height: 100%;
283
+ background-color: var(--ant-color-primary);
284
+ }
111
285
  }
@@ -38,7 +38,10 @@ export var Aside = function Aside(_ref) {
38
38
  onDragEnd = _ref.onDragEnd,
39
39
  onScrollBottom = _ref.onScrollBottom,
40
40
  _ref$bottomThreshold = _ref.bottomThreshold,
41
- bottomThreshold = _ref$bottomThreshold === void 0 ? 50 : _ref$bottomThreshold;
41
+ bottomThreshold = _ref$bottomThreshold === void 0 ? 50 : _ref$bottomThreshold,
42
+ _ref$isSubNode = _ref.isSubNode,
43
+ isSubNode = _ref$isSubNode === void 0 ? false : _ref$isSubNode,
44
+ onSubClick = _ref.onSubClick;
42
45
  var mb = useBem('aside');
43
46
  var asideRef = useRef(null);
44
47
  // 当前选择的key
@@ -46,11 +49,16 @@ export var Aside = function Aside(_ref) {
46
49
  _useState2 = _slicedToArray(_useState, 2),
47
50
  key = _useState2[0],
48
51
  setKey = _useState2[1];
49
- // 缓存传入的数据
50
- var _useState3 = useState([]),
52
+ // 当前选择的key
53
+ var _useState3 = useState(),
51
54
  _useState4 = _slicedToArray(_useState3, 2),
52
- dataValue = _useState4[0],
53
- setDataValue = _useState4[1];
55
+ subKey = _useState4[0],
56
+ setSubKey = _useState4[1];
57
+ // 缓存传入的数据
58
+ var _useState5 = useState([]),
59
+ _useState6 = _slicedToArray(_useState5, 2),
60
+ dataValue = _useState6[0],
61
+ setDataValue = _useState6[1];
54
62
  var sensors = useSensors(useSensor(PointerSensor, {
55
63
  activationConstraint: {
56
64
  delay: 50,
@@ -61,11 +69,24 @@ export var Aside = function Aside(_ref) {
61
69
  }));
62
70
  // 切换选中项
63
71
  var handleClick = function handleClick(key, e) {
72
+ console.log(key, e);
64
73
  if (key != null) {
74
+ var _e$children$0$key, _e$children;
65
75
  setKey(key);
76
+ setSubKey((_e$children$0$key = e === null || e === void 0 || (_e$children = e.children) === null || _e$children === void 0 || (_e$children = _e$children[0]) === null || _e$children === void 0 ? void 0 : _e$children.key) !== null && _e$children$0$key !== void 0 ? _e$children$0$key : '');
66
77
  onClick === null || onClick === void 0 || onClick(key, e);
67
78
  }
68
79
  };
80
+ // 切换选中项
81
+ var handleSubClick = function handleSubClick(key, subKey, e) {
82
+ if (key != null) {
83
+ setKey(key);
84
+ if (subKey != null) {
85
+ setSubKey(subKey);
86
+ onSubClick === null || onSubClick === void 0 || onSubClick(key, subKey, e);
87
+ }
88
+ }
89
+ };
69
90
  // 添加
70
91
  var handleAdd = function handleAdd() {
71
92
  onAdd === null || onAdd === void 0 || onAdd();
@@ -188,7 +209,7 @@ export var Aside = function Aside(_ref) {
188
209
  }),
189
210
  strategy: verticalListSortingStrategy
190
211
  }, dataValue === null || dataValue === void 0 ? void 0 : dataValue.map(function (item) {
191
- var _dataValue$;
212
+ var _dataValue$, _item$children;
192
213
  return /*#__PURE__*/React.createElement(SortableItem, {
193
214
  key: item.key,
194
215
  activeKey: key !== null && key !== void 0 ? key : dataValue === null || dataValue === void 0 || (_dataValue$ = dataValue[0]) === null || _dataValue$ === void 0 ? void 0 : _dataValue$.key,
@@ -204,8 +225,12 @@ export var Aside = function Aside(_ref) {
204
225
  onEdit: handleEdit,
205
226
  onDel: handleDel,
206
227
  onSwitch: handleSwitch,
228
+ onSubClick: handleSubClick,
207
229
  data: item.data,
208
- status: item.status
230
+ status: item.status,
231
+ subId: subKey !== null && subKey !== void 0 ? subKey : (_item$children = item.children) === null || _item$children === void 0 || (_item$children = _item$children[0]) === null || _item$children === void 0 ? void 0 : _item$children.key,
232
+ isSubNode: isSubNode,
233
+ subNode: item.children
209
234
  });
210
235
  })))));
211
236
  };
@@ -5,6 +5,14 @@ type IdataItem = {
5
5
  checked?: boolean;
6
6
  status?: string;
7
7
  data?: any;
8
+ children?: Array<{
9
+ key: string;
10
+ title: string;
11
+ extra?: string;
12
+ checked?: boolean;
13
+ status?: string;
14
+ data?: any;
15
+ }>;
8
16
  };
9
17
  export type AsideProps = {
10
18
  width?: number;
@@ -31,6 +39,8 @@ export type AsideProps = {
31
39
  onDragEnd?: (data: IdataItem[]) => void;
32
40
  onScrollBottom?: () => void;
33
41
  bottomThreshold?: number;
42
+ isSubNode: boolean;
43
+ onSubClick?: (key: string, subKey: string, e: IdataItem) => void;
34
44
  };
35
45
  export type AsideItemProps = {
36
46
  activeKey: string;
@@ -44,8 +54,19 @@ export type AsideItemProps = {
44
54
  extra?: string;
45
55
  status?: string;
46
56
  data?: any;
47
- onClick?: (key: string, e: IdataItem) => void;
57
+ onClick?: (key: string | undefined, e: IdataItem) => void;
48
58
  onEdit?: (key: string, e: IdataItem) => void;
49
59
  onDel?: (key: string, e: IdataItem) => void;
50
60
  onSwitch?: (key: string, e: boolean) => void;
61
+ subId?: string;
62
+ isSubNode?: boolean;
63
+ subNode?: Array<{
64
+ key: string;
65
+ title: string;
66
+ extra?: string;
67
+ checked?: boolean;
68
+ status?: string;
69
+ data?: any;
70
+ }>;
71
+ onSubClick?: (key, subKey: string | undefined, e: IdataItem) => void;
51
72
  };
package/package.json CHANGED
@@ -1,92 +1,92 @@
1
- {
2
- "name": "yootd",
3
- "version": "0.2.11",
4
- "description": "基于 Antd 二次开发的组件库",
5
- "license": "MIT",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "build": "father build",
13
- "build:watch": "father dev",
14
- "dev": "dumi dev",
15
- "docs:build": "dumi build",
16
- "docs:preview": "dumi preview",
17
- "doctor": "father doctor",
18
- "lint": "npm run lint:es && npm run lint:css",
19
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
- "prepare": "husky install && dumi setup",
22
- "prepublishOnly": "father doctor && npm run build",
23
- "start": "npm run dev"
24
- },
25
- "commitlint": {
26
- "extends": [
27
- "@commitlint/config-conventional"
28
- ]
29
- },
30
- "lint-staged": {
31
- "*.{md,json}": [
32
- "prettier --write --no-error-on-unmatched-pattern"
33
- ],
34
- "*.{css,less}": [
35
- "stylelint --fix",
36
- "prettier --write"
37
- ],
38
- "*.{js,jsx}": [
39
- "eslint --fix",
40
- "prettier --write"
41
- ],
42
- "*.{ts,tsx}": [
43
- "eslint --fix",
44
- "prettier --parser=typescript --write"
45
- ]
46
- },
47
- "dependencies": {
48
- "@ant-design/icons": "^6.0.0",
49
- "@babel/runtime": "^7.26.9"
50
- },
51
- "devDependencies": {
52
- "@commitlint/cli": "^17.1.2",
53
- "@commitlint/config-conventional": "^17.1.0",
54
- "@types/lodash": "^4.17.12",
55
- "@types/react": "^18.0.0",
56
- "@types/react-dom": "^18.0.0",
57
- "@umijs/lint": "^4.0.0",
58
- "dumi": "^2.3.0",
59
- "dumi-theme-antd": "^0.4.2",
60
- "eslint": "^8.23.0",
61
- "father": "^4.1.0",
62
- "husky": "^8.0.1",
63
- "lint-staged": "^13.0.3",
64
- "prettier": "^2.7.1",
65
- "prettier-plugin-organize-imports": "^3.0.0",
66
- "prettier-plugin-packagejson": "^2.2.18",
67
- "sass": "^1.80.0",
68
- "stylelint": "^14.9.1"
69
- },
70
- "peerDependencies": {
71
- "@dnd-kit/core": ">=6.1.0",
72
- "@dnd-kit/modifiers": ">=7.0.0",
73
- "@dnd-kit/sortable": ">=8.0.0",
74
- "@dnd-kit/utilities": ">=3.2.2",
75
- "@tanstack/react-query": ">=5.59.15",
76
- "@tensorflow-models/pose-detection": ">=2.1.3",
77
- "@tensorflow/tfjs": ">=4.22.0",
78
- "@vladmandic/face-api": ">=1.7.14",
79
- "@xyflow/react": ">=12.3.3",
80
- "antd": ">=5.21.4",
81
- "axios": ">=1.7.7",
82
- "dayjs": ">=1.11.13",
83
- "lodash": ">=4.17.21",
84
- "react": ">=18.0.0",
85
- "react-dom": ">=18.0.0",
86
- "yootd-webrtc-sdk": ">=1.0.1"
87
- },
88
- "publishConfig": {
89
- "access": "public"
90
- },
91
- "authors": []
92
- }
1
+ {
2
+ "name": "yootd",
3
+ "version": "0.2.13",
4
+ "description": "基于 Antd 二次开发的组件库",
5
+ "license": "MIT",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "dev": "dumi dev",
15
+ "docs:build": "dumi build",
16
+ "docs:preview": "dumi preview",
17
+ "doctor": "father doctor",
18
+ "lint": "npm run lint:es && npm run lint:css",
19
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
+ "prepare": "husky install && dumi setup",
22
+ "prepublishOnly": "father doctor && npm run build",
23
+ "start": "npm run dev"
24
+ },
25
+ "commitlint": {
26
+ "extends": [
27
+ "@commitlint/config-conventional"
28
+ ]
29
+ },
30
+ "lint-staged": {
31
+ "*.{md,json}": [
32
+ "prettier --write --no-error-on-unmatched-pattern"
33
+ ],
34
+ "*.{css,less}": [
35
+ "stylelint --fix",
36
+ "prettier --write"
37
+ ],
38
+ "*.{js,jsx}": [
39
+ "eslint --fix",
40
+ "prettier --write"
41
+ ],
42
+ "*.{ts,tsx}": [
43
+ "eslint --fix",
44
+ "prettier --parser=typescript --write"
45
+ ]
46
+ },
47
+ "dependencies": {
48
+ "@ant-design/icons": "^6.0.0",
49
+ "@babel/runtime": "^7.26.9"
50
+ },
51
+ "devDependencies": {
52
+ "@commitlint/cli": "^17.1.2",
53
+ "@commitlint/config-conventional": "^17.1.0",
54
+ "@types/lodash": "^4.17.12",
55
+ "@types/react": "^18.0.0",
56
+ "@types/react-dom": "^18.0.0",
57
+ "@umijs/lint": "^4.0.0",
58
+ "dumi": "^2.3.0",
59
+ "dumi-theme-antd": "^0.4.2",
60
+ "eslint": "^8.23.0",
61
+ "father": "^4.1.0",
62
+ "husky": "^8.0.1",
63
+ "lint-staged": "^13.0.3",
64
+ "prettier": "^2.7.1",
65
+ "prettier-plugin-organize-imports": "^3.0.0",
66
+ "prettier-plugin-packagejson": "^2.2.18",
67
+ "sass": "^1.80.0",
68
+ "stylelint": "^14.9.1"
69
+ },
70
+ "peerDependencies": {
71
+ "@dnd-kit/core": ">=6.1.0",
72
+ "@dnd-kit/modifiers": ">=7.0.0",
73
+ "@dnd-kit/sortable": ">=8.0.0",
74
+ "@dnd-kit/utilities": ">=3.2.2",
75
+ "@tanstack/react-query": ">=5.59.15",
76
+ "@tensorflow-models/pose-detection": ">=2.1.3",
77
+ "@tensorflow/tfjs": ">=4.22.0",
78
+ "@vladmandic/face-api": ">=1.7.14",
79
+ "@xyflow/react": ">=12.3.3",
80
+ "antd": ">=5.21.4",
81
+ "axios": ">=1.7.7",
82
+ "dayjs": ">=1.11.13",
83
+ "lodash": ">=4.17.21",
84
+ "react": ">=18.0.0",
85
+ "react-dom": ">=18.0.0",
86
+ "yootd-webrtc-sdk": ">=1.0.1"
87
+ },
88
+ "publishConfig": {
89
+ "access": "public"
90
+ },
91
+ "authors": []
92
+ }