@visactor/vchart-extension 2.1.0-alpha.14 → 2.1.0-alpha.15

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 (85) hide show
  1. package/build/index.js +1960 -0
  2. package/build/index.min.js +2 -2
  3. package/cjs/charts/image-cloud/series/image-cloud.d.ts +138 -0
  4. package/cjs/charts/storyline/index.d.ts +4 -0
  5. package/cjs/charts/storyline/index.js +22 -0
  6. package/cjs/charts/storyline/index.js.map +1 -0
  7. package/cjs/charts/storyline/interface.d.ts +59 -0
  8. package/cjs/charts/storyline/interface.js +6 -0
  9. package/cjs/charts/storyline/interface.js.map +1 -0
  10. package/cjs/charts/storyline/layout.d.ts +53 -0
  11. package/cjs/charts/storyline/layout.js +215 -0
  12. package/cjs/charts/storyline/layout.js.map +1 -0
  13. package/cjs/charts/storyline/layouts/bowl.d.ts +5 -0
  14. package/cjs/charts/storyline/layouts/bowl.js +286 -0
  15. package/cjs/charts/storyline/layouts/bowl.js.map +1 -0
  16. package/cjs/charts/storyline/layouts/clock.d.ts +5 -0
  17. package/cjs/charts/storyline/layouts/clock.js +233 -0
  18. package/cjs/charts/storyline/layouts/clock.js.map +1 -0
  19. package/cjs/charts/storyline/layouts/common.d.ts +87 -0
  20. package/cjs/charts/storyline/layouts/common.js +287 -0
  21. package/cjs/charts/storyline/layouts/common.js.map +1 -0
  22. package/cjs/charts/storyline/layouts/default.d.ts +4 -0
  23. package/cjs/charts/storyline/layouts/default.js +179 -0
  24. package/cjs/charts/storyline/layouts/default.js.map +1 -0
  25. package/cjs/charts/storyline/layouts/dome.d.ts +5 -0
  26. package/cjs/charts/storyline/layouts/dome.js +286 -0
  27. package/cjs/charts/storyline/layouts/dome.js.map +1 -0
  28. package/cjs/charts/storyline/layouts/landscape.d.ts +4 -0
  29. package/cjs/charts/storyline/layouts/landscape.js +254 -0
  30. package/cjs/charts/storyline/layouts/landscape.js.map +1 -0
  31. package/cjs/charts/storyline/layouts/portrait.d.ts +4 -0
  32. package/cjs/charts/storyline/layouts/portrait.js +241 -0
  33. package/cjs/charts/storyline/layouts/portrait.js.map +1 -0
  34. package/cjs/charts/storyline/storyline-transformer.d.ts +4 -0
  35. package/cjs/charts/storyline/storyline-transformer.js +62 -0
  36. package/cjs/charts/storyline/storyline-transformer.js.map +1 -0
  37. package/cjs/charts/storyline/storyline.d.ts +16 -0
  38. package/cjs/charts/storyline/storyline.js +36 -0
  39. package/cjs/charts/storyline/storyline.js.map +1 -0
  40. package/cjs/components/map-label/map-label.d.ts +52 -0
  41. package/cjs/index.d.ts +1 -0
  42. package/cjs/index.js +5 -5
  43. package/cjs/index.js.map +1 -1
  44. package/esm/charts/image-cloud/series/image-cloud.d.ts +138 -0
  45. package/esm/charts/storyline/index.d.ts +4 -0
  46. package/esm/charts/storyline/index.js +8 -0
  47. package/esm/charts/storyline/index.js.map +1 -0
  48. package/esm/charts/storyline/interface.d.ts +59 -0
  49. package/esm/charts/storyline/interface.js +2 -0
  50. package/esm/charts/storyline/interface.js.map +1 -0
  51. package/esm/charts/storyline/layout.d.ts +53 -0
  52. package/esm/charts/storyline/layout.js +205 -0
  53. package/esm/charts/storyline/layout.js.map +1 -0
  54. package/esm/charts/storyline/layouts/bowl.d.ts +5 -0
  55. package/esm/charts/storyline/layouts/bowl.js +278 -0
  56. package/esm/charts/storyline/layouts/bowl.js.map +1 -0
  57. package/esm/charts/storyline/layouts/clock.d.ts +5 -0
  58. package/esm/charts/storyline/layouts/clock.js +227 -0
  59. package/esm/charts/storyline/layouts/clock.js.map +1 -0
  60. package/esm/charts/storyline/layouts/common.d.ts +87 -0
  61. package/esm/charts/storyline/layouts/common.js +255 -0
  62. package/esm/charts/storyline/layouts/common.js.map +1 -0
  63. package/esm/charts/storyline/layouts/default.d.ts +4 -0
  64. package/esm/charts/storyline/layouts/default.js +172 -0
  65. package/esm/charts/storyline/layouts/default.js.map +1 -0
  66. package/esm/charts/storyline/layouts/dome.d.ts +5 -0
  67. package/esm/charts/storyline/layouts/dome.js +278 -0
  68. package/esm/charts/storyline/layouts/dome.js.map +1 -0
  69. package/esm/charts/storyline/layouts/landscape.d.ts +4 -0
  70. package/esm/charts/storyline/layouts/landscape.js +250 -0
  71. package/esm/charts/storyline/layouts/landscape.js.map +1 -0
  72. package/esm/charts/storyline/layouts/portrait.d.ts +4 -0
  73. package/esm/charts/storyline/layouts/portrait.js +238 -0
  74. package/esm/charts/storyline/layouts/portrait.js.map +1 -0
  75. package/esm/charts/storyline/storyline-transformer.d.ts +4 -0
  76. package/esm/charts/storyline/storyline-transformer.js +61 -0
  77. package/esm/charts/storyline/storyline-transformer.js.map +1 -0
  78. package/esm/charts/storyline/storyline.d.ts +16 -0
  79. package/esm/charts/storyline/storyline.js +29 -0
  80. package/esm/charts/storyline/storyline.js.map +1 -0
  81. package/esm/components/map-label/map-label.d.ts +52 -0
  82. package/esm/index.d.ts +1 -0
  83. package/esm/index.js +2 -0
  84. package/esm/index.js.map +1 -1
  85. package/package.json +8 -8
