ronds-metadata 1.1.48 → 1.1.50

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
- pre {
2
- margin: 0;
3
- font-weight: 900;
4
- font-size: 14px;
5
- }
6
- .string {
7
- color: #3ab54a;
8
- }
9
- .number {
10
- color: #25aae2;
11
- }
12
- .boolean {
13
- color: #f98280;
14
- }
15
- .null {
16
- color: #f1592a;
17
- }
18
- .width-10 {
19
- width: 10px;
20
- }
21
- .key {
22
- color: #92278f;
23
- }
24
- .open {
25
- display: inline-block;
26
- width: 12px;
27
- height: 12px;
28
- background: url('./icon/close.png') no-repeat;
29
- background-size: 100% 100%;
30
- vertical-align: middle;
31
- cursor: pointer;
32
- }
33
- .close {
34
- display: inline-block;
35
- width: 12px;
36
- height: 12px;
37
- background: url('./icon/open.png') no-repeat;
38
- background-size: 100% 100%;
39
- vertical-align: middle;
40
- cursor: pointer;
41
- }
1
+ pre {
2
+ margin: 0;
3
+ font-weight: 900;
4
+ font-size: 14px;
5
+ }
6
+ .string {
7
+ color: #3ab54a;
8
+ }
9
+ .number {
10
+ color: #25aae2;
11
+ }
12
+ .boolean {
13
+ color: #f98280;
14
+ }
15
+ .null {
16
+ color: #f1592a;
17
+ }
18
+ .width-10 {
19
+ width: 10px;
20
+ }
21
+ .key {
22
+ color: #92278f;
23
+ }
24
+ .open {
25
+ display: inline-block;
26
+ width: 12px;
27
+ height: 12px;
28
+ background: url('./icon/close.png') no-repeat;
29
+ background-size: 100% 100%;
30
+ vertical-align: middle;
31
+ cursor: pointer;
32
+ }
33
+ .close {
34
+ display: inline-block;
35
+ width: 12px;
36
+ height: 12px;
37
+ background: url('./icon/open.png') no-repeat;
38
+ background-size: 100% 100%;
39
+ vertical-align: middle;
40
+ cursor: pointer;
41
+ }
@@ -1,9 +1,10 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
1
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
3
 
3
4
  /*
4
5
  * @Author: wangxian
5
6
  * @Date: 2022-10-14 09:05:50
6
- * @LastEditTime: 2022-10-14 10:55:42
7
+ * @LastEditTime: 2022-10-14 14:25:18
7
8
  */
8
9
  import React from 'react';
9
10
  import { getCurrentHashValue, trimArrZero } from './utils';
