impact-nova 3.0.0-alpha.5 → 3.0.0-alpha.7

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 (46) hide show
  1. package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +56 -42
  2. package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +48 -45
  3. package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
  4. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
  5. package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
  6. package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
  7. package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
  8. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  9. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  10. package/dist/components/data/expandable-list-item/sku-picker-chrome.js +35 -30
  11. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +1 -1
  12. package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
  13. package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
  14. package/dist/components/data-display/chart/chart.js +125 -112
  15. package/dist/components/data-display/chart/chart.utils.js +122 -92
  16. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  17. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  18. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  19. package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
  20. package/dist/components/flows/iris-chat/iris-chat-markdown.js +47 -27
  21. package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +1 -0
  22. package/dist/components/flows/iris-chat/iris-chat-thread.js +81 -75
  23. package/dist/components/flows/iris-chat/iris-chat.js +83 -83
  24. package/dist/components/flows/iris-chat/iris-chat.types.d.ts +2 -0
  25. package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +1 -0
  26. package/dist/components/flows/iris-chat/iris-chat.variants.js +29 -11
  27. package/dist/components/forms/choice-card/choice-card-percent.js +82 -51
  28. package/dist/components/forms/choice-card/choice-card.js +23 -23
  29. package/dist/components/forms/input/input.js +5 -5
  30. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  31. package/dist/components/forms/select/components/Submenu.js +3 -2
  32. package/dist/components/primitives/button/button.variants.js +1 -1
  33. package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
  34. package/dist/components/primitives/stepper/internals/step-model.js +5 -5
  35. package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
  36. package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
  37. package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
  38. package/dist/components/primitives/stepper/internals/stepper-summary.js +7 -7
  39. package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
  40. package/dist/components/primitives/stepper/stepper.js +92 -91
  41. package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
  42. package/dist/impact-nova-components.css +88 -4
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/llms/rules/installation.js +1 -1
  45. package/dist/llms/rules/requirements.js +1 -1
  46. package/package.json +1 -1