@@ -0,0 +1,205 @@
1
+ const DEFAULT_LAYOUT = "landscape", DEFAULT_PADDING = 24;
2
+
3
+ export const normalizePadding = padding => {
4
+ var _a, _b, _c, _d;
5
+ if (Array.isArray(padding)) return {
6
+ top: null !== (_a = padding[0]) && void 0 !== _a ? _a : 0,
7
+ right: null !== (_b = padding[1]) && void 0 !== _b ? _b : 0,
8
+ bottom: null !== (_c = padding[2]) && void 0 !== _c ? _c : 0,
9
+ left: null !== (_d = padding[3]) && void 0 !== _d ? _d : 0
10
+ };
11
+ const value = null != padding ? padding : 24;
12
+ return {
13
+ top: value,
14
+ right: value,
15
+ bottom: value,
16
+ left: value
17
+ };
18
+ };
19
+
20
+ export const normalizeLayout = layout => layout ? "string" == typeof layout ? {
21
+ type: layout
22
+ } : layout : {
23
+ type: "landscape"
24
+ };
25
+
26
+ export const computeStorylineLayout = (data, options) => {
27
+ var _a, _b, _c;
28
+ const layout = normalizeLayout(options.layout), padding = normalizePadding(null !== (_a = layout.padding) && void 0 !== _a ? _a : options.padding), gap = null !== (_b = options.gap) && void 0 !== _b ? _b : 40, lineDistance = null !== (_c = options.lineDistance) && void 0 !== _c ? _c : 8, blocks = computeBlockPositions(data, layout, options.viewBox, options.block, padding, gap), circleGuide = "clock" === layout.type ? computeClockCircleGuide(options.viewBox, options.block, padding, layout) : void 0;
29
+ return {
30
+ blocks: blocks,
31
+ links: computeLinks(blocks, lineDistance),
32
+ circleGuide: circleGuide
33
+ };
34
+ };
35
+
36
+ const computeBlockPositions = (data, layout, viewBox, block, padding, gap) => {
37
+ const count = data.length;
38
+ if (!count) return [];
39
+ const inner = {
40
+ x: padding.left,
41
+ y: padding.top,
42
+ width: Math.max(viewBox.width - padding.left - padding.right, block.width),
43
+ height: Math.max(viewBox.height - padding.top - padding.bottom, block.height)
44
+ }, center = {
45
+ x: inner.x + inner.width / 2,
46
+ y: inner.y + inner.height / 2
47
+ };
48
+ let centers;
49
+ switch (layout.type) {
50
+ case "portrait":
51
+ centers = lineCenters(count, center.x, inner.y + block.height / 2, center.x, inner.y + inner.height - block.height / 2);
52
+ break;
53
+
54
+ case "up-ladder":
55
+ centers = lineCenters(count, inner.x + block.width / 2, inner.y + inner.height - block.height / 2, inner.x + inner.width - block.width / 2, inner.y + block.height / 2);
56
+ break;
57
+
58
+ case "down-ladder":
59
+ centers = lineCenters(count, inner.x + block.width / 2, inner.y + block.height / 2, inner.x + inner.width - block.width / 2, inner.y + inner.height - block.height / 2);
60
+ break;
61
+
62
+ case "pulse":
63
+ centers = alternatingHorizontalCenters(count, inner, block, gap);
64
+ break;
65
+
66
+ case "spiral":
67
+ centers = alternatingVerticalCenters(count, inner, block, gap);
68
+ break;
69
+
70
+ case "clock":
71
+ centers = circularCenters(count, viewBox, block, padding, layout);
72
+ break;
73
+
74
+ case "bowl":
75
+ centers = arcCenters(count, inner, block, layout, 200, 340);
76
+ break;
77
+
78
+ case "dome":
79
+ centers = arcCenters(count, inner, block, layout, 160, 20);
80
+ break;
81
+
82
+ case "left-wing":
83
+ centers = arcCenters(count, inner, block, layout, 250, 110);
84
+ break;
85
+
86
+ case "right-wing":
87
+ centers = arcCenters(count, inner, block, layout, -70, 70);
88
+ break;
89
+
90
+ default:
91
+ centers = lineCenters(count, inner.x + block.width / 2, center.y, inner.x + inner.width - block.width / 2, center.y);
92
+ }
93
+ return centers.map(((point, index) => {
94
+ var _a, _b;
95
+ return {
96
+ id: null !== (_b = null === (_a = data[index]) || void 0 === _a ? void 0 : _a.id) && void 0 !== _b ? _b : index,
97
+ index: index,
98
+ datum: data[index],
99
+ width: block.width,
100
+ height: block.height,
101
+ x: point.x - block.width / 2,
102
+ y: point.y - block.height / 2,
103
+ center: point
104
+ };
105
+ }));
106
+ }, lineCenters = (count, x0, y0, x1, y1) => 1 === count ? [ {
107
+ x: (x0 + x1) / 2,
108
+ y: (y0 + y1) / 2
109
+ } ] : Array.from({
110
+ length: count
111
+ }, ((_, index) => {
112
+ const t = index / (count - 1);
113
+ return {
114
+ x: x0 + (x1 - x0) * t,
115
+ y: y0 + (y1 - y0) * t
116
+ };
117
+ })), alternatingHorizontalCenters = (count, inner, block, gap) => {
118
+ const baseY = inner.y + inner.height / 2, offset = Math.min(Math.max(.65 * block.height + gap / 2, 0), Math.max((inner.height - block.height) / 2, 0));
119
+ return lineCenters(count, inner.x + block.width / 2, baseY, inner.x + inner.width - block.width / 2, baseY).map(((point, index) => ({
120
+ x: point.x,
121
+ y: point.y + (index % 2 == 0 ? -offset : offset)
122
+ })));
123
+ }, alternatingVerticalCenters = (count, inner, block, gap) => {
124
+ const baseX = inner.x + inner.width / 2, offset = Math.min(Math.max(.65 * block.width + gap / 2, 0), Math.max((inner.width - block.width) / 2, 0));
125
+ return lineCenters(count, baseX, inner.y + block.height / 2, baseX, inner.y + inner.height - block.height / 2).map(((point, index) => ({
126
+ x: point.x + (index % 2 == 0 ? -offset : offset),
127
+ y: point.y
128
+ })));
129
+ }, circularCenters = (count, viewBox, block, padding, layout) => {
130
+ var _a;
131
+ const guide = computeClockCircleGuide(viewBox, block, padding, layout), startAngle = null !== (_a = layout.startAngle) && void 0 !== _a ? _a : -90;
132
+ if (1 === count) {
133
+ const angle = degreeToRadian(startAngle);
134
+ return [ {
135
+ x: guide.center.x + Math.cos(angle) * guide.radius,
136
+ y: guide.center.y + Math.sin(angle) * guide.radius
137
+ } ];
138
+ }
139
+ return Array.from({
140
+ length: count
141
+ }, ((_, index) => {
142
+ const angle = degreeToRadian(startAngle + 360 * index / count);
143
+ return {
144
+ x: guide.center.x + Math.cos(angle) * guide.radius,
145
+ y: guide.center.y + Math.sin(angle) * guide.radius
146
+ };
147
+ }));
148
+ }, computeClockCircleGuide = (viewBox, block, padding, layout) => {
149
+ var _a;
150
+ const innerWidth = Math.max(viewBox.width - padding.left - padding.right, 1), innerHeight = Math.max(viewBox.height - padding.top - padding.bottom, 1), center = {
151
+ x: padding.left + innerWidth / 2,
152
+ y: padding.top + innerHeight / 2
153
+ }, ratio = null !== (_a = layout.radiusRatio) && void 0 !== _a ? _a : .7, maxRadius = Math.max(Math.min(innerWidth - block.width, innerHeight - block.height) / 2, 1);
154
+ return {
155
+ center: center,
156
+ radius: Math.max(1, maxRadius * ratio)
157
+ };
158
+ }, arcCenters = (count, inner, block, layout, fallbackStartAngle, fallbackEndAngle, defaultRatio = .88) => {
159
+ var _a, _b, _c, _d, _e;
160
+ const startAngle = null !== (_b = null !== (_a = layout.startAngle) && void 0 !== _a ? _a : fallbackStartAngle) && void 0 !== _b ? _b : -90, endAngle = null !== (_d = null !== (_c = layout.endAngle) && void 0 !== _c ? _c : fallbackEndAngle) && void 0 !== _d ? _d : 270, ratio = null !== (_e = layout.radiusRatio) && void 0 !== _e ? _e : defaultRatio, rx = Math.max((inner.width - block.width) / 2, 1) * ratio, ry = Math.max((inner.height - block.height) / 2, 1) * ratio, center_x = inner.x + inner.width / 2, center_y = inner.y + inner.height / 2;
161
+ if (1 === count) {
162
+ const angle = degreeToRadian((startAngle + endAngle) / 2);
163
+ return [ {
164
+ x: center_x + Math.cos(angle) * rx,
165
+ y: center_y + Math.sin(angle) * ry
166
+ } ];
167
+ }
168
+ return Array.from({
169
+ length: count
170
+ }, ((_, index) => {
171
+ const t = index / (count - 1), angle = degreeToRadian(startAngle + angleDelta(startAngle, endAngle) * t);
172
+ return {
173
+ x: center_x + Math.cos(angle) * rx,
174
+ y: center_y + Math.sin(angle) * ry
175
+ };
176
+ }));
177
+ }, angleDelta = (startAngle, endAngle) => {
178
+ const delta = endAngle - startAngle;
179
+ return Math.abs(delta) >= 360 ? 360 : delta;
180
+ }, degreeToRadian = degree => degree / 180 * Math.PI, computeLinks = (blocks, distance) => {
181
+ const links = [];
182
+ for (let i = 0; i < blocks.length - 1; i++) {
183
+ const from = blocks[i], to = blocks[i + 1], start = pointOnBlockEdge(from, to.center, distance), end = pointOnBlockEdge(to, from.center, distance);
184
+ links.push({
185
+ from: from,
186
+ to: to,
187
+ start: start,
188
+ end: end,
189
+ points: [ start, end ]
190
+ });
191
+ }
192
+ return links;
193
+ }, pointOnBlockEdge = (block, toward, distance) => {
194
+ const dx = toward.x - block.center.x, dy = toward.y - block.center.y;
195
+ if (0 === dx && 0 === dy) return {
196
+ x: block.center.x,
197
+ y: block.center.y
198
+ };
199
+ const scaleX = 0 === dx ? Number.POSITIVE_INFINITY : block.width / 2 / Math.abs(dx), scaleY = 0 === dy ? Number.POSITIVE_INFINITY : block.height / 2 / Math.abs(dy), scale = Math.min(scaleX, scaleY), length = Math.sqrt(dx * dx + dy * dy) || 1;
200
+ return {
201
+ x: block.center.x + dx * scale + dx / length * distance,
202
+ y: block.center.y + dy * scale + dy / length * distance
203
+ };
204
+ };
205
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/charts/storyline/layout.ts"],"names":[],"mappings":"AAsDA,MAAM,cAAc,GAAwB,WAAW,CAAC;AACxD,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,CAAC,MAAM,gBA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,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO;QACL,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,QAAQ;QACzD,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,QAAQ;KAC1D,CAAC;AACJ,CAAC,CAAC","file":"layout.js","sourcesContent":["import type { IStorylineBlock, IStorylineLayoutOptions, StorylineLayoutType } from './interface';\n\nexport interface StorylineSize {\n width: number;\n height: number;\n}\n\nexport interface StorylinePadding {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\nexport interface StorylinePoint {\n x: number;\n y: number;\n}\n\nexport interface StorylineBlockPosition extends StorylinePoint, StorylineSize {\n id: string | number;\n index: number;\n datum: IStorylineBlock;\n center: StorylinePoint;\n}\n\nexport interface StorylineLinkPosition {\n from: StorylineBlockPosition;\n to: StorylineBlockPosition;\n start: StorylinePoint;\n end: StorylinePoint;\n points: StorylinePoint[];\n}\n\nexport interface StorylineCircleGuide {\n center: StorylinePoint;\n radius: number;\n}\n\nexport interface StorylineLayoutResult {\n blocks: StorylineBlockPosition[];\n links: StorylineLinkPosition[];\n circleGuide?: StorylineCircleGuide;\n}\n\nexport interface StorylineComputeOptions {\n layout: StorylineLayoutType | IStorylineLayoutOptions | undefined;\n viewBox: StorylineSize;\n block: StorylineSize;\n gap?: number;\n padding?: number | [number, number, number, number];\n lineDistance?: number;\n}\n\nconst DEFAULT_LAYOUT: StorylineLayoutType = 'landscape';\nconst DEFAULT_PADDING = 24;\n\nexport const normalizePadding = (padding?: number | [number, number, number, number]): StorylinePadding => {\n if (Array.isArray(padding)) {\n return {\n top: padding[0] ?? 0,\n right: padding[1] ?? 0,\n bottom: padding[2] ?? 0,\n left: padding[3] ?? 0\n };\n }\n const value = padding ?? DEFAULT_PADDING;\n return { top: value, right: value, bottom: value, left: value };\n};\n\nexport const normalizeLayout = (layout?: StorylineLayoutType | IStorylineLayoutOptions): IStorylineLayoutOptions => {\n if (!layout) {\n return { type: DEFAULT_LAYOUT };\n }\n if (typeof layout === 'string') {\n return { type: layout };\n }\n return layout;\n};\n\nexport const computeStorylineLayout = (\n data: IStorylineBlock[],\n options: StorylineComputeOptions\n): StorylineLayoutResult => {\n const layout = normalizeLayout(options.layout);\n const padding = normalizePadding(layout.padding ?? options.padding);\n const gap = options.gap ?? 40;\n const lineDistance = options.lineDistance ?? 8;\n const blocks = computeBlockPositions(data, layout, options.viewBox, options.block, padding, gap);\n const circleGuide =\n layout.type === 'clock' ? computeClockCircleGuide(options.viewBox, options.block, padding, layout) : undefined;\n return {\n blocks,\n links: computeLinks(blocks, lineDistance),\n circleGuide\n };\n};\n\nconst computeBlockPositions = (\n data: IStorylineBlock[],\n layout: IStorylineLayoutOptions,\n viewBox: StorylineSize,\n block: StorylineSize,\n padding: StorylinePadding,\n gap: number\n): StorylineBlockPosition[] => {\n const count = data.length;\n if (!count) {\n return [];\n }\n\n const inner = {\n x: padding.left,\n y: padding.top,\n width: Math.max(viewBox.width - padding.left - padding.right, block.width),\n height: Math.max(viewBox.height - padding.top - padding.bottom, block.height)\n };\n const center = {\n x: inner.x + inner.width / 2,\n y: inner.y + inner.height / 2\n };\n\n let centers: StorylinePoint[];\n switch (layout.type) {\n case 'portrait':\n centers = lineCenters(\n count,\n center.x,\n inner.y + block.height / 2,\n center.x,\n inner.y + inner.height - block.height / 2\n );\n break;\n case 'up-ladder':\n centers = lineCenters(\n count,\n inner.x + block.width / 2,\n inner.y + inner.height - block.height / 2,\n inner.x + inner.width - block.width / 2,\n inner.y + block.height / 2\n );\n break;\n case 'down-ladder':\n centers = lineCenters(\n count,\n inner.x + block.width / 2,\n inner.y + block.height / 2,\n inner.x + inner.width - block.width / 2,\n inner.y + inner.height - block.height / 2\n );\n break;\n case 'pulse':\n centers = alternatingHorizontalCenters(count, inner, block, gap);\n break;\n case 'spiral':\n centers = alternatingVerticalCenters(count, inner, block, gap);\n break;\n case 'clock':\n centers = circularCenters(count, viewBox, block, padding, layout);\n break;\n case 'bowl':\n centers = arcCenters(count, inner, block, layout, 200, 340);\n break;\n case 'dome':\n centers = arcCenters(count, inner, block, layout, 160, 20);\n break;\n case 'left-wing':\n centers = arcCenters(count, inner, block, layout, 250, 110);\n break;\n case 'right-wing':\n centers = arcCenters(count, inner, block, layout, -70, 70);\n break;\n case 'landscape':\n default:\n centers = lineCenters(\n count,\n inner.x + block.width / 2,\n center.y,\n inner.x + inner.width - block.width / 2,\n center.y\n );\n break;\n }\n\n return centers.map((point, index) => ({\n id: data[index]?.id ?? index,\n index,\n datum: data[index],\n width: block.width,\n height: block.height,\n x: point.x - block.width / 2,\n y: point.y - block.height / 2,\n center: point\n }));\n};\n\nconst lineCenters = (count: number, x0: number, y0: number, x1: number, y1: number): StorylinePoint[] => {\n if (count === 1) {\n return [{ x: (x0 + x1) / 2, y: (y0 + y1) / 2 }];\n }\n return Array.from({ length: count }, (_, index) => {\n const t = index / (count - 1);\n return {\n x: x0 + (x1 - x0) * t,\n y: y0 + (y1 - y0) * t\n };\n });\n};\n\nconst alternatingHorizontalCenters = (\n count: number,\n inner: { x: number; y: number; width: number; height: number },\n block: StorylineSize,\n gap: number\n) => {\n const baseY = inner.y + inner.height / 2;\n const offset = Math.min(Math.max(block.height * 0.65 + gap / 2, 0), Math.max((inner.height - block.height) / 2, 0));\n const points = lineCenters(count, inner.x + block.width / 2, baseY, inner.x + inner.width - block.width / 2, baseY);\n return points.map((point, index) => ({\n x: point.x,\n y: point.y + (index % 2 === 0 ? -offset : offset)\n }));\n};\n\nconst alternatingVerticalCenters = (\n count: number,\n inner: { x: number; y: number; width: number; height: number },\n block: StorylineSize,\n gap: number\n) => {\n const baseX = inner.x + inner.width / 2;\n const offset = Math.min(Math.max(block.width * 0.65 + gap / 2, 0), Math.max((inner.width - block.width) / 2, 0));\n const points = lineCenters(\n count,\n baseX,\n inner.y + block.height / 2,\n baseX,\n inner.y + inner.height - block.height / 2\n );\n return points.map((point, index) => ({\n x: point.x + (index % 2 === 0 ? -offset : offset),\n y: point.y\n }));\n};\n\nconst circularCenters = (\n count: number,\n viewBox: StorylineSize,\n block: StorylineSize,\n padding: StorylinePadding,\n layout: IStorylineLayoutOptions\n) => {\n const guide = computeClockCircleGuide(viewBox, block, padding, layout);\n const startAngle = layout.startAngle ?? -90;\n const delta = 360;\n\n if (count === 1) {\n const angle = degreeToRadian(startAngle);\n return [\n {\n x: guide.center.x + Math.cos(angle) * guide.radius,\n y: guide.center.y + Math.sin(angle) * guide.radius\n }\n ];\n }\n\n return Array.from({ length: count }, (_, index) => {\n const angle = degreeToRadian(startAngle + (delta * index) / count);\n return {\n x: guide.center.x + Math.cos(angle) * guide.radius,\n y: guide.center.y + Math.sin(angle) * guide.radius\n };\n });\n};\n\nconst computeClockCircleGuide = (\n viewBox: StorylineSize,\n block: StorylineSize,\n padding: StorylinePadding,\n layout: IStorylineLayoutOptions\n): StorylineCircleGuide => {\n const innerWidth = Math.max(viewBox.width - padding.left - padding.right, 1);\n const innerHeight = Math.max(viewBox.height - padding.top - padding.bottom, 1);\n const center = {\n x: padding.left + innerWidth / 2,\n y: padding.top + innerHeight / 2\n };\n const ratio = layout.radiusRatio ?? 0.7;\n const maxRadius = Math.max(Math.min(innerWidth - block.width, innerHeight - block.height) / 2, 1);\n\n return {\n center,\n radius: Math.max(1, maxRadius * ratio)\n };\n};\n\nconst arcCenters = (\n count: number,\n inner: { x: number; y: number; width: number; height: number },\n block: StorylineSize,\n layout: IStorylineLayoutOptions,\n fallbackStartAngle?: number,\n fallbackEndAngle?: number,\n defaultRatio = 0.88\n) => {\n const startAngle = layout.startAngle ?? fallbackStartAngle ?? -90;\n const endAngle = layout.endAngle ?? fallbackEndAngle ?? 270;\n const ratio = layout.radiusRatio ?? defaultRatio;\n const rx = Math.max((inner.width - block.width) / 2, 1) * ratio;\n const ry = Math.max((inner.height - block.height) / 2, 1) * ratio;\n const center = {\n x: inner.x + inner.width / 2,\n y: inner.y + inner.height / 2\n };\n\n if (count === 1) {\n const angle = degreeToRadian((startAngle + endAngle) / 2);\n return [{ x: center.x + Math.cos(angle) * rx, y: center.y + Math.sin(angle) * ry }];\n }\n\n return Array.from({ length: count }, (_, index) => {\n const t = index / (count - 1);\n const angle = degreeToRadian(startAngle + angleDelta(startAngle, endAngle) * t);\n return {\n x: center.x + Math.cos(angle) * rx,\n y: center.y + Math.sin(angle) * ry\n };\n });\n};\n\nconst angleDelta = (startAngle: number, endAngle: number) => {\n const delta = endAngle - startAngle;\n return Math.abs(delta) >= 360 ? 360 : delta;\n};\n\nconst degreeToRadian = (degree: number) => (degree / 180) * Math.PI;\n\nconst computeLinks = (blocks: StorylineBlockPosition[], distance: number): StorylineLinkPosition[] => {\n const links: StorylineLinkPosition[] = [];\n for (let i = 0; i < blocks.length - 1; i++) {\n const from = blocks[i];\n const to = blocks[i + 1];\n const start = pointOnBlockEdge(from, to.center, distance);\n const end = pointOnBlockEdge(to, from.center, distance);\n links.push({\n from,\n to,\n start,\n end,\n points: [start, end]\n });\n }\n return links;\n};\n\nconst pointOnBlockEdge = (block: StorylineBlockPosition, toward: StorylinePoint, distance: number): StorylinePoint => {\n const dx = toward.x - block.center.x;\n const dy = toward.y - block.center.y;\n if (dx === 0 && dy === 0) {\n return { x: block.center.x, y: block.center.y };\n }\n const scaleX = dx === 0 ? Number.POSITIVE_INFINITY : block.width / 2 / Math.abs(dx);\n const scaleY = dy === 0 ? Number.POSITIVE_INFINITY : block.height / 2 / Math.abs(dy);\n const scale = Math.min(scaleX, scaleY);\n const length = Math.sqrt(dx * dx + dy * dy) || 1;\n return {\n x: block.center.x + dx * scale + (dx / length) * distance,\n y: block.center.y + dy * scale + (dy / length) * distance\n };\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import type { IExtensionGroupMarkSpec } from '@visactor/vchart';
2
+ import type { IStorylineBlock, IStorylineSpec } from '../interface';
3
+ export declare const buildBowlArcMark: (spec: IStorylineSpec) => IExtensionGroupMarkSpec | null;
4
+ export declare const buildBowlCenterImageMark: (spec: IStorylineSpec) => IExtensionGroupMarkSpec | null;
5
+ export declare const buildBowlBlockMark: (spec: IStorylineSpec, block: IStorylineBlock, index: number) => IExtensionGroupMarkSpec;
@@ -0,0 +1,278 @@
1
+ import { LayoutZIndex } from "@visactor/vchart";
2
+
3
+ import { buildRichContent, getRegionGeometry, getThemeColor, normalizeLayout, normalizePadding, omitImageLayoutSpec, resolveBlockWidth, withAlpha } from "./common";
4
+
5
+ const BOWL_BLOCK_IMAGE_SIZE = 140, BOWL_TEXT_GAP_FROM_IMAGE = 10, BOWL_TITLE_LINE_HEIGHT = 19, BOWL_CONTENT_LINE_HEIGHT = 17, BOWL_CONTENT_FONT_SIZE = 12, BOWL_TEXT_BOX_HEIGHT = 300, BOWL_TITLE_TO_CONTENT_GAP = 4, BOWL_TEXT_LEFT_PADDING = 20, BOWL_CENTER_IMAGE_WIDTH_RATIO = .32, BOWL_CENTER_IMAGE_HEIGHT_RATIO = .32, BOWL_ARC_BOTTOM_GAP_FROM_CENTER_IMAGE = 300, getBowlCenterImageRect = (spec, ctx) => {
6
+ var _a, _b, _c, _e, _f;
7
+ const {width: width, height: height, startX: startX, startY: startY} = getRegionGeometry(ctx), padding = normalizePadding(null === (_a = spec.block) || void 0 === _a ? void 0 : _a.padding), innerWidth = Math.max(width - padding.left - padding.right, 1), innerHeight = Math.max(height - padding.top - padding.bottom, 1), w = Math.max(null !== (_c = null === (_b = spec.centerImage) || void 0 === _b ? void 0 : _b.width) && void 0 !== _c ? _c : .32 * innerWidth, 80), h = Math.max(null !== (_f = null === (_e = spec.centerImage) || void 0 === _e ? void 0 : _e.height) && void 0 !== _f ? _f : .32 * innerHeight, 60);
8
+ return {
9
+ x: startX + padding.left + innerWidth / 2 - w / 2,
10
+ y: startY + padding.top,
11
+ width: w,
12
+ height: h
13
+ };
14
+ }, getBowlArcGeometry = (spec, ctx) => {
15
+ var _a, _b, _c, _e;
16
+ const {width: width, startX: startX} = getRegionGeometry(ctx), blockPadding = normalizePadding(null === (_a = spec.block) || void 0 === _a ? void 0 : _a.padding), innerWidth = Math.max(width - blockPadding.left - blockPadding.right, 1), blockWidth = resolveBlockWidth(spec, width), layoutOpt = normalizeLayout(spec.layout), startAngle = null !== (_b = layoutOpt.startAngle) && void 0 !== _b ? _b : 20, endAngle = null !== (_c = layoutOpt.endAngle) && void 0 !== _c ? _c : 160, ratio = null !== (_e = layoutOpt.radiusRatio) && void 0 !== _e ? _e : .88, rx = Math.max((innerWidth - blockWidth) / 2, 1) * ratio, centerRect = getBowlCenterImageRect(spec, ctx), centerTop = centerRect.y, centerBottom = centerRect.y + centerRect.height, sinStart = Math.sin(startAngle / 180 * Math.PI), denom = Math.max(1 - sinStart, .05), ry = (centerRect.height + 300) / denom, cy = centerTop - ry * sinStart;
17
+ return {
18
+ cx: startX + blockPadding.left + innerWidth / 2,
19
+ cy: cy,
20
+ rx: rx,
21
+ ry: ry,
22
+ startAngle: startAngle,
23
+ endAngle: endAngle,
24
+ centerTop: centerTop,
25
+ centerBottom: centerBottom
26
+ };
27
+ }, getBowlBlockCenter = (spec, ctx, index) => {
28
+ var _a, _b, _c, _e;
29
+ const arc = getBowlArcGeometry(spec, ctx), count = null !== (_b = null === (_a = spec.data) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
30
+ if (count <= 0) return {
31
+ x: arc.cx,
32
+ y: arc.cy
33
+ };
34
+ 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 : 140) / 2;
35
+ return {
36
+ x: px + nx * offset,
37
+ y: py + ny * offset
38
+ };
39
+ };
40
+
41
+ export const buildBowlArcMark = spec => {
42
+ var _a;
43
+ if (!0 !== (null === (_a = spec.line) || void 0 === _a ? void 0 : _a.visible)) return null;
44
+ const themeColor = getThemeColor(spec);
45
+ return {
46
+ type: "group",
47
+ name: "storyline-bowl-arc",
48
+ zIndex: LayoutZIndex.Mark,
49
+ children: [ {
50
+ type: "path",
51
+ name: "storyline-bowl-arc-path",
52
+ interactive: !1,
53
+ style: {
54
+ stroke: themeColor,
55
+ lineWidth: 2,
56
+ lineCap: "round",
57
+ fill: "transparent",
58
+ fillOpacity: 0,
59
+ path: (_d, ctx) => {
60
+ const arc = getBowlArcGeometry(spec, ctx), span = arc.endAngle - arc.startAngle, segments = [];
61
+ for (let i = 0; i <= 64; i++) {
62
+ const t = i / 64, angle = (arc.startAngle + span * t) / 180 * Math.PI, x = arc.cx + Math.cos(angle) * arc.rx, y = arc.cy + Math.sin(angle) * arc.ry;
63
+ segments.push(`${0 === i ? "M" : "L"} ${x.toFixed(2)} ${y.toFixed(2)}`);
64
+ }
65
+ return segments.join(" ");
66
+ }
67
+ }
68
+ } ]
69
+ };
70
+ };
71
+
72
+ export const buildBowlCenterImageMark = spec => {
73
+ var _a, _b, _c, _e;
74
+ if (!(!1 !== (null === (_a = spec.centerImage) || void 0 === _a ? void 0 : _a.visible))) return null;
75
+ const themeColor = getThemeColor(spec), hasImage = !!(null === (_b = spec.centerImage) || void 0 === _b ? void 0 : _b.image), symbolGradient = {
76
+ gradient: "linear",
77
+ x0: .5,
78
+ y0: 0,
79
+ x1: .5,
80
+ y1: 1,
81
+ stops: [ {
82
+ offset: 0,
83
+ color: withAlpha(themeColor, .15)
84
+ }, {
85
+ offset: 1,
86
+ color: themeColor
87
+ } ]
88
+ };
89
+ return {
90
+ type: "group",
91
+ name: "storyline-bowl-center",
92
+ zIndex: LayoutZIndex.Mark,
93
+ children: [ {
94
+ type: "symbol",
95
+ name: "storyline-bowl-center-symbol",
96
+ interactive: !1,
97
+ style: {
98
+ x: (_d, ctx) => {
99
+ const r = getBowlCenterImageRect(spec, ctx);
100
+ return r.x + r.width / 2;
101
+ },
102
+ y: (_d, ctx) => {
103
+ const r = getBowlCenterImageRect(spec, ctx);
104
+ return r.y + r.height / 2;
105
+ },
106
+ size: (_d, ctx) => {
107
+ const r = getBowlCenterImageRect(spec, ctx);
108
+ return 1.1 * Math.max(r.width, r.height);
109
+ },
110
+ symbolType: "circle",
111
+ fill: symbolGradient,
112
+ stroke: themeColor,
113
+ lineWidth: 2
114
+ }
115
+ }, {
116
+ type: "rect",
117
+ name: "storyline-bowl-center-rect",
118
+ interactive: !1,
119
+ style: {
120
+ x: (_d, ctx) => getBowlCenterImageRect(spec, ctx).x,
121
+ y: (_d, ctx) => getBowlCenterImageRect(spec, ctx).y,
122
+ width: (_d, ctx) => getBowlCenterImageRect(spec, ctx).width,
123
+ height: (_d, ctx) => getBowlCenterImageRect(spec, ctx).height,
124
+ cornerRadius: 12,
125
+ fill: "#ffffff",
126
+ stroke: themeColor,
127
+ lineWidth: 2
128
+ }
129
+ }, hasImage ? Object.assign(Object.assign({
130
+ type: "image",
131
+ name: "storyline-bowl-center-image",
132
+ interactive: !1
133
+ }, spec.centerImage), {
134
+ style: Object.assign({
135
+ x: (_d, ctx) => getBowlCenterImageRect(spec, ctx).x,
136
+ y: (_d, ctx) => getBowlCenterImageRect(spec, ctx).y,
137
+ width: (_d, ctx) => getBowlCenterImageRect(spec, ctx).width,
138
+ height: (_d, ctx) => getBowlCenterImageRect(spec, ctx).height,
139
+ image: null === (_c = spec.centerImage) || void 0 === _c ? void 0 : _c.image,
140
+ cornerRadius: 12,
141
+ repeatX: "no-repeat",
142
+ repeatY: "no-repeat",
143
+ imageMode: "cover",
144
+ imagePosition: "center"
145
+ }, null === (_e = spec.centerImage) || void 0 === _e ? void 0 : _e.style)
146
+ }) : null ].filter(Boolean)
147
+ };
148
+ };
149
+
150
+ const getBowlBlockMetrics = spec => {
151
+ var _a, _b, _c, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
152
+ const titleFontSize = Number(null !== (_c = null === (_b = null === (_a = spec.title) || void 0 === _a ? void 0 : _a.style) || void 0 === _b ? void 0 : _b.fontSize) && void 0 !== _c ? _c : 14), titleLineHeight = Number(null !== (_g = null === (_f = null === (_e = spec.title) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.lineHeight) && void 0 !== _g ? _g : Math.max(19, Math.round(1.35 * titleFontSize))), contentFontSize = Number(null !== (_k = null === (_j = null === (_h = spec.content) || void 0 === _h ? void 0 : _h.style) || void 0 === _j ? void 0 : _j.fontSize) && void 0 !== _k ? _k : 12), contentLineHeight = Number(null !== (_o = null === (_m = null === (_l = spec.content) || void 0 === _l ? void 0 : _l.style) || void 0 === _m ? void 0 : _m.lineHeight) && void 0 !== _o ? _o : 17), contentHeight = Math.max(300 - titleLineHeight - 4, contentLineHeight), imageWidth = null !== (_q = null === (_p = spec.image) || void 0 === _p ? void 0 : _p.width) && void 0 !== _q ? _q : 140, imageHeight = null !== (_s = null === (_r = spec.image) || void 0 === _r ? void 0 : _r.height) && void 0 !== _s ? _s : 140, imageBox = {
153
+ x: -imageWidth / 2,
154
+ y: -imageHeight / 2,
155
+ width: imageWidth,
156
+ height: imageHeight
157
+ }, textBox = {
158
+ x: -imageWidth / 2 + 20,
159
+ y: imageBox.y + imageHeight + 10,
160
+ width: imageWidth - 20,
161
+ height: 300
162
+ };
163
+ return {
164
+ titleFontSize: titleFontSize,
165
+ titleLineHeight: titleLineHeight,
166
+ contentFontSize: contentFontSize,
167
+ contentLineHeight: contentLineHeight,
168
+ imageBox: imageBox,
169
+ textBox: textBox,
170
+ contentBox: {
171
+ x: textBox.x,
172
+ y: textBox.y + titleLineHeight + 4,
173
+ width: textBox.width,
174
+ height: contentHeight
175
+ }
176
+ };
177
+ };
178
+
179
+ export const buildBowlBlockMark = (spec, block, index) => {
180
+ var _a, _b, _c, _e;
181
+ const hasImage = !!block.image, contentText = Array.isArray(block.content) ? block.content : block.content ? [ block.content ] : [], themeColor = getThemeColor(spec), metrics = getBowlBlockMetrics(spec);
182
+ return {
183
+ type: "group",
184
+ id: `storyline-block-${null !== (_a = block.id) && void 0 !== _a ? _a : index}`,
185
+ name: `storyline-block-${index}`,
186
+ zIndex: LayoutZIndex.Mark + 1,
187
+ style: {
188
+ x: (_d, ctx) => getBowlBlockCenter(spec, ctx, index).x,
189
+ y: (_d, ctx) => getBowlBlockCenter(spec, ctx, index).y
190
+ },
191
+ children: [ {
192
+ type: "rect",
193
+ name: `storyline-block-connector-${index}`,
194
+ interactive: !1,
195
+ style: {
196
+ x: metrics.imageBox.x,
197
+ y: metrics.imageBox.y + metrics.imageBox.height,
198
+ width: 2,
199
+ height: Math.max(metrics.textBox.y + metrics.textBox.height - (metrics.imageBox.y + metrics.imageBox.height), 0),
200
+ fill: themeColor,
201
+ fillOpacity: .6
202
+ }
203
+ }, hasImage ? Object.assign(Object.assign({
204
+ type: "image",
205
+ name: `storyline-block-image-${index}`,
206
+ interactive: !1
207
+ }, omitImageLayoutSpec(spec.image)), {
208
+ style: Object.assign({
209
+ x: metrics.imageBox.x,
210
+ y: metrics.imageBox.y,
211
+ width: metrics.imageBox.width,
212
+ height: metrics.imageBox.height,
213
+ image: block.image,
214
+ cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2,
215
+ repeatX: "no-repeat",
216
+ repeatY: "no-repeat",
217
+ imageMode: "cover",
218
+ imagePosition: "center",
219
+ stroke: themeColor,
220
+ lineWidth: 2
221
+ }, null === (_b = spec.image) || void 0 === _b ? void 0 : _b.style)
222
+ }) : {
223
+ type: "rect",
224
+ name: `storyline-block-image-bg-${index}`,
225
+ interactive: !1,
226
+ style: {
227
+ x: metrics.imageBox.x,
228
+ y: metrics.imageBox.y,
229
+ width: metrics.imageBox.width,
230
+ height: metrics.imageBox.height,
231
+ cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2,
232
+ fill: "#ffffff",
233
+ stroke: themeColor,
234
+ lineWidth: 2
235
+ }
236
+ }, block.title ? Object.assign(Object.assign({
237
+ type: "text",
238
+ name: `storyline-block-title-${index}`,
239
+ interactive: !1
240
+ }, spec.title), {
241
+ style: Object.assign({
242
+ x: metrics.textBox.x,
243
+ y: metrics.textBox.y,
244
+ text: block.title,
245
+ maxLineWidth: metrics.textBox.width,
246
+ fontSize: metrics.titleFontSize,
247
+ lineHeight: metrics.titleLineHeight,
248
+ fontWeight: "bold",
249
+ fill: "#1f2430",
250
+ textAlign: "left",
251
+ textBaseline: "top"
252
+ }, null === (_c = spec.title) || void 0 === _c ? void 0 : _c.style)
253
+ }) : null, contentText.length ? Object.assign(Object.assign({
254
+ type: "text",
255
+ name: `storyline-block-content-${index}`,
256
+ interactive: !1
257
+ }, spec.content), {
258
+ textType: "rich",
259
+ style: Object.assign({
260
+ x: metrics.contentBox.x,
261
+ y: metrics.contentBox.y,
262
+ width: metrics.contentBox.width,
263
+ height: metrics.contentBox.height,
264
+ maxLineWidth: metrics.contentBox.width,
265
+ heightLimit: metrics.contentBox.height,
266
+ text: buildRichContent(contentText, spec),
267
+ fontSize: 12,
268
+ lineHeight: 17,
269
+ textAlign: "left",
270
+ textBaseline: "top",
271
+ wordBreak: "break-word",
272
+ ellipsis: "...",
273
+ fill: "#596173"
274
+ }, null === (_e = spec.content) || void 0 === _e ? void 0 : _e.style)
275
+ }) : null ].filter(Boolean)
276
+ };
277
+ };
278
+ //# sourceMappingURL=bowl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/charts/storyline/layouts/bow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AAU,EAAE,MAAM,EAClB,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,KAAK,IAChB,MAAA,IAAI,CAAC,KAAK,0CAAE,KAAK,IAEK;gBAC/B,CAAC,CAAC,IAAI;YACR,WAAW,CAAC,MAAM;gBAChB,CAAC,CAAE,8BACC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,2BAA2B,KAAK,EAAE,EACxC,WAAW,EAAE,KAAK,IACf,IAAI,CAAC,OAAO,KACf,QAAQ,EAAE,MAAM,EAChB,KAAK,kBACH,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,EACvB,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,EACvB,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,EAC/B,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,EACjC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,EACtC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,EACtC,IAAI,EAAE,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,EACzC,QAAQ,EAAE,sBAAsB,EAChC,UAAU,EAAE,wBAAwB,EACpC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,KAAK,EACnB,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,KAAK,EACf,IAAI,EAAE,SAAS,IACZ,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,IAEG;gBAC/B,CAAC,CAAC,IAAI;SACT,CAAC,MAAM,CAAC,OAAO,CAA2B;KAC5C,CAAC;AACJ,CAAC,CAAC","file":"bowl.js","sourcesContent":["import type { IExtensionGroupMarkSpec } from '@visactor/vchart';\nimport { LayoutZIndex } from '@visactor/vchart';\nimport type { IStorylineBlock, IStorylineSpec } from '../interface';\nimport {\n type ICustomMarkSpec,\n type LayoutContext,\n type StorylinePoint,\n buildRichContent,\n getRegionGeometry,\n getThemeColor,\n normalizeLayout,\n normalizePadding,\n omitImageLayoutSpec,\n resolveBlockWidth,\n withAlpha\n} from './common';\n\n// bowl 布局:dome 的上下镜像\n// - centerImage 贴顶(dome 是贴底)\n// - 弧线在 centerImage 下方(dome 在上方)\n// - block 沿弧线分布、image + title/content 位于弧线外侧(弧线下方)\n// - title/content 位于 image 下方(dome 是上方)\n// image 默认为圆形,BOWL_BLOCK_IMAGE_SIZE 即圆的直径\nconst BOWL_BLOCK_IMAGE_SIZE = 140;\nconst BOWL_TEXT_GAP_FROM_IMAGE = 10;\nconst BOWL_TITLE_LINE_HEIGHT = 19;\nconst BOWL_CONTENT_LINE_HEIGHT = 17;\nconst BOWL_CONTENT_FONT_SIZE = 12;\n// title + content 区域总高度(默认 300px,溢出由富文本 heightLimit + ellipsis 自动截断)\nconst BOWL_TEXT_BOX_HEIGHT = 300;\nconst BOWL_TITLE_TO_CONTENT_GAP = 4;\n// 引导线与 title/content 之间的水平间距\nconst BOWL_TEXT_LEFT_PADDING = 20;\nconst BOWL_CENTER_IMAGE_WIDTH_RATIO = 0.32;\nconst BOWL_CENTER_IMAGE_HEIGHT_RATIO = 0.32;\n// 弧线最低点(视觉上的底点)距离 centerImage 底部的距离\nconst BOWL_ARC_BOTTOM_GAP_FROM_CENTER_IMAGE = 300;\n\n/**\n * 计算 bowl 布局 centerImage 的 box:水平居中、垂直贴顶(位于 inner 区域顶部)。\n */\nconst getBowlCenterImageRect = (spec: IStorylineSpec, ctx: LayoutContext) => {\n const { width, height, startX, startY } = getRegionGeometry(ctx);\n const padding = normalizePadding(spec.block?.padding);\n const innerWidth = Math.max(width - padding.left - padding.right, 1);\n const innerHeight = Math.max(height - padding.top - padding.bottom, 1);\n const w = Math.max(spec.centerImage?.width ?? innerWidth * BOWL_CENTER_IMAGE_WIDTH_RATIO, 80);\n const h = Math.max(spec.centerImage?.height ?? innerHeight * BOWL_CENTER_IMAGE_HEIGHT_RATIO, 60);\n const cx = startX + padding.left + innerWidth / 2;\n // 紧贴顶部,仅保留 spec.block.padding.top 的留白\n const top = startY + padding.top;\n return { x: cx - w / 2, y: top, width: w, height: h };\n};\n\n/**\n * 计算 bowl 弧线的几何参数:\n * - cx / rx / startAngle / endAngle 与 layout.ts 中 arcCenters 一致;\n * - cy 与 ry 由两条对齐约束反推:\n * 1) 弧线起/终点 y == centerImage 顶部\n * 2) 弧线最低点 y == centerImage 底部 + BOWL_ARC_BOTTOM_GAP_FROM_CENTER_IMAGE\n *\n * bowl 的 startAngle = 20°、endAngle = 160°(弧线在 centerImage 下方)。\n * 解方程:\n * cy + ry * sin(startAngle) = centerImageTop\n * cy + ry = centerImageBottom + GAP\n * → ry = (GAP + centerImageHeight) / (1 - sin(startAngle))\n * cy = centerImageTop - ry * sin(startAngle)\n */\nconst getBowlArcGeometry = (spec: IStorylineSpec, ctx: LayoutContext) => {\n const { width, startX } = getRegionGeometry(ctx);\n const blockPadding = normalizePadding(spec.block?.padding);\n const innerWidth = Math.max(width - blockPadding.left - blockPadding.right, 1);\n const blockWidth = resolveBlockWidth(spec, width);\n const layoutOpt = normalizeLayout(spec.layout);\n // bowl 默认弧线起止角与 layout.ts 中一致\n const startAngle = layoutOpt.startAngle ?? 20;\n const endAngle = layoutOpt.endAngle ?? 160;\n const ratio = layoutOpt.radiusRatio ?? 0.88;\n const rx = Math.max((innerWidth - blockWidth) / 2, 1) * ratio;\n const centerRect = getBowlCenterImageRect(spec, ctx);\n const centerTop = centerRect.y;\n const centerBottom = centerRect.y + centerRect.height;\n const sinStart = Math.sin((startAngle / 180) * Math.PI);\n // sinStart 接近 1 时 ry → ∞;这里限制下界以防 startAngle 配置异常\n const denom = Math.max(1 - sinStart, 0.05);\n const ry = (centerRect.height + BOWL_ARC_BOTTOM_GAP_FROM_CENTER_IMAGE) / denom;\n const cy = centerTop - ry * sinStart;\n return {\n cx: startX + blockPadding.left + innerWidth / 2,\n cy,\n rx,\n ry,\n startAngle,\n endAngle,\n centerTop,\n centerBottom\n };\n};\n\n/**\n * 在 bowl 弧线上按 index 采样 block 中心,与 arc 完全同步。\n * 同时让 block 沿弧线径向向外偏移 imageHeight/2,\n * 使 image 内边贴在弧线上,image + text 整体位于弧线外侧(下方)。\n */\nconst getBowlBlockCenter = (spec: IStorylineSpec, ctx: LayoutContext, index: number): StorylinePoint => {\n const arc = getBowlArcGeometry(spec, ctx);\n const count = spec.data?.length ?? 0;\n if (count <= 0) {\n return { x: arc.cx, y: arc.cy };\n }\n const t = count === 1 ? 0.5 : index / (count - 1);\n const angle = ((arc.startAngle + (arc.endAngle - arc.startAngle) * t) / 180) * Math.PI;\n const px = arc.cx + Math.cos(angle) * arc.rx;\n const py = arc.cy + Math.sin(angle) * arc.ry;\n // 椭圆在 (px,py) 处的外法向量 ∝ (cos(angle)/rx, sin(angle)/ry)\n const nxRaw = Math.cos(angle) / arc.rx;\n const nyRaw = Math.sin(angle) / arc.ry;\n const nLen = Math.hypot(nxRaw, nyRaw) || 1;\n const nx = nxRaw / nLen;\n const ny = nyRaw / nLen;\n const imageHeight = spec.image?.height ?? BOWL_BLOCK_IMAGE_SIZE;\n const offset = imageHeight / 2;\n return { x: px + nx * offset, y: py + ny * offset };\n};\n\n/**\n * 贯穿所有 block 的弧线 mark(path 通过沿椭圆采样实现)\n * 默认不展示,仅当用户在 spec.line.visible 显式置为 true 时才渲染。\n */\nexport const buildBowlArcMark = (spec: IStorylineSpec): IExtensionGroupMarkSpec | null => {\n if (spec.line?.visible !== true) {\n return null;\n }\n const themeColor = getThemeColor(spec);\n return {\n type: 'group' as any,\n name: 'storyline-bowl-arc',\n zIndex: LayoutZIndex.Mark,\n children: [\n {\n type: 'path',\n name: 'storyline-bowl-arc-path',\n interactive: false,\n style: {\n stroke: themeColor,\n lineWidth: 2,\n lineCap: 'round',\n fill: 'transparent',\n fillOpacity: 0,\n path: (_d: unknown, ctx: LayoutContext) => {\n const arc = getBowlArcGeometry(spec, ctx);\n const span = arc.endAngle - arc.startAngle;\n const samples = 64;\n const segments: string[] = [];\n for (let i = 0; i <= samples; i++) {\n const t = i / samples;\n const angle = ((arc.startAngle + span * t) / 180) * Math.PI;\n const x = arc.cx + Math.cos(angle) * arc.rx;\n const y = arc.cy + Math.sin(angle) * arc.ry;\n segments.push(`${i === 0 ? 'M' : 'L'} ${x.toFixed(2)} ${y.toFixed(2)}`);\n }\n return segments.join(' ');\n }\n }\n } as ICustomMarkSpec<'path'>\n ]\n };\n};\n\nexport const buildBowlCenterImageMark = (spec: IStorylineSpec): IExtensionGroupMarkSpec | null => {\n const visible = spec.centerImage?.visible !== false;\n if (!visible) {\n return null;\n }\n const themeColor = getThemeColor(spec);\n const hasImage = !!spec.centerImage?.image;\n // 主题色生成的线性渐变(顶部偏淡 → 底部主题色),作为 centerImage 位置的 symbol 填充\n const symbolGradient = {\n gradient: 'linear',\n x0: 0.5,\n y0: 0,\n x1: 0.5,\n y1: 1,\n stops: [\n { offset: 0, color: withAlpha(themeColor, 0.15) },\n { offset: 1, color: themeColor }\n ]\n };\n return {\n type: 'group' as any,\n name: 'storyline-bowl-center',\n zIndex: LayoutZIndex.Mark,\n children: [\n {\n type: 'symbol',\n name: 'storyline-bowl-center-symbol',\n interactive: false,\n style: {\n x: (_d: unknown, ctx: LayoutContext) => {\n const r = getBowlCenterImageRect(spec, ctx);\n return r.x + r.width / 2;\n },\n y: (_d: unknown, ctx: LayoutContext) => {\n const r = getBowlCenterImageRect(spec, ctx);\n return r.y + r.height / 2;\n },\n size: (_d: unknown, ctx: LayoutContext) => {\n const r = getBowlCenterImageRect(spec, ctx);\n return Math.max(r.width, r.height) * 1.1;\n },\n symbolType: 'circle',\n fill: symbolGradient,\n stroke: themeColor,\n lineWidth: 2\n }\n } as ICustomMarkSpec<'symbol'>,\n {\n type: 'rect',\n name: 'storyline-bowl-center-rect',\n interactive: false,\n style: {\n x: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).x,\n y: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).y,\n width: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).width,\n height: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).height,\n cornerRadius: 12,\n fill: '#ffffff',\n stroke: themeColor,\n lineWidth: 2\n }\n } as ICustomMarkSpec<'rect'>,\n hasImage\n ? ({\n type: 'image',\n name: 'storyline-bowl-center-image',\n interactive: false,\n ...spec.centerImage,\n style: {\n x: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).x,\n y: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).y,\n width: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).width,\n height: (_d: unknown, ctx: LayoutContext) => getBowlCenterImageRect(spec, ctx).height,\n image: spec.centerImage?.image,\n cornerRadius: 12,\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n imageMode: 'cover',\n imagePosition: 'center',\n ...spec.centerImage?.style\n }\n } as ICustomMarkSpec<'image'>)\n : null\n ].filter(Boolean) as ICustomMarkSpec<any>[]\n };\n};\n\nconst getBowlBlockMetrics = (spec: IStorylineSpec) => {\n const titleFontSize = Number((spec.title?.style as any)?.fontSize ?? 14);\n const titleLineHeight = Number(\n (spec.title?.style as any)?.lineHeight ?? Math.max(BOWL_TITLE_LINE_HEIGHT, Math.round(titleFontSize * 1.35))\n );\n const contentFontSize = Number((spec.content?.style as any)?.fontSize ?? BOWL_CONTENT_FONT_SIZE);\n const contentLineHeight = Number((spec.content?.style as any)?.lineHeight ?? BOWL_CONTENT_LINE_HEIGHT);\n const titleToContentGap = BOWL_TITLE_TO_CONTENT_GAP;\n const textHeight = BOWL_TEXT_BOX_HEIGHT;\n const contentHeight = Math.max(textHeight - titleLineHeight - titleToContentGap, contentLineHeight);\n\n const imageWidth = spec.image?.width ?? BOWL_BLOCK_IMAGE_SIZE;\n const imageHeight = spec.image?.height ?? BOWL_BLOCK_IMAGE_SIZE;\n\n // image 位于 block 中心,title/content 在 image 下方(与 dome 上下对称)\n const imageBox = {\n x: -imageWidth / 2,\n y: -imageHeight / 2,\n width: imageWidth,\n height: imageHeight\n };\n const textBox = {\n x: -imageWidth / 2 + BOWL_TEXT_LEFT_PADDING,\n y: imageBox.y + imageHeight + BOWL_TEXT_GAP_FROM_IMAGE,\n width: imageWidth - BOWL_TEXT_LEFT_PADDING,\n height: textHeight\n };\n const contentBox = {\n x: textBox.x,\n y: textBox.y + titleLineHeight + titleToContentGap,\n width: textBox.width,\n height: contentHeight\n };\n return {\n titleFontSize,\n titleLineHeight,\n contentFontSize,\n contentLineHeight,\n imageBox,\n textBox,\n contentBox\n };\n};\n\nexport const buildBowlBlockMark = (\n spec: IStorylineSpec,\n block: IStorylineBlock,\n index: number\n): IExtensionGroupMarkSpec => {\n const hasImage = !!block.image;\n const contentText = Array.isArray(block.content) ? block.content : block.content ? [block.content] : [];\n const themeColor = getThemeColor(spec);\n const metrics = getBowlBlockMetrics(spec);\n\n return {\n type: 'group' as any,\n id: `storyline-block-${block.id ?? index}`,\n name: `storyline-block-${index}`,\n zIndex: LayoutZIndex.Mark + 1,\n style: {\n x: (_d: unknown, ctx: LayoutContext) => getBowlBlockCenter(spec, ctx, index).x,\n y: (_d: unknown, ctx: LayoutContext) => getBowlBlockCenter(spec, ctx, index).y\n },\n children: [\n // title / content 左侧的垂直引导线(贯穿 image 底部 → text 底部,与文字保持 padding)\n {\n type: 'rect',\n name: `storyline-block-connector-${index}`,\n interactive: false,\n style: {\n x: metrics.imageBox.x,\n y: metrics.imageBox.y + metrics.imageBox.height,\n width: 2,\n height: Math.max(\n metrics.textBox.y + metrics.textBox.height - (metrics.imageBox.y + metrics.imageBox.height),\n 0\n ),\n fill: themeColor,\n fillOpacity: 0.6\n }\n } as ICustomMarkSpec<'rect'>,\n hasImage\n ? ({\n type: 'image',\n name: `storyline-block-image-${index}`,\n interactive: false,\n ...omitImageLayoutSpec(spec.image),\n style: {\n x: metrics.imageBox.x,\n y: metrics.imageBox.y,\n width: metrics.imageBox.width,\n height: metrics.imageBox.height,\n image: block.image,\n // 圆形裁剪:cornerRadius = min(w,h) / 2\n cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2,\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n imageMode: 'cover',\n imagePosition: 'center',\n stroke: themeColor,\n lineWidth: 2,\n ...spec.image?.style\n }\n } as ICustomMarkSpec<'image'>)\n : ({\n type: 'rect',\n name: `storyline-block-image-bg-${index}`,\n interactive: false,\n style: {\n x: metrics.imageBox.x,\n y: metrics.imageBox.y,\n width: metrics.imageBox.width,\n height: metrics.imageBox.height,\n cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2,\n fill: '#ffffff',\n stroke: themeColor,\n lineWidth: 2\n }\n } as ICustomMarkSpec<'rect'>),\n block.title\n ? ({\n type: 'text',\n name: `storyline-block-title-${index}`,\n interactive: false,\n ...spec.title,\n style: {\n x: metrics.textBox.x,\n y: metrics.textBox.y,\n text: block.title,\n maxLineWidth: metrics.textBox.width,\n fontSize: metrics.titleFontSize,\n lineHeight: metrics.titleLineHeight,\n fontWeight: 'bold',\n fill: '#1f2430',\n textAlign: 'left',\n textBaseline: 'top',\n ...spec.title?.style\n }\n } as ICustomMarkSpec<'text'>)\n : null,\n contentText.length\n ? ({\n type: 'text',\n name: `storyline-block-content-${index}`,\n interactive: false,\n ...spec.content,\n textType: 'rich',\n style: {\n x: metrics.contentBox.x,\n y: metrics.contentBox.y,\n width: metrics.contentBox.width,\n height: metrics.contentBox.height,\n maxLineWidth: metrics.contentBox.width,\n heightLimit: metrics.contentBox.height,\n text: buildRichContent(contentText, spec),\n fontSize: BOWL_CONTENT_FONT_SIZE,\n lineHeight: BOWL_CONTENT_LINE_HEIGHT,\n textAlign: 'left',\n textBaseline: 'top',\n wordBreak: 'break-word',\n ellipsis: '...',\n fill: '#596173',\n ...spec.content?.style\n }\n } as ICustomMarkSpec<'text'>)\n : null\n ].filter(Boolean) as ICustomMarkSpec<any>[]\n };\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import type { IExtensionGroupMarkSpec } from '@visactor/vchart';
2
+ import type { IStorylineBlock, IStorylineSpec } from '../interface';
3
+ export declare const buildClockCenterImageMark: (spec: IStorylineSpec) => IExtensionGroupMarkSpec | null;
4
+ export declare const buildClockArcMark: (spec: IStorylineSpec) => IExtensionGroupMarkSpec | null;
5
+ export declare const buildClockBlockMark: (spec: IStorylineSpec, block: IStorylineBlock, index: number) => IExtensionGroupMarkSpec;