@bridge-ui/vue 0.18.0 → 0.20.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 (103) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +35 -34
  2. package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
  3. package/dist/Components/Autocomplete/composables/useAutocomplete.js +257 -265
  4. package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
  5. package/dist/Components/Calendar/composables/useCalendar.js +192 -187
  6. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
  7. package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
  8. package/dist/Components/CalendarRange/composables/useCalendarRange.js +243 -238
  9. package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +5 -0
  10. package/dist/Components/ChartBar/chartBar.types.d.ts +11 -1
  11. package/dist/Components/ChartBar/composables/useChartBar.js +4 -4
  12. package/dist/Components/ChartBar/index.d.ts +1 -1
  13. package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +4 -1
  14. package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +24 -2
  15. package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +3 -0
  16. package/dist/Components/ChartBarSeries/index.d.ts +1 -0
  17. package/dist/Components/ChartFunnel/composables/useChartFunnel.js +10 -10
  18. package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +1 -0
  19. package/dist/Components/ChartLine/chartLine.types.d.ts +7 -0
  20. package/dist/Components/ChartLine/composables/useChartLine.js +1 -1
  21. package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +3 -0
  22. package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +23 -2
  23. package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +3 -0
  24. package/dist/Components/ChartLineSeries/index.d.ts +1 -0
  25. package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +3 -0
  26. package/dist/Components/ChartPie/chartPie.types.d.ts +20 -1
  27. package/dist/Components/ChartPie/composables/useChartPie.d.ts +1 -1
  28. package/dist/Components/ChartPie/composables/useChartPie.js +39 -29
  29. package/dist/Components/ChartScatter/composables/useChartScatter.js +63 -58
  30. package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +1 -0
  31. package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +8 -1
  32. package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +2 -1
  33. package/dist/Components/ChartScatterSeries/index.d.ts +1 -0
  34. package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +11 -7
  35. package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +4 -0
  36. package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +1 -0
  37. package/dist/Components/ChartTooltip/composables/useChartTooltip.js +4 -0
  38. package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +1 -2
  39. package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -66
  40. package/dist/Components/DataTable/composables/useDataTable.js +267 -349
  41. package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +1 -2
  42. package/dist/Components/Heading/Heading.js +5 -0
  43. package/dist/Components/Heading/Heading.vue.d.ts +11 -0
  44. package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
  45. package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
  46. package/dist/Components/Heading/composables/useHeading.js +56 -0
  47. package/dist/Components/Heading/heading.types.d.ts +56 -0
  48. package/dist/Components/Heading/index.d.ts +3 -0
  49. package/dist/Components/Heading/index.js +3 -0
  50. package/dist/Components/ListItem/composables/useListItem.js +29 -30
  51. package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +0 -5
  52. package/dist/Components/Listbox/composables/useListboxNavigation.js +23 -50
  53. package/dist/Components/Listbox/index.d.ts +1 -1
  54. package/dist/Components/Listbox/index.js +5 -5
  55. package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
  56. package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +31 -31
  57. package/dist/Components/Select/composables/useSelect.js +201 -211
  58. package/dist/Components/Slider/composables/useSlider.js +93 -122
  59. package/dist/Components/Text/Text.js +5 -0
  60. package/dist/Components/Text/Text.vue.d.ts +11 -0
  61. package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
  62. package/dist/Components/Text/composables/useText.d.ts +9 -0
  63. package/dist/Components/Text/composables/useText.js +56 -0
  64. package/dist/Components/Text/index.d.ts +3 -0
  65. package/dist/Components/Text/index.js +3 -0
  66. package/dist/Components/Text/text.types.d.ts +76 -0
  67. package/dist/Utils/Charts/chart.types.d.ts +17 -0
  68. package/dist/Utils/Charts/chartInjectionKey.d.ts +2 -2
  69. package/dist/Utils/Charts/index.d.ts +1 -1
  70. package/dist/Utils/Charts/useChartCartesian.d.ts +4 -2
  71. package/dist/Utils/Charts/useChartCartesian.js +90 -76
  72. package/dist/augments.d.ts +10 -0
  73. package/dist/index.d.ts +5 -1
  74. package/dist/index.js +175 -171
  75. package/docs/README.md +2 -0
  76. package/docs/components/BridgeUIProvider.md +1 -1
  77. package/docs/components/Card.md +15 -0
  78. package/docs/components/Chart.md +17 -10
  79. package/docs/components/ChartBar.md +70 -17
  80. package/docs/components/ChartLine.md +57 -16
  81. package/docs/components/ChartPie.md +33 -10
  82. package/docs/components/ChartScatter.md +25 -7
  83. package/docs/components/Heading.md +85 -0
  84. package/docs/components/Text.md +118 -0
  85. package/package.json +2 -2
  86. package/dist/Components/RichTextEditor/tiptapEditor.d.ts +0 -111
  87. package/dist/Components/RichTextEditor/tiptapEditor.js +0 -121
  88. package/dist/Utils/Charts/echarts/bar.d.ts +0 -6
  89. package/dist/Utils/Charts/echarts/bar.js +0 -22
  90. package/dist/Utils/Charts/echarts/cartesian.d.ts +0 -15
  91. package/dist/Utils/Charts/echarts/cartesian.js +0 -255
  92. package/dist/Utils/Charts/echarts/funnel.d.ts +0 -15
  93. package/dist/Utils/Charts/echarts/funnel.js +0 -79
  94. package/dist/Utils/Charts/echarts/line.d.ts +0 -5
  95. package/dist/Utils/Charts/echarts/line.js +0 -19
  96. package/dist/Utils/Charts/echarts/part.d.ts +0 -19
  97. package/dist/Utils/Charts/echarts/part.js +0 -45
  98. package/dist/Utils/Charts/echarts/pie.d.ts +0 -14
  99. package/dist/Utils/Charts/echarts/pie.js +0 -75
  100. package/dist/Utils/Charts/echarts/plot.d.ts +0 -44
  101. package/dist/Utils/Charts/echarts/plot.js +0 -52
  102. package/dist/Utils/Charts/echarts/scatter.d.ts +0 -14
  103. package/dist/Utils/Charts/echarts/scatter.js +0 -152
