@worm-print-platform/echarts 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -21
- package/dist/bind.d.ts +1 -1
- package/dist/browser/executor.iife.d.ts +1 -1
- package/dist/browser-bundle.d.ts +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/constants.d.ts +5 -1
- package/dist/defaults.d.ts +1 -1
- package/dist/echarts.d.ts +1 -1
- package/dist/echarts.js +38 -14
- package/dist/executor.iife.global.d.ts +1 -1
- package/dist/executor.iife.global.js +29 -17
- package/dist/i18n/en-US.json +153 -0
- package/dist/i18n/th-TH.json +153 -0
- package/dist/i18n/zh-CN.json +153 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/kinds.d.ts +5 -1
- package/dist/kit.cjs +2 -2
- package/dist/kit.d.ts +1 -1
- package/dist/kit.js +2 -2
- package/dist/label.d.ts +3 -1
- package/dist/marketplace.d.ts +1 -1
- package/dist/marketplace.js +650 -136
- package/dist/node.cjs +46 -19
- package/dist/node.d.ts +1 -1
- package/dist/node.js +46 -19
- package/dist/normalize.d.ts +1 -1
- package/dist/option-utils.d.ts +1 -1
- package/dist/plugin-8R67OtBD.cjs +6 -0
- package/dist/plugin-CKyaiHYF.js +960 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/renderer.d.ts +1 -1
- package/dist/test-setup.d.ts +7 -0
- package/dist/type-augmentation.d.ts +1 -1
- package/dist/ui.cjs +650 -136
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +650 -136
- package/dist/units.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +29 -3
- package/dist/plugin-BWmSrZ3m.cjs +0 -6
- package/dist/plugin-Dvcrcg_Z.js +0 -933
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
worm-print-platform 插件市场的百度图表插件:**十类 ECharts 图表元素 + 设计器 UI,import 即注册**。
|
|
4
4
|
|
|
5
|
-
本目录 `marketplace/plugins/echarts/`
|
|
5
|
+
本目录 `marketplace/plugins/echarts/` 是图表插件的**唯一源码真源**。同一份源码构建出一个市场插件与一个兼容 npm 包:
|
|
6
6
|
|
|
7
7
|
| 包名 | 定位 | 根入口行为 |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| `@worm-print-platform/plugin-echarts` |
|
|
9
|
+
| `@worm-print-platform/plugin-echarts` | 市场插件(不再单独发 npm) | 注册插件描述符 + 设计器 UI |
|
|
10
10
|
| `@worm-print-platform/echarts` | 兼容镜像,供存量依赖方零改动使用 | 仅注册插件描述符(原行为) |
|
|
11
11
|
|
|
12
12
|
## 安装(插件市场口径,推荐)
|
|
@@ -15,6 +15,8 @@ worm-print-platform 插件市场的百度图表插件:**十类 ECharts 图表
|
|
|
15
15
|
npx @worm-print-platform/marketplace install echarts
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
> npm 上未发布该主包,`auto` 源会在 npm 源失败后自动回退 Gitee(其次 GitHub);也可显式 `--source gitee` 指定来源。
|
|
19
|
+
|
|
18
20
|
宿主按清单加载插件入口(import 即注册,无需额外调用):
|
|
19
21
|
|
|
20
22
|
```js
|
|
@@ -24,22 +26,9 @@ import '../.worm-print/plugins/echarts/dist/marketplace.js'
|
|
|
24
26
|
插件安装后,素材台出现「图表」分组的十张卡片:柱状图、条形图、折线图、面积图、饼图、环形图、
|
|
25
27
|
散点图、雷达图、漏斗图、仪表盘。
|
|
26
28
|
|
|
27
|
-
##
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npm install @worm-print-platform/plugin-echarts
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
// 主入口:插件描述符 + 设计器 UI 一次注册完成
|
|
35
|
-
import '@worm-print-platform/plugin-echarts'
|
|
36
|
-
|
|
37
|
-
// 按需子路径
|
|
38
|
-
import '@worm-print-platform/plugin-echarts/kit' // 仅框架无关插件描述符(无 UI)
|
|
39
|
-
import '@worm-print-platform/plugin-echarts/ui' // 仅设计器 UI
|
|
40
|
-
```
|
|
29
|
+
## 服务端与存量兼容
|
|
41
30
|
|
|
42
|
-
服务端 PDF / Electron
|
|
31
|
+
服务端 PDF / Electron 静默打印继续使用 `@worm-print-platform/echarts` 兼容镜像的 `/node` 与
|
|
43
32
|
`/browser/executor.iife`(页面执行器),浏览器直挂使用 `/browser` UMD 产物。
|
|
44
33
|
|
|
45
34
|
存量项目若仍依赖 `@worm-print-platform/echarts`,无需改动:兼容镜像保留全部原有子路径
|
|
@@ -85,20 +74,19 @@ chartOption: {
|
|
|
85
74
|
不支持:`rich` 富文本、`emphasis.label`(SSR 导出只含 normal 态)、`labelLayout`
|
|
86
75
|
(防重叠会改变存量观感,后续单独立项)。
|
|
87
76
|
|
|
88
|
-
##
|
|
77
|
+
## 构建与发版
|
|
89
78
|
|
|
90
|
-
|
|
79
|
+
主包不再单独 `npm publish`,仅兼容镜像随主线发版:
|
|
91
80
|
|
|
92
81
|
```bash
|
|
93
82
|
cd marketplace/plugins/echarts
|
|
94
83
|
npm run build # vite + tsc + tsup + UMD + 兼容镜像同步
|
|
95
|
-
npm publish --registry=https://registry.npmjs.org --access public
|
|
96
84
|
# 根目录:npm publish -w @worm-print-platform/echarts(兼容镜像)
|
|
97
85
|
```
|
|
98
86
|
|
|
99
87
|
发版时同步 `marketplace.json`、`plugin.json`、本 `package.json` 的 `wormPrint.version`;市场 CLI
|
|
100
88
|
通过本仓 tag `plugins/echarts/vX.Y.Z` 解析稳定版本。完整收录与版本规则见
|
|
101
|
-
[
|
|
89
|
+
[用户使用文档 · 插件安装与配置](../../../docs/guide/07-plugin-install.md)。
|
|
102
90
|
|
|
103
91
|
## 信任边界
|
|
104
92
|
|
package/dist/bind.d.ts
CHANGED
package/dist/browser-bundle.d.ts
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.6.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
@@ -26,6 +26,8 @@ export declare function getChartPluginConfig(): ChartPluginConfig;
|
|
|
26
26
|
export interface ChartPalette {
|
|
27
27
|
key: string;
|
|
28
28
|
label: string;
|
|
29
|
+
/** 内置配色的语义键;自定义配色无此字段时沿用 label 原文 */
|
|
30
|
+
labelKey?: string;
|
|
29
31
|
colors: readonly string[];
|
|
30
32
|
}
|
|
31
33
|
/** 预设配色 ∪ 自定义配色:同名以自定义为准,新增 key 追加在末尾 */
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.6.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
@@ -10,18 +10,22 @@ export declare const CHART_PLUGIN_ID = "@worm-print-platform/echarts";
|
|
|
10
10
|
export declare const CHART_PALETTES: readonly [{
|
|
11
11
|
readonly key: "default";
|
|
12
12
|
readonly label: "默认蓝";
|
|
13
|
+
readonly labelKey: "echarts.palette.default";
|
|
13
14
|
readonly colors: readonly ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de"];
|
|
14
15
|
}, {
|
|
15
16
|
readonly key: "fresh";
|
|
16
17
|
readonly label: "清新绿";
|
|
18
|
+
readonly labelKey: "echarts.palette.fresh";
|
|
17
19
|
readonly colors: readonly ["#2f9e6e", "#5cc9a7", "#9ad6c1", "#f2c94c", "#4a90e2"];
|
|
18
20
|
}, {
|
|
19
21
|
readonly key: "warm";
|
|
20
22
|
readonly label: "暖橙红";
|
|
23
|
+
readonly labelKey: "echarts.palette.warm";
|
|
21
24
|
readonly colors: readonly ["#f2704e", "#f7a35c", "#f7d56d", "#c54e3f", "#8f5a4a"];
|
|
22
25
|
}, {
|
|
23
26
|
readonly key: "purple";
|
|
24
27
|
readonly label: "紫灰";
|
|
28
|
+
readonly labelKey: "echarts.palette.purple";
|
|
25
29
|
readonly colors: readonly ["#7b61ff", "#9b8cff", "#c3baff", "#596275", "#8d99ae"];
|
|
26
30
|
}];
|
|
27
31
|
export type ChartPaletteKey = (typeof CHART_PALETTES)[number]['key'];
|
package/dist/defaults.d.ts
CHANGED
package/dist/echarts.d.ts
CHANGED