@jcdecor/vue 0.1.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 (107) hide show
  1. package/README.md +68 -0
  2. package/dist/brand/Brand.d.ts +83 -0
  3. package/dist/brand/index.d.ts +2 -0
  4. package/dist/brand/paths.d.ts +43 -0
  5. package/dist/brand-CeSffe5P.js +320 -0
  6. package/dist/brand-CeSffe5P.js.map +1 -0
  7. package/dist/brand.d.ts +1 -0
  8. package/dist/brand.js +2 -0
  9. package/dist/charts/ChartCard.d.ts +32 -0
  10. package/dist/charts/charts.d.ts +124 -0
  11. package/dist/charts/echartsTheme.d.ts +19 -0
  12. package/dist/charts/index.d.ts +8 -0
  13. package/dist/charts/palette.d.ts +59 -0
  14. package/dist/charts.d.ts +1 -0
  15. package/dist/charts.js +473 -0
  16. package/dist/charts.js.map +1 -0
  17. package/dist/chat/ChatComposer.d.ts +34 -0
  18. package/dist/chat/ChatLayout.d.ts +53 -0
  19. package/dist/chat/ChatMessage.d.ts +26 -0
  20. package/dist/chat/ChatThread.d.ts +36 -0
  21. package/dist/chat/ConversationList.d.ts +22 -0
  22. package/dist/chat/TypingIndicator.d.ts +8 -0
  23. package/dist/chat/index.d.ts +9 -0
  24. package/dist/chat/node.d.ts +12 -0
  25. package/dist/chat/types.d.ts +38 -0
  26. package/dist/chat/utils.d.ts +25 -0
  27. package/dist/chat.d.ts +1 -0
  28. package/dist/chat.js +661 -0
  29. package/dist/chat.js.map +1 -0
  30. package/dist/colors-DUSEhAuo.js +32 -0
  31. package/dist/colors-DUSEhAuo.js.map +1 -0
  32. package/dist/components/ContentCard/ContentCard.d.ts +8 -0
  33. package/dist/components/ContentCard/ContentCard.types.d.ts +34 -0
  34. package/dist/components/ContentCard/ContentCard.vue.d.ts +35 -0
  35. package/dist/components/ContentCard/index.d.ts +1 -0
  36. package/dist/components/CouponCode/CouponCode.d.ts +20 -0
  37. package/dist/components/CouponCode/index.d.ts +1 -0
  38. package/dist/components/DataTable/DataTable.d.ts +95 -0
  39. package/dist/components/DataTable/index.d.ts +1 -0
  40. package/dist/components/KpiCard/KpiCard.d.ts +12 -0
  41. package/dist/components/KpiCard/KpiCard.types.d.ts +44 -0
  42. package/dist/components/KpiCard/KpiCard.vars.d.ts +3 -0
  43. package/dist/components/KpiCard/KpiCard.vue.d.ts +42 -0
  44. package/dist/components/KpiCard/KpiGroup.d.ts +10 -0
  45. package/dist/components/KpiCard/index.d.ts +1 -0
  46. package/dist/components/PageHeader/PageHeader.d.ts +29 -0
  47. package/dist/components/PageHeader/index.d.ts +1 -0
  48. package/dist/components/PriceTag/PriceTag.d.ts +21 -0
  49. package/dist/components/PriceTag/index.d.ts +1 -0
  50. package/dist/components/ProductCard/ProductCard.d.ts +12 -0
  51. package/dist/components/ProductCard/ProductCard.types.d.ts +53 -0
  52. package/dist/components/ProductCard/ProductCard.vue.d.ts +45 -0
  53. package/dist/components/ProductCard/index.d.ts +1 -0
  54. package/dist/components/PromoBanner/PromoBanner.d.ts +12 -0
  55. package/dist/components/PromoBanner/PromoBanner.types.d.ts +50 -0
  56. package/dist/components/PromoBanner/PromoBanner.vars.d.ts +2 -0
  57. package/dist/components/PromoBanner/PromoBanner.vue.d.ts +41 -0
  58. package/dist/components/PromoBanner/index.d.ts +1 -0
  59. package/dist/components/Tag/Tag.d.ts +18 -0
  60. package/dist/components/Tag/index.d.ts +1 -0
  61. package/dist/components/ThemeToggle/ThemeToggle.d.ts +10 -0
  62. package/dist/components/ThemeToggle/index.d.ts +1 -0
  63. package/dist/components/TokenSwatch/TokenSwatch.d.ts +21 -0
  64. package/dist/components/TokenSwatch/index.d.ts +1 -0
  65. package/dist/components/TopNav/TopNav.d.ts +9 -0
  66. package/dist/components/TopNav/TopNav.types.d.ts +50 -0
  67. package/dist/components/TopNav/TopNav.vue.d.ts +33 -0
  68. package/dist/components/TopNav/index.d.ts +1 -0
  69. package/dist/components/Typography/Typography.d.ts +41 -0
  70. package/dist/components/Typography/index.d.ts +1 -0
  71. package/dist/components/index.d.ts +13 -0
  72. package/dist/format-D40SMATK.js +108 -0
  73. package/dist/format-D40SMATK.js.map +1 -0
  74. package/dist/index.d.ts +15 -0
  75. package/dist/index.js +2239 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/provider/JcProvider.d.ts +285 -0
  78. package/dist/styles.css +2 -0
  79. package/dist/theme/colors.d.ts +26 -0
  80. package/dist/theme/components/buttons.d.ts +2 -0
  81. package/dist/theme/components/combobox.d.ts +2 -0
  82. package/dist/theme/components/dataDisplay.d.ts +2 -0
  83. package/dist/theme/components/feedback.d.ts +2 -0
  84. package/dist/theme/components/index.d.ts +3 -0
  85. package/dist/theme/components/inputs.d.ts +2 -0
  86. package/dist/theme/components/layout.d.ts +2 -0
  87. package/dist/theme/components/misc.d.ts +2 -0
  88. package/dist/theme/components/navigation.d.ts +2 -0
  89. package/dist/theme/components/overlays.d.ts +2 -0
  90. package/dist/theme/components/types.d.ts +11 -0
  91. package/dist/theme/components/typography.d.ts +2 -0
  92. package/dist/theme/controls.d.ts +44 -0
  93. package/dist/theme/cssVariablesResolver.d.ts +2 -0
  94. package/dist/theme/theme.d.ts +3 -0
  95. package/dist/theme/themeDefaults.d.ts +18 -0
  96. package/dist/theme/tokens.d.ts +457 -0
  97. package/dist/theme/variantColorResolver.d.ts +9 -0
  98. package/dist/themeDefaults-Ckd05FUY.js +29 -0
  99. package/dist/themeDefaults-Ckd05FUY.js.map +1 -0
  100. package/dist/tokens-CDSk_JkY.js +315 -0
  101. package/dist/tokens-CDSk_JkY.js.map +1 -0
  102. package/dist/tokens.d.ts +2 -0
  103. package/dist/tokens.js +3 -0
  104. package/dist/utils/format.d.ts +14 -0
  105. package/dist/utils/styles-api.d.ts +15 -0
  106. package/dist/utils/vue.d.ts +27 -0
  107. package/package.json +109 -0
