@8btc/finance-assistant-mcp 0.0.35 → 0.0.37

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 (2) hide show
  1. package/dist/index.cjs +560 -23
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -42,7 +42,7 @@ function _interopNamespaceDefault(e) {
42
42
  return Object.freeze(n);
43
43
  }
44
44
  const echarts__namespace = /* @__PURE__ */ _interopNamespaceDefault(echarts);
45
- const version = "0.0.35";
45
+ const version = "0.0.37";
46
46
  const pkgJSON = {
47
47
  version
48
48
  };
@@ -1898,7 +1898,7 @@ const generate_financial_news_pdf = {
1898
1898
  toolHandler: toolHandler$5,
1899
1899
  initHandler: initHandler$5
1900
1900
  };
1901
- const generateData$e = (rawData) => {
1901
+ const generateData$i = (rawData) => {
1902
1902
  const categoryData = [];
1903
1903
  const roe = [];
1904
1904
  const gp_margin = [];
@@ -1927,7 +1927,7 @@ const renderRoe = (rawData) => {
1927
1927
  // need to specify height and width
1928
1928
  height: 284
1929
1929
  });
1930
- const data0 = generateData$e(rawData);
1930
+ const data0 = generateData$i(rawData);
1931
1931
  const option = {
1932
1932
  color: colors,
1933
1933
  animation: false,
@@ -1970,19 +1970,31 @@ const renderRoe = (rawData) => {
1970
1970
  ],
1971
1971
  yAxis: [
1972
1972
  {
1973
+ name: "营收",
1974
+ nameLocation: "end",
1973
1975
  scale: true,
1974
1976
  splitLine: {
1975
1977
  lineStyle: {
1976
1978
  color: splitLineColor
1977
1979
  }
1980
+ },
1981
+ axisLabel: {
1982
+ formatter: (value) => {
1983
+ return formatNumberToUnit(value);
1984
+ }
1978
1985
  }
1986
+ },
1987
+ {
1988
+ name: "ROE、收益率",
1989
+ nameLocation: "end",
1990
+ alignTicks: true
1979
1991
  }
1980
1992
  ],
1981
1993
  series: [
1982
1994
  {
1983
- name: "ROE指标",
1995
+ name: "营收",
1984
1996
  type: "line",
1985
- data: data0.roe,
1997
+ data: data0.revenue,
1986
1998
  smooth: true,
1987
1999
  showSymbol: false,
1988
2000
  lineStyle: {
@@ -1991,25 +2003,112 @@ const renderRoe = (rawData) => {
1991
2003
  }
1992
2004
  },
1993
2005
  {
1994
- name: "毛利率",
2006
+ name: "ROE指标",
1995
2007
  type: "line",
1996
- data: data0.gp_margin,
2008
+ data: data0.roe,
1997
2009
  smooth: true,
1998
2010
  showSymbol: false,
1999
2011
  lineStyle: {
2000
2012
  opacity: 1,
2001
2013
  width: 1
2002
- }
2014
+ },
2015
+ yAxisIndex: 1
2003
2016
  },
2004
2017
  {
2005
- name: "营收",
2018
+ name: "毛利率",
2006
2019
  type: "line",
2007
- data: data0.revenue,
2020
+ data: data0.gp_margin,
2008
2021
  smooth: true,
2009
2022
  showSymbol: false,
2010
2023
  lineStyle: {
2011
2024
  opacity: 1,
2012
2025
  width: 1
2026
+ },
2027
+ yAxisIndex: 1
2028
+ }
2029
+ ]
2030
+ };
2031
+ chart.setOption(option);
2032
+ const svgStr = chart.renderToSVGString();
2033
+ return svgStr;
2034
+ };
2035
+ const generateData$h = (rawData, rootName) => {
2036
+ return {
2037
+ name: rootName,
2038
+ children: rawData.map((it) => {
2039
+ return {
2040
+ name: it.name,
2041
+ value: it.shares_ratio
2042
+ };
2043
+ })
2044
+ };
2045
+ };
2046
+ const renderStockHolder = (rawData, rootName) => {
2047
+ const chart = echarts__namespace.init(null, null, {
2048
+ renderer: "svg",
2049
+ // must use SVG mode
2050
+ ssr: true,
2051
+ // enable SSR
2052
+ width: 651,
2053
+ // need to specify height and width
2054
+ height: 400
2055
+ });
2056
+ const data0 = generateData$h(rawData, rootName);
2057
+ const option = {
2058
+ color: colors,
2059
+ animation: false,
2060
+ tooltip: {
2061
+ trigger: "item",
2062
+ triggerOn: "mousemove"
2063
+ },
2064
+ series: [
2065
+ {
2066
+ type: "tree",
2067
+ data: [data0],
2068
+ left: "2%",
2069
+ right: "2%",
2070
+ top: "20%",
2071
+ bottom: "8%",
2072
+ symbol: "emptyCircle",
2073
+ orient: "BT",
2074
+ expandAndCollapse: true,
2075
+ edgeShape: "polyline",
2076
+ symbolSize: 1,
2077
+ label: {
2078
+ //蓝色框的配置
2079
+ position: ["50%", "50%"],
2080
+ //蓝色框的定位
2081
+ verticalAlign: "middle",
2082
+ align: "left",
2083
+ //框框的对其方向可以配合position定位到自己想要的位置
2084
+ backgroundColor: "#0084ff",
2085
+ color: "#fff",
2086
+ padding: [0, 0],
2087
+ //内填充
2088
+ borderWidth: 2,
2089
+ //边框宽度
2090
+ borderColor: "#0070d9",
2091
+ formatter: ["{box|{b}}"].join("\n"),
2092
+ rich: {
2093
+ box: {
2094
+ height: 30,
2095
+ color: "#fff",
2096
+ padding: [0, 5],
2097
+ align: "center",
2098
+ fontWeight: "bold",
2099
+ fontSize: 14
2100
+ }
2101
+ }
2102
+ },
2103
+ leaves: {
2104
+ label: {
2105
+ position: "top",
2106
+ verticalAlign: "middle",
2107
+ align: "left"
2108
+ }
2109
+ },
2110
+ emphasis: {
2111
+ focus: "descendant"
2013
2112
  }
2014
2113
  }
2015
2114
  ]
@@ -2205,7 +2304,7 @@ function Chapter1$4({ data }) {
2205
2304
  ] })
