@visactor/vchart-extension 2.1.0-alpha.22 → 2.1.0-alpha.24

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.
Files changed (177) hide show
  1. package/build/index.js +258 -159
  2. package/build/index.min.js +2 -2
  3. package/cjs/charts/axis-3d/index.js +2 -1
  4. package/cjs/charts/bar-3d/chart-spec-transformer.js +1 -1
  5. package/cjs/charts/bar-3d/chart.js +1 -1
  6. package/cjs/charts/bar-3d/constant.js +1 -2
  7. package/cjs/charts/bar-3d/index.js +1 -1
  8. package/cjs/charts/bar-3d/interface.js +1 -1
  9. package/cjs/charts/bar-3d/series-spec-transformer.js +1 -1
  10. package/cjs/charts/bar-3d/series.js +1 -1
  11. package/cjs/charts/bar-3d/theme.js +1 -1
  12. package/cjs/charts/candlestick/candlestick-transformer.js +1 -1
  13. package/cjs/charts/candlestick/candlestick.js +1 -1
  14. package/cjs/charts/candlestick/index.js +1 -1
  15. package/cjs/charts/candlestick/interface.js +1 -1
  16. package/cjs/charts/candlestick/util.js +1 -1
  17. package/cjs/charts/combination-candlestick/combination-candlestick-transformer.js +1 -1
  18. package/cjs/charts/combination-candlestick/combination-candlestick.js +1 -1
  19. package/cjs/charts/combination-candlestick/constant.js +1 -1
  20. package/cjs/charts/combination-candlestick/index.js +1 -1
  21. package/cjs/charts/combination-candlestick/interface.js +1 -1
  22. package/cjs/charts/conversion-funnel/arrow-data-transform.js +1 -1
  23. package/cjs/charts/conversion-funnel/constants.js +1 -1
  24. package/cjs/charts/conversion-funnel/conversion-funnel-transformer.js +1 -1
  25. package/cjs/charts/conversion-funnel/conversion-funnel.js +1 -1
  26. package/cjs/charts/conversion-funnel/index.js +1 -1
  27. package/cjs/charts/conversion-funnel/interface.js +1 -2
  28. package/cjs/charts/conversion-funnel/util.js +1 -1
  29. package/cjs/charts/funnel-3d/chart.js +1 -1
  30. package/cjs/charts/funnel-3d/constant.js +1 -1
  31. package/cjs/charts/funnel-3d/index.js +1 -1
  32. package/cjs/charts/funnel-3d/interface.js +1 -1
  33. package/cjs/charts/funnel-3d/series-spec-transformer.js +1 -1
  34. package/cjs/charts/funnel-3d/series.js +1 -2
  35. package/cjs/charts/funnel-3d/theme.js +1 -1
  36. package/cjs/charts/pictogram/element-highlight-by-graphic-name.js +1 -1
  37. package/cjs/charts/storyline/layouts/arc.js +104 -51
  38. package/cjs/charts/storyline/layouts/arc.js.map +1 -1
  39. package/cjs/charts/storyline/layouts/clock.js +17 -9
  40. package/cjs/charts/storyline/layouts/clock.js.map +1 -1
  41. package/cjs/charts/storyline/layouts/common.d.ts +4 -15
  42. package/cjs/charts/storyline/layouts/common.js +18 -20
  43. package/cjs/charts/storyline/layouts/common.js.map +1 -1
  44. package/cjs/charts/storyline/layouts/default.js +15 -8
  45. package/cjs/charts/storyline/layouts/default.js.map +1 -1
  46. package/cjs/charts/storyline/layouts/ladder.js +16 -9
  47. package/cjs/charts/storyline/layouts/ladder.js.map +1 -1
  48. package/cjs/charts/storyline/layouts/landscape.js +47 -29
  49. package/cjs/charts/storyline/layouts/landscape.js.map +1 -1
  50. package/cjs/charts/storyline/layouts/portrait.d.ts +1 -1
  51. package/cjs/charts/storyline/layouts/portrait.js +22 -16
  52. package/cjs/charts/storyline/layouts/portrait.js.map +1 -1
  53. package/cjs/charts/storyline/layouts/wing.js +16 -8
  54. package/cjs/charts/storyline/layouts/wing.js.map +1 -1
  55. package/cjs/charts/storyline/storyline-transformer.js +1 -1
  56. package/cjs/charts/storyline/storyline-transformer.js.map +1 -1
  57. package/cjs/components/bar-link/bar-link.js +1 -1
  58. package/cjs/components/bar-link/constant.js +1 -1
  59. package/cjs/components/bar-link/index.js +1 -1
  60. package/cjs/components/bar-link/type.js +1 -1
  61. package/cjs/components/bar-link/util.js +1 -1
  62. package/cjs/components/bar-regression-line/index.js +1 -1
  63. package/cjs/components/bar-regression-line/type.js +1 -1
  64. package/cjs/components/extension-mark-sync-state/extension-mark-sync-state.js +1 -1
  65. package/cjs/components/extension-mark-sync-state/index.js +1 -1
  66. package/cjs/components/extension-mark-sync-state/type.js +1 -1
  67. package/cjs/components/histogram-regression-line/index.js +1 -1
  68. package/cjs/components/histogram-regression-line/type.js +2 -1
  69. package/cjs/components/map-label/index.js +1 -1
  70. package/cjs/components/map-label/layout.js +1 -1
  71. package/cjs/components/map-label/map-label-transformer.js +1 -1
  72. package/cjs/components/map-label/map-label.js +1 -1
  73. package/cjs/components/map-label/theme.js +1 -1
  74. package/cjs/components/map-label/type.js +1 -1
  75. package/cjs/components/regression-line/index.js +1 -1
  76. package/cjs/components/regression-line/regression-line.js +1 -1
  77. package/cjs/components/regression-line/type.js +1 -1
  78. package/cjs/components/scatter-regression-line/index.js +1 -1
  79. package/cjs/components/scatter-regression-line/type.js +1 -1
  80. package/cjs/components/series-break/constant.js +1 -1
  81. package/cjs/components/series-break/index.js +1 -1
  82. package/cjs/components/series-break/series-break.js +1 -1
  83. package/cjs/components/series-break/type.js +1 -1
  84. package/cjs/components/series-break/util.js +2 -1
  85. package/cjs/components/series-label/constant.js +1 -1
  86. package/cjs/components/series-label/index.js +1 -1
  87. package/cjs/components/series-label/series-label.js +1 -1
  88. package/cjs/components/series-label/type.js +1 -1
  89. package/cjs/components/series-label/util.js +1 -1
  90. package/esm/charts/axis-3d/index.js +2 -1
  91. package/esm/charts/bar-3d/chart-spec-transformer.js +1 -1
  92. package/esm/charts/bar-3d/chart.js +1 -1
  93. package/esm/charts/bar-3d/constant.js +1 -2
  94. package/esm/charts/bar-3d/index.js +1 -1
  95. package/esm/charts/bar-3d/interface.js +1 -1
  96. package/esm/charts/bar-3d/series-spec-transformer.js +1 -1
  97. package/esm/charts/bar-3d/series.js +1 -1
  98. package/esm/charts/bar-3d/theme.js +1 -1
  99. package/esm/charts/candlestick/candlestick-transformer.js +1 -1
  100. package/esm/charts/candlestick/candlestick.js +1 -1
  101. package/esm/charts/candlestick/index.js +1 -1
  102. package/esm/charts/candlestick/interface.js +1 -1
  103. package/esm/charts/candlestick/util.js +1 -1
  104. package/esm/charts/combination-candlestick/combination-candlestick-transformer.js +1 -1
  105. package/esm/charts/combination-candlestick/combination-candlestick.js +1 -1
  106. package/esm/charts/combination-candlestick/constant.js +1 -1
  107. package/esm/charts/combination-candlestick/index.js +1 -1
  108. package/esm/charts/combination-candlestick/interface.js +1 -1
  109. package/esm/charts/conversion-funnel/arrow-data-transform.js +1 -1
  110. package/esm/charts/conversion-funnel/constants.js +1 -1
  111. package/esm/charts/conversion-funnel/conversion-funnel-transformer.js +1 -1
  112. package/esm/charts/conversion-funnel/conversion-funnel.js +1 -1
  113. package/esm/charts/conversion-funnel/index.js +1 -1
  114. package/esm/charts/conversion-funnel/interface.js +1 -2
  115. package/esm/charts/conversion-funnel/util.js +1 -1
  116. package/esm/charts/funnel-3d/chart.js +1 -1
  117. package/esm/charts/funnel-3d/constant.js +1 -1
  118. package/esm/charts/funnel-3d/index.js +1 -1
  119. package/esm/charts/funnel-3d/interface.js +1 -1
  120. package/esm/charts/funnel-3d/series-spec-transformer.js +1 -1
  121. package/esm/charts/funnel-3d/series.js +1 -2
  122. package/esm/charts/funnel-3d/theme.js +1 -1
  123. package/esm/charts/pictogram/element-highlight-by-graphic-name.js +1 -1
  124. package/esm/charts/storyline/layouts/arc.js +101 -50
  125. package/esm/charts/storyline/layouts/arc.js.map +1 -1
  126. package/esm/charts/storyline/layouts/clock.js +18 -10
  127. package/esm/charts/storyline/layouts/clock.js.map +1 -1
  128. package/esm/charts/storyline/layouts/common.d.ts +4 -15
  129. package/esm/charts/storyline/layouts/common.js +12 -17
  130. package/esm/charts/storyline/layouts/common.js.map +1 -1
  131. package/esm/charts/storyline/layouts/default.js +15 -9
  132. package/esm/charts/storyline/layouts/default.js.map +1 -1
  133. package/esm/charts/storyline/layouts/ladder.js +16 -10
  134. package/esm/charts/storyline/layouts/ladder.js.map +1 -1
  135. package/esm/charts/storyline/layouts/landscape.js +46 -30
  136. package/esm/charts/storyline/layouts/landscape.js.map +1 -1
  137. package/esm/charts/storyline/layouts/portrait.d.ts +1 -1
  138. package/esm/charts/storyline/layouts/portrait.js +21 -16
  139. package/esm/charts/storyline/layouts/portrait.js.map +1 -1
  140. package/esm/charts/storyline/layouts/wing.js +16 -9
  141. package/esm/charts/storyline/layouts/wing.js.map +1 -1
  142. package/esm/charts/storyline/storyline-transformer.js +1 -1
  143. package/esm/charts/storyline/storyline-transformer.js.map +1 -1
  144. package/esm/components/bar-link/bar-link.js +1 -1
  145. package/esm/components/bar-link/constant.js +1 -1
  146. package/esm/components/bar-link/index.js +1 -1
  147. package/esm/components/bar-link/type.js +1 -1
  148. package/esm/components/bar-link/util.js +1 -1
  149. package/esm/components/bar-regression-line/index.js +1 -1
  150. package/esm/components/bar-regression-line/type.js +1 -1
  151. package/esm/components/extension-mark-sync-state/extension-mark-sync-state.js +1 -1
  152. package/esm/components/extension-mark-sync-state/index.js +1 -1
  153. package/esm/components/extension-mark-sync-state/type.js +1 -1
  154. package/esm/components/histogram-regression-line/index.js +1 -1
  155. package/esm/components/histogram-regression-line/type.js +2 -1
  156. package/esm/components/map-label/index.js +1 -1
  157. package/esm/components/map-label/layout.js +1 -1
  158. package/esm/components/map-label/map-label-transformer.js +1 -1
  159. package/esm/components/map-label/map-label.js +1 -1
  160. package/esm/components/map-label/theme.js +1 -1
  161. package/esm/components/map-label/type.js +1 -1
  162. package/esm/components/regression-line/index.js +1 -1
  163. package/esm/components/regression-line/regression-line.js +1 -1
  164. package/esm/components/regression-line/type.js +1 -1
  165. package/esm/components/scatter-regression-line/index.js +1 -1
  166. package/esm/components/scatter-regression-line/type.js +1 -1
  167. package/esm/components/series-break/constant.js +1 -1
  168. package/esm/components/series-break/index.js +1 -1
  169. package/esm/components/series-break/series-break.js +1 -1
  170. package/esm/components/series-break/type.js +1 -1
  171. package/esm/components/series-break/util.js +2 -1
  172. package/esm/components/series-label/constant.js +1 -1
  173. package/esm/components/series-label/index.js +1 -1
  174. package/esm/components/series-label/series-label.js +1 -1
  175. package/esm/components/series-label/type.js +1 -1
  176. package/esm/components/series-label/util.js +1 -1
  177. package/package.json +2 -2
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.SERIES_LABEL = void 0, exports.SERIES_LABEL = "seriesLabel";
6
- //# sourceMappingURL=constant.js.map
6
+ //# sourceMappingURL=constant.js.map
@@ -46,4 +46,4 @@ Object.defineProperty(exports, "getSeriesLabelConfig", {
46
46
  return util_1.appendSeriesLabelConfig;
47
47
  }
48
48
  });