@@ -1,152 +0,0 @@
1
- import { labelStyle as e, mountEchartsPlot as t } from "./plot.js";
2
- import { get as n, isArray as r, isNil as i, isNumber as a } from "es-toolkit/compat";
3
- import { isChartValue as o, scaleChartBubbleSize as s } from "@bridge-ui/core/Domain";
4
- import { ScatterChart as c } from "echarts/charts";
5
- import { GridComponent as l, TooltipComponent as u } from "echarts/components";
6
- import { use as d } from "echarts/core";
7
- import { SVGRenderer as f } from "echarts/renderers";
8
- //#region src/Utils/Charts/echarts/scatter.ts
9
- d([
10
- c,
11
- l,
12
- f,
13
- u
14
- ]);
15
- var p = .7;
16
- function m(e, t, n) {
17
- let a = r(n) ? n[2] : void 0, c = t.symbolSize ?? e.symbolSize;
18
- return !o(a) || i(e.sizeDomain) ? c : s({
19
- value: a,
20
- range: e.bubbleSize,
21
- domain: e.sizeDomain
22
- });
23
- }
24
- function h(t, n) {
25
- let { theme: r } = t;
26
- return {
27
- scale: !0,
28
- min: n.min,
29
- max: n.max,
30
- name: n.label,
31
- type: "value",
32
- show: n.hidden !== !0,
33
- splitNumber: n.tickCount,
34
- nameTextStyle: e(r),
35
- axisLine: { lineStyle: { color: r.axisColor } },
36
- splitLine: {
37
- show: n.grid ?? !0,
38
- lineStyle: { color: r.gridColor }
39
- },
40
- axisLabel: {
41
- ...e(r),
42
- formatter: i(n.formatTick) ? void 0 : (e) => n.formatTick?.(Number(e)) ?? String(e)
43
- }
44
- };
45
- }
46
- function g(e) {
47
- let { theme: t } = e, n = Math.round(t.fontSize * 2.25), r = !i(e.sizeDomain);
48
- return {
49
- animation: e.animation,
50
- tooltip: {
51
- show: !0,
52
- trigger: "item",
53
- showContent: !1
54
- },
55
- yAxis: {
56
- ...h(e, e.yAxis),
57
- nameLocation: "end"
58
- },
59
- textStyle: {
60
- fontSize: t.fontSize,
61
- fontFamily: t.fontFamily
62
- },
63
- xAxis: {
64
- ...h(e, e.xAxis),
65
- nameGap: n,
66
- nameLocation: "middle"
67
- },
68
- grid: {
69
- left: 4,
70
- outerBoundsMode: "same",
71
- outerBoundsContain: "axisLabel",
72
- top: i(e.yAxis.label) ? 12 : n,
73
- right: r ? e.bubbleSize[1] / 2 : 12,
74
- bottom: i(e.xAxis.label) ? 4 : n
75
- },
76
- series: e.series.map((t) => ({
77
- id: t.id,
78
- type: "scatter",
79
- name: t.name,
80
- data: t.data,
81
- emphasis: {
82
- scale: 1.2,
83
- focus: "series"
84
- },
85
- symbolSize: (n) => m(e, t, n),
86
- itemStyle: {
87
- color: t.color,
88
- opacity: r ? p : 1
89
- }
90
- }))
91
- };
92
- }
93
- function _(e, t, n) {
94
- let r = e.points.findIndex((e) => e.seriesIndex === t && e.dataIndex === n);
95
- return r === -1 ? null : r;
96
- }
97
- var v = {
98
- build: g,
99
- highlight: (e, t, n) => {
100
- e.dispatchAction({ type: "downplay" }), i(n) || e.dispatchAction({
101
- seriesId: n,
102
- type: "highlight"
103
- });
104
- },
105
- attach: (e, t, r) => {
106
- e.on("mouseover", (e) => {
107
- let i = n(e, "seriesIndex"), o = n(e, "dataIndex");
108
- a(i) && a(o) && t(_(r(), i, o));
109
- }), e.on("mouseout", () => {
110
- t(null);
111
- });
112
- },
113
- showActive: (e, t, n) => {
114
- e.dispatchAction({ type: "downplay" });
115
- let r = i(n) ? void 0 : t.points[n];
116
- if (i(r)) {
117
- e.dispatchAction({ type: "hideTip" });
118
- return;
119
- }
120
- let a = {
121
- dataIndex: r.dataIndex,
122
- seriesIndex: r.seriesIndex
123
- };
124
- e.dispatchAction({
125
- ...a,
126
- type: "highlight"
127
- }), e.dispatchAction({
128
- ...a,
129
- type: "showTip"
130
- });
131
- },
132
- getAnchor: (e, t, n) => {
133
- let o = t.points[n], s = i(o) ? void 0 : t.series[o.seriesIndex];
134
- if (i(o) || i(s)) return null;
135
- let c = e.convertToPixel({ seriesIndex: o.seriesIndex }, [o.x, o.y]);
136
- if (!r(c) || !a(c[0]) || !a(c[1])) return null;
137
- let l = m(t, s, i(o.size) ? [o.x, o.y] : [
138
- o.x,
139
- o.y,
140
- o.size
141
- ]);
142
- return {
143
- x: c[0],
144
- y: c[1] - l / 2
145
- };
146
- }
147
- };
148
- function y(e) {
149
- return t(e, v);
150
- }
151
- //#endregion
152
- export { g as buildEchartsScatterOption, y as mountEchartsScatter };