2206
2305
  ] });
2207
2306
  }
2208
- function Chapter2$4({ data }) {
2307
+ function Chapter2$4({ data, stockHolderSvg }) {
2209
2308
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chapterPage", children: [
2210
2309
  /* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { index: 2, title: "筹码分布与股东画像分析" }),
2211
2310
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "2.1 整体结构概览" }),
@@ -2219,6 +2318,18 @@ function Chapter2$4({ data }) {
2219
2318
  data.free_float_characteristics
2220
2319
  ] })
2221
2320
  ] }),
2321
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2322
+ /* @__PURE__ */ jsxRuntime.jsx(
2323
+ "div",
2324
+ {
2325
+ className: "w-[651px] h-[284px]",
2326
+ dangerouslySetInnerHTML: {
2327
+ __html: stockHolderSvg
2328
+ }
2329
+ }
2330
+ ),
2331
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "figcaption", children: "图4-1 贵州茅台酒股份有限公司-股权穿透图" })
2332
+ ] }),
2222
2333
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "2.2 前十大股东分析" }),
2223
2334
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "indent-8", children: data.stock_holder_analyze }),
2224
2335
  /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "table-fixed text-left border-b break-inside-avoid", children: [
@@ -2282,7 +2393,7 @@ function Chapter4$4({ data, roeSvg }) {
2282
2393
  }
2283
2394
  }