49
- //# sourceMappingURL=index.js.map
49
+ //# sourceMappingURL=index.js.map
@@ -111,4 +111,4 @@ const registerSeriesLabel = () => {
111
111
  };
112
112
 
113
113
  exports.registerSeriesLabel = registerSeriesLabel;
114
- //# sourceMappingURL=series-label.js.map
114
+ //# sourceMappingURL=series-label.js.map
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=type.js.map
6
+ //# sourceMappingURL=type.js.map
@@ -149,4 +149,4 @@ function appendSeriesLabelConfig(rawSpec, seriesLabelSpec) {
149
149
 
150
150
  exports.dodge = dodge, exports.dodgeHorizontal = dodgeHorizontal, exports.getSeriesLabelConfig = getSeriesLabelConfig,
151
151
  exports.appendSeriesLabelConfig = appendSeriesLabelConfig;
152
- //# sourceMappingURL=util.js.map
152
+ //# sourceMappingURL=util.js.map
@@ -15,4 +15,5 @@ import { registerCartesianTimeAxis3d } from "./time-axis";
15
15
  export const registerAxis3dPlugin = () => {
16
16
  register3DPlugin(), registerLayout3d(), registerCartesianBandAxis3d(), registerCartesianLinearAxis3d(),
17
17
  registerCartesianTimeAxis3d(), registerCartesianSymlogAxis3d(), registerCartesianLogAxis3d();
18
- };
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -8,4 +8,4 @@ export class Bar3dChartSpecTransformer extends BarChartSpecTransformer {
8
8
  seriesSpec;
9
9
  }
10
10
  }