package/dist/charts.js ADDED
@@ -0,0 +1,473 @@
1
+ import { t as e } from "./themeDefaults-Ckd05FUY.js";
2
+ import { c as t, l as n, n as r, o as i, r as a, u as o } from "./tokens-CDSk_JkY.js";
3
+ import { a as s, d as c } from "./format-D40SMATK.js";
4
+ import { Group as l, SegmentedControl as u, Text as d, hasNode as f, resolveNode as p, useComputedColorScheme as m, useMantineTheme as h } from "@mantine-vue/core";
5
+ import { computed as g, defineComponent as _, h as v, inject as y, provide as b, ref as x, toValue as S } from "vue";
6
+ import { THEME_KEY as C } from "vue-echarts";
7
+ import { AreaChart as w, BarChart as ee, BarsList as te, BubbleChart as ne, CandlestickChart as re, ChartLegend as ie, ChartTooltip as ae, CompositeChart as oe, DonutChart as se, FunnelChart as ce, GaugeChart as le, Heatmap as ue, LineChart as de, MatrixChart as fe, PieChart as pe, RadarChart as T, RadialBarChart as E, SankeyChart as D, ScatterChart as O, Sparkline as k, Treemap as A, WaffleChart as j } from "@mantine-vue/charts";
8
+ //#region src/charts/echartsTheme.ts
9
+ var M = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
10
+ function N(e, t) {
11
+ if (!M(t)) return e;
12
+ let n = { ...e };
13
+ for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = M(r) && M(n[e]) ? N(n[e], r) : r);
14
+ return n;
15
+ }
16
+ function P(e, n = {}) {
17
+ let a = o[e], s = {
18
+ axisLine: { lineStyle: { color: a.borderSoft } },
19
+ axisTick: {
20
+ show: !1,
21
+ lineStyle: { color: a.borderSoft }
22
+ },
23
+ axisLabel: { color: a.text3 },
24
+ splitLine: { lineStyle: {
25
+ color: a.borderSoft,
26
+ type: [4, 4]
27
+ } },
28
+ nameTextStyle: { color: a.text3 }
29
+ }, c = { color: a.text2 };
30
+ return {
31
+ color: [...r[e]],
32
+ backgroundColor: "transparent",
33
+ textStyle: { fontFamily: i },
34
+ title: {
35
+ textStyle: { color: a.text },
36
+ subtextStyle: { color: a.text3 }
37
+ },
38
+ legend: {
39
+ textStyle: { color: a.text2 },
40
+ inactiveColor: a.border,
41
+ pageTextStyle: { color: a.text3 },
42
+ pageIconColor: a.text2,
43
+ pageIconInactiveColor: a.border
44
+ },
45
+ tooltip: {
46
+ backgroundColor: a.surface,
47
+ borderColor: a.borderSoft,
48
+ borderWidth: 1,
49
+ padding: [8, 12],
50
+ textStyle: {
51
+ color: a.text,
52
+ fontFamily: i,
53
+ fontSize: 13
54
+ },
55
+ extraCssText: `box-shadow: ${a.shadowMd}; border-radius: ${t.sm};`,
56
+ axisPointer: {
57
+ lineStyle: { color: a.border },
58
+ crossStyle: { color: a.border },
59
+ shadowStyle: { color: a.primarySoft }
60
+ }
61
+ },
62
+ categoryAxis: s,
63
+ valueAxis: s,
64
+ logAxis: s,
65
+ timeAxis: s,
66
+ radar: {
67
+ axisName: { color: a.text2 },
68
+ axisLine: { lineStyle: { color: a.borderSoft } },
69
+ splitLine: { lineStyle: { color: a.borderSoft } },
70
+ splitArea: { show: !1 },
71
+ areaStyle: { opacity: .25 },
72
+ lineStyle: { width: 2 }
73
+ },
74
+ bar: {
75
+ label: c,
76
+ ...n.barRadius !== void 0 && { itemStyle: { borderRadius: n.barRadius } }
77
+ },
78
+ line: { label: c },
79
+ scatter: { label: c },
80
+ gauge: {
81
+ detail: { color: a.text },
82
+ title: { color: a.text3 }
83
+ },
84
+ sankey: {
85
+ label: c,
86
+ lineStyle: {
87
+ color: "source",
88
+ opacity: .35
89
+ }
90
+ },
91
+ treemap: { breadcrumb: { itemStyle: {
92
+ color: a.surface2,
93
+ borderColor: a.borderSoft,
94
+ textStyle: { color: a.text2 }
95
+ } } },
96
+ visualMap: { textStyle: { color: a.text3 } },
97
+ calendar: {
98
+ itemStyle: {
99
+ color: a.surface2,
100
+ borderColor: a.surface
101
+ },
102
+ splitLine: { show: !1 },
103
+ dayLabel: { color: a.text3 },
104
+ monthLabel: { color: a.text3 },
105
+ yearLabel: { show: !1 }
106
+ },
107
+ dataZoom: {
108
+ textStyle: { color: a.text3 },
109
+ borderColor: a.borderSoft
110
+ }
111
+ };
112
+ }
113
+ //#endregion
114
+ //#region src/charts/palette.ts
115
+ function F(e) {
116
+ return a[e % a.length];
117
+ }
118
+ function I(e) {
119
+ return e.map((e, t) => ({
120
+ ...e,
121
+ color: e.color ?? F(t)
122
+ }));
123
+ }
124
+ var L = (e) => s(e), R = /^var\(\s*--jc-chart-(\d+)\s*(?:,[^)]*)?\)$/, z = /^var\(\s*--mantine-color-([a-z][\w]*)-(\d)\s*\)$/i, B = /^([a-z][\w]*)(?:\.(\d))?$/i;
125
+ function me(e, t) {
126
+ let n = e.primaryShade;
127
+ return typeof n == "number" ? n : n?.[t] ?? 6;
128
+ }
129
+ function V(e, t, n) {
130
+ if (typeof e != "string") return;
131
+ let i = e.trim();
132
+ if (!i) return;
133
+ let a = R.exec(i);
134
+ if (a) {
135
+ let e = r[n], t = Number(a[1]) - 1;
136
+ return t >= 0 ? e[t % e.length] : i;
137
+ }
138
+ let o = z.exec(i);
139
+ if (o) return t.colors[o[1]]?.[Number(o[2])] ?? i;
140
+ if (i === "white" && t.white) return t.white;
141
+ if (i === "black" && t.black) return t.black;
142
+ let s = B.exec(i);
143
+ if (s) {
144
+ let e = t.colors[s[1]];
145
+ if (e) return e[s[2] === void 0 ? me(t, n) : Number(s[2])] ?? i;
146
+ }
147
+ return i;
148
+ }
149
+ function H(e, t) {
150
+ let n = r[t];
151
+ return n[e % n.length];
152
+ }
153
+ function U() {
154
+ let e = h(), t = m("light"), n = g(() => t.value === "dark" ? "dark" : "light"), i = g(() => o[n.value]), a = g(() => r[n.value]), s = (t) => V(t, e.value, n.value), c = (e) => H(e, n.value);
155
+ return {
156
+ scheme: n,
157
+ tokens: i,
158
+ palette: a,
159
+ resolve: s,
160
+ color: c,
161
+ withPalette: (e) => (e ?? []).map((e, t) => ({
162
+ ...e,
163
+ color: s(e.color) ?? c(t)
164
+ }))
165
+ };
166
+ }
167
+ //#endregion
168
+ //#region src/charts/charts.ts
169
+ var he = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ge = /* @__PURE__ */ new Set([
170
+ "connectNulls",
171
+ "roundCaps",
172
+ "autoresize",
173
+ "loading"
174
+ ]), _e = (e) => ge.has(e) || /^with[A-Z]/.test(e);
175
+ function ve(e) {
176
+ let t = {};
177
+ for (let [n, r] of Object.entries(e)) {
178
+ let e = n.startsWith("data-") || n.startsWith("aria-") ? n : he(n);
179
+ t[e] = r === "" && _e(e) ? !0 : r;
180
+ }
181
+ return t;
182
+ }
183
+ var ye = (e) => Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0)), W = (e) => Array.isArray(e) ? e : void 0, G = (e) => typeof e == "string" ? e : void 0, K = (e) => typeof e == "function" ? e : L;
184
+ function q(e, t, n) {
185
+ return _({
186
+ name: `Jc${e}`,
187
+ inheritAttrs: !1,
188
+ props: n.props ?? {},
189
+ setup(e, { attrs: r, slots: i, expose: a }) {
190
+ let o = U(), s = y(C, null), c = g(() => N(P(o.scheme.value, n.themeOptions?.(e)), S(s)));
191
+ b(C, c);
192
+ let l = x();
193
+ return a({
194
+ getEchartsInstance: () => l.value?.getEchartsInstance?.(),
195
+ resize: () => l.value?.resize?.(),
196
+ setOption: (e) => l.value?.setOption?.(e)
197
+ }), () => {
198
+ let { h: a, ...s } = {
199
+ ...ye(e),
200
+ ...ve(r)
201
+ };
202
+ s.height === void 0 && a !== void 0 && (s.height = a);
203
+ let c = {
204
+ c: o,
205
+ t: o.tokens.value,
206
+ scheme: o.scheme.value
207
+ };
208
+ return v(t, {
209
+ ...n.build(s, c),
210
+ ref: l
211
+ }, i);
212
+ };
213
+ }
214
+ });
215
+ }
216
+ function J(e, t, { c: n, t: r }) {
217
+ let i = {
218
+ ...e,
219
+ ...t
220
+ }, a = n.resolve(G(t.textColor)) ?? r.text3, o = n.resolve(G(t.gridColor)) ?? r.borderSoft, s = K(i.valueFormatter), c = { lineStyle: { color: o } }, l = {
221
+ axisLabel: { color: a },
222
+ splitLine: c
223
+ }, u = {
224
+ axisLabel: {
225
+ color: a,
226
+ formatter: (e) => s(e)
227
+ },
228
+ splitLine: c
229
+ }, d = t.orientation === "vertical";
230
+ return {
231
+ ...i,
232
+ valueFormatter: s,
233
+ textColor: a,
234
+ gridColor: o,
235
+ xAxisProps: N(d ? u : l, t.xAxisProps),
236
+ yAxisProps: N(d ? l : u, t.yAxisProps),
237
+ rightYAxisProps: N(u, t.rightYAxisProps),
238
+ referenceLines: Y(t.referenceLines, n, r.text3),
239
+ referenceAreas: Y(t.referenceAreas, n, r.text3),
240
+ referenceDots: Y(t.referenceDots, n, r.text3),
241
+ series: n.withPalette(W(t.series))
242
+ };
243
+ }
244
+ function Y(e, t, n) {
245
+ return W(e)?.map((e) => ({
246
+ ...e,
247
+ color: t.resolve(e.color) ?? n
248
+ }));
249
+ }
250
+ function be(e, t) {
251
+ return N({ valueFormatter: (e) => t(Number(e)) }, e.tooltipProps);
252
+ }
253
+ var X = {
254
+ light: [
255
+ n.horizon[100],
256
+ n.horizon[300],
257
+ n.horizon[500],
258
+ n.horizon[700]
259
+ ],
260
+ dark: [
261
+ n.horizon[900],
262
+ n.horizon[700],
263
+ n.horizon[500],
264
+ n.horizon[300]
265
+ ]
266
+ }, xe = q("LineChart", de, { build: (e, t) => J({
267
+ height: 280,
268
+ curveType: "monotone",
269
+ strokeWidth: 2.5
270
+ }, e, t) }), Se = q("AreaChart", w, { build: (e, t) => J({
271
+ height: 280,
272
+ curveType: "monotone",
273
+ strokeWidth: 2.5,
274
+ fillOpacity: .25
275
+ }, e, t) });
276
+ function Ce(e) {
277
+ let t = e.barProps && typeof e.barProps == "object" ? e.barProps : {}, n = t.radius ?? t.borderRadius;
278
+ if (Array.isArray(n)) return n;
279
+ let r = e.type === "stacked" || e.type === "percent", i = typeof n == "number" ? n : r ? 0 : 4;
280
+ return e.orientation === "vertical" ? [
281
+ 0,
282
+ i,
283
+ i,
284
+ 0
285
+ ] : [
286
+ i,
287
+ i,
288
+ 0,
289
+ 0
290
+ ];
291
+ }
292
+ var we = q("BarChart", ee, {
293
+ props: {
294
+ type: String,
295
+ orientation: String,
296
+ barProps: {
297
+ type: [Object, Function],
298
+ default: void 0
299
+ }
300
+ },
301
+ themeOptions: (e) => ({ barRadius: Ce(e) }),
302
+ build: (e, t) => J({ height: 280 }, e, t)
303
+ }), Te = q("CompositeChart", oe, { build: (e, t) => J({
304
+ height: 280,
305
+ curveType: "monotone"
306
+ }, e, t) }), Ee = q("RadarChart", T, { build: (e, { c: t }) => ({
307
+ height: 300,
308
+ ...e,
309
+ series: t.withPalette(W(e.series))
310
+ }) });
311
+ function Z(e, t, { c: n, t: r }) {
312
+ let i = K(t.valueFormatter);
313
+ return {
314
+ height: typeof t.size == "number" ? t.size : 160,
315
+ withTooltip: !0,
316
+ ...e,
317
+ ...t,
318
+ valueFormatter: i,
319
+ tooltipProps: be(t, i),
320
+ chartLabelColor: n.resolve(G(t.chartLabelColor)) ?? r.text,
321
+ data: n.withPalette(W(t.data))
322
+ };
323
+ }
324
+ var De = q("DonutChart", se, { build: (e, t) => Z({
325
+ paddingAngle: 2,
326
+ thickness: 52
327
+ }, e, t) }), Oe = q("PieChart", pe, { build: (e, t) => Z({}, e, t) }), ke = q("Sparkline", k, { build: (e, { c: t }) => {
328
+ let n = e.trendColors;
329
+ return {
330
+ height: 48,
331
+ curveType: "monotone",
332
+ fillOpacity: .3,
333
+ strokeWidth: 2,
334
+ ...e,
335
+ color: t.resolve(G(e.color)) ?? t.color(0),
336
+ trendColors: n && Object.fromEntries(Object.entries(n).map(([e, n]) => [e, t.resolve(n)]))
337
+ };
338
+ } }), Ae = q("ScatterChart", O, { build: (e, { c: t }) => ({
339
+ ...e,
340
+ series: t.withPalette(W(e.series))
341
+ }) }), je = q("BubbleChart", ne, { build: (e, { c: t }) => ({
342
+ valueFormatter: L,
343
+ ...e,
344
+ color: t.resolve(G(e.color)) ?? t.color(0)
345
+ }) }), Me = q("FunnelChart", ce, { build: (e, { c: t }) => ({
346
+ valueFormatter: L,
347
+ ...e,
348
+ data: t.withPalette(W(e.data))
349
+ }) }), Ne = q("RadialBarChart", E, { build: (e, { c: t }) => ({
350
+ ...e,
351
+ data: t.withPalette(W(e.data))
352
+ }) }), Pe = q("BarsList", te, {
353
+ themeOptions: () => ({ barRadius: [
354
+ 0,
355
+ 4,
356
+ 4,
357
+ 0
358
+ ] }),
359
+ build: (e, { c: t, t: n }) => ({
360
+ valueFormatter: L,
361
+ ...e,
362
+ barColor: t.resolve(G(e.barColor)) ?? t.color(0),
363
+ textColor: t.resolve(G(e.textColor) ?? G(e.barTextColor)) ?? n.text2
364
+ })
365
+ }), Fe = q("Heatmap", ue, { build: (e, { c: t, scheme: n }) => ({
366
+ ...e,
367
+ colors: (W(e.colors) ?? X[n]).map((e) => t.resolve(e) ?? e)
368
+ }) }), Q = q("MatrixChart", fe, { build: (e, { c: t, t: n, scheme: r }) => ({
369
+ ...e,
370
+ colors: (W(e.colors) ?? X[r]).map((e) => t.resolve(e) ?? e),
371
+ emptyColor: t.resolve(G(e.emptyColor)) ?? n.surface2
372
+ }) }), Ie = q("GaugeChart", le, { build: (e, { c: t, t: n }) => ({
373
+ valueFormatter: L,
374
+ ...e,
375
+ filledColor: t.resolve(G(e.filledColor)) ?? t.color(0),
376
+ trackColor: t.resolve(G(e.trackColor)) ?? n.borderSoft,
377
+ targetColor: t.resolve(G(e.targetColor)) ?? n.text,
378
+ sections: W(e.sections)?.map((e, n) => ({
379
+ ...e,
380
+ color: t.resolve(e.color) ?? t.color(n)
381
+ }))
382
+ }) }), Le = q("WaffleChart", j, { build: (e, { c: t, t: n }) => ({
383
+ ...e,
384
+ data: t.withPalette(W(e.data)),
385
+ emptyColor: t.resolve(G(e.emptyColor)) ?? n.borderSoft
386
+ }) }), Re = q("Treemap", A, { build: (e, { c: t }) => ({
387
+ valueFormatter: L,
388
+ ...e,
389
+ data: t.withPalette(W(e.data))
390
+ }) }), ze = q("SankeyChart", D, { build: (e, { c: t }) => {
391
+ let n = (e) => e && t.withPalette(e).map((e) => ({
392
+ ...e,
393
+ itemStyle: {
394
+ color: e.color,
395
+ ...e.itemStyle
396
+ }
397
+ }));
398
+ return {
399
+ valueFormatter: L,
400
+ ...e,
401
+ ...e.nodes !== void 0 && { nodes: n(W(e.nodes)) },
402
+ ...e.data !== void 0 && { data: n(W(e.data)) }
403
+ };
404
+ } }), Be = q("CandlestickChart", re, { build: (e, { c: t }) => ({
405
+ ...e,
406
+ upColor: t.resolve(G(e.upColor) ?? "evergreen"),
407
+ downColor: t.resolve(G(e.downColor) ?? "danger")
408
+ }) }), $ = {
409
+ type: null,
410
+ default: void 0
411
+ }, Ve = _({
412
+ name: "ChartCard",
413
+ inheritAttrs: !1,
414
+ props: {
415
+ kicker: $,
416
+ title: $,
417
+ description: $,
418
+ value: $,
419
+ periods: {
420
+ type: Array,
421
+ default: void 0
422
+ },
423
+ period: {
424
+ type: String,
425
+ default: void 0
426
+ }
427
+ },
428
+ emits: ["update:period", "periodChange"],
429
+ setup(t, { attrs: n, slots: r, emit: i }) {
430
+ let a = (e) => {
431
+ i("update:period", String(e)), i("periodChange", String(e));
432
+ };
433
+ return () => {
434
+ let i = p(t.kicker, r.kicker), o = p(t.description, r.description), s = p(t.value, r.value), m = r.actions?.(), h = t.periods ?? [], g = v("div", { style: {
435
+ flex: "1 1 220px",
436
+ minWidth: 0
437
+ } }, [
438
+ f(i) ? v(c, { mb: 4 }, () => i) : null,
439
+ v(d, {
440
+ fw: 600,
441
+ fz: "var(--type-subheadline-lg)",
442
+ lh: 1.3
443
+ }, () => p(t.title, r.title)),
444
+ f(o) ? v(d, {
445
+ fz: "xs",
446
+ c: "var(--ds-text-3)",
447
+ mt: 2
448
+ }, () => o) : null,
449
+ f(s) ? v(d, {
450
+ fw: 700,
451
+ fz: "var(--type-headline-md)",
452
+ mt: 4,
453
+ style: { fontVariantNumeric: "tabular-nums" }
454
+ }, () => s) : null
455
+ ]), _ = v(l, { gap: "xs" }, () => [h.length > 0 ? v(u, {
456
+ size: "xs",
457
+ data: h,
458
+ modelValue: t.period,
459
+ "onUpdate:modelValue": a
460
+ }) : null, m]);
461
+ return v(e, n, () => [v(l, {
462
+ justify: "space-between",
463
+ align: "flex-start",
464
+ mb: "lg",
465
+ gap: "sm"
466
+ }, () => [g, _]), r.default?.()]);
467
+ };
468
+ }
469
+ });
470
+ //#endregion
471
+ export { Se as AreaChart, we as BarChart, Pe as BarsList, je as BubbleChart, Be as CandlestickChart, Ve as ChartCard, ie as ChartLegend, ae as ChartTooltip, Te as CompositeChart, De as DonutChart, Me as FunnelChart, Ie as GaugeChart, Fe as Heatmap, xe as LineChart, Q as MatrixChart, Oe as PieChart, Ee as RadarChart, Ne as RadialBarChart, ze as SankeyChart, Ae as ScatterChart, ke as Sparkline, Re as Treemap, Le as WaffleChart, r as chartColors, a as chartPalette, P as createJcEChartsTheme, N as mergeChartOptions, F as paletteColor, H as paletteHex, L as ptBRValueFormatter, V as resolveChartColor, U as useJcChartColors, I as withPalette };
472
+
473
+ //# sourceMappingURL=charts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.js","names":["camelize","MLineChart","MAreaChart","MBarChart","MCompositeChart","MRadarChart","MDonutChart","MPieChart","MSparkline","MScatterChart","MBubbleChart","MFunnelChart","MRadialBarChart","MBarsList","MHeatmap","MMatrixChart","MGaugeChart","MWaffleChart","MTreemap","MSankeyChart","MCandlestickChart","Card","Card$1","radius","ramps","chartColors","fontFamily","chartPalette","semantic","formatNumber","Kicker","AreaChart$1","BarChart$1","BarsList$1","BubbleChart$1","CandlestickChart$1","CompositeChart$1","DonutChart$1","FunnelChart$1","GaugeChart$1","Heatmap$1","LineChart$1","MatrixChart$1","PieChart$1","RadarChart$1","RadialBarChart$1","SankeyChart$1","ScatterChart$1","Sparkline$1","Treemap$1","WaffleChart$1","isPlainObject","value","mergeChartOptions","source","target","result","key","createJcEChartsTheme","s","scheme","axis","label","options","paletteColor","index","withPalette","items","item","ptBRValueFormatter","JC_CHART_VAR","MANTINE_COLOR_VAR","THEME_COLOR","primaryShadeFor","shade","theme","resolveChartColor","color","chartVar","colors","mantineVar","themeColor","tuple","paletteHex","useJcChartColors","useMantineTheme","computedScheme","useComputedColorScheme","computed","tokens","palette","resolve","camelize$1","letter","BOOLEAN_PROPS","isBooleanProp","normalizeAttrs","out","attrs","name","definedEntries","props","asArray","asString","asFormatter","defineJcChart","defineComponent","spec","c","outerTheme","inject","THEME_KEY","toValue","chart","ref","expose","option","heightAlias","input","ctx","h","base","slots","gridChartProps","merged","defaults","text","t","grid","format","splitLine","categoryAxis","valueAxis","vertical","resolveRefs","fallback","itemTooltipProps","sequentialColors","LineChart","AreaChart","barRadius","barProps","custom","stacked","r","BarChart","CompositeChart","RadarChart","radialProps","DonutChart","PieChart","Sparkline","trend","ScatterChart","BubbleChart","FunnelChart","RadialBarChart","BarsList","Heatmap","MatrixChart","GaugeChart","section","WaffleChart","Treemap","SankeyChart","withNodeColors","nodes","node","CandlestickChart","nodeProp","ChartCard","onPeriod","emit","kicker","resolveNode","description","actions","periods","heading","hasNode","Text","controls","Group","SegmentedControl","ChartLegend","ChartTooltip"],"sources":["../src/charts/echartsTheme.ts","../src/charts/palette.ts","../src/charts/charts.ts","../src/charts/ChartCard.ts"],"sourcesContent":["import { chartColors, fontFamily, radius, semantic } from '../theme/tokens';\nimport type { ChartColorScheme } from './palette';\n\n/** Objeto de tema do ECharts (o mesmo formato de `echarts.registerTheme`). */\nexport type JcEChartsTheme = Record<string, unknown>;\n\nexport interface JcEChartsThemeOptions {\n /** Raio das barras (`itemStyle.borderRadius` do ECharts). Omitido = barras retas. */\n barRadius?: number | number[];\n}\n\ntype PlainObject = Record<string, unknown>;\n\nconst isPlainObject = (value: unknown): value is PlainObject =>\n !!value && typeof value === 'object' && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;\n\n/** Mescla profunda de objetos simples: `source` vence; arrays e funções são substituídos. */\nexport function mergeChartOptions<T extends PlainObject>(target: T, source: unknown): T {\n if (!isPlainObject(source)) return target;\n const result: PlainObject = { ...target };\n for (const [key, value] of Object.entries(source)) {\n if (value === undefined) continue;\n result[key] = isPlainObject(value) && isPlainObject(result[key]) ? mergeChartOptions(result[key] as PlainObject, value) : value;\n }\n return result as T;\n}\n\n/**\n * Tema do ECharts com os tokens JC Decor para o esquema `scheme`.\n * Os gráficos do Mantine Vue desenham em canvas, onde variáveis CSS (`--ds-*`) não chegam:\n * textos, eixos, grade, legenda e tooltip recebem aqui os hex do tema claro/escuro.\n * Valores definidos explicitamente nas opções do gráfico continuam tendo prioridade.\n * Também serve para quem usa `vue-echarts` direto: `provide(THEME_KEY, createJcEChartsTheme('dark'))`.\n */\nexport function createJcEChartsTheme(scheme: ChartColorScheme, options: JcEChartsThemeOptions = {}): JcEChartsTheme {\n const s = semantic[scheme];\n const axis = {\n axisLine: { lineStyle: { color: s.borderSoft } },\n axisTick: { show: false, lineStyle: { color: s.borderSoft } },\n axisLabel: { color: s.text3 },\n splitLine: { lineStyle: { color: s.borderSoft, type: [4, 4] } },\n nameTextStyle: { color: s.text3 },\n };\n const label = { color: s.text2 };\n\n return {\n color: [...chartColors[scheme]],\n backgroundColor: 'transparent',\n // Só a fonte: cor global quebraria o contraste automático dos rótulos internos (pizza, funil, treemap)\n textStyle: { fontFamily },\n title: { textStyle: { color: s.text }, subtextStyle: { color: s.text3 } },\n legend: {\n textStyle: { color: s.text2 },\n inactiveColor: s.border,\n pageTextStyle: { color: s.text3 },\n pageIconColor: s.text2,\n pageIconInactiveColor: s.border,\n },\n // Mesmo visual do `.mantine-ChartTooltip-tooltip` do global.css (o tooltip do ECharts é HTML com estilo inline)\n tooltip: {\n backgroundColor: s.surface,\n borderColor: s.borderSoft,\n borderWidth: 1,\n padding: [8, 12],\n textStyle: { color: s.text, fontFamily, fontSize: 13 },\n extraCssText: `box-shadow: ${s.shadowMd}; border-radius: ${radius.sm};`,\n axisPointer: {\n lineStyle: { color: s.border },\n crossStyle: { color: s.border },\n shadowStyle: { color: s.primarySoft },\n },\n },\n categoryAxis: axis,\n valueAxis: axis,\n logAxis: axis,\n timeAxis: axis,\n // `radar` vale para o componente (eixos/grade) e para a série (preenchimento 25%)\n radar: {\n axisName: { color: s.text2 },\n axisLine: { lineStyle: { color: s.borderSoft } },\n splitLine: { lineStyle: { color: s.borderSoft } },\n splitArea: { show: false },\n areaStyle: { opacity: 0.25 },\n lineStyle: { width: 2 },\n },\n // Rótulos de valor ficam fora da barra/ponto (top/right): texto do tema, não preto fixo\n bar: { label, ...(options.barRadius !== undefined && { itemStyle: { borderRadius: options.barRadius } }) },\n line: { label },\n scatter: { label },\n gauge: { detail: { color: s.text }, title: { color: s.text3 } },\n sankey: { label, lineStyle: { color: 'source', opacity: 0.35 } },\n treemap: { breadcrumb: { itemStyle: { color: s.surface2, borderColor: s.borderSoft, textStyle: { color: s.text2 } } } },\n visualMap: { textStyle: { color: s.text3 } },\n calendar: {\n itemStyle: { color: s.surface2, borderColor: s.surface },\n splitLine: { show: false },\n dayLabel: { color: s.text3 },\n monthLabel: { color: s.text3 },\n yearLabel: { show: false },\n },\n dataZoom: { textStyle: { color: s.text3 }, borderColor: s.borderSoft },\n };\n}\n","import { computed, type ComputedRef } from 'vue';\nimport { useComputedColorScheme, useMantineTheme, type MantineTheme } from '@mantine-vue/core';\nimport { chartColors, chartPalette, semantic } from '../theme/tokens';\nimport { formatNumber } from '../utils/format';\n\nexport { chartColors, chartPalette };\n\nexport type ChartColorScheme = 'light' | 'dark';\n\n/** Tokens semânticos de um esquema (`semantic.light` / `semantic.dark`) como strings. */\nexport type ChartSchemeTokens = { [K in keyof (typeof semantic)['light']]: string };\n\n/** Parte do tema Mantine que o resolvedor de cores usa. */\nexport type ChartColorTheme = Pick<MantineTheme, 'colors' | 'primaryShade'> & Partial<Pick<MantineTheme, 'white' | 'black'>>;\n\n/** Cor da série `index` na paleta da marca (cicla quando acaba). Devolve `var(--jc-chart-N)`. */\nexport function paletteColor(index: number) {\n return chartPalette[index % chartPalette.length];\n}\n\n/** Preenche `color` das séries que não definiram cor, na ordem da paleta JC. */\nexport function withPalette<T extends { color?: string }>(items: T[]): (T & { color: string })[] {\n return items.map((item, index) => ({ ...item, color: item.color ?? paletteColor(index) }));\n}\n\n/** Formatador padrão dos gráficos: números pt-BR (54.959). */\nexport const ptBRValueFormatter = (value: number) => formatNumber(value);\n\nconst JC_CHART_VAR = /^var\\(\\s*--jc-chart-(\\d+)\\s*(?:,[^)]*)?\\)$/;\nconst MANTINE_COLOR_VAR = /^var\\(\\s*--mantine-color-([a-z][\\w]*)-(\\d)\\s*\\)$/i;\nconst THEME_COLOR = /^([a-z][\\w]*)(?:\\.(\\d))?$/i;\n\nfunction primaryShadeFor(theme: ChartColorTheme, scheme: ChartColorScheme): number {\n const shade = theme.primaryShade;\n return typeof shade === 'number' ? shade : (shade?.[scheme] ?? 6);\n}\n\n/**\n * Converte qualquer cor aceita pelos wrappers em um valor que o canvas do ECharts entende\n * (o canvas não lê variáveis CSS nem nomes do tema JC):\n * - `undefined`/vazio → `undefined`\n * - `var(--jc-chart-N)` (ou `chartPalette[i]`) → `chartColors[scheme][N-1]`\n * - `horizon`, `horizon.6`, aliases (`blue`, `green`…) → hex de `theme.colors`;\n * sem tom usa o `primaryShade` do esquema (6 no claro, 4 no escuro)\n * - `var(--mantine-color-horizon-6)` → hex de `theme.colors`\n * - `white` / `black` → `theme.white` / `theme.black`\n * - qualquer outra coisa (hex, rgb, hsl, nomes CSS) passa intacta\n */\nexport function resolveChartColor(\n color: string | null | undefined,\n theme: ChartColorTheme,\n scheme: ChartColorScheme,\n): string | undefined {\n if (typeof color !== 'string') return undefined;\n const value = color.trim();\n if (!value) return undefined;\n\n const chartVar = JC_CHART_VAR.exec(value);\n if (chartVar) {\n const colors = chartColors[scheme];\n const index = Number(chartVar[1]) - 1;\n return index >= 0 ? colors[index % colors.length] : value;\n }\n\n const mantineVar = MANTINE_COLOR_VAR.exec(value);\n if (mantineVar) return theme.colors[mantineVar[1]]?.[Number(mantineVar[2])] ?? value;\n\n if (value === 'white' && theme.white) return theme.white;\n if (value === 'black' && theme.black) return theme.black;\n\n const themeColor = THEME_COLOR.exec(value);\n if (themeColor) {\n const tuple = theme.colors[themeColor[1]];\n if (tuple) return tuple[themeColor[2] !== undefined ? Number(themeColor[2]) : primaryShadeFor(theme, scheme)] ?? value;\n }\n\n return value;\n}\n\n/** Hex da paleta da marca para o esquema (`index` cicla). */\nexport function paletteHex(index: number, scheme: ChartColorScheme) {\n const colors = chartColors[scheme];\n return colors[index % colors.length];\n}\n\nexport interface JcChartColors {\n /** Esquema efetivo (claro/escuro) */\n scheme: ComputedRef<ChartColorScheme>;\n /** Tokens semânticos do esquema atual (texto, superfície, bordas…) */\n tokens: ComputedRef<ChartSchemeTokens>;\n /** Paleta da marca em hex para o esquema atual */\n palette: ComputedRef<readonly string[]>;\n /** `resolveChartColor` no tema e esquema atuais */\n resolve: (color: string | null | undefined) => string | undefined;\n /** Hex da cor `index` da paleta no esquema atual */\n color: (index: number) => string;\n /** Como `withPalette`, mas já com todas as cores resolvidas para hex */\n withPalette: <T extends { color?: string }>(items: T[] | undefined | null) => (T & { color: string })[];\n}\n\n/**\n * Cores dos gráficos reativas ao tema: lê `useMantineTheme()` + `useComputedColorScheme()`,\n * então quem usar `resolve`/`palette` dentro de um render recolore ao alternar claro/escuro.\n * Precisa estar dentro do `JcProvider` (ou `MantineProvider`).\n */\nexport function useJcChartColors(): JcChartColors {\n const theme = useMantineTheme();\n const computedScheme = useComputedColorScheme('light');\n const scheme = computed<ChartColorScheme>(() => (computedScheme.value === 'dark' ? 'dark' : 'light'));\n const tokens = computed<ChartSchemeTokens>(() => semantic[scheme.value]);\n const palette = computed<readonly string[]>(() => chartColors[scheme.value]);\n const resolve = (color: string | null | undefined) => resolveChartColor(color, theme.value, scheme.value);\n const color = (index: number) => paletteHex(index, scheme.value);\n return {\n scheme,\n tokens,\n palette,\n resolve,\n color,\n withPalette: (items) => (items ?? []).map((item, index) => ({ ...item, color: resolve(item.color) ?? color(index) })),\n };\n}\n","import {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n ref,\n toValue,\n type Component,\n type ComponentObjectPropsOptions,\n type DefineSetupFnComponent,\n} from 'vue';\nimport { THEME_KEY } from 'vue-echarts';\nimport type { EChartsOption } from 'echarts';\nimport {\n AreaChart as MAreaChart,\n BarChart as MBarChart,\n BarsList as MBarsList,\n BubbleChart as MBubbleChart,\n CandlestickChart as MCandlestickChart,\n CompositeChart as MCompositeChart,\n DonutChart as MDonutChart,\n FunnelChart as MFunnelChart,\n GaugeChart as MGaugeChart,\n Heatmap as MHeatmap,\n LineChart as MLineChart,\n MatrixChart as MMatrixChart,\n PieChart as MPieChart,\n RadarChart as MRadarChart,\n RadialBarChart as MRadialBarChart,\n SankeyChart as MSankeyChart,\n ScatterChart as MScatterChart,\n Sparkline as MSparkline,\n Treemap as MTreemap,\n WaffleChart as MWaffleChart,\n type AreaChartProps as MAreaChartProps,\n type AreaChartSeries,\n type BarChartProps as MBarChartProps,\n type BarChartSeries,\n type BarsListProps as MBarsListProps,\n type BubbleChartProps as MBubbleChartProps,\n type CandlestickChartProps as MCandlestickChartProps,\n type CompositeChartProps as MCompositeChartProps,\n type CompositeChartSeries,\n type DonutChartProps as MDonutChartProps,\n type FunnelChartCell,\n type FunnelChartProps as MFunnelChartProps,\n type GaugeChartProps as MGaugeChartProps,\n type HeatmapProps as MHeatmapProps,\n type LineChartProps as MLineChartProps,\n type LineChartSeries,\n type MatrixChartProps as MMatrixChartProps,\n type PieChartCell,\n type PieChartProps as MPieChartProps,\n type RadarChartProps as MRadarChartProps,\n type RadialBarChartCell,\n type RadialBarChartProps as MRadialBarChartProps,\n type SankeyChartNode,\n type SankeyChartProps as MSankeyChartProps,\n type ScatterChartProps as MScatterChartProps,\n type ScatterChartSeries,\n type SparklineProps as MSparklineProps,\n type TreemapData,\n type TreemapProps as MTreemapProps,\n type WaffleChartCell,\n type WaffleChartProps as MWaffleChartProps,\n type ChartSeries,\n} from '@mantine-vue/charts';\nimport { ramps } from '../theme/tokens';\nimport { createJcEChartsTheme, mergeChartOptions, type JcEChartsThemeOptions } from './echartsTheme';\nimport { ptBRValueFormatter, useJcChartColors, type ChartColorScheme, type ChartSchemeTokens, type JcChartColors } from './palette';\n\n/*\n * Wrappers finos dos gráficos do @mantine-vue/charts (Apache ECharts) com os padrões JC Decor:\n * - séries/fatias sem `color` recebem a paleta da marca (horizon, evergreen, electric…)\n * - TODAS as cores viram hex do esquema atual (o canvas não entende `horizon.6` nem `var(--jc-chart-1)`)\n * e recolorem ao alternar claro/escuro\n * - eixos, grade, legenda e tooltip com os tokens semânticos do esquema (tema do ECharts via `THEME_KEY`)\n * - números formatados em pt-BR; curvas suaves; barras arredondadas (exceto empilhadas)\n * Todas as props do Mantine Vue continuam disponíveis e têm prioridade.\n */\n\ntype Input = Record<string, unknown>;\ntype Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\ntype SeriesWithOptionalColor<S> = Optional<S & { color?: string }, 'color'>;\n\n/** Props comuns dos wrappers JC. */\nexport interface JcChartRootProps {\n /** Alias de `height` (nome usado no @jcdecor/ui React). `height` tem prioridade. */\n h?: number | string;\n}\n\n/** Eventos repassados pelo gráfico do Mantine Vue (parâmetros do ECharts). */\nexport type JcChartEmits = {\n click: (params: unknown) => void;\n dblclick: (params: unknown) => void;\n mouseover: (params: unknown) => void;\n mouseout: (params: unknown) => void;\n legendselectchanged: (params: unknown) => void;\n datazoom: (params: unknown) => void;\n};\n\n/** Métodos expostos via template ref (os mesmos do Mantine Vue). */\nexport interface JcChartExposed {\n getEchartsInstance: () => unknown;\n resize: () => void;\n setOption: (option: EChartsOption) => void;\n}\n\ninterface BuildContext {\n c: JcChartColors;\n t: ChartSchemeTokens;\n scheme: ChartColorScheme;\n}\n\ninterface JcChartSpec {\n /** Props declaradas (reativas) — usadas para o tema por instância; também são repassadas */\n props?: ComponentObjectPropsOptions;\n themeOptions?: (props: Input) => JcEChartsThemeOptions;\n build: (input: Input, ctx: BuildContext) => Input;\n}\n\nconst camelize = (key: string) => key.replace(/-([a-z])/g, (_match, letter: string) => letter.toUpperCase());\n\n/**\n * Props booleanas dos gráficos do Mantine Vue. Como eles não declaram props (leem `attrs`), o atalho\n * de template `<LineChart with-legend />` chega como `''` e o `bool()` interno o ignora — aqui vira `true`.\n */\nconst BOOLEAN_PROPS = new Set(['connectNulls', 'roundCaps', 'autoresize', 'loading']);\nconst isBooleanProp = (key: string) => BOOLEAN_PROPS.has(key) || /^with[A-Z]/.test(key);\n\n/** kebab-case → camelCase (como o Mantine Vue faz), preservando `data-*` e `aria-*`. */\nfunction normalizeAttrs(attrs: Input): Input {\n const out: Input = {};\n for (const [key, value] of Object.entries(attrs)) {\n const name = key.startsWith('data-') || key.startsWith('aria-') ? key : camelize(key);\n out[name] = value === '' && isBooleanProp(name) ? true : value;\n }\n return out;\n}\n\nconst definedEntries = (props: Input) => Object.fromEntries(Object.entries(props).filter(([, value]) => value !== undefined));\nconst asArray = <T = { color?: string }>(value: unknown): T[] | undefined => (Array.isArray(value) ? (value as T[]) : undefined);\nconst asString = (value: unknown) => (typeof value === 'string' ? value : undefined);\nconst asFormatter = (value: unknown) => (typeof value === 'function' ? (value as (value: number) => string) : ptBRValueFormatter);\n\nfunction defineJcChart(name: string, base: Component, spec: JcChartSpec) {\n return defineComponent({\n name: `Jc${name}`,\n inheritAttrs: false,\n props: spec.props ?? {},\n setup(props, { attrs, slots, expose }) {\n const c = useJcChartColors();\n const outerTheme = inject(THEME_KEY, null);\n const theme = computed(() => {\n const own = createJcEChartsTheme(c.scheme.value, spec.themeOptions?.(props as Input));\n // Um tema-objeto fornecido acima (provide(THEME_KEY, …)) vence o tema JC\n return mergeChartOptions(own, toValue(outerTheme));\n });\n provide(THEME_KEY, theme);\n\n const chart = ref<Partial<JcChartExposed>>();\n expose({\n getEchartsInstance: () => chart.value?.getEchartsInstance?.(),\n resize: () => chart.value?.resize?.(),\n setOption: (option: EChartsOption) => chart.value?.setOption?.(option),\n } satisfies JcChartExposed);\n\n return () => {\n const { h: heightAlias, ...input } = { ...definedEntries(props as Input), ...normalizeAttrs(attrs) };\n if (input.height === undefined && heightAlias !== undefined) input.height = heightAlias;\n const ctx: BuildContext = { c, t: c.tokens.value, scheme: c.scheme.value };\n return h(base as any, { ...spec.build(input, ctx), ref: chart }, slots);\n };\n },\n });\n}\n\n/** Eixos com cores do esquema + formatador pt-BR no eixo de valores; props do usuário mesclam por cima. */\nfunction gridChartProps(defaults: Input, input: Input, { c, t }: BuildContext): Input {\n const merged = { ...defaults, ...input };\n const text = c.resolve(asString(input.textColor)) ?? t.text3;\n const grid = c.resolve(asString(input.gridColor)) ?? t.borderSoft;\n const format = asFormatter(merged.valueFormatter);\n const splitLine = { lineStyle: { color: grid } };\n const categoryAxis = { axisLabel: { color: text }, splitLine };\n const valueAxis = { axisLabel: { color: text, formatter: (value: number) => format(value) }, splitLine };\n const vertical = input.orientation === 'vertical';\n return {\n ...merged,\n valueFormatter: format,\n textColor: text,\n gridColor: grid,\n xAxisProps: mergeChartOptions(vertical ? valueAxis : categoryAxis, input.xAxisProps),\n yAxisProps: mergeChartOptions(vertical ? categoryAxis : valueAxis, input.yAxisProps),\n rightYAxisProps: mergeChartOptions(valueAxis, input.rightYAxisProps),\n referenceLines: resolveRefs(input.referenceLines, c, t.text3),\n referenceAreas: resolveRefs(input.referenceAreas, c, t.text3),\n referenceDots: resolveRefs(input.referenceDots, c, t.text3),\n series: c.withPalette(asArray<{ color?: string }>(input.series)),\n };\n}\n\n/** Linhas/áreas/pontos de referência: cor resolvida (padrão: texto-3 do esquema, não o cinza fixo do Mantine). */\nfunction resolveRefs(items: unknown, c: JcChartColors, fallback: string) {\n const list = asArray<{ color?: string }>(items);\n return list?.map((item) => ({ ...item, color: c.resolve(item.color) ?? fallback }));\n}\n\n/** Tooltip de pizza/rosca/funil com o formatador pt-BR (o Mantine Vue só formata os rótulos). */\nfunction itemTooltipProps(input: Input, format: (value: number) => string) {\n return mergeChartOptions({ valueFormatter: (value: unknown) => format(Number(value)) }, input.tooltipProps);\n}\n\nconst sequentialColors: Record<ChartColorScheme, string[]> = {\n light: [ramps.horizon[100], ramps.horizon[300], ramps.horizon[500], ramps.horizon[700]],\n dark: [ramps.horizon[900], ramps.horizon[700], ramps.horizon[500], ramps.horizon[300]],\n};\n\n/* ------------------------------------------------------------------ cartesianos */\n\nexport type LineChartProps = Omit<MLineChartProps, 'series'> &\n JcChartRootProps & { series: SeriesWithOptionalColor<LineChartSeries>[] };\n\n/** Gráfico de linhas. Padrões: `height` 280, curva `monotone`, traço 2,5, pt-BR. */\nexport const LineChart = defineJcChart('LineChart', MLineChart, {\n build: (input, ctx) => gridChartProps({ height: 280, curveType: 'monotone', strokeWidth: 2.5 }, input, ctx),\n}) as unknown as DefineSetupFnComponent<LineChartProps, JcChartEmits>;\n\nexport type AreaChartProps = Omit<MAreaChartProps, 'series'> &\n JcChartRootProps & { series: SeriesWithOptionalColor<AreaChartSeries>[] };\n\n/** Gráfico de área. Padrões: `height` 280, curva `monotone`, traço 2,5, preenchimento 25%, pt-BR. */\nexport const AreaChart = defineJcChart('AreaChart', MAreaChart, {\n build: (input, ctx) => gridChartProps({ height: 280, curveType: 'monotone', strokeWidth: 2.5, fillOpacity: 0.25 }, input, ctx),\n}) as unknown as DefineSetupFnComponent<AreaChartProps, JcChartEmits>;\n\nexport type BarChartProps = Omit<MBarChartProps, 'series'> &\n JcChartRootProps & { series: SeriesWithOptionalColor<BarChartSeries>[] };\n\n/** Raio das barras: `barProps.radius` (como no Recharts) ou 4px no topo/ponta; empilhadas ficam retas. */\nfunction barRadius(props: Input): number | number[] {\n const barProps = props.barProps && typeof props.barProps === 'object' ? (props.barProps as Input) : {};\n const custom = barProps.radius ?? barProps.borderRadius;\n if (Array.isArray(custom)) return custom as number[];\n const stacked = props.type === 'stacked' || props.type === 'percent';\n const r = typeof custom === 'number' ? custom : stacked ? 0 : 4;\n // [sup.-esq., sup.-dir., inf.-dir., inf.-esq.]: arredonda só a ponta da barra\n return props.orientation === 'vertical' ? [0, r, r, 0] : [r, r, 0, 0];\n}\n\n/** Gráfico de barras. Padrões: `height` 280, barras com raio 4 (retas se `stacked`/`percent`), pt-BR. */\nexport const BarChart = defineJcChart('BarChart', MBarChart, {\n props: { type: String, orientation: String, barProps: { type: [Object, Function], default: undefined } },\n themeOptions: (props) => ({ barRadius: barRadius(props) }),\n build: (input, ctx) => gridChartProps({ height: 280 }, input, ctx),\n}) as unknown as DefineSetupFnComponent<BarChartProps, JcChartEmits>;\n\nexport type CompositeChartProps = Omit<MCompositeChartProps, 'series'> &\n JcChartRootProps & { series: SeriesWithOptionalColor<CompositeChartSeries>[] };\n\n/** Gráfico composto (linha + área + barra). Padrões: `height` 280, curva `monotone`, pt-BR. */\nexport const CompositeChart = defineJcChart('CompositeChart', MCompositeChart, {\n build: (input, ctx) => gridChartProps({ height: 280, curveType: 'monotone' }, input, ctx),\n}) as unknown as DefineSetupFnComponent<CompositeChartProps, JcChartEmits>;\n\nexport type RadarChartProps = Omit<MRadarChartProps, 'series'> & JcChartRootProps & { series: SeriesWithOptionalColor<ChartSeries>[] };\n\n/** Gráfico de radar. Padrões: `height` 300, área preenchida a 25% (tema). */\nexport const RadarChart = defineJcChart('RadarChart', MRadarChart, {\n build: (input, { c }) => ({ height: 300, ...input, series: c.withPalette(asArray(input.series)) }),\n}) as unknown as DefineSetupFnComponent<RadarChartProps, JcChartEmits>;\n\n/* ------------------------------------------------------------------ radiais */\n\nexport type DonutChartProps = Omit<MDonutChartProps, 'data'> & JcChartRootProps & { data: Optional<PieChartCell, 'color'>[] };\n\nfunction radialProps(defaults: Input, input: Input, { c, t }: BuildContext): Input {\n const format = asFormatter(input.valueFormatter);\n return {\n // `size` é tipado no Mantine Vue mas não é usado: vira a altura (padrão 160, como no Mantine React)\n height: typeof input.size === 'number' ? input.size : 160,\n withTooltip: true,\n ...defaults,\n ...input,\n valueFormatter: format,\n tooltipProps: itemTooltipProps(input, format),\n chartLabelColor: c.resolve(asString(input.chartLabelColor)) ?? t.text,\n data: c.withPalette(asArray(input.data)),\n };\n}\n\n/**\n * Gráfico de rosca. Padrões: altura 160 (ou `size`), tooltip, espaço de 2° entre fatias, pt-BR.\n * Atenção: no Mantine Vue `thickness` é o RAIO INTERNO em % (não a espessura em px do React);\n * o padrão 52 reproduz a proporção do anel do @jcdecor/ui (24px num gráfico de 160px).\n */\nexport const DonutChart = defineJcChart('DonutChart', MDonutChart, {\n build: (input, ctx) => radialProps({ paddingAngle: 2, thickness: 52 }, input, ctx),\n}) as unknown as DefineSetupFnComponent<DonutChartProps, JcChartEmits>;\n\nexport type PieChartProps = Omit<MPieChartProps, 'data'> & JcChartRootProps & { data: Optional<PieChartCell, 'color'>[] };\n\n/** Gráfico de pizza. Padrões: altura 160 (ou `size`), tooltip, pt-BR. */\nexport const PieChart = defineJcChart('PieChart', MPieChart, {\n build: (input, ctx) => radialProps({}, input, ctx),\n}) as unknown as DefineSetupFnComponent<PieChartProps, JcChartEmits>;\n\n/* ------------------------------------------------------------------ sparkline */\n\nexport type SparklineProps = MSparklineProps & JcChartRootProps;\n\n/** Minigráfico de tendência. Padrões: `height` 48, cor 1 da paleta, preenchimento 30%, traço 2. */\nexport const Sparkline = defineJcChart('Sparkline', MSparkline, {\n build: (input, { c }) => {\n const trend = input.trendColors as Record<string, string | undefined> | undefined;\n return {\n height: 48,\n curveType: 'monotone',\n fillOpacity: 0.3,\n strokeWidth: 2,\n ...input,\n color: c.resolve(asString(input.color)) ?? c.color(0),\n trendColors: trend && Object.fromEntries(Object.entries(trend).map(([key, color]) => [key, c.resolve(color)])),\n };\n },\n}) as unknown as DefineSetupFnComponent<SparklineProps, JcChartEmits>;\n\n/* ------------------------------------------------------------------ demais gráficos (só paleta + tema) */\n\nexport type ScatterChartProps = Omit<MScatterChartProps, 'series'> &\n JcChartRootProps & { series: SeriesWithOptionalColor<ScatterChartSeries>[] };\n\n/** Dispersão: séries na paleta da marca, eixos/tooltip do esquema. */\nexport const ScatterChart = defineJcChart('ScatterChart', MScatterChart, {\n build: (input, { c }) => ({ ...input, series: c.withPalette(asArray(input.series)) }),\n}) as unknown as DefineSetupFnComponent<ScatterChartProps, JcChartEmits>;\n\nexport type BubbleChartProps = MBubbleChartProps & JcChartRootProps;\n\n/** Bolhas: cor 1 da paleta por padrão. */\nexport const BubbleChart = defineJcChart('BubbleChart', MBubbleChart, {\n build: (input, { c }) => ({ valueFormatter: ptBRValueFormatter, ...input, color: c.resolve(asString(input.color)) ?? c.color(0) }),\n}) as unknown as DefineSetupFnComponent<BubbleChartProps, JcChartEmits>;\n\nexport type FunnelChartProps = Omit<MFunnelChartProps, 'data'> & JcChartRootProps & { data: Optional<FunnelChartCell, 'color'>[] };\n\n/** Funil: etapas na paleta da marca. */\nexport const FunnelChart = defineJcChart('FunnelChart', MFunnelChart, {\n build: (input, { c }) => ({ valueFormatter: ptBRValueFormatter, ...input, data: c.withPalette(asArray(input.data)) }),\n}) as unknown as DefineSetupFnComponent<FunnelChartProps, JcChartEmits>;\n\nexport type RadialBarChartProps = Omit<MRadialBarChartProps, 'data'> &\n JcChartRootProps & { data: Optional<RadialBarChartCell, 'color'>[] };\n\n/** Barras radiais: itens na paleta da marca. */\nexport const RadialBarChart = defineJcChart('RadialBarChart', MRadialBarChart, {\n build: (input, { c }) => ({ ...input, data: c.withPalette(asArray(input.data)) }),\n}) as unknown as DefineSetupFnComponent<RadialBarChartProps, JcChartEmits>;\n\nexport type BarsListProps = MBarsListProps & JcChartRootProps & { textColor?: string };\n\n/**\n * Lista de barras: `barColor` padrão = cor 1 da paleta, rótulos no texto do esquema, ponta arredondada.\n * Limitação do Mantine Vue: `color`/`textColor` por item são ignorados (todas as barras usam `barColor`).\n */\nexport const BarsList = defineJcChart('BarsList', MBarsList, {\n themeOptions: () => ({ barRadius: [0, 4, 4, 0] }),\n build: (input, { c, t }) => ({\n valueFormatter: ptBRValueFormatter,\n ...input,\n barColor: c.resolve(asString(input.barColor)) ?? c.color(0),\n textColor: c.resolve(asString(input.textColor) ?? asString(input.barTextColor)) ?? t.text2,\n }),\n}) as unknown as DefineSetupFnComponent<BarsListProps, JcChartEmits>;\n\nexport type HeatmapProps = MHeatmapProps & JcChartRootProps;\n\n/** Mapa de calor (calendário): escala sequencial em horizon (clara→escura no claro; o inverso no escuro). */\nexport const Heatmap = defineJcChart('Heatmap', MHeatmap, {\n build: (input, { c, scheme }) => ({\n ...input,\n colors: (asArray<string>(input.colors) ?? sequentialColors[scheme]).map((color) => c.resolve(color) ?? color),\n }),\n}) as unknown as DefineSetupFnComponent<HeatmapProps, JcChartEmits>;\n\nexport type MatrixChartProps = MMatrixChartProps & JcChartRootProps;\n\n/** Matriz de calor: mesma escala sequencial do Heatmap; células vazias na superfície 2. */\nexport const MatrixChart = defineJcChart('MatrixChart', MMatrixChart, {\n build: (input, { c, t, scheme }) => ({\n ...input,\n colors: (asArray<string>(input.colors) ?? sequentialColors[scheme]).map((color) => c.resolve(color) ?? color),\n emptyColor: c.resolve(asString(input.emptyColor)) ?? t.surface2,\n }),\n}) as unknown as DefineSetupFnComponent<MatrixChartProps, JcChartEmits>;\n\nexport type GaugeChartProps = Omit<MGaugeChartProps, 'sections'> &\n JcChartRootProps & { sections?: { value: number; color: string }[] };\n\n/** Medidor: preenchimento na cor 1 da paleta, trilho na borda suave, alvo no texto do esquema, pt-BR. */\nexport const GaugeChart = defineJcChart('GaugeChart', MGaugeChart, {\n build: (input, { c, t }) => ({\n valueFormatter: ptBRValueFormatter,\n ...input,\n filledColor: c.resolve(asString(input.filledColor)) ?? c.color(0),\n trackColor: c.resolve(asString(input.trackColor)) ?? t.borderSoft,\n targetColor: c.resolve(asString(input.targetColor)) ?? t.text,\n sections: asArray<{ color?: string }>(input.sections)?.map((section, index) => ({\n ...section,\n color: c.resolve(section.color) ?? c.color(index),\n })),\n }),\n}) as unknown as DefineSetupFnComponent<GaugeChartProps, JcChartEmits>;\n\nexport type WaffleChartProps = Omit<MWaffleChartProps, 'data'> & JcChartRootProps & { data: Optional<WaffleChartCell, 'color'>[] };\n\n/** Waffle: segmentos na paleta da marca, células vazias na borda suave. */\nexport const WaffleChart = defineJcChart('WaffleChart', MWaffleChart, {\n build: (input, { c, t }) => ({\n ...input,\n data: c.withPalette(asArray(input.data)),\n emptyColor: c.resolve(asString(input.emptyColor)) ?? t.borderSoft,\n }),\n}) as unknown as DefineSetupFnComponent<WaffleChartProps, JcChartEmits>;\n\nexport type TreemapProps = MTreemapProps & JcChartRootProps;\n\n/** Treemap: nós do primeiro nível na paleta da marca (filhos herdam a cor do pai no ECharts). */\nexport const Treemap = defineJcChart('Treemap', MTreemap, {\n build: (input, { c }) => ({ valueFormatter: ptBRValueFormatter, ...input, data: c.withPalette(asArray<TreemapData>(input.data)) }),\n}) as unknown as DefineSetupFnComponent<TreemapProps, JcChartEmits>;\n\nexport type SankeyChartProps = MSankeyChartProps & JcChartRootProps;\n\n/** Sankey: nós na paleta da marca (o Mantine Vue ignora `color` dos nós — aqui vira `itemStyle.color`). */\nexport const SankeyChart = defineJcChart('SankeyChart', MSankeyChart, {\n build: (input, { c }) => {\n const withNodeColors = (nodes: SankeyChartNode[] | undefined) =>\n nodes &&\n c.withPalette(nodes).map((node) => ({\n ...node,\n itemStyle: { color: node.color, ...(node.itemStyle as Input | undefined) },\n }));\n return {\n valueFormatter: ptBRValueFormatter,\n ...input,\n ...(input.nodes !== undefined && { nodes: withNodeColors(asArray(input.nodes)) }),\n ...(input.data !== undefined && { data: withNodeColors(asArray(input.data)) }),\n };\n },\n}) as unknown as DefineSetupFnComponent<SankeyChartProps, JcChartEmits>;\n\nexport type CandlestickChartProps = MCandlestickChartProps & JcChartRootProps;\n\n/** Candlestick: alta em evergreen, baixa em danger (tom do esquema). */\nexport const CandlestickChart = defineJcChart('CandlestickChart', MCandlestickChart, {\n build: (input, { c }) => ({\n ...input,\n upColor: c.resolve(asString(input.upColor) ?? 'evergreen'),\n downColor: c.resolve(asString(input.downColor) ?? 'danger'),\n }),\n}) as unknown as DefineSetupFnComponent<CandlestickChartProps, JcChartEmits>;\n","import { defineComponent, h, type DefineSetupFnComponent, type PropType, type SlotsType, type VNodeChild } from 'vue';\nimport { Group, SegmentedControl, Text, hasNode, resolveNode, type CardProps, type MantineNode } from '@mantine-vue/core';\nimport { Card } from '../theme/themeDefaults';\nimport { Kicker } from '../components/Typography';\n\nexport interface ChartCardProps extends Omit<CardProps, 'title'> {\n /** Sobretítulo (ou slot `kicker`) */\n kicker?: MantineNode;\n /** Título do card (ou slot `title`) */\n title?: MantineNode;\n /** Texto de apoio abaixo do título (ou slot `description`) */\n description?: MantineNode;\n /** Valor em destaque ao lado do título, ex.: total do período (ou slot `value`) */\n value?: MantineNode;\n /** Opções de período (ex.: ['7d', '30d', '90d']) */\n periods?: string[];\n /** Período selecionado — use `v-model:period` */\n period?: string;\n}\n\nexport interface ChartCardSlots {\n /** O gráfico */\n default?: () => VNodeChild;\n kicker?: () => VNodeChild;\n title?: () => VNodeChild;\n description?: () => VNodeChild;\n value?: () => VNodeChild;\n /** Ações extras no cabeçalho */\n actions?: () => VNodeChild;\n}\n\nexport type ChartCardEmits = {\n 'update:period': (period: string) => void;\n periodChange: (period: string) => void;\n};\n\nconst nodeProp = { type: null as unknown as PropType<MantineNode>, default: undefined };\n\n/** Card de gráfico: título, valor em destaque, seletor de período e o gráfico (slot padrão). */\nexport const ChartCard = defineComponent({\n name: 'ChartCard',\n inheritAttrs: false,\n props: {\n kicker: nodeProp,\n title: nodeProp,\n description: nodeProp,\n value: nodeProp,\n periods: { type: Array as PropType<string[]>, default: undefined },\n period: { type: String, default: undefined },\n },\n emits: ['update:period', 'periodChange'],\n setup(props, { attrs, slots, emit }) {\n const onPeriod = (value: unknown) => {\n emit('update:period', String(value));\n emit('periodChange', String(value));\n };\n\n return () => {\n const kicker = resolveNode(props.kicker, slots.kicker);\n const description = resolveNode(props.description, slots.description);\n const value = resolveNode(props.value, slots.value);\n const actions = slots.actions?.();\n const periods = props.periods ?? [];\n\n const heading = h('div', { style: { flex: '1 1 220px', minWidth: 0 } }, [\n hasNode(kicker) ? h(Kicker as any, { mb: 4 }, () => kicker) : null,\n h(Text as any, { fw: 600, fz: 'var(--type-subheadline-lg)', lh: 1.3 }, () => resolveNode(props.title, slots.title)),\n hasNode(description) ? h(Text as any, { fz: 'xs', c: 'var(--ds-text-3)', mt: 2 }, () => description) : null,\n hasNode(value)\n ? h(Text as any, { fw: 700, fz: 'var(--type-headline-md)', mt: 4, style: { fontVariantNumeric: 'tabular-nums' } }, () => value)\n : null,\n ]);\n\n const controls = h(Group as any, { gap: 'xs' }, () => [\n periods.length > 0\n ? h(SegmentedControl as any, {\n size: 'xs',\n data: periods,\n modelValue: props.period,\n 'onUpdate:modelValue': onPeriod,\n })\n : null,\n actions,\n ]);\n\n return h(Card as any, attrs, () => [\n h(Group as any, { justify: 'space-between', align: 'flex-start', mb: 'lg', gap: 'sm' }, () => [heading, controls]),\n slots.default?.(),\n ]);\n };\n },\n}) as unknown as DefineSetupFnComponent<ChartCardProps, ChartCardEmits, SlotsType<ChartCardSlots>>;\n"],"mappings":";;;;;;;;AAaA,IAAMmD,KAAiB,MACrB,CAAC,CAACC,KAAS,OAAOA,KAAU,YAAY,CAAC,MAAM,QAAQA,CAAK,KAAK,OAAO,eAAeA,CAAK,MAAM,OAAO;AAG3G,SAAgBC,EAAyC,GAAW,GAAoB;CACtF,IAAI,CAACF,EAAcG,CAAM,GAAG,OAAOC;CACnC,IAAMC,IAAsB,EAAE,GAAGD,EAAO;CACxC,KAAK,IAAM,CAACE,GAAKL,MAAU,OAAO,QAAQE,CAAM,GAC9C,AAAIF,MAAU,KAAA,MACd,EAAOK,KAAON,EAAcC,CAAK,KAAKD,EAAcK,EAAOC,EAAI,IAAIJ,EAAkBG,EAAOC,IAAqBL,CAAK,IAAIA;CAE5H,OAAOI;AACT;AASA,SAAgBE,EAAqB,GAA0B,IAAiC,CAAC,GAAmB;CAClH,IAAMC,IAAI/B,EAASgC,IACbC,IAAO;EACX,UAAU,EAAE,WAAW,EAAE,OAAOF,EAAE,WAAW,EAAE;EAC/C,UAAU;GAA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EAAE4D,GAAa;KAAE,IAAI;KAAK,IAAI;KAA8B,IAAI;IAAI,SAASN,EAAYzE,EAAM,OAAOqB,EAAM,KAAK,CAAC;IAClHyD,EAAQJ,CAAW,IAAIvD,EAAE4D,GAAa;KAAE,IAAI;KAAM,GAAG;KAAoB,IAAI;IAAE,SAASL,CAAW,IAAI;IACvGI,EAAQ/H,CAAK,IACToE,EAAE4D,GAAa;KAAE,IAAI;KAAK,IAAI;KAA2B,IAAI;KAAG,OAAO,EAAE,oBAAoB,eAAe;IAAE,SAAShI,CAAK,IAC5H;GACN,CAAC,GAEKiI,IAAW7D,EAAE8D,GAAc,EAAE,KAAK,KAAK,SAAS,CACpDL,EAAQ,SAAS,IACbzD,EAAE+D,GAAyB;IACzB,MAAM;IACN,MAAMN;IACN,YAAY5E,EAAM;IAClB,uBAAuBsE;GACzB,CAAC,IACD,MACJK,CACF,CAAC;GAED,OAAOxD,EAAEnG,GAAa6E,SAAa,CACjCsB,EAAE8D,GAAc;IAAE,SAAS;IAAiB,OAAO;IAAc,IAAI;IAAM,KAAK;GAAK,SAAS,CAACJ,GAASG,CAAQ,CAAC,GACjH3D,EAAM,UAAU,CAClB,CAAC;EACH;CACF;AACF,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type DefineSetupFnComponent, type SlotsType, type VNodeChild } from 'vue';
2
+ import { type BoxProps, type MantineNode } from '@mantine-vue/core';
3
+ export interface ChatComposerSendPayload {
4
+ text: string;
5
+ files: File[];
6
+ }
7
+ export interface ChatComposerProps extends BoxProps {
8
+ /** Texto controlado (`v-model`). Sem `v-model`, o campo é não controlado. */
9
+ modelValue?: string;
10
+ /** Texto inicial no modo não controlado */
11
+ defaultValue?: string;
12
+ placeholder?: string;
13
+ disabled?: boolean;
14
+ /** Habilita anexos; `accept` segue o atributo HTML (ex.: "image/*,.pdf") */
15
+ allowAttachments?: boolean;
16
+ accept?: string;
17
+ /** Máximo de linhas antes de rolar @default 5 */
18
+ maxRows?: number;
19
+ /** Elementos extras à esquerda (ex.: emoji picker, respostas rápidas). O slot `#leftSection` tem prioridade. */
20
+ leftSection?: MantineNode;
21
+ sendLabel?: string;
22
+ }
23
+ export type ChatComposerEmits = {
24
+ /** Ao enviar (Enter ou botão). O campo é limpo em seguida. */
25
+ send: (payload: ChatComposerSendPayload) => void;
26
+ /** `v-model` do texto */
27
+ 'update:modelValue': (value: string) => void;
28
+ };
29
+ export interface ChatComposerSlots {
30
+ /** Elementos extras à esquerda (ex.: emoji picker, respostas rápidas) */
31
+ leftSection?: () => VNodeChild;
32
+ }
33
+ /** Campo de mensagem: Enter envia, Shift+Enter quebra linha, anexos opcionais. */
34
+ export declare const ChatComposer: DefineSetupFnComponent<ChatComposerProps, ChatComposerEmits, SlotsType<ChatComposerSlots>>;