2284
2395
  ),
2285
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "figcaption", children: "图4-1 营收走势图" })
2396
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "figcaption", children: "图4-1 营收、ROE、毛利率走势图" })
2286
2397
  ] }),
2287
2398
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "4.2 盈利能力" }),
2288
2399
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "indent-8", children: data.roe_review }),
@@ -2574,7 +2685,10 @@ const renderChapter1$4 = (data) => {
2574
2685
  return renderFullHtml(seg);
2575
2686
  };
2576
2687
  const renderChapter2$4 = (data) => {
2577
- const seg = ReactDOMServer.renderToString(/* @__PURE__ */ jsxRuntime.jsx(Chapter2$4, { data }));
2688
+ const stockHolderSvg = renderStockHolder(data.stock_holder_list, data.name);
2689
+ const seg = ReactDOMServer.renderToString(
2690
+ /* @__PURE__ */ jsxRuntime.jsx(Chapter2$4, { data, stockHolderSvg })
2691
+ );
2578
2692
  return renderFullHtml(seg);
2579
2693
  };
2580
2694
  const renderChapter3$4 = (data) => {
@@ -2719,6 +2833,381 @@ const generate_fundamental_pdf = {
2719
2833
  toolHandler: toolHandler$4,
2720
2834
  initHandler: initHandler$4
2721
2835
  };
2836
+ const generateData$g = (rawData) => {
2837
+ const categoryData = [];
2838
+ const values2 = [];
2839
+ for (let i = 0; i < rawData.inflow_board_rank.length; i++) {
2840
+ const d = rawData.inflow_board_rank[i];
2841
+ categoryData.push(d.name);
2842
+ values2.push([i, d.money, d.money > 0 ? 1 : -1]);
2843
+ }
2844
+ const len = rawData.inflow_board_rank.length;
2845
+ for (let i = 0; i < rawData.outflow_board_rank.length; i++) {
2846
+ const d = rawData.outflow_board_rank[i];
2847
+ categoryData.push(d.name);
2848
+ values2.push([len + i, d.money, d.money > 0 ? 1 : -1]);
2849
+ }
2850
+ return {
2851
+ categoryData,
2852
+ values: values2
2853
+ };
2854
+ };
2855
+ const renderCapitalFlows = (rawData) => {
2856
+ const chart = echarts__namespace.init(null, null, {
2857
+ renderer: "svg",
2858
+ // must use SVG mode
2859
+ ssr: true,
2860
+ // enable SSR
2861
+ width: 651,
2862
+ // need to specify height and width
2863
+ height: 284
2864
+ });
2865
+ const upColor = "#cc2f3c";
2866
+ const downColor = "#06806b";
2867
+ const data0 = generateData$g(rawData);
2868
+ console.log(data0);
2869
+ const option = {
2870
+ color: colors,
2871
+ animation: false,
2872
+ tooltip: {
2873
+ trigger: "axis",
2874
+ axisPointer: {
2875
+ type: "cross"
2876
+ }
2877
+ },
2878
+ legend: {
2879
+ show: false,
2880
+ // data: ["日K", "MA5", "MA10", "MA20", "MA30"],
2881
+ top: 20
2882
+ },
2883
+ visualMap: {
2884
+ show: false,
2885
+ seriesIndex: 0,
2886
+ dimension: 2,
2887
+ pieces: [
2888
+ {
2889
+ value: 1,
2890
+ color: upColor
2891
+ },
2892
+ {
2893
+ value: -1,
2894
+ color: downColor
2895
+ }
2896
+ ]
2897
+ },
2898
+ grid: [
2899
+ {
2900
+ top: "0%",
2901
+ left: "7%",
2902
+ right: "8%",
2903
+ bottom: "8%",
2904
+ height: "100%"
2905
+ }
2906
+ ],
2907
+ xAxis: [
2908
+ {
2909
+ type: "category",
2910
+ data: data0.categoryData,
2911
+ boundaryGap: true,
2912
+ axisLine: { onZero: false },
2913
+ splitLine: { show: false },
2914
+ axisLabel: {
2915
+ interval: 0,
2916
+ rotate: -45
2917
+ }
2918
+ }
2919
+ ],
2920
+ yAxis: [
2921
+ {
2922
+ scale: true,
2923
+ splitLine: {
2924
+ lineStyle: {
2925
+ color: splitLineColor
2926
+ }
2927
+ },
2928
+ splitArea: {
2929
+ show: false
2930
+ },
2931
+ axisLabel: {
2932
+ formatter: (value) => {
2933
+ return formatNumberToUnit(value);
2934
+ }
2935
+ }
2936
+ }
2937
+ ],
2938
+ series: [
2939
+ {
2940
+ name: "主力资金流向",
2941
+ type: "bar",
2942
+ data: data0.values,
2943
+ itemStyle: {
2944
+ opacity: 1
2945
+ }
2946
+ }
2947
+ ]
2948
+ };
2949
+ chart.setOption(option);
2950
+ const svgStr = chart.renderToSVGString();
2951
+ return svgStr;
2952
+ };
2953
+ const generateData$f = (rawData) => {
2954
+ let ret = [];
2955
+ let x = 0;
2956
+ let y = -1;
2957
+ rawData.forEach((it, index) => {
2958
+ if (index % 5 === 0) {
2959
+ y++;
2960
+ x = 0;
2961
+ }
2962
+ ret.push([x, y, it.pct_chg, it]);
2963
+ x++;
2964
+ });
2965
+ return {
2966
+ xAxis: Array(5).fill(void 0).map((_, index) => index),
2967
+ yAxis: Array(y + 1).fill(void 0).map((_, index) => index),
2968
+ values: ret
2969
+ };
2970
+ };
2971
+ const renderIndustriesRank = (datas) => {
2972
+ const yCount = Math.ceil(datas.length / 5);
2973
+ const chart = echarts__namespace.init(null, null, {
2974
+ renderer: "svg",
2975
+ // must use SVG mode
2976
+ ssr: true,
2977
+ // enable SSR
2978
+ width: 651,
2979
+ // need to specify height and width
2980
+ height: 142 * yCount
2981
+ });
2982
+ const data0 = generateData$f(datas);
2983
+ const option = {
2984
+ animation: false,
2985
+ tooltip: {
2986
+ position: "top"
2987
+ },
2988
+ // color: colors,
2989
+ grid: {
2990
+ height: "80%",
2991
+ top: "10%",
2992
+ left: 0,
2993
+ right: 0
2994
+ },
2995
+ visualMap: {
2996
+ show: false,
2997
+ min: -10,
2998
+ max: 10,
2999
+ calculable: true,
3000
+ orient: "horizontal",
3001
+ left: "center",
3002
+ bottom: "15%",
3003
+ inRange: {
3004
+ color: ["#06806b", "#ffffff", "#cc2f3c"]
3005
+ },
3006
+ dimension: 2
3007
+ },
3008
+ xAxis: {
3009
+ type: "category",
3010
+ data: data0.xAxis,
3011
+ axisLine: {
3012
+ show: false
3013
+ },
3014
+ axisTick: {
3015
+ show: false
3016
+ },
3017
+ axisLabel: {
3018
+ show: false
3019
+ }
3020
+ },
3021
+ yAxis: {
3022
+ data: data0.yAxis,
3023
+ type: "category",
3024
+ inverse: true,
3025
+ axisLine: {
3026
+ show: false
3027
+ },
3028
+ axisTick: {
3029
+ show: false
3030
+ },
3031
+ axisLabel: {
3032
+ show: false
3033
+ }
3034
+ },
3035
+ series: [
3036
+ {
3037
+ name: "行业热力图",
3038
+ type: "heatmap",
3039
+ data: data0.values,
3040
+ label: {
3041
+ show: true,
3042
+ formatter: (v) => {
3043
+ return `${v.data[3].name}
3044
+
3045
+ ${formatNumberToUnit(
3046
+ // @ts-ignore
3047
+ v.data[3].pct_chg
3048
+ )}%`;
3049
+ }
3050
+ }
3051
+ }
3052
+ ]
3053
+ };
3054
+ chart.setOption(option);
3055
+ const svgStr = chart.renderToSVGString();
3056
+ return svgStr;
3057
+ };
3058
+ const generateData$e = (rawData) => {
3059
+ const categoryData = [];
3060
+ const values2 = [];
3061
+ const volumes = [];
3062
+ for (let i = 0; i < rawData.length; i++) {
3063
+ const d = rawData[i];
3064
+ categoryData.push(d.time);
3065
+ values2.push([d.open, d.close, d.low, d.high]);
3066
+ volumes.push([i, d.vol, d.open > d.close ? 1 : -1]);
3067
+ }
3068
+ return {
3069
+ categoryData,
3070
+ values: values2,
3071
+ volumes
3072
+ };
3073
+ };
3074
+ const renderKlineSimple = (datas) => {
3075
+ const chart = echarts__namespace.init(null, null, {
3076
+ renderer: "svg",
3077
+ // must use SVG mode
3078
+ ssr: true,
3079
+ // enable SSR
3080
+ width: 651,
3081
+ // need to specify height and width
3082
+ height: 284
3083
+ });
3084
+ const upColor = "#cc2f3c";
3085
+ const downColor = "#06806b";
3086
+ const data0 = generateData$e(datas);
3087
+ const option = {
3088
+ animation: false,
3089
+ tooltip: {
3090
+ trigger: "axis",
3091
+ axisPointer: {
3092
+ type: "cross"
3093
+ }
3094
+ },
3095
+ color: colors,
3096
+ legend: {
3097
+ show: false,
3098
+ top: 20,
3099
+ itemWidth: 8,
3100
+ icon: "circle"
3101
+ },
3102
+ visualMap: {
3103
+ show: false,
3104
+ seriesIndex: 1,
3105
+ dimension: 2,
3106
+ pieces: [
3107
+ {
3108
+ value: 1,
3109
+ color: downColor
3110
+ },
3111
+ {
3112
+ value: -1,
3113
+ color: upColor
3114
+ }
3115
+ ]
3116
+ },
3117
+ grid: [
3118
+ {
3119
+ left: "7%",
3120
+ right: "8%",
3121
+ bottom: "8%",
3122
+ height: "85%"
3123
+ },
3124
+ {
3125
+ left: "7%",
3126
+ right: "8%",
3127
+ // top: '0%',
3128
+ bottom: "8%",
3129
+ height: "15%"
3130
+ }
3131
+ ],
3132
+ xAxis: [
3133
+ {
3134
+ type: "category",
3135
+ data: data0.categoryData,
3136
+ boundaryGap: true,
3137
+ axisLine: { onZero: false },
3138
+ splitLine: { show: false },
3139
+ min: "dataMin",
3140
+ max: "dataMax",
3141
+ axisLabel: {
3142
+ formatter: (value) => {
3143
+ return dayjs(value).format("MM/DD");
3144
+ }
3145
+ }
3146
+ },
3147
+ {
3148
+ type: "category",
3149
+ gridIndex: 1,
3150
+ data: data0.categoryData,
3151
+ boundaryGap: true,
3152
+ axisLine: { onZero: false },
3153
+ axisTick: { show: false },
3154
+ splitLine: { show: false },
3155
+ axisLabel: { show: false },
3156
+ min: "dataMin",
3157
+ max: "dataMax"
3158
+ }
3159
+ ],
3160
+ yAxis: [
3161
+ {
3162
+ scale: true,
3163
+ splitLine: {
3164
+ lineStyle: {
3165
+ color: splitLineColor
3166
+ }
3167
+ },
3168
+ splitArea: {
3169
+ show: false
3170
+ }
3171
+ },
3172
+ {
3173
+ scale: true,
3174
+ gridIndex: 1,
3175
+ splitNumber: 2,
3176
+ axisLabel: { show: false },
3177
+ axisLine: { show: false },
3178
+ axisTick: { show: false },
3179
+ splitLine: { show: false }
3180
+ }
3181
+ ],
3182
+ series: [
3183
+ {
3184
+ name: "日K",
3185
+ type: "candlestick",
3186
+ data: data0.values,
3187
+ itemStyle: {
3188
+ color: upColor,
3189
+ color0: downColor,
3190
+ borderColor: upColor,
3191
+ borderColor0: downColor
3192
+ }
3193
+ },
3194
+ {
3195
+ name: "成交量",
3196
+ type: "bar",
3197
+ xAxisIndex: 1,
3198
+ yAxisIndex: 1,
3199
+ data: data0.volumes,
3200
+ zlevel: 0,
3201
+ itemStyle: {
3202
+ opacity: 0.7
3203
+ }
3204
+ }
3205
+ ]
3206
+ };
3207
+ chart.setOption(option);
3208
+ const svgStr = chart.renderToSVGString();
3209
+ return svgStr;
3210
+ };
2722
3211
  const catalogs$3 = [
2723
3212
  "大盘全景扫描与量价配合",
2724
3213
  "资金面博弈与情绪水位",
@@ -2830,7 +3319,7 @@ function Chapter1$3({ data }) {
2830
3319
  ] })