11
- //# sourceMappingURL=chart-spec-transformer.js.map
11
+ //# sourceMappingURL=chart-spec-transformer.js.map
@@ -22,4 +22,4 @@ Bar3dChart.type = "bar3d", Bar3dChart.seriesType = SeriesType3dEnum.bar3d, Bar3d
22
22
  export const registerBar3dChart = () => {
23
23
  register3DPlugin(), registerLayout3d(), registerBar3dSeries(), Factory.registerChart(Bar3dChart.type, Bar3dChart);
24
24
  };
25
- //# sourceMappingURL=chart.js.map
25
+ //# sourceMappingURL=chart.js.map
@@ -7,5 +7,4 @@ export const bar3dSeriesMark = {
7
7
  name: "bar3d",
8
8
  type: "rect3d"
9
9
  }
10
- };
11
- //# sourceMappingURL=constant.js.map
10
+ };
@@ -7,4 +7,4 @@ export * from "./interface";
7
7
  export * from "./series";
8
8
 
9
9
  export * from "./series-spec-transformer";
10
- //# sourceMappingURL=index.js.map
10
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=interface.js.map
2
+ //# sourceMappingURL=interface.js.map
@@ -5,4 +5,4 @@ export class Bar3dSeriesSpecTransformer extends BarSeriesSpecTransformer {
5
5
  this._addMarkLabelSpec(spec, "bar3d");
6
6
  }
7
7
  }
8
- //# sourceMappingURL=series-spec-transformer.js.map
8
+ //# sourceMappingURL=series-spec-transformer.js.map
@@ -27,4 +27,4 @@ export const registerBar3dSeries = () => {
27
27
  registerBar3dAnimation(), registerRect3dMark(), registerCartesianBandAxis(), registerCartesianLinearAxis(),
28
28
  Factory.registerSeries(Bar3dSeries.type, Bar3dSeries);
29
29
  };
30
- //# sourceMappingURL=series.js.map
30
+ //# sourceMappingURL=series.js.map
@@ -12,4 +12,4 @@ export const bar3d = {
12
12
  }
13
13
  }
14
14
  };
15
- //# sourceMappingURL=theme.js.map
15
+ //# sourceMappingURL=theme.js.map
@@ -13,4 +13,4 @@ export class CandlestickChartSpecTransformer extends CartesianChartSpecTransform
13
13
  } ]), setDefaultCrosshairForCartesianChart(spec);
14
14
  }
15
15
  }
16
- //# sourceMappingURL=candlestick-transformer.js.map
16
+ //# sourceMappingURL=candlestick-transformer.js.map
@@ -20,4 +20,4 @@ export const registerCandlestickChart = () => {
20
20
  registerDimensionTooltipProcessor(), registerMarkTooltipProcessor(), registerDimensionEvents(),
21
21
  registerDimensionHover(), registerCandlestickSeries(), Factory.registerChart(CandlestickChart.type, CandlestickChart);
22
22
  };
23
- //# sourceMappingURL=candlestick.js.map
23
+ //# sourceMappingURL=candlestick.js.map
@@ -7,4 +7,4 @@ export * from "./candlestick-transformer";
7
7
  export * from "./series/candlestick";
8
8
 
9
9
  export * from "./util";
10
- //# sourceMappingURL=index.js.map
10
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=interface.js.map
2
+ //# sourceMappingURL=interface.js.map
@@ -1,4 +1,4 @@
1
1
  export function transformCandlestickSeriesSpec(spec) {
2
2
  spec.yField = [ spec.openField, spec.highField, spec.lowField, spec.closeField ];
3
3
  }
4
- //# sourceMappingURL=util.js.map
4
+ //# sourceMappingURL=util.js.map
@@ -196,4 +196,4 @@ export class CombinationCandlestickChartSpecTransformer extends CartesianChartSp
196
196
  };
197
197
  }
198
198
  }
199
- //# sourceMappingURL=combination-candlestick-transformer.js.map
199
+ //# sourceMappingURL=combination-candlestick-transformer.js.map
@@ -26,4 +26,4 @@ mixin(CombinationCandlestickChart, StackChartMixin);
26
26
  export const registerCombinationCandlestickChart = () => {
27
27
  registerCandlestickSeries(), Factory.registerChart(CombinationCandlestickChart.type, CombinationCandlestickChart);
28
28
  };
29
- //# sourceMappingURL=combination-candlestick.js.map
29
+ //# sourceMappingURL=combination-candlestick.js.map
@@ -1,2 +1,2 @@
1
1
  export const CombinationCandlestickChart_TYPE = "combinationCandlestick";
