@univerjs-pro/engine-chart 1.0.0-alpha.7 → 1.0.0-beta.0

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 (347) hide show
  1. package/README.md +16 -3
  2. package/lib/cjs/facade.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/ar-SA.js +1 -0
  5. package/lib/cjs/locale/ca-ES.js +1 -0
  6. package/lib/cjs/locale/de-DE.js +1 -0
  7. package/lib/cjs/locale/en-US.js +1 -0
  8. package/lib/cjs/locale/es-ES.js +1 -0
  9. package/lib/cjs/locale/fa-IR.js +1 -0
  10. package/lib/cjs/locale/fr-FR.js +1 -0
  11. package/lib/cjs/locale/id-ID.js +1 -0
  12. package/lib/cjs/locale/it-IT.js +1 -0
  13. package/lib/cjs/locale/ja-JP.js +1 -0
  14. package/lib/cjs/locale/ko-KR.js +1 -0
  15. package/lib/cjs/locale/pl-PL.js +1 -0
  16. package/lib/cjs/locale/pt-BR.js +1 -0
  17. package/lib/cjs/locale/ru-RU.js +1 -0
  18. package/lib/cjs/locale/sk-SK.js +1 -0
  19. package/lib/cjs/locale/vi-VN.js +1 -0
  20. package/lib/cjs/locale/zh-CN.js +1 -0
  21. package/lib/cjs/locale/zh-HK.js +1 -0
  22. package/lib/cjs/locale/zh-TW.js +1 -0
  23. package/lib/es/facade.js +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/locale/ar-SA.js +1 -0
  26. package/lib/es/locale/ca-ES.js +1 -0
  27. package/lib/es/locale/de-DE.js +1 -0
  28. package/lib/es/locale/en-US.js +1 -0
  29. package/lib/es/locale/es-ES.js +1 -0
  30. package/lib/es/locale/fa-IR.js +1 -0
  31. package/lib/es/locale/fr-FR.js +1 -0
  32. package/lib/es/locale/id-ID.js +1 -0
  33. package/lib/es/locale/it-IT.js +1 -0
  34. package/lib/es/locale/ja-JP.js +1 -0
  35. package/lib/es/locale/ko-KR.js +1 -0
  36. package/lib/es/locale/pl-PL.js +1 -0
  37. package/lib/es/locale/pt-BR.js +1 -0
  38. package/lib/es/locale/ru-RU.js +1 -0
  39. package/lib/es/locale/sk-SK.js +1 -0
  40. package/lib/es/locale/vi-VN.js +1 -0
  41. package/lib/es/locale/zh-CN.js +1 -0
  42. package/lib/es/locale/zh-HK.js +1 -0
  43. package/lib/es/locale/zh-TW.js +1 -0
  44. package/lib/facade.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -0
  47. package/lib/locale/ca-ES.js +1 -0
  48. package/lib/locale/de-DE.js +1 -0
  49. package/lib/locale/en-US.js +1 -0
  50. package/lib/locale/es-ES.js +1 -0
  51. package/lib/locale/fa-IR.js +1 -0
  52. package/lib/locale/fr-FR.js +1 -0
  53. package/lib/locale/id-ID.js +1 -0
  54. package/lib/locale/it-IT.js +1 -0
  55. package/lib/locale/ja-JP.js +1 -0
  56. package/lib/locale/ko-KR.js +1 -0
  57. package/lib/locale/pl-PL.js +1 -0
  58. package/lib/locale/pt-BR.js +1 -0
  59. package/lib/locale/ru-RU.js +1 -0
  60. package/lib/locale/sk-SK.js +1 -0
  61. package/lib/locale/vi-VN.js +1 -0
  62. package/lib/locale/zh-CN.js +1 -0
  63. package/lib/locale/zh-HK.js +1 -0
  64. package/lib/locale/zh-TW.js +1 -0
  65. package/lib/types/chart-builder/chart-builder-adapter.d.ts +3 -3
  66. package/lib/types/chart-builder/chart-builder.d.ts +4 -3
  67. package/lib/types/chart-builder/chart-starter-data.d.ts +4 -0
  68. package/lib/types/chart-builder/chart-types.d.ts +180 -67
  69. package/lib/types/chart-builder/configuration/assertions.d.ts +3 -0
  70. package/lib/types/chart-builder/configuration/candlestick.d.ts +9 -0
  71. package/lib/types/chart-builder/configuration/cartesian-series.d.ts +2 -1
  72. package/lib/types/chart-builder/configuration/chart-config-operation.d.ts +9 -1
  73. package/lib/types/chart-builder/configuration/chord.d.ts +12 -0
  74. package/lib/types/chart-builder/configuration/gauge.d.ts +31 -0
  75. package/lib/types/chart-builder/configuration/histogram.d.ts +11 -0
  76. package/lib/types/chart-builder/configuration/pie.d.ts +5 -6
  77. package/lib/types/chart-builder/configuration/point-mapping.d.ts +3 -0
  78. package/lib/types/chart-builder/configuration/sunburst.d.ts +7 -0
  79. package/lib/types/chart-builder/configuration/treemap.d.ts +8 -0
  80. package/lib/types/chart-builder/configuration/waterfall.d.ts +3 -1
  81. package/lib/types/chart-builder/conversion/chart-config-converter.d.ts +9 -3
  82. package/lib/types/chart-builder/conversion/chart-context-patch.d.ts +5 -0
  83. package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +13 -6
  84. package/lib/types/chart-builder/conversion/chart-type-converter.d.ts +3 -1
  85. package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +1546 -7
  86. package/lib/types/chart-builder/conversion/resolve-chart-model-data.d.ts +4 -4
  87. package/lib/types/chart-builder/detached-chart-builder-adapter.d.ts +10 -1
  88. package/lib/types/chart-builder/internal/chart-patch-replace-policy.d.ts +6 -0
  89. package/lib/types/chart-builder/internal/host-builder-runtime.d.ts +0 -2
  90. package/lib/types/chart-data-aggregation.d.ts +10 -0
  91. package/lib/types/chart-text-measure-canvas.d.ts +6 -0
  92. package/lib/types/config/config.d.ts +7 -0
  93. package/lib/types/enum.d.ts +78 -2
  94. package/lib/types/facade/builders/f-candlestick-chart-builder.d.ts +133 -0
  95. package/lib/types/facade/builders/f-chord-chart-builder.d.ts +30 -0
  96. package/lib/types/facade/builders/f-gauge-chart-builder.d.ts +52 -0
  97. package/lib/types/facade/builders/f-histogram-chart-builder.d.ts +74 -0
  98. package/lib/types/facade/builders/f-pie-chart-builder.d.ts +4 -61
  99. package/lib/types/facade/builders/f-sunburst-chart-builder.d.ts +24 -0
  100. package/lib/types/facade/builders/f-treemap-chart-builder.d.ts +34 -0
  101. package/lib/types/facade/chart-builder-type-map.d.ts +26 -1
  102. package/lib/types/facade/f-cartesian-chart-builder.d.ts +3 -3
  103. package/lib/types/facade/f-chart-base.d.ts +2 -2
  104. package/lib/types/facade/f-chart-builder-base.d.ts +4 -1
  105. package/lib/types/facade/f-enum.d.ts +3 -1
  106. package/lib/types/facade/index.d.ts +20 -1
  107. package/lib/types/index.d.ts +122 -39
  108. package/lib/types/locale/ar-SA.d.ts +3 -0
  109. package/lib/types/locale/ca-ES.d.ts +3 -0
  110. package/lib/types/locale/de-DE.d.ts +3 -0
  111. package/lib/types/locale/en-US.d.ts +46 -0
  112. package/lib/types/locale/es-ES.d.ts +3 -0
  113. package/lib/types/locale/fa-IR.d.ts +3 -0
  114. package/lib/types/locale/fr-FR.d.ts +3 -0
  115. package/lib/types/locale/id-ID.d.ts +3 -0
  116. package/lib/types/locale/it-IT.d.ts +3 -0
  117. package/lib/types/locale/ja-JP.d.ts +3 -0
  118. package/lib/types/locale/ko-KR.d.ts +3 -0
  119. package/lib/types/locale/pl-PL.d.ts +3 -0
  120. package/lib/types/locale/pt-BR.d.ts +3 -0
  121. package/lib/types/locale/ru-RU.d.ts +3 -0
  122. package/lib/types/locale/sk-SK.d.ts +3 -0
  123. package/lib/types/locale/types.d.ts +3 -0
  124. package/lib/types/locale/vi-VN.d.ts +3 -0
  125. package/lib/types/locale/zh-CN.d.ts +3 -0
  126. package/lib/types/locale/zh-HK.d.ts +3 -0
  127. package/lib/types/locale/zh-TW.d.ts +3 -0
  128. package/lib/types/models/{chart-semantic-axes.d.ts → chart-context/axes/chart-semantic-axes.d.ts} +2 -2
  129. package/lib/types/models/chart-context/chart-field-selection.d.ts +21 -0
  130. package/lib/types/models/chart-context/resolve-chart-context.d.ts +2 -0
  131. package/lib/types/models/chart-data/build-chart-data.d.ts +5 -0
  132. package/lib/types/models/chart-data/builders/boxplot-chart-data.d.ts +4 -0
  133. package/lib/types/models/chart-data/builders/candlestick-chart-data.d.ts +4 -0
  134. package/lib/types/models/chart-data/builders/cartesian-point-chart-data.d.ts +5 -0
  135. package/lib/types/models/chart-data/builders/category-series-chart-data.d.ts +5 -0
  136. package/lib/types/models/chart-data/builders/chord-chart-data.d.ts +4 -0
  137. package/lib/types/models/chart-data/builders/gauge-chart-data.d.ts +4 -0
  138. package/lib/types/models/chart-data/builders/heatmap-chart-data.d.ts +3 -0
  139. package/lib/types/models/chart-data/builders/hierarchy-chart-data.d.ts +5 -0
  140. package/lib/types/models/chart-data/builders/histogram-chart-data.d.ts +4 -0
  141. package/lib/types/models/chart-data/builders/relation-chart-data.d.ts +3 -0
  142. package/lib/types/models/chart-data/builders/sankey-chart-data.d.ts +3 -0
  143. package/lib/types/models/chart-data/chart-field-consumption-validator.d.ts +15 -0
  144. package/lib/types/models/chart-data/chart-field-consumption.d.ts +4 -0
  145. package/lib/types/models/chart-data/chart-field-requirements.d.ts +7 -0
  146. package/lib/types/models/chart-data/get-chart-data-builder.d.ts +7 -0
  147. package/lib/types/models/chart-data/internal/aggregate-number-format.d.ts +8 -0
  148. package/lib/types/models/{chart-data-operators → chart-data/internal}/cartesian-point-data.d.ts +3 -8
  149. package/lib/types/models/chart-data/internal/category-data.d.ts +3 -0
  150. package/lib/types/models/chart-data/internal/category-series-aggregation.d.ts +10 -0
  151. package/lib/types/models/chart-data/internal/chart-data-result.d.ts +5 -0
  152. package/lib/types/models/chart-data/internal/chart-hierarchy-data.d.ts +1 -0
  153. package/lib/types/models/chart-data/internal/chord-data.d.ts +7 -0
  154. package/lib/types/models/chart-data/internal/data-set-accessors.d.ts +7 -0
  155. package/lib/types/models/chart-data/internal/gauge-data.d.ts +5 -0
  156. package/lib/types/models/chart-data/internal/histogram-bins.d.ts +10 -0
  157. package/lib/types/models/chart-data/internal/relation-data-shape.d.ts +2 -0
  158. package/lib/types/models/chart-data/internal/source-cell-label.d.ts +3 -0
  159. package/lib/types/models/chart-data/internal/sunburst-data.d.ts +4 -0
  160. package/lib/types/models/chart-data/internal/treemap-data.d.ts +4 -0
  161. package/lib/types/models/chart-data/pie-composite/pie-composite-projection.d.ts +36 -0
  162. package/lib/types/models/chart-data/pie-composite/pie-composite-render-metadata.d.ts +15 -0
  163. package/lib/types/models/chart-data/pie-composite/pie-composite-spec.d.ts +38 -0
  164. package/lib/types/models/{chart-host-style.d.ts → chart-host/chart-host-style.d.ts} +1 -1
  165. package/lib/types/models/{image-chart-host.d.ts → chart-host/image-chart-host.d.ts} +14 -2
  166. package/lib/types/models/{offscreen-chart-host.d.ts → chart-host/offscreen-chart-host.d.ts} +1 -1
  167. package/lib/types/models/{chart-resource-serializer.d.ts → chart-host/resource/chart-resource-serializer.d.ts} +1 -1
  168. package/lib/types/models/chart-host/resource/inline-chart-table.d.ts +4 -0
  169. package/lib/types/models/chart-host/resource/static-chart-resource-repository.d.ts +75 -0
  170. package/lib/types/models/chart-host/static/static-chart-model-store.d.ts +43 -0
  171. package/lib/types/models/chart-host/static/static-chart-runtime.d.ts +26 -0
  172. package/lib/types/models/{chart-model.d.ts → chart-model/chart-model.d.ts} +1660 -625
  173. package/lib/types/models/{echart-to-chart-model-init.d.ts → chart-model/echart-to-chart-model-init.d.ts} +2 -2
  174. package/lib/types/models/{data-context-transformers/bar-data-context-transformer.d.ts → chart-model/type-transition/bar-type-transition.d.ts} +1 -1
  175. package/lib/types/models/{data-context-transformers/line-like-context-transformer.d.ts → chart-model/type-transition/line-like-type-transition.d.ts} +1 -1
  176. package/lib/types/models/{data-context-transformers/percent-data-context-transformer.d.ts → chart-model/type-transition/percent-type-transition.d.ts} +1 -1
  177. package/lib/types/models/{chart-element-axis-id.d.ts → chart-render/axes/chart-element-axis-id.d.ts} +1 -1
  178. package/lib/types/models/{chart-runtime-axes.d.ts → chart-render/axes/chart-runtime-axes.d.ts} +3 -3
  179. package/lib/types/models/{chart-render-input-resolver.d.ts → chart-render/chart-render-input-resolver.d.ts} +2 -2
  180. package/lib/types/models/{chart-render-model-manager.service.d.ts → chart-render/chart-render-model-manager.service.d.ts} +2 -3
  181. package/lib/types/models/{mode-converter → chart-render/converter}/converters/boxplot-chart-converter.d.ts +1 -1
  182. package/lib/types/models/{mode-converter → chart-render/converter}/converters/bubble-chart-converter.d.ts +1 -1
  183. package/lib/types/models/chart-render/converter/converters/candlestick-chart-converter.d.ts +4 -0
  184. package/lib/types/models/chart-render/converter/converters/chord-chart-converter.d.ts +10 -0
  185. package/lib/types/models/{mode-converter → chart-render/converter}/converters/combination-chart-converter.d.ts +1 -1
  186. package/lib/types/models/{mode-converter → chart-render/converter}/converters/funnel-chart-converter.d.ts +1 -1
  187. package/lib/types/models/chart-render/converter/converters/gauge-chart-converter.d.ts +18 -0
  188. package/lib/types/models/{mode-converter → chart-render/converter}/converters/heatmap-chart-convert.d.ts +1 -1
  189. package/lib/types/models/chart-render/converter/converters/histogram-chart-converter.d.ts +3 -0
  190. package/lib/types/models/{mode-converter → chart-render/converter}/converters/pareto-chart-converter.d.ts +1 -1
  191. package/lib/types/models/{mode-converter → chart-render/converter}/converters/pie-chart-converter.d.ts +1 -1
  192. package/lib/types/models/{mode-converter → chart-render/converter}/converters/radar-chart-converter.d.ts +1 -1
  193. package/lib/types/models/{mode-converter → chart-render/converter}/converters/relation-chart-converter.d.ts +1 -1
  194. package/lib/types/models/{mode-converter → chart-render/converter}/converters/sankey-chart-converter.d.ts +1 -1
  195. package/lib/types/models/{mode-converter → chart-render/converter}/converters/scatter-chart-converter.d.ts +1 -1
  196. package/lib/types/models/chart-render/converter/converters/sunburst-chart-converter.d.ts +3 -0
  197. package/lib/types/models/{mode-converter → chart-render/converter}/converters/tools.d.ts +1 -1
  198. package/lib/types/models/chart-render/converter/converters/treemap-chart-converter.d.ts +3 -0
  199. package/lib/types/models/{mode-converter → chart-render/converter}/converters/waterfall-chart-converter.d.ts +1 -1
  200. package/lib/types/models/{mode-converter → chart-render/converter}/converters/waterfall-layout.d.ts +2 -2
  201. package/lib/types/models/{mode-converter → chart-render/converter}/converters/word-cloud-converter.d.ts +1 -1
  202. package/lib/types/models/{mode-converter → chart-render/converter}/mode-converter.d.ts +3 -5
  203. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/auto-gradient-presets.d.ts +1 -1
  204. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/axis-title.operator.d.ts +1 -1
  205. package/lib/types/models/chart-render/converter/render-spec-operators/bar-layout.operator.d.ts +3 -0
  206. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/bubble-style.operator.d.ts +1 -1
  207. package/lib/types/models/{mode-converter/render-spec-operators/trend-line/trend-line.operator.d.ts → chart-render/converter/render-spec-operators/chart-axes.operator.d.ts} +1 -1
  208. package/lib/types/models/{mode-converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts → chart-render/converter/render-spec-operators/chart-box-style.operator.d.ts} +1 -1
  209. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/chart-color.d.ts +1 -1
  210. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/empty-style-operator.d.ts +1 -1
  211. package/lib/types/models/chart-render/converter/render-spec-operators/font-size.operator.d.ts +2 -0
  212. package/lib/types/models/chart-render/converter/render-spec-operators/grid-operator.d.ts +12 -0
  213. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/heatmap-chart-operator.d.ts +1 -1
  214. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/hover-mark-style.operator.d.ts +1 -1
  215. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/implicit-category-axis.operator.d.ts +1 -1
  216. package/lib/types/models/{mode-converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts → chart-render/converter/render-spec-operators/invalid-value-style.operator.d.ts} +1 -1
  217. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/legend-size.d.ts +1 -1
  218. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/legend-style.operator.d.ts +1 -1
  219. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/line-like-style.operator.d.ts +1 -1
  220. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/mark-line.operator.d.ts +1 -1
  221. package/lib/types/models/chart-render/converter/render-spec-operators/pie-composite-layout.operator.d.ts +2 -0
  222. package/lib/types/models/chart-render/converter/render-spec-operators/pie-style.operator.d.ts +2 -0
  223. package/lib/types/models/chart-render/converter/render-spec-operators/plot-area.d.ts +10 -0
  224. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/radar-style.operator.d.ts +1 -1
  225. package/lib/types/models/chart-render/converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts +2 -0
  226. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/rich-text-inheritance.operator.d.ts +1 -1
  227. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/rtl-render-spec.operator.d.ts +1 -1
  228. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/sankey-chart-operator.d.ts +1 -1
  229. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/scatter-style.operator.d.ts +1 -1
  230. package/lib/types/models/chart-render/converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts +2 -0
  231. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/series-style-operator.d.ts +2 -2
  232. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/waterfall-series-style-operator.d.ts +1 -1
  233. package/lib/types/models/chart-render/converter/render-spec-operators/stack.operator.d.ts +2 -0
  234. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/theme.operator.d.ts +1 -1
  235. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/title-style.operator.d.ts +1 -1
  236. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/tool-tip-operator.d.ts +8 -3
  237. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/tool-tip-renderer.d.ts +1 -1
  238. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/tools.d.ts +1 -2
  239. package/lib/types/models/chart-render/converter/render-spec-operators/trend-line/trend-line.operator.d.ts +2 -0
  240. package/lib/types/models/chart-render/converter/render-spec-operators/visual-map-operator.d.ts +2 -0
  241. package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/watermark.operator.d.ts +1 -1
  242. package/lib/types/models/{echart-render-model.d.ts → chart-render/echart-render-model.d.ts} +10 -4
  243. package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/chart-element-edit-overlay.d.ts +2 -2
  244. package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/resolve-chart-element-hit-layout.d.ts +2 -2
  245. package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/types.d.ts +1 -1
  246. package/lib/types/models/chart-render/format/chart-value-format.d.ts +16 -0
  247. package/lib/types/models/{chart-runtime-style.d.ts → chart-render/style/chart-runtime-style.d.ts} +3 -2
  248. package/lib/types/models/common/chart-field-diagnostic.d.ts +14 -0
  249. package/lib/types/models/common/chart-field-role.d.ts +53 -0
  250. package/lib/types/models/common/chart-locale-texts.d.ts +44 -0
  251. package/lib/types/models/common/constants/chord.d.ts +5 -0
  252. package/lib/types/models/common/constants/default-chart-style.d.ts +920 -0
  253. package/lib/types/models/{constants → common/constants}/default.d.ts +1 -1
  254. package/lib/types/models/common/constants/hierarchy.d.ts +5 -0
  255. package/lib/types/models/common/constants/histogram-defaults.d.ts +8 -0
  256. package/lib/types/models/common/constants/treemap.d.ts +1 -0
  257. package/lib/types/models/common/theme/build-in-theme/theme-util.d.ts +4 -0
  258. package/lib/types/models/{chart-theme.service.d.ts → common/theme/chart-theme.service.d.ts} +1 -3
  259. package/lib/types/plugin.d.ts +15 -0
  260. package/lib/types/types.d.ts +426 -31
  261. package/lib/types/util.d.ts +1 -7
  262. package/lib/types/utils/echarts.d.ts +0 -1
  263. package/lib/types/word-cloud-resource/word-cloud-resource-config.d.ts +5 -0
  264. package/lib/types/wordcloud-chart/adapters/echarts/chart-view.d.ts +0 -2
  265. package/lib/types/wordcloud-chart/adapters/echarts/echarts-options.d.ts +1 -1
  266. package/lib/types/wordcloud-chart/adapters/echarts/layout-register.d.ts +0 -2
  267. package/lib/types/wordcloud-chart/adapters/echarts/series-model.d.ts +0 -2
  268. package/lib/types/wordcloud-chart/adapters/echarts/text-measurer.d.ts +1 -1
  269. package/lib/types/wordcloud-chart/canvas.d.ts +3 -3
  270. package/lib/types/wordcloud-chart/core/collision/box-shape-engine.d.ts +1 -1
  271. package/lib/types/wordcloud-chart/core/layout/word-shrink.d.ts +5 -8
  272. package/lib/types/wordcloud-chart/core/text/formatter.d.ts +2 -2
  273. package/lib/types/wordcloud-chart/core/text/normalize.d.ts +2 -2
  274. package/lib/types/wordcloud-chart/defaults.d.ts +2 -2
  275. package/lib/types/wordcloud-chart/types.d.ts +0 -3
  276. package/lib/types/wordcloud-chart/word-cloud-render-config.d.ts +1 -0
  277. package/lib/umd/facade.js +1 -1
  278. package/lib/umd/index.js +1 -1
  279. package/lib/umd/locale/ar-SA.js +1 -0
  280. package/lib/umd/locale/ca-ES.js +1 -0
  281. package/lib/umd/locale/de-DE.js +1 -0
  282. package/lib/umd/locale/en-US.js +1 -0
  283. package/lib/umd/locale/es-ES.js +1 -0
  284. package/lib/umd/locale/fa-IR.js +1 -0
  285. package/lib/umd/locale/fr-FR.js +1 -0
  286. package/lib/umd/locale/id-ID.js +1 -0
  287. package/lib/umd/locale/it-IT.js +1 -0
  288. package/lib/umd/locale/ja-JP.js +1 -0
  289. package/lib/umd/locale/ko-KR.js +1 -0
  290. package/lib/umd/locale/pl-PL.js +1 -0
  291. package/lib/umd/locale/pt-BR.js +1 -0
  292. package/lib/umd/locale/ru-RU.js +1 -0
  293. package/lib/umd/locale/sk-SK.js +1 -0
  294. package/lib/umd/locale/vi-VN.js +1 -0
  295. package/lib/umd/locale/zh-CN.js +1 -0
  296. package/lib/umd/locale/zh-HK.js +1 -0
  297. package/lib/umd/locale/zh-TW.js +1 -0
  298. package/package.json +10 -4
  299. package/lib/types/chart-builder/configuration/index.d.ts +0 -30
  300. package/lib/types/chart-builder/index.d.ts +0 -14
  301. package/lib/types/facade/builders/index.d.ts +0 -14
  302. package/lib/types/models/chart-data-operators/build-chart-data.d.ts +0 -9
  303. package/lib/types/models/chart-data-operators/index.d.ts +0 -2
  304. package/lib/types/models/chart-data-operators/operators.d.ts +0 -20
  305. package/lib/types/models/chart-element-edit-overlay/index.d.ts +0 -4
  306. package/lib/types/models/chart-locale-texts.d.ts +0 -22
  307. package/lib/types/models/constants/build-in-theme/index.d.ts +0 -15
  308. package/lib/types/models/constants/build-in-theme/theme-util.d.ts +0 -5
  309. package/lib/types/models/constants/default-chart-style.d.ts +0 -138
  310. package/lib/types/models/data-context-transformers/box-plot-data-context-transformer.d.ts +0 -3
  311. package/lib/types/models/data-context-transformers/pareto-data-context-transformer.d.ts +0 -3
  312. package/lib/types/models/data-context-transformers/pie-data-context-transformer.d.ts +0 -3
  313. package/lib/types/models/data-context-transformers/word-cloud-data-context-transform.d.ts +0 -3
  314. package/lib/types/models/mode-converter/render-spec-operators/chart-axes.operator.d.ts +0 -2
  315. package/lib/types/models/mode-converter/render-spec-operators/chart-box-style.operator.d.ts +0 -2
  316. package/lib/types/models/mode-converter/render-spec-operators/font-size.operator.d.ts +0 -2
  317. package/lib/types/models/mode-converter/render-spec-operators/grid-operator.d.ts +0 -2
  318. package/lib/types/models/mode-converter/render-spec-operators/index.d.ts +0 -15
  319. package/lib/types/models/mode-converter/render-spec-operators/invalid-value-style.operator.d.ts +0 -2
  320. package/lib/types/models/mode-converter/render-spec-operators/pie-style.operator.d.ts +0 -2
  321. package/lib/types/models/mode-converter/render-spec-operators/stack.operator.d.ts +0 -2
  322. package/lib/types/models/mode-converter/render-spec-operators/visual-map-operator.d.ts +0 -2
  323. package/lib/types/models/spec-converter/spec-converter.d.ts +0 -1
  324. package/lib/types/models/word-cloud-musk-image.service.d.ts +0 -17
  325. package/lib/types/wordcloud-chart/index.d.ts +0 -12
  326. /package/lib/types/models/{mode-converter → chart-render/converter}/converters/constants.d.ts +0 -0
  327. /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/operator-types.d.ts +0 -0
  328. /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/relation-chart-operator/relation-force-directed-layout.d.ts +0 -0
  329. /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/series-chart-style.handler.d.ts +0 -0
  330. /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/series-data-label.handler.d.ts +0 -0
  331. /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/trend-line/trendline-util.d.ts +0 -0
  332. /package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/palette.d.ts +0 -0
  333. /package/lib/types/models/{series-style → chart-render/style/series-style}/series-style-resolver.d.ts +0 -0
  334. /package/lib/types/models/{constants → common/theme}/build-in-theme/default.d.ts +0 -0
  335. /package/lib/types/models/{constants → common/theme}/build-in-theme/types.d.ts +0 -0
  336. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient1.d.ts +0 -0
  337. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient2.d.ts +0 -0
  338. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient3.d.ts +0 -0
  339. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient4.d.ts +0 -0
  340. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient5.d.ts +0 -0
  341. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient6.d.ts +0 -0
  342. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer1.d.ts +0 -0
  343. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer2.d.ts +0 -0
  344. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer3.d.ts +0 -0
  345. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer4.d.ts +0 -0
  346. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer5.d.ts +0 -0
  347. /package/lib/types/models/{constants → common/theme}/build-in-theme/univer6.d.ts +0 -0