2831
3320
  ] });
2832
3321
  }
2833
- function Chapter2$3({ data }) {
3322
+ function Chapter2$3({ data, capitalFlowsSvg }) {
2834
3323
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chapterPage", children: [
2835
3324
  /* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { index: 2, title: "资金面博弈与情绪水位" }),
2836
3325
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "2.1 涨跌分布与赚钱效应" }),
@@ -2886,7 +3375,18 @@ function Chapter2$3({ data }) {
2886
3375
  ] })
2887
3376
  ] })
2888
3377
  ] }),
2889
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: "这里补一个板块流入 流出的图" }),
3378
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3379
+ /* @__PURE__ */ jsxRuntime.jsx(
3380
+ "div",
3381
+ {
3382
+ className: "w-[651px] h-[284px]",
3383
+ dangerouslySetInnerHTML: {
3384
+ __html: capitalFlowsSvg
3385
+ }
3386
+ }
3387
+ ),
3388
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "figcaption", children: "图2-1 主力资金行业净流入/流出" })
3389
+ ] }),
2890
3390
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "2.3 估值与波动率" }),
2891
3391
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "indent-8", children: data.market_valuation.PE_PB_description }),
2892
3392
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "list", children: /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
@@ -2897,7 +3397,7 @@ function Chapter2$3({ data }) {
2897
3397
  ] }) }) })