2
- //# sourceMappingURL=constant.js.map
2
+ //# sourceMappingURL=constant.js.map
@@ -3,4 +3,4 @@ export * from "./combination-candlestick";
3
3
  export * from "./interface";
4
4
 
5
5
  export * from "./constant";
6
- //# sourceMappingURL=index.js.map
6
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=interface.js.map
2
+ //# sourceMappingURL=interface.js.map
@@ -91,4 +91,4 @@ function computeIndex(arrow, totalArrows) {
91
91
  }
92
92
  return index;
93
93
  }
94
- //# sourceMappingURL=arrow-data-transform.js.map
94
+ //# sourceMappingURL=arrow-data-transform.js.map
@@ -22,4 +22,4 @@ export const DEFAULT_ARROW_TEXT_MARK_STYLE = {
22
22
  export const DEFAULT_FUNNEL_BACKGROUND_MARK_STYLE = {
23
23
  fill: "#eff1f9"
24
24
  };
25
- //# sourceMappingURL=constants.js.map
25
+ //# sourceMappingURL=constants.js.map
@@ -190,4 +190,4 @@ function addFunnelBackgroundMark(funnelBackground) {
190
190
  })
191
191
  });
192
192
  }
193
- //# sourceMappingURL=conversion-funnel-transformer.js.map
193
+ //# sourceMappingURL=conversion-funnel-transformer.js.map
@@ -54,4 +54,4 @@ export const registerConversionFunnelChart = option => {
54
54
  const vchartConstructor = (null == option ? void 0 : option.VChart) || VChart;
55
55
  vchartConstructor && (vchartConstructor.useChart([ ConversionFunnelChart ]), vchartConstructor.useSeries([ ConversionFunnelSeries ]));
56
56
  };
57
- //# sourceMappingURL=conversion-funnel.js.map
57
+ //# sourceMappingURL=conversion-funnel.js.map
@@ -1,4 +1,4 @@
1
1
  export * from "./interface";
2
2
 
3
3
  export * from "./conversion-funnel";
4
- //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1 @@
1
- export { };
2
- //# sourceMappingURL=interface.js.map
1
+ export { };
@@ -7,4 +7,4 @@ export function isSameArrow(arrow1, arrow2) {
7
7
  const {from: from1, to: to1} = arrow1, {from: from2, to: to2} = arrow2;
8
8
  return from1 === from2 && to1 === to2;
9
9
  }
10
- //# sourceMappingURL=util.js.map
10
+ //# sourceMappingURL=util.js.map
@@ -22,4 +22,4 @@ export const registerFunnel3dChart = () => {
22
22
  registerMarkTooltipProcessor(), register3DPlugin(), registerLayout3d(), registerFunnel3dSeries(),
23
23
  Factory.registerChart(Funnel3dChart.type, Funnel3dChart);
24
24
  };
25
- //# sourceMappingURL=chart.js.map
25
+ //# sourceMappingURL=chart.js.map
@@ -22,4 +22,4 @@ export const funnel3dSeriesMark = Object.assign(Object.assign({}, baseSeriesMark
22
22
  type: "rule"
23
23
  }
24
24
  });
25
- //# sourceMappingURL=constant.js.map
25
+ //# sourceMappingURL=constant.js.map
@@ -5,4 +5,4 @@ export * from "./series";
5
5
  export * from "./series-spec-transformer";
6
6
 
7
7
  export * from "./interface";
8
- //# sourceMappingURL=index.js.map
8
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=interface.js.map
2
+ //# sourceMappingURL=interface.js.map
@@ -5,4 +5,4 @@ export class Funnel3dSeriesSpecTransformer extends FunnelSeriesSpecTransformer {
5
5
  this._addMarkLabelSpec(spec, "funnel3d"), spec.isTransform && this._addMarkLabelSpec(spec, "transform3d", "transformLabel");
6
6
  }
7
7
  }
8
- //# sourceMappingURL=series-spec-transformer.js.map
8
+ //# sourceMappingURL=series-spec-transformer.js.map
@@ -80,5 +80,4 @@ Funnel3dSeries.builtInTheme = {
80
80
 
81
81
  export const registerFunnel3dSeries = () => {
82
82
  registerPyramid3dMark(), registerTextMark(), registerRuleMark(), Factory.registerSeries(Funnel3dSeries.type, Funnel3dSeries);
83
- };
84
- //# sourceMappingURL=series.js.map
83
+ };
@@ -1,4 +1,4 @@
1
1
  import { getFunnelTheme } from "@visactor/vchart";
2
2
 
3
3
  export const funnel3d = getFunnelTheme(!0);
4
- //# sourceMappingURL=theme.js.map
4
+ //# sourceMappingURL=theme.js.map
@@ -46,4 +46,4 @@ ElementHighlightByGraphicName.type = type;
46
46
  export const registerElementHighlightByGraphicName = () => {
47
47
  Factory.registerInteractionTrigger(ElementHighlightByGraphicName.type, ElementHighlightByGraphicName);
48
48
  };
49
- //# sourceMappingURL=element-highlight-by-graphic-name.js.map
49
+ //# sourceMappingURL=element-highlight-by-graphic-name.js.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutZIndex } from "@visactor/vchart";
2
2
 
3
- import { buildRichContent, getImageBackgroundStyle, getRegionGeometry, getThemeColor, normalizeLayout, omitImageLayoutSpec, resolveAdaptiveLineHeight, resolveBlockWidth, resolveTitleFontSize, shouldShowImageBackground, withAlpha } from "./common";
3
+ import { BLOCK_TITLE_MAX_LINES, buildPlainContent, getBlockTitleHeight, getImageBackgroundStyle, getRegionGeometry, getThemeColor, normalizeLayout, omitImageLayoutSpec, resolveAdaptiveLineHeight, resolveBlockWidth, resolveTitleFontSize, shouldShowImageBackground, withAlpha } from "./common";
4
4
 
