@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;
@@ -571,7 +571,7 @@ function MiaodaInspector(props) {
571
571
  postMessage({
572
572
  type: "PageMounted",
573
573
  data: {
574
- version: "1.0.1",
574
+ version: "1.0.2",
575
575
  feature: {
576
576
  selectParent: true,
577
577
  reverseSelect: true
@@ -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;
@@ -588,7 +588,7 @@ function MiaodaInspector(props) {
588
588
  (0, import_utils2.postMessage)({
589
589
  type: "PageMounted",
590
590
  data: {
591
- version: "1.0.1",
591
+ version: "1.0.2",
592
592
  feature: {
593
593
  selectParent: true,
594
594
  reverseSelect: true
@@ -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`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-inspector",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Inspector for Lark Apaas",
5
5
  "sideEffects": [
6
6
  "*.css"