2898
3398
  ] });
2899
3399
  }
2900
- function Chapter3$3({ data }) {
3400
+ function Chapter3$3({ data, klineSvg }) {
2901
3401
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chapterPage", children: [
2902
3402
  /* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { index: 3, title: "多周期共振与关键点位" }),
2903
3403
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "3.1 多周期趋势分析" }),
@@ -2947,10 +3447,22 @@ function Chapter3$3({ data }) {
2947
3447
  data.periods_analyze.volatility_summary
2948
3448
  ] })
2949
3449
  ] }),
2950
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: "这里补一个k线图" })
3450
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3451
+ /* @__PURE__ */ jsxRuntime.jsx(
3452
+ "div",
3453
+ {
3454
+ className: "w-[651px] h-[284px]",
3455
+ dangerouslySetInnerHTML: {
3456
+ __html: klineSvg
3457
+ }
3458
+ }
3459
+ ),
3460
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "figcaption", children: "图3-1 上证指数日线K线图" })
3461
+ ] })
2951
3462
  ] });
2952
3463
  }
2953
- function Chapter4$3({ data }) {
3464
+ function Chapter4$3({ data, industriesRankSvg }) {
3465
+ const yCount = Math.ceil(data.industries_info.industries_rank.length / 5);
2954
3466
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chapterPage", children: [
2955
3467
  /* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { index: 4, title: "行业轮动与风格切换" }),
2956
3468
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "4.1 强势行业" }),
@@ -2997,7 +3509,21 @@ function Chapter4$3({ data }) {
2997
3509
  ] })
2998
3510
  ] })
2999
3511
  ] }),
3000
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: "这里补一个板块热力图" })
3512
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3513
+ /* @__PURE__ */ jsxRuntime.jsx(
3514
+ "div",
3515
+ {
3516
+ className: "w-[651px] h-[284px]",
3517
+ style: {
3518
+ height: `${142 * yCount}px`
3519
+ },
3520
+ dangerouslySetInnerHTML: {
3521
+ __html: industriesRankSvg
3522
+ }
3523
+ }
3524
+ ),
3525
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "figcaption", children: "图4-1 行业涨跌幅热力图" })
3526
+ ] })
3001
3527
  ] });
