@lark-apaas/miaoda-inspector 1.0.1 → 1.0.2
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.
|
@@ -36,7 +36,8 @@ const getCodeInfoFromProps = (fiber) => {
|
|
|
36
36
|
"data-miaoda-column": columnNumber,
|
|
37
37
|
"data-miaoda-relative-path": relativePath,
|
|
38
38
|
"data-miaoda-component-name": name,
|
|
39
|
-
"data-miaoda-metadata": metadataStr
|
|
39
|
+
"data-miaoda-metadata": metadataStr,
|
|
40
|
+
"data-ai-section-type": sectionType
|
|
40
41
|
} = fiber.pendingProps;
|
|
41
42
|
let metadata;
|
|
42
43
|
if (metadataStr) {
|
|
@@ -52,7 +53,8 @@ const getCodeInfoFromProps = (fiber) => {
|
|
|
52
53
|
lineNumber,
|
|
53
54
|
columnNumber,
|
|
54
55
|
relativePath,
|
|
55
|
-
metadata
|
|
56
|
+
metadata,
|
|
57
|
+
sectionType: sectionType != null ? sectionType : ""
|
|
56
58
|
};
|
|
57
59
|
}
|
|
58
60
|
return void 0;
|
|
@@ -69,7 +69,8 @@ const getCodeInfoFromProps = (fiber) => {
|
|
|
69
69
|
"data-miaoda-column": columnNumber,
|
|
70
70
|
"data-miaoda-relative-path": relativePath,
|
|
71
71
|
"data-miaoda-component-name": name,
|
|
72
|
-
"data-miaoda-metadata": metadataStr
|
|
72
|
+
"data-miaoda-metadata": metadataStr,
|
|
73
|
+
"data-ai-section-type": sectionType
|
|
73
74
|
} = fiber.pendingProps;
|
|
74
75
|
let metadata;
|
|
75
76
|
if (metadataStr) {
|
|
@@ -85,7 +86,8 @@ const getCodeInfoFromProps = (fiber) => {
|
|
|
85
86
|
lineNumber,
|
|
86
87
|
columnNumber,
|
|
87
88
|
relativePath,
|
|
88
|
-
metadata
|
|
89
|
+
metadata,
|
|
90
|
+
sectionType: sectionType != null ? sectionType : ""
|
|
89
91
|
};
|
|
90
92
|
}
|
|
91
93
|
return void 0;
|
|
@@ -4,6 +4,7 @@ interface CodeInfo {
|
|
|
4
4
|
name?: string;
|
|
5
5
|
lineNumber: string;
|
|
6
6
|
columnNumber: string;
|
|
7
|
+
sectionType?: string;
|
|
7
8
|
/**
|
|
8
9
|
* code source file relative path to dev-server cwd(current working directory)
|
|
9
10
|
* need use with `react-dev-inspector/plugins/babel`
|
|
@@ -37,6 +38,7 @@ interface CodeDataAttribute {
|
|
|
37
38
|
'data-miaoda-relative-path': string;
|
|
38
39
|
'data-miaoda-component-name'?: string;
|
|
39
40
|
'data-miaoda-metadata'?: string;
|
|
41
|
+
'data-ai-section-type'?: string;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* react fiber property `_debugSource` created by `@babel/plugin-transform-react-jsx-source`
|