@@ -0,0 +1,15 @@
1
+ import type { IUniverDataSet } from '../../types';
2
+ import type { IChartFieldDiagnostic } from '../common/chart-field-diagnostic';
3
+ import type { IChartFieldConsumption } from './chart-field-consumption';
4
+ import type { ChartTypeBits } from '../../enum';
5
+ export type ChartFieldValidationResult = {
6
+ valid: true;
7
+ } | {
8
+ valid: false;
9
+ diagnostic: IChartFieldDiagnostic;
10
+ };
11
+ export declare function validateChartFieldConsumption(input: {
12
+ chartType: ChartTypeBits;
13
+ consumption: IChartFieldConsumption;
14
+ dataSet: IUniverDataSet;
15
+ }): ChartFieldValidationResult;
@@ -0,0 +1,4 @@
1
+ export interface IChartFieldConsumption {
2
+ categoryIndexes: readonly number[];
3
+ seriesIndexes: readonly number[];
4
+ }
@@ -0,0 +1,7 @@
1
+ import type { IUniverDataSet } from '../../types';
2
+ import { ChartTypeBits } from '../../enum';
3
+ export interface IChartRequiredFieldCounts {
4
+ categoryRequiredCount: number;
5
+ seriesRequiredCount: number;
6
+ }
7
+ export declare function getChartRequiredFieldCounts(chartType: ChartTypeBits, dataSet: IUniverDataSet): IChartRequiredFieldCounts | undefined;
@@ -0,0 +1,7 @@
1
+ import type { IChartDataAggregation } from '../../chart-data-aggregation';
2
+ import type { IChartContext, IChartData, IUniverDataSet } from '../../types';
3
+ import type { IChartLocaleTexts } from '../common/chart-locale-texts';
4
+ import type { IChartFieldConsumption } from './chart-field-consumption';
5
+ import { ChartTypeBits } from '../../enum';
6
+ export type ChartDataBuilder = (dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, chartContext: IChartContext, localeTexts: IChartLocaleTexts, dataAggregation?: IChartDataAggregation) => IChartData;
7
+ export declare function getChartDataBuilder(chartType: ChartTypeBits): ChartDataBuilder;
@@ -0,0 +1,8 @@
1
+ import type { IUniverDataSet } from '../../../types';
2
+ /**
3
+ * Reconstructs the visible number pattern carried by a normalized chart source.
4
+ * Source datasets currently expose formatted labels rather than number-format codes,
5
+ * so aggregates reuse the first positive finite sample's prefix, suffix, separators,
6
+ * scale, and precision instead of copying any input cell's already-formatted value.
7
+ */
8
+ export declare function createAggregateNumberFormatter(dataSet: IUniverDataSet, fieldIndex: number): (value: number) => string;
@@ -1,10 +1,5 @@
1
- import type { IUniverDataSet } from '../../types';
2
- import type { IChartLocaleTexts } from '../chart-locale-texts';
3
- export declare enum CartesianPointRoleIndex {
4
- X = 0,
5
- Y = 1,
6
- Size = 2
7
- }
1
+ import type { IUniverDataSet } from '../../../types';
2
+ import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
8
3
  export declare enum CartesianPointValueIndex {
9
4
  X = 0,
10
5
  Y = 1,
@@ -39,5 +34,5 @@ interface ICartesianPointRoleIndexes {
39
34
  headers?: string[];
40
35
  }
41
36
  /** Builds normalized Cartesian point records consumed by coordinate-chart converters. */
42
- export declare function buildCartesianPointData(dataSource: IUniverDataSet, roles: ICartesianPointRoleIndexes, localeTexts: IChartLocaleTexts): ICartesianPointData;
37
+ export declare function buildCartesianPointData(dataSet: IUniverDataSet, roles: ICartesianPointRoleIndexes, localeTexts: IChartLocaleTexts, visitRecord?: (record: ICartesianPointRecord) => void): ICartesianPointData;
43
38
  export {};
@@ -0,0 +1,3 @@
1
+ import type { IChartContext, IChartData, IUniverDataSet } from '../../../types';
2
+ import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
3
+ export declare function buildChartCategory(dataSet: IUniverDataSet, categoryIndex: number | undefined, chartContext: IChartContext, localeTexts: IChartLocaleTexts): IChartData['category'];
@@ -0,0 +1,10 @@
1
+ import type { IChartDataAggregation } from '../../../chart-data-aggregation';
2
+ import type { IUniverDataSet } from '../../../types';
3
+ import type { IChartFieldConsumption } from '../chart-field-consumption';
4
+ /**
5
+ * Projects category/value rows while preserving source-field indexes.
6
+ *
7
+ * This runs after field-consumption validation, so callers continue to own chart-specific
8
+ * mapping rules and this module owns only ordinary category/value aggregation and ranking.
9
+ */
10
+ export declare function projectCategorySeriesData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, dataAggregation: IChartDataAggregation | undefined): IUniverDataSet;
@@ -0,0 +1,5 @@
1
+ import type { IChartData } from '../../../types';
2
+ import type { IChartFieldDiagnostic } from '../../common/chart-field-diagnostic';
3
+ export declare function createEmptyChartData(headers?: string[]): IChartData;
4
+ export declare function createInvalidChartData(headers: string[] | undefined, fieldDiagnostic: IChartFieldDiagnostic): IChartData;
5
+ export declare function calculateNumericExtent<T>(items: readonly T[], getValue: (item: T) => number): Pick<IChartData, 'maxValue' | 'minValue'>;
@@ -0,0 +1,7 @@
1
+ import type { IChartChordData, IUniverDataSet } from '../../../types';
2
+ import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
3
+ import type { IChartFieldConsumption } from '../chart-field-consumption';
4
+ export declare const CHORD_NODE_ID_PREFIX = "chord-node:";
5
+ export declare const CHORD_LINK_ID_PREFIX = "chord-link:";
6
+ /** Resolves a normalized spreadsheet edge list into one undirected semantic graph. */
7
+ export declare function buildChordData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, localeTexts: IChartLocaleTexts): IChartChordData;
@@ -0,0 +1,7 @@
1
+ import type { DimensionDefinitionLoose, IUniverDataSet, OptionDataValue } from '../../../types';
2
+ export declare function getRawDataValue(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): OptionDataValue;
3
+ export declare function getDataValue(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): OptionDataValue;
4
+ export declare function getDataLabel(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): string;
5
+ export declare function getDimensionLabel(value: DimensionDefinitionLoose | undefined): string;
6
+ export declare function getDataSetItemCount(dataSet: IUniverDataSet, fieldIndex: number, categoryIndex?: number): number;
7
+ export declare function getDataSetRowCount(dataSet: IUniverDataSet): number;
@@ -0,0 +1,5 @@
1
+ import type { IChartGaugeData, IUniverDataSet } from '../../../types';
2
+ import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
3
+ import type { IChartFieldConsumption } from '../chart-field-consumption';
4
+ export declare const GAUGE_ITEM_ID_PREFIX = "gauge-item:";
5
+ export declare function buildGaugeData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, localeTexts: IChartLocaleTexts): IChartGaugeData;
@@ -0,0 +1,10 @@
1
+ import type { IChartHistogramBin, IChartHistogramDataSpec } from '../../../types';
2
+ export declare const MAX_HISTOGRAM_BIN_COUNT = 1000;
3
+ export interface IBuildHistogramBinsResult {
4
+ bins: IChartHistogramBin[];
5
+ sampleCount: number;
6
+ }
7
+ /** Builds deterministic numeric bins without renderer strings or persisted derived values. */
8
+ export declare function buildHistogramBins(values: readonly unknown[], spec?: IChartHistogramDataSpec): IBuildHistogramBinsResult;
9
+ /** Stable two-pass sample standard deviation using denominator n - 1. */
10
+ export declare function sampleStandardDeviation(samples: readonly number[]): number;
@@ -0,0 +1,2 @@
1
+ import type { IUniverDataSet } from '../../../types';
2
+ export declare function isRelationMatrixDataSet(dataSet: IUniverDataSet): boolean;
@@ -0,0 +1,3 @@
1
+ import type { IUniverDataSet } from '../../../types';
2
+ /** Uses source-owned display formatting and falls back to the shared general scalar label. */
3
+ export declare function getSourceCellLabel(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): string;
@@ -0,0 +1,4 @@
1
+ import type { IChartSunburstData, IUniverDataSet } from '../../../types';
2
+ import type { IChartFieldConsumption } from '../chart-field-consumption';
3
+ /** Builds runtime-only Sunburst data through the shared hierarchy policy. */
4
+ export declare function buildSunburstData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, diagnostic?: string): IChartSunburstData;
@@ -0,0 +1,4 @@
1
+ import type { IChartTreemapData, IUniverDataSet } from '../../../types';
2
+ import type { IChartFieldConsumption } from '../chart-field-consumption';
3
+ /** Builds Treemap runtime data through the shared renderer-independent hierarchy policy. */
4
+ export declare function buildTreemapData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, diagnostic?: string): IChartTreemapData;
@@ -0,0 +1,36 @@
1
+ import type { IChartPieCompositeSpec, PieSecondaryPlotType } from '../../../chart-builder/chart-types';
2
+ import { PieCompositeMarkRole, PieCompositePlot } from '../../../chart-builder/chart-types';
3
+ export declare const PieCompositeDiagnosticCode: {
4
+ readonly InsufficientSourcePoints: "insufficientSourcePoints";
5
+ readonly InvalidSecondaryPlot: "invalidSecondaryPlot";
6
+ readonly InvalidPositionCount: "invalidPositionCount";
7
+ readonly EmptySecondarySelection: "emptySecondarySelection";
8
+ readonly AllPointsSelected: "allPointsSelected";
9
+ };
10
+ export type PieCompositeDiagnosticCode = typeof PieCompositeDiagnosticCode[keyof typeof PieCompositeDiagnosticCode];
11
+ export type PieCompositeDatum = {
12
+ plot: typeof PieCompositePlot.Primary | typeof PieCompositePlot.Secondary;
13
+ role: typeof PieCompositeMarkRole.Source;
14
+ sourcePointIndex: number;
15
+ } | {
16
+ plot: typeof PieCompositePlot.Primary;
17
+ role: typeof PieCompositeMarkRole.Aggregate;
18
+ memberSourcePointIndexes: readonly number[];
19
+ value: number;
20
+ };
21
+ export interface IPieCompositeDiagnostic {
22
+ code: PieCompositeDiagnosticCode;
23
+ sourcePointCount: number;
24
+ selectedPointCount: number;
25
+ }
26
+ export interface IPieCompositeProjection {
27
+ active: boolean;
28
+ primary: readonly PieCompositeDatum[];
29
+ secondary: readonly PieCompositeDatum[];
30
+ secondaryPlotType?: PieSecondaryPlotType;
31
+ diagnostics: readonly IPieCompositeDiagnostic[];
32
+ }
33
+ export declare function projectCompositePie(values: readonly number[], composite?: IChartPieCompositeSpec | {
34
+ enabled?: boolean;
35
+ secondaryPlot?: Partial<IChartPieCompositeSpec['secondaryPlot']>;
36
+ }): IPieCompositeProjection;
@@ -0,0 +1,15 @@
1
+ import type { PieCompositeDatum } from './pie-composite-projection';
2
+ export declare const PIE_COMPOSITE_METADATA_FIELD = "pieComposite";
3
+ export declare const PIE_COMPOSITE_PERCENT_FIELD = "pieCompositePercent";
4
+ export declare const PIE_COMPOSITE_SERIES_PLOT_FIELD = "pieCompositePlot";
5
+ export declare const PIE_COMPOSITE_PRIMARY_SERIES_ID = "pie-composite-primary";
6
+ export declare const PIE_COMPOSITE_SECONDARY_SERIES_ID = "pie-composite-secondary";
7
+ export declare const PIE_COMPOSITE_SECONDARY_STACK_ID = "pie-composite-secondary";
8
+ export declare const PIE_COMPOSITE_CONNECTOR_GRAPHIC_ID = "pie-composite-connector";
9
+ export interface IPieCompositeMarkMetadata {
10
+ plot: PieCompositeDatum['plot'];
11
+ role: PieCompositeDatum['role'];
12
+ sourcePointIndex?: number;
13
+ memberSourcePointIndexes?: readonly number[];
14
+ }
15
+ export declare function toPieCompositeMarkMetadata(datum: PieCompositeDatum): IPieCompositeMarkMetadata;
@@ -0,0 +1,38 @@
1
+ import type { IChartPieCompositeSpec, PieSecondaryPlotType } from '../../../chart-builder/chart-types';
2
+ import type { DeepNullish } from '../../../types';
3
+ import { ChartBorderDashType } from '../../../enum';
4
+ export declare const PIE_COMPOSITE_MIN_SOURCE_POINT_COUNT = 2;
5
+ export declare const PIE_AUTO_SPLIT_DIVISOR = 3;
6
+ export declare const PIE_PERCENTAGE_WHOLE = 100;
7
+ export declare const PIE_SECONDARY_SIZE_MIN = 5;
8
+ export declare const PIE_SECONDARY_SIZE_MAX = 200;
9
+ export declare const PIE_SECONDARY_SIZE_DEFAULT = 75;
10
+ export declare const PIE_SECONDARY_GAP_WIDTH_MIN = 0;
11
+ export declare const PIE_SECONDARY_GAP_WIDTH_MAX = 500;
12
+ export declare const PIE_SECONDARY_GAP_WIDTH_DEFAULT = 150;
13
+ export declare const PIE_POSITION_SPLIT_COUNT_MIN = 1;
14
+ export declare const PIE_POSITION_SPLIT_COUNT_DEFAULT = 2;
15
+ export declare const PIE_VALUE_SPLIT_LESS_THAN_DEFAULT = 0;
16
+ export declare const PIE_PERCENTAGE_SPLIT_LESS_THAN_DEFAULT = 10;
17
+ export declare const PIE_AGGREGATE_COLOR_DEFAULT = "#D9D9D9";
18
+ export declare const PIE_CONNECTOR_VISIBLE_DEFAULT = true;
19
+ export declare const PIE_CONNECTOR_COLOR_DEFAULT = "#8C8C8C";
20
+ export declare const PIE_CONNECTOR_WIDTH_DEFAULT = 1;
21
+ export declare const PIE_CONNECTOR_OPACITY_DEFAULT = 1;
22
+ export declare const PIE_CONNECTOR_DASH_TYPE_DEFAULT = ChartBorderDashType.Solid;
23
+ export declare const PIE_COMPOSITE_SECONDARY_PLOT_REQUIRED_ERROR = "Active Pie composite requires a secondary plot with type \"pie\" or \"bar\".";
24
+ export declare const PIE_COMPOSITE_INVALID_VALUE_ERROR_PREFIX = "Invalid Pie composite value";
25
+ export declare function assertPieCompositePatch(current: DeepNullish<IChartPieCompositeSpec> | null | undefined, patch: DeepNullish<IChartPieCompositeSpec> | null | undefined): void;
26
+ /**
27
+ * Composite Pie fields were added to the persisted Pie style additively.
28
+ * Historical snapshots omit `composite`, and an abandoned transition shape can
29
+ * omit `enabled`; both remain disabled without materializing persisted defaults.
30
+ */
31
+ export declare function resolveActivePieComposite(pie: {
32
+ composite?: {
33
+ enabled?: boolean | null;
34
+ secondaryPlot?: {
35
+ type?: PieSecondaryPlotType | null;
36
+ } | null;
37
+ } | null;
38
+ } | null | undefined): IChartPieCompositeSpec | undefined;
@@ -1,4 +1,4 @@
1
- import type { ChartImageSource, ChartStyle, IChartHostBorderStyle, IChartHostRect, IChartHostStyle } from '../types';
1
+ import type { ChartImageSource, ChartStyle, IChartHostBorderStyle, IChartHostRect, IChartHostStyle } from '../../types';
2
2
  export interface IResolveChartHostFrameStyleInput {
3
3
  style?: ChartStyle | null;
4
4
  getRenderColor?: (color: string) => string;
@@ -1,6 +1,6 @@
1
- import type { ChartImageSource, IChartHostLease, IChartHostRect, IChartHostStyle, IImageChartHost } from '../types';
1
+ import type { ChartImageSource, IChartHostLease, IChartHostRect, IChartHostStyle, IImageChartHost } from '../../types';
2
2
  import { Disposable } from '@univerjs/core';
3
- import { ChartHostRenderMode } from '../types';
3
+ import { ChartHostRenderMode } from '../../types';
4
4
  export declare function chartImageSourceToDataUrl(image: ChartImageSource): string;
5
5
  export declare abstract class ImageChartHost extends Disposable implements IImageChartHost {
6
6
  readonly chartId: string;
@@ -16,3 +16,15 @@ export declare abstract class ImageChartHost extends Disposable implements IImag
16
16
  acquireOffscreenHost(rect: IChartHostRect): IChartHostLease;
17
17
  dispose(): void;
18
18
  }
19
+ export declare class DataUrlImageChartHost extends ImageChartHost {
20
+ private readonly _rect;
21
+ private _dataUrl;
22
+ constructor(chartId: string, _rect: IChartHostRect);
23
+ getRect(): IChartHostRect;
24
+ setStyle(_style: IChartHostStyle): void;
25
+ nextVersion(): number;
26
+ commitSnapshot(image: ChartImageSource, _version: number): boolean;
27
+ requestPaint(): void;
28
+ invalidateSnapshot(): void;
29
+ getDataUrl(): string | undefined;
30
+ }
@@ -1,4 +1,4 @@
1
- import type { IChartHostLease, IChartHostRect } from '../types';
1
+ import type { IChartHostLease, IChartHostRect } from '../../types';
2
2
  import { Disposable } from '@univerjs/core';
3
3
  export declare class OffscreenChartHost extends Disposable {
4
4
  private readonly _leases;
@@ -1,4 +1,4 @@
1
- import type { ChartStyle } from '../types';
1
+ import type { ChartStyle } from '../../../types';
2
2
  interface IChartResourceSnapshot {
3
3
  style?: ChartStyle;
4
4
  }
@@ -0,0 +1,4 @@
1
+ import type { IUniverDataSet } from '../../../types';
2
+ export type InlineChartCellValue = string | number | boolean | null;
3
+ export declare function parseInlineChartTable(text: string): InlineChartCellValue[][];
4
+ export declare function buildInlineChartTableDataSet(values: readonly (readonly InlineChartCellValue[])[]): IUniverDataSet;
@@ -0,0 +1,75 @@
1
+ import type { ChartTypeBits } from '../../../enum';
2
+ import type { IChartDataAggregation } from '../../../chart-data-aggregation';
3
+ import type { ChartStyle, IChartContext } from '../../../types';
4
+ import type { InlineChartCellValue } from './inline-chart-table';
5
+ import { Disposable } from '@univerjs/core';
6
+ export declare const STATIC_CHART_RESOURCE_VERSION = 1;
7
+ export interface IStaticChartInlineDataSource<TCell extends InlineChartCellValue = InlineChartCellValue> {
8
+ id: string;
9
+ name?: string;
10
+ values: TCell[][];
11
+ }
12
+ export interface IStaticChartContext {
13
+ orient?: 'row' | 'column';
14
+ firstRowAsHeader?: boolean;
15
+ firstColumnAsCategory?: boolean;
16
+ chartContext?: Partial<IChartContext>;
17
+ }
18
+ export interface IStaticChartState {
19
+ legendSelected?: Record<string, boolean>;
20
+ activePage?: number;
21
+ relationNodePositions?: Record<string, {
22
+ x: number;
23
+ y: number;
24
+ }>;
25
+ }
26
+ export interface IStaticChartSnapshot<TContext = IStaticChartContext, TState = IStaticChartState> {
27
+ id: string;
28
+ dataSourceId: string;
29
+ chartType: ChartTypeBits;
30
+ style?: ChartStyle;
31
+ context?: TContext;
32
+ state?: TState;
33
+ dataAggregation?: IChartDataAggregation;
34
+ }
35
+ export interface IStaticChartResource<TDataSource extends IStaticChartInlineDataSource = IStaticChartInlineDataSource, TChart extends IStaticChartSnapshot<unknown, unknown> = IStaticChartSnapshot> {
36
+ version: typeof STATIC_CHART_RESOURCE_VERSION;
37
+ dataSources: Record<string, TDataSource>;
38
+ charts: Record<string, TChart>;
39
+ }
40
+ export interface ICreateStaticChartDataSourceOptions<TCell extends InlineChartCellValue> {
41
+ id?: string;
42
+ name?: string;
43
+ values: TCell[][];
44
+ }
45
+ export type ICreateStaticChartSnapshotOptions<TChart extends IStaticChartSnapshot<unknown, unknown>> = Omit<TChart, 'id'> & {
46
+ id?: string;
47
+ };
48
+ export type IUpdateStaticChartSnapshotPatch<TChart extends IStaticChartSnapshot<unknown, unknown>> = Partial<Omit<TChart, 'id'>>;
49
+ export declare class StaticChartResourceRepository<TCell extends InlineChartCellValue, TDataSource extends IStaticChartInlineDataSource<TCell>, TChart extends IStaticChartSnapshot<unknown, unknown>, TResource extends IStaticChartResource<TDataSource, TChart>> extends Disposable {
50
+ private readonly _resources;
51
+ ensureUnitResource(unitId: string): TResource;
52
+ loadUnit(unitId: string, resource: TResource | string | null | undefined): TResource;
53
+ unloadUnit(unitId: string): void;
54
+ serializeUnit(unitId: string): string;
55
+ getResource(unitId: string): TResource;
56
+ getDataSource(unitId: string, dataSourceId: string): TDataSource | undefined;
57
+ getChart(unitId: string, chartId: string): TChart | undefined;
58
+ createDataSource(unitId: string, options: ICreateStaticChartDataSourceOptions<TCell>): TDataSource;
59
+ setDataSource(unitId: string, dataSource: TDataSource): TDataSource;
60
+ updateDataSource(unitId: string, dataSourceId: string, values: TCell[][], patch?: Partial<Pick<TDataSource, 'name'>>): TDataSource | undefined;
61
+ removeDataSource(unitId: string, dataSourceId: string): boolean;
62
+ createChart(unitId: string, options: ICreateStaticChartSnapshotOptions<TChart>): TChart;
63
+ setChart(unitId: string, chart: TChart): TChart;
64
+ updateChart(unitId: string, chartId: string, patch: IUpdateStaticChartSnapshotPatch<TChart>): TChart | undefined;
65
+ removeChart(unitId: string, chartId: string, options?: {
66
+ cleanupDataSource?: boolean;
67
+ }): TChart | undefined;
68
+ getChartIdsByDataSource(unitId: string, dataSourceId: string): string[];
69
+ getDataSourceSharingCount(unitId: string, dataSourceId: string): number;
70
+ duplicateDataSourceForChart(unitId: string, chartId: string, duplicateDataSourceId?: string): TDataSource | undefined;
71
+ cleanupOrphanedResources(unitId: string): void;
72
+ dispose(): void;
73
+ private _cloneValues;
74
+ private _deleteUndefinedFields;
75
+ }
@@ -0,0 +1,43 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import type { IChartContext, IUniverDataSet } from '../../../types';
3
+ import type { ChartModel } from '../../chart-model/chart-model';
4
+ import type { InlineChartCellValue } from '../resource/inline-chart-table';
5
+ import type { IStaticChartContext, IStaticChartInlineDataSource, IStaticChartResource, IStaticChartSnapshot, StaticChartResourceRepository } from '../resource/static-chart-resource-repository';
6
+ import type { IStaticChartRuntime } from './static-chart-runtime';
7
+ import { Disposable } from '@univerjs/core';
8
+ export interface IStaticChartModelRuntime extends IStaticChartRuntime {
9
+ unitId: string;
10
+ chartId: string;
11
+ dataSourceId: string;
12
+ }
13
+ export declare class StaticChartModelStore<TCell extends InlineChartCellValue, TDataSource extends IStaticChartInlineDataSource<TCell>, TChart extends IStaticChartSnapshot<IStaticChartContext, unknown>, TResource extends IStaticChartResource<TDataSource, TChart>, TRuntime extends IStaticChartModelRuntime = IStaticChartModelRuntime> extends Disposable {
14
+ private readonly _resourceRepository;
15
+ private readonly _injector;
16
+ private readonly _buildDataSet;
17
+ private readonly _activeRuntimeModel$;
18
+ readonly activeRuntimeModel$: import("rxjs").Observable<TRuntime | null>;
19
+ get activeRuntimeModel(): TRuntime | null;
20
+ private readonly _activeChartModel$;
21
+ readonly activeChartModel$: import("rxjs").Observable<ChartModel<import("../../..").IChartDataSource> | null>;
22
+ get activeChartModel(): ChartModel | null;
23
+ private readonly _runtimeModels;
24
+ private readonly _chartModelAdded$;
25
+ readonly chartModelAdded$: import("rxjs").Observable<TRuntime>;
26
+ private readonly _chartModelRemoved$;
27
+ readonly chartModelRemoved$: import("rxjs").Observable<TRuntime>;
28
+ constructor(_resourceRepository: StaticChartResourceRepository<TCell, TDataSource, TChart, TResource>, _injector: Injector, _buildDataSet: (values: TCell[][]) => IUniverDataSet);
29
+ ensureChartModel(unitId: string, chartId: string): TRuntime | undefined;
30
+ getChartModel(unitId: string, chartId: string): TRuntime | undefined;
31
+ setActiveChartRuntime(runtime: TRuntime | null): void;
32
+ setActiveChartModel(chartModel: ChartModel | null): void;
33
+ setActiveChartById(unitId: string, chartId: string): TRuntime | null;
34
+ generateChartModelContext(unitId: string, chartId: string): IChartContext | undefined;
35
+ refreshChartModel(unitId: string, chartId: string): TRuntime | undefined;
36
+ refreshChartsByDataSource(unitId: string, dataSourceId: string): TRuntime[];
37
+ removeChartModel(unitId: string, chartId: string): boolean;
38
+ removeUnit(unitId: string): void;
39
+ dispose(): void;
40
+ protected _createStoredRuntime(runtime: IStaticChartModelRuntime): TRuntime;
41
+ protected _beforeRuntimeRefresh(_runtime: TRuntime): void;
42
+ private _disposeRuntime;
43
+ }
@@ -0,0 +1,26 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import type { IChartDataAggregation } from '../../../chart-data-aggregation';
3
+ import type { ChartTypeBits } from '../../../enum';
4
+ import type { ChartStyle, IChartContext, IUniverDataSet } from '../../../types';
5
+ import { StaticChartSource } from '../../../source/static-chart-source';
6
+ import { ChartModel } from '../../chart-model/chart-model';
7
+ export interface IStaticChartRuntime {
8
+ model: ChartModel;
9
+ source: StaticChartSource;
10
+ }
11
+ export interface IStaticChartRuntimeConfig {
12
+ chartType: ChartTypeBits;
13
+ dataSet: IUniverDataSet;
14
+ isRowDirection: boolean;
15
+ style?: ChartStyle;
16
+ context?: Partial<IChartContext>;
17
+ dataAggregation?: IChartDataAggregation;
18
+ }
19
+ export interface ICreateStaticChartRuntimeOptions extends IStaticChartRuntimeConfig {
20
+ id: string;
21
+ injector: Injector;
22
+ }
23
+ /** Creates the canonical runtime pair used by hosts backed by an inline table. */
24
+ export declare function createStaticChartRuntime(options: ICreateStaticChartRuntimeOptions): IStaticChartRuntime;
25
+ /** Applies a persisted inline-table snapshot without duplicating chart semantics in each host. */
26
+ export declare function refreshStaticChartRuntime(runtime: IStaticChartRuntime, config: IStaticChartRuntimeConfig): void;