3002
3528
  }
3003
3529
  function Chapter5$3({ data }) {
@@ -3371,15 +3897,26 @@ const renderChapter1$3 = (data) => {
3371
3897
  return renderFullHtml(seg);
3372
3898
  };
3373
3899
  const renderChapter2$3 = (data) => {
3374
- const seg = ReactDOMServer.renderToString(/* @__PURE__ */ jsxRuntime.jsx(Chapter2$3, { data }));
3900
+ const capitalFlowsSvg = renderCapitalFlows(data.capital_flows);
3901
+ const seg = ReactDOMServer.renderToString(
3902
+ /* @__PURE__ */ jsxRuntime.jsx(Chapter2$3, { data, capitalFlowsSvg })
3903
+ );
3375
3904
  return renderFullHtml(seg);
3376
3905
  };
3377
3906
  const renderChapter3$3 = (data) => {
3378
- const seg = ReactDOMServer.renderToString(/* @__PURE__ */ jsxRuntime.jsx(Chapter3$3, { data }));
3907
+ const klineSvg = renderKlineSimple(data.periods_analyze.kline_daily);
3908
+ const seg = ReactDOMServer.renderToString(
3909
+ /* @__PURE__ */ jsxRuntime.jsx(Chapter3$3, { data, klineSvg })
3910
+ );
3379
3911
  return renderFullHtml(seg);
3380
3912
  };
3381
3913
  const renderChapter4$3 = (data) => {
3382
- const seg = ReactDOMServer.renderToString(/* @__PURE__ */ jsxRuntime.jsx(Chapter4$3, { data }));
3914
+ const industriesRankSvg = renderIndustriesRank(
3915
+ data.industries_info.industries_rank
3916
+ );
3917
+ const seg = ReactDOMServer.renderToString(
3918
+ /* @__PURE__ */ jsxRuntime.jsx(Chapter4$3, { data, industriesRankSvg })
3919
+ );
3383
3920
  return renderFullHtml(seg);
3384
3921
  };
3385
3922
  const renderChapter5$3 = (data) => {
@@ -3581,7 +4118,7 @@ zod.z.object({
3581
4118
  })
3582
4119
  });
3583
4120
  const tool$3 = {
3584
- name: "generate_market_trends",
4121
+ name: "generate_market_trends_pdf",
3585
4122
  description: "市场趋势分析报告pdf,传入的json参数必须是标准格式的",
3586
4123
  inputSchema: zodToJsonSchema(marketTrendSchema)
3587
4124
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8btc/finance-assistant-mcp",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "财经agent辅助mcp工具",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",