@@ -1,45 +1,46 @@
1
- import h from "highcharts";
2
- import { CHART_PALETTE_CSS_VARS as x } from "./chart-palette.js";
3
- import { resolveDesignTokenColor as m } from "../../../lib/resolve-design-token-color.js";
4
- function v(o, { fadeTo: i = 0.1 } = {}) {
5
- const n = typeof document > "u" ? o : m(o), a = h.color(n).setOpacity(Math.min(Math.max(i, 0), 1)).get("rgba");
1
+ import v from "highcharts";
2
+ import { CHART_PALETTE_CSS_VARS as A } from "./chart-palette.js";
3
+ import { resolveDesignTokenColor as S } from "../../../lib/resolve-design-token-color.js";
4
+ import { chartUsesScatter3d as O, getScatter3dHighchartsOptions as C, mergeScatter3dOptions3dFrame as L, mergeScatter3dChartLoadHandlers as T } from "./chart-scatter3d.js";
5
+ function D(o, { fadeTo: i = 0.1 } = {}) {
6
+ const a = typeof document > "u" ? o : S(o), n = v.color(a).setOpacity(Math.min(Math.max(i, 0), 1)).get("rgba");
6
7
  return {
7
8
  linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
8
9
  stops: [
9
- [0, n],
10
- [1, a]
10
+ [0, a],
11
+ [1, n]
11
12
  ]
12
13
  };
13
14
  }
14
- const A = /* @__PURE__ */ new Set(["column", "bar"]);
15
- function D(o, i) {
16
- const { series: n, colors: a } = o;
17
- if (!i || !n || !a?.length) return o;
18
- const p = i === !0 ? {} : i, s = o.chart?.type ?? "column";
15
+ const k = /* @__PURE__ */ new Set(["column", "bar"]);
16
+ function F(o, i) {
17
+ const { series: a, colors: n } = o;
18
+ if (!i || !a || !n?.length) return o;
19
+ const h = i === !0 ? {} : i, l = o.chart?.type ?? "column";
19
20
  return {
20
21
  ...o,
21
- series: n.map((t, d) => {
22
- const u = "type" in t && t.type || s;
23
- if (!A.has(u) || "color" in t && t.color)
24
- return t;
25
- const e = "colorIndex" in t && typeof t.colorIndex == "number" ? t.colorIndex : d, l = a[e % a.length];
26
- if (typeof l != "string") return t;
27
- const c = v(l, p), f = "negativeColor" in t && t.negativeColor;
22
+ series: a.map((r, f) => {
23
+ const u = "type" in r && r.type || l;
24
+ if (!k.has(u) || "color" in r && r.color)
25
+ return r;
26
+ const t = "colorIndex" in r && typeof r.colorIndex == "number" ? r.colorIndex : f, c = n[t % n.length];
27
+ if (typeof c != "string") return r;
28
+ const p = D(c, h), g = "negativeColor" in r && r.negativeColor;
28
29
  return {
29
- ...t,
30
- color: c,
30
+ ...r,
31
+ color: p,
31
32
  // Points below the threshold grow away from the axis the other way; flip the fade.
32
- ...!f && {
33
- negativeColor: { ...c, linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 } }
33
+ ...!g && {
34
+ negativeColor: { ...p, linearGradient: { x1: 0, y1: 1, x2: 0, y2: 0 } }
34
35
  }
35
36
  };
36
37
  })
37
38
  };
38
39
  }
39
- function S(o) {
40
+ function z(o) {
40
41
  return !o || Array.isArray(o) ? {} : o;
41
42
  }
42
- function g(o) {
43
+ function y(o) {
43
44
  return {
44
45
  ...o,
45
46
  style: {
@@ -48,51 +49,51 @@ function g(o) {
48
49
  }
49
50
  };
50
51
  }
51
- function C(o, i) {
52
- const n = i?.dataLabels;
53
- if (Array.isArray(n))
54
- return n.map(g);
55
- const a = S(o?.dataLabels);
56
- return g({
57
- ...a,
52
+ function E(o, i) {
53
+ const a = i?.dataLabels;
54
+ if (Array.isArray(a))
55
+ return a.map(y);
56
+ const n = z(o?.dataLabels);
57
+ return y({
58
58
  ...n,
59
+ ...a,
59
60
  style: {
60
- ...a.style,
61
- ...n?.style,
61
+ ...n.style,
62
+ ...a?.style,
62
63
  pointerEvents: "none"
63
64
  }
64
65
  });
65
66
  }
66
- function O(o, i) {
67
+ function W(o, i) {
67
68
  return {
68
69
  ...o,
69
70
  ...i,
70
- dataLabels: C(o, i)
71
+ dataLabels: E(o, i)
71
72
  };
72
73
  }
73
- const E = (o) => {
74
+ const I = (o) => {
74
75
  const {
75
76
  type: i = "column",
76
- title: n,
77
- subtitle: a,
78
- xAxisCategories: p,
79
- xAxisTitle: s,
80
- yAxisCategories: t,
81
- yAxisTitle: d,
77
+ title: a,
78
+ subtitle: n,
79
+ xAxisCategories: h,
80
+ xAxisTitle: l,
81
+ yAxisCategories: r,
82
+ yAxisTitle: f,
82
83
  series: u,
83
- options: e,
84
- stacked: l,
85
- is3D: c,
86
- showLegend: f = !0,
87
- showTooltip: y = !0
88
- } = o, r = {
84
+ options: t,
85
+ stacked: c,
86
+ is3D: p,
87
+ showLegend: g = !0,
88
+ showTooltip: x = !0
89
+ } = o, d = O({ is3D: p, type: i, series: u }), s = d ? C({ xAxisTitle: l, yAxisTitle: f, options: t }) : void 0, e = {
89
90
  chart: {
90
91
  type: i,
91
92
  backgroundColor: "transparent",
92
93
  style: {
93
94
  fontFamily: "Manrope, sans-serif"
94
95
  },
95
- options3d: c ? {
96
+ options3d: p ? {
96
97
  enabled: !0,
97
98
  alpha: 15,
98
99
  beta: 15,
@@ -101,7 +102,7 @@ const E = (o) => {
101
102
  } : void 0
102
103
  },
103
104
  title: {
104
- text: n ?? "",
105
+ text: a ?? "",
105
106
  align: "left",
106
107
  style: {
107
108
  fontSize: "18px",
@@ -110,7 +111,7 @@ const E = (o) => {
110
111
  }
111
112
  },
112
113
  subtitle: {
113
- text: a,
114
+ text: n,
114
115
  align: "left"
115
116
  },
116
117
  credits: {
@@ -126,9 +127,9 @@ const E = (o) => {
126
127
  }
127
128
  },
128
129
  xAxis: {
129
- categories: p,
130
- title: s ? {
131
- text: s,
130
+ categories: h,
131
+ title: l ? {
132
+ text: l,
132
133
  style: {
133
134
  color: "var(--color-foreground-tertiary)",
134
135
  fontFamily: '"Manrope", sans-serif',
@@ -151,9 +152,9 @@ const E = (o) => {
151
152
  }
152
153
  },
153
154
  yAxis: {
154
- categories: t,
155
+ categories: r,
155
156
  title: {
156
- text: d,
157
+ text: f,
157
158
  margin: 30,
158
159
  style: {
159
160
  color: "var(--color-foreground-tertiary)",
@@ -178,7 +179,7 @@ const E = (o) => {
178
179
  }
179
180
  },
180
181
  legend: {
181
- enabled: f,
182
+ enabled: g,
182
183
  symbolRadius: 2,
183
184
  itemStyle: {
184
185
  color: "var(--color-foreground-tertiary)",
@@ -190,7 +191,7 @@ const E = (o) => {
190
191
  }
191
192
  },
192
193
  tooltip: {
193
- enabled: y,
194
+ enabled: x,
194
195
  backgroundColor: "var(--color-surface-floating)",
195
196
  borderColor: "var(--color-border)",
196
197
  borderRadius: 8,
@@ -199,16 +200,16 @@ const E = (o) => {
199
200
  },
200
201
  shadow: !0
201
202
  },
202
- colors: [...x],
203
+ colors: [...A],
203
204
  plotOptions: {
204
205
  column: {
205
206
  borderRadius: 4,
206
- stacking: l ? "normal" : void 0,
207
+ stacking: c ? "normal" : void 0,
207
208
  borderWidth: 0
208
209
  },
209
210
  bar: {
210
211
  borderRadius: 4,
211
- stacking: l ? "normal" : void 0,
212
+ stacking: c ? "normal" : void 0,
212
213
  borderWidth: 1,
213
214
  borderColor: "var(--color-background)"
214
215
  },
@@ -237,62 +238,91 @@ const E = (o) => {
237
238
  }
238
239
  },
239
240
  series: u
241
+ }, m = d ? {
242
+ ...e.chart?.options3d,
243
+ ...s?.chart?.options3d,
244
+ ...t?.chart?.options3d,
245
+ frame: L(
246
+ s?.chart?.options3d?.frame,
247
+ t?.chart?.options3d?.frame
248
+ )
249
+ } : {
250
+ ...e.chart?.options3d,
251
+ ...t?.chart?.options3d
240
252
  };
241
253
  return {
242
- ...r,
243
254
  ...e,
244
- colors: e?.colors ?? r.colors,
255
+ ...t,
256
+ colors: t?.colors ?? e.colors,
245
257
  chart: {
246
- ...r.chart,
247
- ...e?.chart
258
+ ...e.chart,
259
+ ...s?.chart,
260
+ ...t?.chart,
261
+ ...d ? { type: "scatter3d" } : {},
262
+ options3d: m,
263
+ events: d ? {
264
+ ...t?.chart?.events,
265
+ load: T(t?.chart?.events?.load)
266
+ } : t?.chart?.events
248
267
  },
249
268
  xAxis: {
250
- ...r.xAxis,
251
- ...Array.isArray(e?.xAxis) ? {} : e?.xAxis
269
+ ...e.xAxis,
270
+ ...s?.xAxis,
271
+ ...Array.isArray(t?.xAxis) ? {} : t?.xAxis
252
272
  },
253
- yAxis: Array.isArray(e?.yAxis) ? e?.yAxis.map((b) => ({
254
- ...r.yAxis,
273
+ yAxis: Array.isArray(t?.yAxis) ? t.yAxis.map((b) => ({
274
+ ...e.yAxis,
275
+ ...s?.yAxis,
255
276
  ...b
256
277
  })) : {
257
- ...r.yAxis,
258
- ...e?.yAxis
278
+ ...e.yAxis,
279
+ ...s?.yAxis,
280
+ ...t?.yAxis
259
281
  },
282
+ zAxis: d ? {
283
+ ...s?.zAxis,
284
+ ...t?.zAxis
285
+ } : t?.zAxis,
260
286
  plotOptions: {
261
- ...r.plotOptions,
262
- ...e?.plotOptions,
287
+ ...e.plotOptions,
288
+ ...t?.plotOptions,
263
289
  column: {
264
- ...r.plotOptions?.column,
265
- ...e?.plotOptions?.column
290
+ ...e.plotOptions?.column,
291
+ ...t?.plotOptions?.column
266
292
  },
267
293
  bar: {
268
- ...r.plotOptions?.bar,
269
- ...e?.plotOptions?.bar
294
+ ...e.plotOptions?.bar,
295
+ ...t?.plotOptions?.bar
270
296
  },
271
297
  pie: {
272
- ...r.plotOptions?.pie,
273
- ...e?.plotOptions?.pie
298
+ ...e.plotOptions?.pie,
299
+ ...t?.plotOptions?.pie
274
300
  },
275
- heatmap: O(
276
- r.plotOptions?.heatmap,
277
- e?.plotOptions?.heatmap
301
+ heatmap: W(
302
+ e.plotOptions?.heatmap,
303
+ t?.plotOptions?.heatmap
278
304
  ),
305
+ scatter3d: {
306
+ ...s?.plotOptions?.scatter3d,
307
+ ...t?.plotOptions?.scatter3d
308
+ },
279
309
  series: {
280
- ...r.plotOptions?.series,
281
- ...e?.plotOptions?.series
310
+ ...e.plotOptions?.series,
311
+ ...t?.plotOptions?.series
282
312
  }
283
313
  },
284
314
  tooltip: {
285
- ...r.tooltip,
286
- ...e?.tooltip
315
+ ...e.tooltip,
316
+ ...t?.tooltip
287
317
  },
288
318
  legend: {
289
- ...r.legend,
290
- ...e?.legend
319
+ ...e.legend,
320
+ ...t?.legend
291
321
  }
292
322
  };
293
323
  };
294
324
  export {
295
- D as applySeriesGradient,
296
- v as chartGradient,
297
- E as getBaseChartOptions
325
+ F as applySeriesGradient,
326
+ D as chartGradient,
327
+ I as getBaseChartOptions
298
328
  };
@@ -1,6 +1,7 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
3
- const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
3
+ import "react";
4
+ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
4
5
  /* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
5
6
  /* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
6
7
  ] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
9
10
  ] });
10
11
  export {
11
12
  h as defaultAccordionTooltipRender,
12
- d as defaultTabTooltipRender
13
+ p as defaultTabTooltipRender
13
14
  };
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
3
  import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
4
4
  import { cn as p } from "../../../lib/utils.js";
5
+ import { Kbd as $ } from "../../primitives/kbd/kbd.js";
6
+ import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
5
7
  import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
6
- import { ModuleRegistry as $, AllCommunityModule as H } from "ag-grid-community";
7
- import { AllEnterpriseModule as V } from "ag-grid-enterprise";
8
- import { DataTable as J, DataTableContent as Q } from "../../data/data-table/data-table.js";
8
+ import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
9
+ import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
10
+ import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
9
11
  import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
10
- import { Kbd as X } from "../../primitives/kbd/kbd.js";
11
- import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
12
12
  import { useCommandPalette as Z } from "./use-command-palette.js";
13
13
  import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
14
14
  import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
15
- $.registerModules([H, V]);
15
+ V.registerModules([J, Q]);
16
16
  function re(a) {
17
17
  const t = a.data;
18
18
  return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
@@ -69,7 +69,7 @@ function ne(a) {
69
69
  "flex items-center justify-end h-full w-full text-end",
70
70
  t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
71
71
  ),
72
- children: /* @__PURE__ */ r(X, { keybinding: t.keybinding, size: "sm" })
72
+ children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
73
73
  }
74
74
  ) : t.customisable ? /* @__PURE__ */ r(
75
75
  "button",
@@ -133,7 +133,7 @@ function le({
133
133
  description: e.description || "",
134
134
  category: e.category || "General",
135
135
  keybinding: i,
136
- keybindingDisplay: i ? Y(i) : "",
136
+ keybindingDisplay: i ? H(i) : "",
137
137
  scope: e.scope,
138
138
  source: D,
139
139
  sourceColor: T ? "primary" : "neutral",
@@ -278,10 +278,10 @@ function le({
278
278
  u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
279
279
  /* @__PURE__ */ r("span", { children: u ? u.text : L })
280
280
  ] }) : null;
281
- return /* @__PURE__ */ h(J, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
281
+ return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
282
282
  s ? s(E) : E,
283
283
  /* @__PURE__ */ r(
284
- Q,
284
+ Y,
285
285
  {
286
286
  rowData: y,
287
287
  columnDefs: I,
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
6
6
  import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
7
7
  import { Button as D } from "../../primitives/button/button.js";
8
8
  import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
9
- import { OverflowTooltip as S } from "../../feedback/tooltip/overflow-tooltip.js";
10
- import { Kbd as j } from "../../primitives/kbd/kbd.js";
9
+ import { Kbd as S } from "../../primitives/kbd/kbd.js";
10
+ import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
11
11
  import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
12
12
  import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
13
13
  import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
@@ -145,14 +145,14 @@ const O = ({
145
145
  ),
146
146
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
147
147
  /* @__PURE__ */ e(
148
- S,
148
+ j,
149
149
  {
150
150
  triggerClassName: "truncate font-['Manrope'] block min-w-0",
151
151
  content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
152
152
  t.label,
153
153
  " ",
154
154
  /* @__PURE__ */ e(
155
- j,
155
+ S,
156
156
  {
157
157
  keybinding: t.tooltipKeybinding,
158
158
  size: "sm"
@@ -1,13 +1,13 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { Download as y, ThreeDots as v } from "impact-nova-icons";
3
- import { Checkbox as C } from "../../forms/checkbox/checkbox.js";
4
- import { DropdownMenu as w, DropdownMenuTrigger as j, DropdownMenuContent as k, DropdownMenuItem as p } from "../../feedback/dropdown-menu/dropdown-menu.js";
2
+ import { Download as N, ThreeDots as y } from "impact-nova-icons";
3
+ import { Checkbox as v } from "../../forms/checkbox/checkbox.js";
4
+ import { DropdownMenu as C, DropdownMenuTrigger as j, DropdownMenuContent as k, DropdownMenuItem as p } from "../../feedback/dropdown-menu/dropdown-menu.js";
5
5
  import { ButtonIconTooltip as x } from "../../feedback/tooltip/button-icon-tooltip.js";
6
- import { Button as b } from "../../primitives/button/button.js";
6
+ import { Button as f } from "../../primitives/button/button.js";
7
7
  import { useImpactNovaI18n as I } from "../../../i18n/use-impact-nova-i18n.js";
8
- import { createComponent as f } from "../../../lib/primitives/create-component.js";
8
+ import { createComponent as b } from "../../../lib/primitives/create-component.js";
9
9
  import { cn as u } from "../../../lib/utils.js";
10
- function N(o, i) {
10
+ function g(o, i) {
11
11
  const a = o.map((l) => l.header).join(","), n = i.map(
12
12
  (l) => o.map((t) => {
13
13
  const d = l.cells[t.id];
@@ -18,16 +18,16 @@ function N(o, i) {
18
18
  `);
19
19
  }
20
20
  function S(o, i, a) {
21
- const n = new Blob([N(i, a)], { type: "text/csv;charset=utf-8" }), l = URL.createObjectURL(n), t = document.createElement("a");
21
+ const n = new Blob([g(i, a)], { type: "text/csv;charset=utf-8" }), l = URL.createObjectURL(n), t = document.createElement("a");
22
22
  t.href = l, t.download = `${o.replaceAll(/\s+/g, "-").toLowerCase()}.csv`, t.click(), URL.revokeObjectURL(l);
23
23
  }
24
- const O = f(
24
+ const O = b(
25
25
  "IrisChatArtifact",
26
26
  ({ className: o, title: i, columns: a, rows: n, onDownload: l, onMore: t }, d) => {
27
27
  const { t: c } = I(), m = () => {
28
28
  S(i, a, n), l?.();
29
- }, g = () => {
30
- navigator.clipboard?.writeText(N(a, n)).catch(() => {
29
+ }, w = () => {
30
+ navigator.clipboard?.writeText(g(a, n)).catch(() => {
31
31
  }), t?.();
32
32
  };
33
33
  return /* @__PURE__ */ r(
@@ -35,62 +35,72 @@ const O = f(
35
35
  {
36
36
  ref: d,
37
37
  "data-component": "iris-chat-artifact",
38
- className: u("min-w-0 w-full max-w-full overflow-hidden rounded-xl border border-stroke-subtle", o),
38
+ className: u(
39
+ "grid w-full min-w-0 max-w-full grid-cols-[minmax(0,1fr)] overflow-hidden rounded-xl border border-stroke-subtle",
40
+ o
41
+ ),
39
42
  children: [
40
- /* @__PURE__ */ r("header", { className: "flex items-center justify-between gap-2 px-3 py-2", children: [
43
+ /* @__PURE__ */ r("header", { className: "flex min-w-0 items-center justify-between gap-2 px-3 py-2", children: [
41
44
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-content", children: i }),
42
45
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
43
46
  /* @__PURE__ */ e(x, { label: c("irisChat.download"), children: /* @__PURE__ */ e(
44
- b,
47
+ f,
45
48
  {
46
49
  type: "button",
47
50
  variant: "ghost",
48
51
  size: "iconSm",
49
52
  "aria-label": c("irisChat.download"),
50
53
  onClick: m,
51
- children: /* @__PURE__ */ e(y, { size: 16 })
54
+ children: /* @__PURE__ */ e(N, { size: 16 })
52
55
  }
53
56
  ) }),
54
- /* @__PURE__ */ r(w, { children: [
57
+ /* @__PURE__ */ r(C, { children: [
55
58
  /* @__PURE__ */ e(x, { label: c("irisChat.moreActions"), children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
56
- b,
59
+ f,
57
60
  {
58
61
  type: "button",
59
62
  variant: "ghost",
60
63
  size: "iconSm",
61
64
  "aria-label": c("irisChat.moreActions"),
62
- children: /* @__PURE__ */ e(v, { size: 16 })
65
+ children: /* @__PURE__ */ e(y, { size: 16 })
63
66
  }
64
67
  ) }) }),
65
68
  /* @__PURE__ */ r(k, { align: "end", children: [
66
- /* @__PURE__ */ e(p, { onSelect: g, children: c("irisChat.copy") }),
69
+ /* @__PURE__ */ e(p, { onSelect: w, children: c("irisChat.copy") }),
67
70
  /* @__PURE__ */ e(p, { onSelect: m, children: c("irisChat.download") })
68
71
  ] })
69
72
  ] })
70
73
  ] })
71
74
  ] }),
72
- /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { className: "w-full table-fixed border-t border-stroke-subtle text-sm", children: [
73
- /* @__PURE__ */ e("thead", { className: "bg-secondary", children: /* @__PURE__ */ r("tr", { children: [
74
- /* @__PURE__ */ e("th", { className: "w-10 px-3 py-2", children: /* @__PURE__ */ e("span", { className: "sr-only", children: c("aria.toggleSelection") }) }),
75
- a.map((s) => /* @__PURE__ */ e(
76
- "th",
77
- {
78
- className: "px-3 py-2 text-start font-medium text-content",
79
- children: s.header
80
- },
81
- s.id
82
- ))
83
- ] }) }),
84
- /* @__PURE__ */ e("tbody", { children: n.map((s) => /* @__PURE__ */ r("tr", { className: "border-t border-stroke-subtle", children: [
85
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(C, { "aria-label": s.id }) }),
86
- a.map((h) => /* @__PURE__ */ e("td", { className: "px-3 py-2 text-content", children: s.cells[h.id] }, h.id))
87
- ] }, s.id)) })
88
- ] }) })
75
+ /* @__PURE__ */ e(
76
+ "div",
77
+ {
78
+ "data-slot": "artifact-scroll",
79
+ className: "min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain",
80
+ children: /* @__PURE__ */ r("table", { className: "w-max min-w-full border-t border-stroke-subtle text-sm", children: [
81
+ /* @__PURE__ */ e("thead", { className: "bg-secondary", children: /* @__PURE__ */ r("tr", { children: [
82
+ /* @__PURE__ */ e("th", { className: "w-10 px-3 py-2", children: /* @__PURE__ */ e("span", { className: "sr-only", children: c("aria.toggleSelection") }) }),
83
+ a.map((s) => /* @__PURE__ */ e(
84
+ "th",
85
+ {
86
+ className: "whitespace-nowrap px-3 py-2 text-start font-medium text-content",
87
+ children: s.header
88
+ },
89
+ s.id
90
+ ))
91
+ ] }) }),
92
+ /* @__PURE__ */ e("tbody", { children: n.map((s) => /* @__PURE__ */ r("tr", { className: "border-t border-stroke-subtle", children: [
93
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(v, { "aria-label": s.id }) }),
94
+ a.map((h) => /* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-2 text-content", children: s.cells[h.id] }, h.id))
95
+ ] }, s.id)) })
96
+ ] })
97
+ }
98
+ )
89
99
  ]
90
100
  }
91
101
  );
92
102
  }
93
- ), $ = f(
103
+ ), $ = b(
94
104
  "IrisChatScenario",
95
105
  ({ className: o, title: i, rows: a, notes: n }, l) => /* @__PURE__ */ r(
96
106
  "section",