5
- const ARC_BLOCK_IMAGE_SIZE = 240, ARC_BLOCK_IMAGE_BORDER = 3, ARC_BLOCK_IMAGE_HALO_PADDING = 6, ARC_TEXT_GAP_FROM_IMAGE = 10, ARC_TITLE_FONT_SIZE = 32, ARC_TITLE_LINE_HEIGHT = 34, ARC_CONTENT_LINE_HEIGHT = 26, ARC_CONTENT_FONT_SIZE = 20, ARC_TEXT_BOX_HEIGHT = 240, ARC_TITLE_TO_CONTENT_GAP = 4, ARC_TEXT_PADDING = 20, ARC_TEXT_BOX_MIN_WIDTH = 240, ARC_TITLE_IMAGE_WIDTH_RATIO = .68, ARC_TITLE_IMAGE_MAX_WIDTH = 900, ARC_TITLE_IMAGE_HEIGHT_RATIO = .34, ARC_GAP_FROM_TITLE_IMAGE = 200, isDownArc = spec => "down" === normalizeLayout(spec.layout).direction, getArcTitleImageRect = (spec, ctx) => {
5
+ const ARC_BLOCK_IMAGE_SIZE = 240, ARC_BLOCK_IMAGE_BORDER = 3, ARC_BLOCK_IMAGE_HALO_PADDING = 6, ARC_TEXT_GAP_FROM_IMAGE = 10, ARC_TITLE_FONT_SIZE = 32, ARC_TITLE_LINE_HEIGHT = 34, ARC_CONTENT_LINE_HEIGHT = 24, ARC_CONTENT_FONT_SIZE = 18, ARC_TEXT_BOX_HEIGHT = 240, ARC_TITLE_TO_CONTENT_GAP = 4, ARC_TEXT_PADDING = 20, ARC_TEXT_BOX_MIN_WIDTH = 96, ARC_TEXT_BOX_ABSOLUTE_MIN_WIDTH = 64, ARC_TEXT_BOX_MAX_WIDTH = 260, ARC_TITLE_IMAGE_WIDTH_RATIO = .68, ARC_TITLE_IMAGE_MAX_WIDTH = 900, ARC_TITLE_IMAGE_HEIGHT_RATIO = .34, ARC_GAP_FROM_TITLE_IMAGE = 200, ARC_FIT_MARGIN = 8, clamp = (value, min, max) => Math.max(min, Math.min(max, value)), isDownArc = spec => "down" === normalizeLayout(spec.layout).direction, getArcTitleImageRect = (spec, ctx) => {
6
6
  var _a, _b, _c, _e;
7
7
  const {width: width, height: height, startX: startX, startY: startY} = getRegionGeometry(ctx), innerWidth = Math.max(width, 1), innerHeight = Math.max(height, 1), baseWidth = Math.min(.68 * innerWidth, 900), w = Math.max(null !== (_b = null === (_a = spec.titleImage) || void 0 === _a ? void 0 : _a.width) && void 0 !== _b ? _b : baseWidth, 80), h = Math.max(null !== (_e = null === (_c = spec.titleImage) || void 0 === _c ? void 0 : _c.height) && void 0 !== _e ? _e : .34 * w, 40);
8
8
  return {
@@ -11,7 +11,7 @@ const ARC_BLOCK_IMAGE_SIZE = 240, ARC_BLOCK_IMAGE_BORDER = 3, ARC_BLOCK_IMAGE_HA
11
11
  width: w,
12
12
  height: h
13
13
  };
14
- }, getArcGeometry = (spec, ctx) => {
14
+ }, getBaseArcGeometry = (spec, ctx) => {
15
15
  var _a, _b, _c;
16
16
  const {width: width, startX: startX} = getRegionGeometry(ctx), innerWidth = Math.max(width, 1), blockWidth = resolveBlockWidth(spec, width), layoutOpt = normalizeLayout(spec.layout), isDown = "down" === layoutOpt.direction, startAngle = null !== (_a = layoutOpt.startAngle) && void 0 !== _a ? _a : isDown ? 20 : 200, endAngle = null !== (_b = layoutOpt.endAngle) && void 0 !== _b ? _b : isDown ? 160 : 340, ratio = null !== (_c = layoutOpt.radiusRatio) && void 0 !== _c ? _c : .88, rx = Math.max((innerWidth - blockWidth) / 2, 1) * ratio, titleImageRect = getArcTitleImageRect(spec, ctx), centerTop = titleImageRect.y, centerBottom = titleImageRect.y + titleImageRect.height, sinStart = Math.sin(startAngle / 180 * Math.PI);
17
17
  let cy, ry;
@@ -32,19 +32,58 @@ const ARC_BLOCK_IMAGE_SIZE = 240, ARC_BLOCK_IMAGE_BORDER = 3, ARC_BLOCK_IMAGE_HA
32
32
  centerTop: centerTop,
33
33
  centerBottom: centerBottom
34
34
  };
35
- }, getArcBlockCenter = (spec, ctx, index) => {
36
- var _a, _b, _c, _e;
37
- const arc = getArcGeometry(spec, ctx), count = null !== (_b = null === (_a = spec.data) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
35
+ }, getArcBlockCenterByGeometry = (spec, arc, index, ctx) => {
36
+ var _a, _b;
37
+ const count = null !== (_b = null === (_a = spec.data) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
38
38
  if (count <= 0) return {
39
39
  x: arc.cx,
40
40
  y: arc.cy
41
41
  };
42
- const t = 1 === count ? .5 : index / (count - 1), angle = (arc.startAngle + (arc.endAngle - arc.startAngle) * t) / 180 * Math.PI, px = arc.cx + Math.cos(angle) * arc.rx, py = arc.cy + Math.sin(angle) * arc.ry, nxRaw = Math.cos(angle) / arc.rx, nyRaw = Math.sin(angle) / arc.ry, nLen = Math.hypot(nxRaw, nyRaw) || 1, nx = nxRaw / nLen, ny = nyRaw / nLen, offset = (null !== (_e = null === (_c = spec.image) || void 0 === _c ? void 0 : _c.height) && void 0 !== _e ? _e : 240) / 2;
42
+ const t = 1 === count ? .5 : index / (count - 1), angle = (arc.startAngle + (arc.endAngle - arc.startAngle) * t) / 180 * Math.PI, px = arc.cx + Math.cos(angle) * arc.rx, py = arc.cy + Math.sin(angle) * arc.ry, nxRaw = Math.cos(angle) / arc.rx, nyRaw = Math.sin(angle) / arc.ry, nLen = Math.hypot(nxRaw, nyRaw) || 1, nx = nxRaw / nLen, ny = nyRaw / nLen, offset = getArcBlockMetrics(spec, index, ctx).imageBox.height / 2;
43
43
  return {
44
44
  x: px + nx * offset,
45
45
  y: py + ny * offset
46
46
  };
47
- };
47
+ }, getArcBlockBounds = (spec, arc, index, ctx) => {
48
+ const center = getArcBlockCenterByGeometry(spec, arc, index, ctx), metrics = getArcBlockMetrics(spec, index, ctx), halo = shouldShowImageBackground(spec) ? 9 : 0, minX = Math.min(metrics.imageBox.x - halo, metrics.textBox.x, metrics.contentBox.x), maxX = Math.max(metrics.imageBox.x + metrics.imageBox.width + halo, metrics.textBox.x + metrics.textBox.width, metrics.contentBox.x + metrics.contentBox.width), minY = Math.min(metrics.imageBox.y - halo, metrics.textBox.y, metrics.contentBox.y), maxY = Math.max(metrics.imageBox.y + metrics.imageBox.height + halo, metrics.textBox.y + metrics.textBox.height, metrics.contentBox.y + metrics.contentBox.height);
49
+ return {
50
+ left: center.x + minX,
51
+ right: center.x + maxX,
52
+ top: center.y + minY,
53
+ bottom: center.y + maxY
54
+ };
55
+ }, getArcBlocksBounds = (spec, arc, ctx) => {
56
+ var _a, _b;
57
+ const count = null !== (_b = null === (_a = spec.data) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
58
+ return count ? Array.from({
59
+ length: count
60
+ }, ((_, index) => getArcBlockBounds(spec, arc, index, ctx))).reduce(((bounds, blockBounds) => ({
61
+ left: Math.min(bounds.left, blockBounds.left),
62
+ right: Math.max(bounds.right, blockBounds.right),
63
+ top: Math.min(bounds.top, blockBounds.top),
64
+ bottom: Math.max(bounds.bottom, blockBounds.bottom)
65
+ })), {
66
+ left: Number.POSITIVE_INFINITY,
67
+ right: Number.NEGATIVE_INFINITY,
68
+ top: Number.POSITIVE_INFINITY,
69
+ bottom: Number.NEGATIVE_INFINITY
70
+ }) : {
71
+ left: arc.cx,
72
+ right: arc.cx,
73
+ top: arc.cy,
74
+ bottom: arc.cy
75
+ };
76
+ }, getArcGeometry = (spec, ctx) => {
77
+ const arc = getBaseArcGeometry(spec, ctx), region = getRegionGeometry(ctx), bounds = getArcBlocksBounds(spec, arc, ctx), fit_left = region.startX + 8, fit_right = region.startX + region.width - 8, fit_top = region.startY + 8, fit_bottom = region.startY + region.height - 8;
78
+ let shiftX = 0, shiftY = 0;
79
+ const boundsWidth = bounds.right - bounds.left, boundsHeight = bounds.bottom - bounds.top, fitHeight = fit_bottom - fit_top;
80
+ return boundsWidth > fit_right - fit_left ? shiftX = (fit_left + fit_right - bounds.left - bounds.right) / 2 : bounds.left < fit_left ? shiftX = fit_left - bounds.left : bounds.right > fit_right && (shiftX = fit_right - bounds.right),
81
+ boundsHeight > fitHeight ? shiftY = (fit_top + fit_bottom - bounds.top - bounds.bottom) / 2 : bounds.top < fit_top ? shiftY = fit_top - bounds.top : bounds.bottom > fit_bottom && (shiftY = fit_bottom - bounds.bottom),
82
+ shiftX || shiftY ? Object.assign(Object.assign({}, arc), {
83
+ cx: arc.cx + shiftX,
84
+ cy: arc.cy + shiftY
85
+ }) : arc;
86
+ }, getArcBlockCenter = (spec, ctx, index) => getArcBlockCenterByGeometry(spec, getArcGeometry(spec, ctx), index, ctx);
48
87
 
49
88
  export const buildArcMark = spec => {
50
89
  var _a;
@@ -103,18 +142,18 @@ export const buildArcTitleImageMark = spec => {
103
142
  } : null;
104
143
  };
105
144
 
106
- const getArcBlockMetrics = (spec, index = 0) => {
107
- var _a, _b, _c, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
108
- const contentFontSize = Number(null !== (_c = null === (_b = null === (_a = spec.content) || void 0 === _a ? void 0 : _a.style) || void 0 === _b ? void 0 : _b.fontSize) && void 0 !== _c ? _c : 20), contentLineHeight = Number(null !== (_g = null === (_f = null === (_e = spec.content) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.lineHeight) && void 0 !== _g ? _g : 26), imageDiameter = Math.max(null !== (_j = null === (_h = spec.image) || void 0 === _h ? void 0 : _h.width) && void 0 !== _j ? _j : 240, null !== (_l = null === (_k = spec.image) || void 0 === _k ? void 0 : _k.height) && void 0 !== _l ? _l : 240), imageWidth = imageDiameter, imageHeight = imageDiameter, isDown = isDownArc(spec), count = Math.max(null !== (_o = null === (_m = spec.data) || void 0 === _m ? void 0 : _m.length) && void 0 !== _o ? _o : 0, 1), canvasWidth = Number(null !== (_p = spec.width) && void 0 !== _p ? _p : imageWidth * count), defaultTextWidth = Math.round(canvasWidth / (count + 1)), textBoxWidth = Math.max(Number(null !== (_r = null === (_q = spec.block) || void 0 === _q ? void 0 : _q.width) && void 0 !== _r ? _r : defaultTextWidth), 240), titleFontSize = resolveTitleFontSize(spec, void 0, null === (_t = null === (_s = spec.data) || void 0 === _s ? void 0 : _s[index]) || void 0 === _t ? void 0 : _t.title, textBoxWidth, 32, [ 8, 40 ]), titleLineHeight = resolveAdaptiveLineHeight(titleFontSize, null === (_u = spec.title) || void 0 === _u ? void 0 : _u.style, 34), contentHeight = Math.max(240 - titleLineHeight - 4, contentLineHeight), isLeftSide = index < count / 2, imageBox = {
145
+ const getArcBlockMetrics = (spec, index = 0, ctx) => {
146
+ var _a, _b, _c, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
147
+ const region = ctx ? getRegionGeometry(ctx, spec) : void 0, count = Math.max(null !== (_b = null === (_a = spec.data) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0, 1), regionWidth = Math.max(null !== (_c = null == region ? void 0 : region.width) && void 0 !== _c ? _c : Number(null !== (_e = spec.width) && void 0 !== _e ? _e : 240 * count), 1), regionHeight = Math.max(null !== (_f = null == region ? void 0 : region.height) && void 0 !== _f ? _f : Number(null !== (_g = spec.height) && void 0 !== _g ? _g : 240), 1), slotWidth = regionWidth / (count + 1), imageScale = clamp(Math.min(regionWidth / Math.max(240 * count * .92, 1), regionHeight / 620), .42, 1), textScale = clamp(Math.min(slotWidth / 180, imageScale), .48, 1), styleContent = null === (_h = spec.content) || void 0 === _h ? void 0 : _h.style, contentFontSize = Number(null !== (_j = null == styleContent ? void 0 : styleContent.fontSize) && void 0 !== _j ? _j : Math.round(18 * textScale)), contentLineHeight = Number(null !== (_k = null == styleContent ? void 0 : styleContent.lineHeight) && void 0 !== _k ? _k : Math.round(Math.max(1.35 * contentFontSize, 24 * textScale))), configuredImageDiameter = Math.max(null !== (_m = null === (_l = spec.image) || void 0 === _l ? void 0 : _l.width) && void 0 !== _m ? _m : 240, null !== (_p = null === (_o = spec.image) || void 0 === _o ? void 0 : _o.height) && void 0 !== _p ? _p : 240), imageDiameter = Math.round(clamp(configuredImageDiameter * imageScale, 64, configuredImageDiameter)), imageWidth = imageDiameter, imageHeight = imageDiameter, isDown = isDownArc(spec), configuredTextWidth = Number(null !== (_r = null === (_q = spec.block) || void 0 === _q ? void 0 : _q.width) && void 0 !== _r ? _r : 260), defaultTextWidth = Math.round(.96 * slotWidth), minTextWidth = Math.min(96, Math.max(Math.round(.72 * slotWidth), 64)), textBoxWidth = Math.round(clamp(Math.min(configuredTextWidth, defaultTextWidth), minTextWidth, 260)), titleFontSize = resolveTitleFontSize(spec, ctx, null === (_t = null === (_s = spec.data) || void 0 === _s ? void 0 : _s[index]) || void 0 === _t ? void 0 : _t.title, textBoxWidth, Math.round(32 * textScale), [ 10, 40 ]), titleLineHeight = resolveAdaptiveLineHeight(titleFontSize, null === (_u = spec.title) || void 0 === _u ? void 0 : _u.style, 34), titleHeight = getBlockTitleHeight(titleLineHeight, null === (_w = null === (_v = spec.data) || void 0 === _v ? void 0 : _v[index]) || void 0 === _w ? void 0 : _w.title, textBoxWidth, titleFontSize), textHeight = Math.round(clamp(240 * textScale, 88, 240)), contentHeight = Math.max(textHeight - titleHeight - 4, contentLineHeight), isLeftSide = index < count / 2, textAlign = isLeftSide ? "right" : "left", imageBox = {
109
148
  x: -imageWidth / 2,
110
149
  y: -imageHeight / 2,
111
150
  width: imageWidth,
112
151
  height: imageHeight
113
- }, textBox = {
114
- x: isLeftSide ? -20 : 20,
115
- y: isDown ? imageBox.y + imageHeight + 10 : imageBox.y - 10 - 240,
152
+ }, textPadding = Math.round(20 * textScale), textBox = {
153
+ x: isLeftSide ? -textPadding - textBoxWidth : textPadding,
154
+ y: isDown ? imageBox.y + imageHeight + 10 : imageBox.y - 10 - textHeight,
116
155
  width: textBoxWidth,
117
- height: 240
156
+ height: textHeight
118
157
  };
119
158
  return {
120
159
  titleFontSize: titleFontSize,
@@ -125,18 +164,27 @@ const getArcBlockMetrics = (spec, index = 0) => {
125
164
  textBox: textBox,
126
165
  contentBox: {
127
166
  x: textBox.x,
128
- y: textBox.y + titleLineHeight + 4,
167
+ y: textBox.y + titleHeight + 4,
129
168
  width: textBox.width,
130
169
  height: contentHeight
131
170
  },
132
171
  isDown: isDown,
133
- textAlign: isLeftSide ? "right" : "left"
172
+ textAlign: textAlign,
173
+ textAnchorX: isLeftSide ? -textPadding : textPadding
134
174
  };
135
175
  };
136
176
 
137
177
  export const buildArcBlockMark = (spec, block, index) => {
138
178
  var _a, _b, _c, _e;
139
- const hasImage = !!block.image, contentText = Array.isArray(block.content) ? block.content : block.content ? [ block.content ] : [], themeColor = getThemeColor(spec), metrics = getArcBlockMetrics(spec, index), connectorY = metrics.isDown ? metrics.imageBox.y + metrics.imageBox.height : metrics.textBox.y, connectorHeight = metrics.isDown ? Math.max(metrics.textBox.y + metrics.textBox.height - (metrics.imageBox.y + metrics.imageBox.height), 0) : Math.max(metrics.imageBox.y - metrics.textBox.y, 0);
179
+ const hasImage = !!block.image, contentText = Array.isArray(block.content) ? block.content : block.content ? [ block.content ] : [], themeColor = getThemeColor(spec), getMetrics = ctx => getArcBlockMetrics(spec, index, ctx), getConnectorBox = ctx => {
180
+ const metrics = getMetrics(ctx);
181
+ return {
182
+ x: -1,
183
+ y: metrics.isDown ? metrics.imageBox.y + metrics.imageBox.height : metrics.textBox.y,
184
+ width: 2,
185
+ height: metrics.isDown ? Math.max(metrics.textBox.y + metrics.textBox.height - (metrics.imageBox.y + metrics.imageBox.height), 0) : Math.max(metrics.imageBox.y - metrics.textBox.y, 0)
186
+ };
187
+ };
140
188
  return {
141
189
  type: "group",
142
190
  id: `storyline-block-${null !== (_a = block.id) && void 0 !== _a ? _a : index}`,
@@ -152,10 +200,10 @@ export const buildArcBlockMark = (spec, block, index) => {
152
200
  interactive: !1,
153
201
  zIndex: LayoutZIndex.Mark + 2,
154
202
  style: {
155
- x: -1,
156
- y: connectorY,
157
- width: 2,
158
- height: connectorHeight,
203
+ x: (_d, ctx) => getConnectorBox(ctx).x,
204
+ y: (_d, ctx) => getConnectorBox(ctx).y,
205
+ width: (_d, ctx) => getConnectorBox(ctx).width,
206
+ height: (_d, ctx) => getConnectorBox(ctx).height,
159
207
  fill: themeColor,
160
208
  fillOpacity: .6
161
209
  }
@@ -166,11 +214,11 @@ export const buildArcBlockMark = (spec, block, index) => {
166
214
  zIndex: LayoutZIndex.Mark + 3
167
215
  }, omitImageLayoutSpec(spec.image)), {
168
216
  style: Object.assign({
169
- x: metrics.imageBox.x,
170
- y: metrics.imageBox.y,
171
- width: metrics.imageBox.width,
172
- height: metrics.imageBox.height,
173
- cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2,
217
+ x: (_d, ctx) => getMetrics(ctx).imageBox.x,
218
+ y: (_d, ctx) => getMetrics(ctx).imageBox.y,
219
+ width: (_d, ctx) => getMetrics(ctx).imageBox.width,
220
+ height: (_d, ctx) => getMetrics(ctx).imageBox.height,
221
+ cornerRadius: (_d, ctx) => Math.min(getMetrics(ctx).imageBox.width, getMetrics(ctx).imageBox.height) / 2,
174
222
  image: block.image,
175
223
  repeatX: "no-repeat",
176
224
  repeatY: "no-repeat",
@@ -185,7 +233,7 @@ export const buildArcBlockMark = (spec, block, index) => {
185
233
  style: Object.assign({
186
234
  x: 0,
187
235
  y: 0,
188
- size: Math.min(metrics.imageBox.width, metrics.imageBox.height),
236
+ size: (_d, ctx) => Math.min(getMetrics(ctx).imageBox.width, getMetrics(ctx).imageBox.height),
189
237
  symbolType: "circle"
190
238
  }, getImageBackgroundStyle(spec))
191
239
  }, shouldShowImageBackground(spec) ? {
@@ -196,7 +244,7 @@ export const buildArcBlockMark = (spec, block, index) => {
196
244
  style: {
197
245
  x: 0,
198
246
  y: 0,
199
- size: Math.min(metrics.imageBox.width, metrics.imageBox.height) + 12,
247
+ size: (_d, ctx) => Math.min(getMetrics(ctx).imageBox.width, getMetrics(ctx).imageBox.height) + 12,
200
248
  symbolType: "circle",
201
249
  fill: "transparent",
202
250
  stroke: withAlpha(themeColor, .82),
@@ -209,19 +257,25 @@ export const buildArcBlockMark = (spec, block, index) => {
209
257
  zIndex: LayoutZIndex.Mark + 5
210
258
  }, spec.title), {
211
259
  style: Object.assign({
212
- x: metrics.textBox.x,
213
- y: metrics.textBox.y,
260
+ x: (_d, ctx) => getMetrics(ctx).textAnchorX,
261
+ y: (_d, ctx) => getMetrics(ctx).textBox.y,
214
262
  text: block.title,
215
- maxLineWidth: metrics.textBox.width,
216
- fontSize: metrics.titleFontSize,
217
- lineHeight: metrics.titleLineHeight,
263
+ maxLineWidth: (_d, ctx) => getMetrics(ctx).textBox.width,
264
+ height: (_d, ctx) => getMetrics(ctx).titleLineHeight * BLOCK_TITLE_MAX_LINES,
265
+ heightLimit: (_d, ctx) => getMetrics(ctx).titleLineHeight * BLOCK_TITLE_MAX_LINES,
266
+ lineClamp: BLOCK_TITLE_MAX_LINES,
267
+ fontSize: (_d, ctx) => getMetrics(ctx).titleFontSize,
268
+ lineHeight: (_d, ctx) => getMetrics(ctx).titleLineHeight,
218
269
  fontWeight: "bold",
219
270
  fill: "#1f2430",
220
271
  stroke: "#fff",
221
272
  lineWidth: 5,
222
273
  lineJoin: "round",
223
- textAlign: metrics.textAlign,
224
- textBaseline: "top"
274
+ textAlign: (_d, ctx) => getMetrics(ctx).textAlign,
275
+ textBaseline: "top",
276
+ whiteSpace: "normal",
277
+ wordBreak: "break-word",
278
+ ellipsis: "..."
225
279
  }, null === (_c = spec.title) || void 0 === _c ? void 0 : _c.style)
226
280
  }) : null, contentText.length ? Object.assign(Object.assign({
227
281
  type: "text",
@@ -229,22 +283,19 @@ export const buildArcBlockMark = (spec, block, index) => {
229
283
  interactive: !1,
230
284
  zIndex: LayoutZIndex.Mark + 4
231
285
  }, spec.content), {
232
- textType: "rich",
233
286
  style: Object.assign({
234
- x: metrics.contentBox.x,
235
- y: metrics.contentBox.y,
236
- width: metrics.contentBox.width,
237
- height: metrics.contentBox.height,
238
- maxLineWidth: metrics.contentBox.width,
239
- heightLimit: metrics.contentBox.height,
240
- text: buildRichContent(contentText, spec, {
241
- fontSize: metrics.contentFontSize,
242
- lineHeight: metrics.contentLineHeight,
243
- fill: "#596173",
244
- align: metrics.textAlign
245
- }),
246
- textAlign: metrics.textAlign,
287
+ x: (_d, ctx) => getMetrics(ctx).textAnchorX,
288
+ y: (_d, ctx) => getMetrics(ctx).contentBox.y,
289
+ width: (_d, ctx) => getMetrics(ctx).contentBox.width,
290
+ height: (_d, ctx) => getMetrics(ctx).contentBox.height,
291
+ maxLineWidth: (_d, ctx) => getMetrics(ctx).contentBox.width,
292
+ heightLimit: (_d, ctx) => getMetrics(ctx).contentBox.height,
293
+ text: buildPlainContent(contentText),
294
+ fontSize: (_d, ctx) => getMetrics(ctx).contentFontSize,
295
+ lineHeight: (_d, ctx) => getMetrics(ctx).contentLineHeight,
296
+ textAlign: (_d, ctx) => getMetrics(ctx).textAlign,
247
297
  textBaseline: "top",
298
+ whiteSpace: "normal",
248
299
  wordBreak: "break-word",
249
300
  ellipsis: "...",
250
301
  fill: "#596173"