@@ -17,73 +18,83 @@ var MdNavbar = function MdNavbar(props) {
17
18
  onNavItemClick = props.onNavItemClick,
18
19
  onHashChange = props.onHashChange;
19
20
 
20
- var _React$useState = React.useState(''),
21
+ var _React$useState = React.useState([]),
21
22
  _React$useState2 = _slicedToArray(_React$useState, 2),
22
- currentListNo = _React$useState2[0],
23
- setCurrentListNo = _React$useState2[1];
23
+ navStructure = _React$useState2[0],
24
+ setNavStructure = _React$useState2[1];
25
+
26
+ var navStructureRef = React.useRef([]);
27
+
28
+ var _React$useState3 = React.useState(''),
29
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
30
+ currentListNo = _React$useState4[0],
31
+ setCurrentListNo = _React$useState4[1];
24
32
 
25
33
  var scrollTimeoutRef = React.useRef();
26
34
  var addTargetTimeoutRef = React.useRef();
27
- var navStructure = React.useMemo(function () {
28
- var contentWithoutCode = source.replace(/^[^#]+\n/g, '').replace(/(?:[^\n#]+)#+\s([^#\n]+)\n*/g, '') // 匹配行内出现 # 号的情况
29
- .replace(/^#\s[^#\n]*\n+/, '').replace(/```[^`\n]*\n+[^```]+```\n+/g, '').replace(/`([^`\n]+)`/g, '$1').replace(/\*\*?([^*\n]+)\*\*?/g, '$1').replace(/__?([^_\n]+)__?/g, '$1').trim();
30
- var pattOfTitle = /#+\s([^#\n]+)\n*/g;
31
- var matchResult = contentWithoutCode.match(pattOfTitle);
32
-
33
- if (!matchResult) {
34
- return [];
35
- }
36
-
37
- var navData = matchResult.map(function (r, i) {
38
- return {
39
- index: i,
40
- level: r.match(/^#+/g)[0].length,
41
- text: r.replace(pattOfTitle, '$1')
42
- };
43
- });
44
- var maxLevel = 0;
45
- navData.forEach(function (t) {
46
- if (t.level > maxLevel) {
47
- maxLevel = t.level;
35
+ var getNavStructure = React.useCallback(function () {
36
+ if (source) {
37
+ var contentWithoutCode = source.replace(/^[^#]+\n/g, '').replace(/(?:[^\n#]+)#+\s([^#\n]+)\n*/g, '') // 匹配行内出现 # 号的情况
38
+ .replace(/^#\s[^#\n]*\n+/, '').replace(/```[^`\n]*\n+[^```]+```\n+/g, '').replace(/`([^`\n]+)`/g, '$1').replace(/\*\*?([^*\n]+)\*\*?/g, '$1').replace(/__?([^_\n]+)__?/g, '$1').trim();
39
+ var pattOfTitle = /#+\s([^#\n]+)\n*/g;
40
+ var matchResult = contentWithoutCode.match(pattOfTitle);
41
+
42
+ if (!matchResult) {
43
+ return;
48
44
  }
49
- });
50
- var matchStack = []; // 此部分重构,原有方法会出现次级标题后再次出现高级标题时,listNo重复的bug
51
45
 
52
- for (var i = 0; i < navData.length; i++) {
53
- var t = navData[i];
54
- var level = t.level;
46
+ var navData = matchResult.map(function (r, i) {
47
+ return {
48
+ index: i,
49
+ level: r.match(/^#+/g)[0].length,
50
+ text: r.replace(pattOfTitle, '$1')
51
+ };
52
+ });
53
+ var maxLevel = 0;
54
+ navData.forEach(function (t) {
55
+ if (t.level > maxLevel) {
56
+ maxLevel = t.level;
57
+ }
58
+ });
59
+ var matchStack = []; // 此部分重构,原有方法会出现次级标题后再次出现高级标题时,listNo重复的bug
55
60
 
56
- while (matchStack.length && matchStack[matchStack.length - 1].level > level) {
57
- matchStack.pop();
58
- }
61
+ for (var i = 0; i < navData.length; i++) {
62
+ var t = navData[i];
63
+ var level = t.level;
59
64
 
60
- if (matchStack.length === 0) {
61
- var _arr = new Array(maxLevel).fill(0);
65
+ while (matchStack.length && matchStack[matchStack.length - 1].level > level) {
66
+ matchStack.pop();
67
+ }
62
68
 
63
- _arr[level - 1] += 1;
69
+ if (matchStack.length === 0) {
70
+ var _arr = new Array(maxLevel).fill(0);
71
+
72
+ _arr[level - 1] += 1;
73
+ matchStack.push({
74
+ level: level,
75
+ arr: _arr
76
+ });
77
+ t.listNo = trimArrZero(_arr).join('.');
78
+ continue;
79
+ }
80
+
81
+ var arr = matchStack[matchStack.length - 1].arr;
82
+ var newArr = arr.slice();
83
+ newArr[level - 1] += 1;
64
84
  matchStack.push({
65
85
  level: level,
66
- arr: _arr
86
+ arr: newArr
67
87
  });
68
- t.listNo = trimArrZero(_arr).join('.');
69
- continue;
88
+ t.listNo = trimArrZero(newArr).join('.');
70
89
  }
71
90
 
72
- var arr = matchStack[matchStack.length - 1].arr;
73
- var newArr = arr.slice();
74
- newArr[level - 1] += 1;
75
- matchStack.push({
76
- level: level,
77
- arr: newArr
78
- });
79
- t.listNo = trimArrZero(newArr).join('.');
91
+ setNavStructure(_toConsumableArray(navData));
92
+ navStructureRef.current = navData;
80
93
  }
81
-
82
- return navData;
83
94
  }, [source]);
84
95
  var initHeadingsId = React.useCallback(function () {
85
96
  var headingId = decodeURIComponent(declarative ? window.location.hash.replace(/^#/, '').trim() : (window.location.hash.match(/heading-\d+/g) || [])[0]);
86
- navStructure.forEach(function (t) {
97
+ navStructureRef.current.forEach(function (t) {
87
98
  var headings = document.querySelectorAll("h".concat(t.level));
88
99
  var curHeading = Array.prototype.slice.apply(headings).find(function (h) {
89
100
  return h.innerText.trim() === t.text.trim() && (!h.dataset || !h.dataset.id);
@@ -112,12 +123,17 @@ var MdNavbar = function MdNavbar(props) {
112
123
  setCurrentListNo(listNo);
113
124
  }
114
125
  }, 500);
115
- }, []);
126
+ }, [navStructure]);
116
127
  React.useEffect(function () {
117
- if (navStructure) {
128
+ if (source) {
129
+ getNavStructure();
130
+ }
131
+ }, [source, getNavStructure]);
132
+ React.useEffect(function () {
133
+ if (source && navStructure && navStructure.length > 0) {
118
134
  refreshNav();
119
135
  }
120
- }, [navStructure]);
136
+ }, [navStructure, source]);
121
137
 
122
138
  var scrollToTarget = function scrollToTarget(dataId) {
123
139
  if (scrollTimeoutRef.current) {
@@ -1,77 +1,77 @@
1
- .markdown-navigation {
2
- font-size: 14px;
3
- font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
4
- 'WenQuanYi Micro Hei', sans-serif;
5
- width: 100%;
6
- overflow-x: hidden;
7
- overflow-y: scroll;
8
- scrollbar-width: 0;
9
- width: 200px;
10
- }
11
- .markdown-navigation::-webkit-scrollbar {
12
- width: 0;
13
- }
14
-
15
- .markdown-navigation .title-anchor {
16
- display: block;
17
- color: #bbb;
18
- transition: all 0.2s;
19
- margin: 0.8em 0;
20
- font-weight: lighter;
21
- line-height: 2em;
22
- padding-right: 1.8em;
23
- cursor: pointer;
24
- }
25
-
26
- .markdown-navigation .title-anchor:hover,
27
- .markdown-navigation .title-anchor.active {
28
- background-color: #f8f8f8;
29
- text-decoration: inherit;
30
- }
31
-
32
- .markdown-navigation .title-anchor.active {
33
- color: #007fff;
34
- }
35
-
36
- .markdown-navigation .title-anchor small {
37
- margin: 0 0.8em;
38
- }
39
-
40
- .markdown-navigation .title-level1 {
41
- color: #000;
42
- font-size: 1.2em;
43
- padding-left: 1em;
44
- font-weight: normal;
45
- }
46
-
47
- .markdown-navigation .title-level2 {
48
- color: #000;
49
- font-size: 1em;
50
- padding-left: 1em;
51
- font-weight: normal;
52
- }
53
-
54
- .markdown-navigation .title-level3 {
55
- color: #000;
56
- font-size: 0.8em;
57
- padding-left: 3em;
58
- font-weight: normal;
59
- }
60
-
61
- .markdown-navigation .title-level4 {
62
- color: #000;
63
- font-size: 0.72em;
64
- padding-left: 5em;
65
- }
66
-
67
- .markdown-navigation .title-level5 {
68
- color: #000;
69
- font-size: 0.72em;
70
- padding-left: 7em;
71
- }
72
-
73
- .markdown-navigation .title-level6 {
74
- color: #000;
75
- font-size: 0.72em;
76
- padding-left: 9em;
77
- }
1
+ .markdown-navigation {
2
+ font-size: 14px;
3
+ font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
4
+ 'WenQuanYi Micro Hei', sans-serif;
5
+ width: 100%;
6
+ overflow-x: hidden;
7
+ overflow-y: scroll;
8
+ scrollbar-width: 0;
9
+ width: 200px;
10
+ }
11
+ .markdown-navigation::-webkit-scrollbar {
12
+ width: 0;
13
+ }
14
+
15
+ .markdown-navigation .title-anchor {
16
+ display: block;
17
+ color: #bbb;
18
+ transition: all 0.2s;
19
+ margin: 0.8em 0;
20
+ font-weight: lighter;
21
+ line-height: 2em;
22
+ padding-right: 1.8em;
23
+ cursor: pointer;
24
+ }
25
+
26
+ .markdown-navigation .title-anchor:hover,
27
+ .markdown-navigation .title-anchor.active {
28
+ background-color: #f8f8f8;
29
+ text-decoration: inherit;
30
+ }
31
+
32
+ .markdown-navigation .title-anchor.active {
33
+ color: #007fff;
34
+ }
35
+
36
+ .markdown-navigation .title-anchor small {
37
+ margin: 0 0.8em;
38
+ }
39
+
40
+ .markdown-navigation .title-level1 {
41
+ color: #000;
42
+ font-size: 1.2em;
43
+ padding-left: 1em;
44
+ font-weight: normal;
45
+ }
46
+
47
+ .markdown-navigation .title-level2 {
48
+ color: #000;
49
+ font-size: 1em;
50
+ padding-left: 1em;
51
+ font-weight: normal;
52
+ }
53
+
54
+ .markdown-navigation .title-level3 {
55
+ color: #000;
56
+ font-size: 0.8em;
57
+ padding-left: 3em;
58
+ font-weight: normal;
59
+ }
60
+
61
+ .markdown-navigation .title-level4 {
62
+ color: #000;
63
+ font-size: 0.72em;
64
+ padding-left: 5em;
65
+ }
66
+
67
+ .markdown-navigation .title-level5 {
68
+ color: #000;
69
+ font-size: 0.72em;
70
+ padding-left: 7em;
71
+ }
72
+
73
+ .markdown-navigation .title-level6 {
74
+ color: #000;
75
+ font-size: 0.72em;
76
+ padding-left: 9em;
77
+ }
@@ -4,7 +4,7 @@ import React from "react";
4
4
  /*
5
5
  * @Author: wangxian
6
6
  * @Date: 2022-09-02 16:17:38
7
- * @LastEditTime: 2022-10-14 11:06:26
7
+ * @LastEditTime: 2022-10-14 11:44:51
8
8
  */
9
9
  import ReactMarkdown from 'react-markdown';
10
10
  import remarkGfm from 'remark-gfm';
@@ -1,10 +1,10 @@
1
- .metadata-edit {
2
- height: 100%;
3
- width: 100%;
4
- .ant-row {
5
- display: block;
6
- }
7
- .pr-10 {
8
- padding-right: 10px;
9
- }
10
- }
1
+ .metadata-edit {
2
+ height: 100%;
3
+ width: 100%;
4
+ .ant-row {
5
+ display: block;
6
+ }
7
+ .pr-10 {
8
+ padding-right: 10px;
9
+ }
10
+ }
@@ -1,20 +1,20 @@
1
- export interface IMetaFileds {
2
- id: string;
3
- type: 'object';
4
- properties: any[];
5
- value: any;
6
- }
7
-
8
- export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
-
10
- export type IMetaProperty = {
11
- /**
12
- * 属性的名称
13
- */
14
- id: string;
15
- /**
16
- * 类型
17
- */
18
- type: string;
19
- enum?: any[];
20
- };
1
+ export interface IMetaFileds {
2
+ id: string;
3
+ type: 'object';
4
+ properties: any[];
5
+ value: any;
6
+ }
7
+
8
+ export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
+
10
+ export type IMetaProperty = {
11
+ /**
12
+ * 属性的名称
13
+ */
14
+ id: string;
15
+ /**
16
+ * 类型
17
+ */
18
+ type: string;
19
+ enum?: any[];
20
+ };
@@ -3,3 +3,4 @@ import { IMetaFormProps } from '../interface';
3
3
  declare function Index(props: IMetaFormProps): JSX.Element;
4
4
  declare const _default: React.MemoExoticComponent<typeof Index>;
5
5
  export default _default;
6
+ export declare const DEFAULT_DATE_FORMAT = "YYYY-MM-DD HH:mm:ss";
@@ -60,6 +60,7 @@ function Index(props) {
60
60
  case 'datePicker':
61
61
  return /*#__PURE__*/React.createElement(_DatePicker, {
62
62
  showTime: true,
63
+ format: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.format) || DEFAULT_DATE_FORMAT,
63
64
  disabled: (_extraInfo$disabled4 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled4 !== void 0 ? _extraInfo$disabled4 : disabled,
64
65
  placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
65
66
  });
@@ -125,4 +126,5 @@ function Index(props) {
125
126
  }), processInputType((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) || ''));
126
127
  }
127
128
 
128
- export default /*#__PURE__*/React.memo(Index);
129
+ export default /*#__PURE__*/React.memo(Index);
130
+ export var DEFAULT_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
@@ -12,6 +12,7 @@ import { MetadataService } from '../../framework/metadata/MetadataService';
12
12
  import useMemoSubject from '../../framework/rxjs-hooks/useMemoSubject';
13
13
  import useObservable from '../../framework/rxjs-hooks/useObservable';
14
14
  import moment from 'moment';
15
+ import { DEFAULT_DATE_FORMAT } from './DataCell/Input';
15
16
 
16
17
  var MetadataForm = function MetadataForm(props) {
17
18
  var _Form$useForm = _Form.useForm(),
@@ -138,7 +139,9 @@ var MetadataForm = function MetadataForm(props) {
138
139
  var _v$text;
139
140
 
140
141
  if ((v === null || v === void 0 ? void 0 : (_v$text = v.text) === null || _v$text === void 0 ? void 0 : _v$text.type) === 'datePicker' && initialValues[k]) {
141
- initialValues[k] = moment(initialValues[k], 'YYYY-MM-DD HH:mm:ss');
142
+ var _v$text2;
143
+
144
+ initialValues[k] = moment(initialValues[k], (v === null || v === void 0 ? void 0 : (_v$text2 = v.text) === null || _v$text2 === void 0 ? void 0 : _v$text2.format) || DEFAULT_DATE_FORMAT);
142
145
  }
143
146
  });
144
147
  form.setFieldsValue(_objectSpread({}, initialValues));
@@ -161,8 +164,10 @@ var MetadataForm = function MetadataForm(props) {
161
164
  var extra = fields.get(key[0]);
162
165
 
163
166
  if ((extra === null || extra === void 0 ? void 0 : (_extra$text = extra.text) === null || _extra$text === void 0 ? void 0 : _extra$text.type) === 'datePicker') {
164
- value[key[0]] = moment(value[key[0]]).format('YYYY-MM-DD HH:mm:ss');
165
- allValues[key[0]] = moment(value[key[0]]).format('YYYY-MM-DD HH:mm:ss');
167
+ var _extra$text2, _extra$text3;
168
+
169
+ value[key[0]] = moment(value[key[0]]).format((extra === null || extra === void 0 ? void 0 : (_extra$text2 = extra.text) === null || _extra$text2 === void 0 ? void 0 : _extra$text2.format) || DEFAULT_DATE_FORMAT);
170
+ allValues[key[0]] = moment(value[key[0]]).format((extra === null || extra === void 0 ? void 0 : (_extra$text3 = extra.text) === null || _extra$text3 === void 0 ? void 0 : _extra$text3.format) || DEFAULT_DATE_FORMAT);
166
171
  }
167
172
 
168
173
  onValuesChange && onValuesChange(value, allValues);
@@ -171,10 +176,12 @@ var MetadataForm = function MetadataForm(props) {
171
176
  var onMyFinish = function onMyFinish(values) {
172
177
  // 处理时间格式
173
178
  fields.forEach(function (v, k) {
174
- var _v$text2;
179
+ var _v$text3;
180
+
181
+ if ((v === null || v === void 0 ? void 0 : (_v$text3 = v.text) === null || _v$text3 === void 0 ? void 0 : _v$text3.type) === 'datePicker' && values[k]) {
182
+ var _v$text4;
175
183
 
176
- if ((v === null || v === void 0 ? void 0 : (_v$text2 = v.text) === null || _v$text2 === void 0 ? void 0 : _v$text2.type) === 'datePicker' && values[k]) {
177
- values[k] = moment(values[k]).format('YYYY-MM-DD HH:mm:ss');
184
+ values[k] = moment(values[k]).format((v === null || v === void 0 ? void 0 : (_v$text4 = v.text) === null || _v$text4 === void 0 ? void 0 : _v$text4.format) || DEFAULT_DATE_FORMAT);
178
185
  }
179
186
  });
180
187
  onFinish && onFinish(values);
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "public": true,
3
- "name": "ronds-metadata",
4
- "version": "1.1.48",
5
- "scripts": {
6
- "start": "dumi dev",
7
- "docs:build": "dumi build",
8
- "docs:deploy": "gh-pages -d docs-dist",
9
- "build": "father-build",
10
- "deploy": "npm run docs:build && npm run docs:deploy",
11
- "release": "npm run build && npm publish",
12
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
- "test": "umi-test",
14
- "test:coverage": "umi-test --coverage",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "main": "es",
18
- "module": "es",
19
- "types": "es/index.d.ts",
20
- "gitHooks": {
21
- "pre-commit": "lint-staged"
22
- },
23
- "lint-staged": {
24
- "*.{js,jsx,less,md,json}": [
25
- "prettier --write"
26
- ],
27
- "*.ts?(x)": [
28
- "prettier --parser=typescript --write"
29
- ]
30
- },
31
- "files": [
32
- "/es"
33
- ],
34
- "dependencies": {
35
- "@antv/x6": "^1.32.2",
36
- "@antv/x6-react-shape": "^1.6.0",
37
- "@babel/helper-create-regexp-features-plugin": "^7.12.13",
38
- "@babel/runtime": "^7.11.2",
39
- "@popperjs/core": "^2.4.4",
40
- "@types/markdown-navbar": "^1.4.0",
41
- "ahooks": "^3.4.0",
42
- "axios": "^0.21.4",
43
- "babel-plugin-import": "^1.13.3",
44
- "babel-plugin-transform-remove-console": "^6.9.4",
45
- "bl": "^5.0.0",
46
- "codemirror": "^5.63.0",
47
- "github-markdown-css": "^5.1.0",
48
- "immer": "^9.0.14",
49
- "lodash": "^4.17.21",
50
- "markdown-navbar": "^1.4.3",
51
- "qs": "^6.10.1",
52
- "react": "^17.0.2",
53
- "react-dnd": "^11.1.3",
54
- "react-dnd-html5-backend": "^11.1.3",
55
- "react-markdown": "^8.0.3",
56
- "react-markdown-editor-lite": "^1.3.2",
57
- "react-popper": "^2.2.3",
58
- "rehype-raw": "^6.1.1",
59
- "remark-gfm": "^3.0.1",
60
- "rxjs": "^7.5.4"
61
- },
62
- "peerDependencies": {
63
- "antd": ">=4.1.5",
64
- "react": ">=16.14.0",
65
- "react-dom": ">=16.14.0",
66
- "react-router": ">=5.0.0",
67
- "styled-components": ">=4.1.1"
68
- },
69
- "devDependencies": {
70
- "@types/react": "^17.0.2",
71
- "@types/react-dom": "^17.0.2",
72
- "@types/react-router": "^5.1.8",
73
- "@types/react-window": "^1.8.2",
74
- "@types/styled-components": "^5.1.2",
75
- "@umijs/test": "^3.0.5",
76
- "antd": "^4.18.1",
77
- "babel-loader": "^8.1.0",
78
- "copy-to-clipboard": "^3.3.1",
79
- "css-loader": "^4.2.2",
80
- "dumi": "^1.0.16",
81
- "father-build": "^1.17.2",
82
- "gh-pages": "^3.0.0",
83
- "less-loader": "^7.0.0",
84
- "lint-staged": "^10.0.7",
85
- "prettier": "^2.2.1",
86
- "style-loader": "^1.2.1",
87
- "webpack-cli": "^3.3.12",
88
- "yorkie": "^2.0.0"
89
- }
90
- }
1
+ {
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.1.50",
5
+ "scripts": {
6
+ "start": "dumi dev",
7
+ "docs:build": "dumi build",
8
+ "docs:deploy": "gh-pages -d docs-dist",
9
+ "build": "father-build",
10
+ "deploy": "npm run docs:build && npm run docs:deploy",
11
+ "release": "npm run build && npm publish",
12
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
+ "test": "umi-test",
14
+ "test:coverage": "umi-test --coverage",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "main": "es",
18
+ "module": "es",
19
+ "types": "es/index.d.ts",
20
+ "gitHooks": {
21
+ "pre-commit": "lint-staged"
22
+ },
23
+ "lint-staged": {
24
+ "*.{js,jsx,less,md,json}": [
25
+ "prettier --write"
26
+ ],
27
+ "*.ts?(x)": [
28
+ "prettier --parser=typescript --write"
29
+ ]
30
+ },
31
+ "files": [
32
+ "/es"
33
+ ],
34
+ "dependencies": {
35
+ "@antv/x6": "^1.32.2",
36
+ "@antv/x6-react-shape": "^1.6.0",
37
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
38
+ "@babel/runtime": "^7.11.2",
39
+ "@popperjs/core": "^2.4.4",
40
+ "@types/markdown-navbar": "^1.4.0",
41
+ "ahooks": "^3.4.0",
42
+ "axios": "^0.21.4",
43
+ "babel-plugin-import": "^1.13.3",
44
+ "babel-plugin-transform-remove-console": "^6.9.4",
45
+ "bl": "^5.0.0",
46
+ "codemirror": "^5.63.0",
47
+ "github-markdown-css": "^5.1.0",
48
+ "immer": "^9.0.14",
49
+ "lodash": "^4.17.21",
50
+ "markdown-navbar": "^1.4.3",
51
+ "qs": "^6.10.1",
52
+ "react": "^17.0.2",
53
+ "react-dnd": "^11.1.3",
54
+ "react-dnd-html5-backend": "^11.1.3",
55
+ "react-markdown": "^8.0.3",
56
+ "react-markdown-editor-lite": "^1.3.2",
57
+ "react-popper": "^2.2.3",
58
+ "rehype-raw": "^6.1.1",
59
+ "remark-gfm": "^3.0.1",
60
+ "rxjs": "^7.5.4"
61
+ },
62
+ "peerDependencies": {
63
+ "antd": ">=4.1.5",
64
+ "react": ">=16.14.0",
65
+ "react-dom": ">=16.14.0",
66
+ "react-router": ">=5.0.0",
67
+ "styled-components": ">=4.1.1"
68
+ },
69
+ "devDependencies": {
70
+ "@types/react": "^17.0.2",
71
+ "@types/react-dom": "^17.0.2",
72
+ "@types/react-router": "^5.1.8",
73
+ "@types/react-window": "^1.8.2",
74
+ "@types/styled-components": "^5.1.2",
75
+ "@umijs/test": "^3.0.5",
76
+ "antd": "^4.18.1",
77
+ "babel-loader": "^8.1.0",
78
+ "copy-to-clipboard": "^3.3.1",
79
+ "css-loader": "^4.2.2",
80
+ "dumi": "^1.0.16",
81
+ "father-build": "^1.17.2",
82
+ "gh-pages": "^3.0.0",
83
+ "less-loader": "^7.0.0",
84
+ "lint-staged": "^10.0.7",
85
+ "prettier": "^2.2.1",
86
+ "style-loader": "^1.2.1",
87
+ "webpack-cli": "^3.3.12",
88
+ "yorkie": "^2.0.0"
89
+ }
90
+ }