@altimateai/ui-components 0.0.64 → 0.0.66-beta1

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 (64) hide show
  1. package/dist/CoachForm.js +9784 -9698
  2. package/dist/Stack.js +10 -10
  3. package/dist/ToggleGroup.js +8549 -0
  4. package/dist/_basePickBy.js +25 -25
  5. package/dist/_baseUniq.js +57 -57
  6. package/dist/arc.js +34 -34
  7. package/dist/architectureDiagram-VXUJARFQ.js +1 -1
  8. package/dist/assets/icons/index.js +1 -1
  9. package/dist/blockDiagram-VD42YOAC.js +1 -1
  10. package/dist/c4Diagram-YG6GDRKO.js +1 -1
  11. package/dist/channel.js +3 -3
  12. package/dist/chatbotV2/index.d.ts +30 -13
  13. package/dist/chatbotV2/index.js +47 -45
  14. package/dist/chunk-4BX2VUAB.js +1 -1
  15. package/dist/chunk-55IACEB6.js +2 -2
  16. package/dist/chunk-B4BG7PRW.js +13 -13
  17. package/dist/chunk-DI55MBZ5.js +1 -1
  18. package/dist/chunk-FMBD7UC4.js +1 -1
  19. package/dist/chunk-QN33PNHL.js +6 -6
  20. package/dist/chunk-QZHKN3VN.js +1 -1
  21. package/dist/chunk-TZMSLE5B.js +1 -1
  22. package/dist/classDiagram-2ON5EDUG.js +1 -1
  23. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  24. package/dist/cose-bilkent-S5V4N54A.js +1 -1
  25. package/dist/dagre-6UL2VRFP.js +17 -17
  26. package/dist/diagram-PSM6KHXK.js +35 -35
  27. package/dist/diagram-QEK2KX5R.js +10 -10
  28. package/dist/diagram-S2PKOQOG.js +2 -2
  29. package/dist/erDiagram-Q2GNP2WA.js +15 -15
  30. package/dist/flowDiagram-NV44I4VS.js +1 -1
  31. package/dist/ganttDiagram-LVOFAZNH.js +1 -1
  32. package/dist/gitGraphDiagram-NY62KEGX.js +1 -1
  33. package/dist/graph.js +1 -1
  34. package/dist/index.d.ts +4 -3
  35. package/dist/index.js +6 -6
  36. package/dist/index2.js +22 -22
  37. package/dist/infoDiagram-F6ZHWCRC.js +7 -7
  38. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  39. package/dist/kanban-definition-3W4ZIXB7.js +19 -19
  40. package/dist/layout.js +20 -20
  41. package/dist/lineage/index.js +608 -615
  42. package/dist/main.js +3 -3
  43. package/dist/mermaid-parser.core.js +1 -1
  44. package/dist/mindmap-definition-VGOIOE7T.js +17 -17
  45. package/dist/pieDiagram-ADFJNKIX.js +4 -4
  46. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  47. package/dist/redux-toolkit.modern.js +483 -476
  48. package/dist/requirementDiagram-UZGBJVZJ.js +76 -76
  49. package/dist/sankeyDiagram-TZEHDZUN.js +22 -22
  50. package/dist/sequenceDiagram-WL72ISMW.js +1 -1
  51. package/dist/shadcn/index.d.ts +46 -2
  52. package/dist/shadcn/index.js +3617 -2880
  53. package/dist/stateDiagram-FKZM4ZOC.js +28 -28
  54. package/dist/stateDiagram-v2-4FDKWEC3.js +4 -4
  55. package/dist/storybook/Carousel.stories.tsx +274 -0
  56. package/dist/storybook/TagsInput.stories.tsx +34 -1
  57. package/dist/storybook/Toggle.stories.tsx +106 -0
  58. package/dist/storybook/ToggleGroup.stories.tsx +178 -0
  59. package/dist/timeline-definition-IT6M3QCI.js +12 -12
  60. package/dist/{types-B4_bdpWO.d.ts → types-N2nctlGV.d.ts} +18 -5
  61. package/dist/xychartDiagram-PRI3JC2R.js +11 -11
  62. package/package.json +1 -1
  63. package/dist/TagsInput.js +0 -6956
  64. package/dist/index2.css +0 -1
@@ -0,0 +1,178 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { ToggleGroup, ToggleGroupItem } from "../shadcn";
3
+ import {
4
+ IconBold,
5
+ IconItalic,
6
+ IconUnderline,
7
+ IconAlignLeft,
8
+ IconAlignCenter,
9
+ IconAlignRight,
10
+ } from "@tabler/icons-react";
11
+
12
+ const meta: Meta<typeof ToggleGroup> = {
13
+ title: "Shadcn/Components/ToggleGroup",
14
+ component: ToggleGroup,
15
+ };
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof ToggleGroup>;
19
+
20
+ export const Default: Story = {
21
+ render: () => (
22
+ <ToggleGroup type="single">
23
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
24
+ <IconBold className="al-size-4" />
25
+ </ToggleGroupItem>
26
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
27
+ <IconItalic className="al-size-4" />
28
+ </ToggleGroupItem>
29
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
30
+ <IconUnderline className="al-size-4" />
31
+ </ToggleGroupItem>
32
+ </ToggleGroup>
33
+ ),
34
+ };
35
+
36
+ export const Multiple: Story = {
37
+ render: () => (
38
+ <ToggleGroup type="multiple">
39
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
40
+ <IconBold className="al-size-4" />
41
+ </ToggleGroupItem>
42
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
43
+ <IconItalic className="al-size-4" />
44
+ </ToggleGroupItem>
45
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
46
+ <IconUnderline className="al-size-4" />
47
+ </ToggleGroupItem>
48
+ </ToggleGroup>
49
+ ),
50
+ };
51
+
52
+ export const Outline: Story = {
53
+ render: () => (
54
+ <ToggleGroup type="single" variant="outline">
55
+ <ToggleGroupItem value="left" aria-label="Align left">
56
+ <IconAlignLeft className="al-size-4" />
57
+ </ToggleGroupItem>
58
+ <ToggleGroupItem value="center" aria-label="Align center">
59
+ <IconAlignCenter className="al-size-4" />
60
+ </ToggleGroupItem>
61
+ <ToggleGroupItem value="right" aria-label="Align right">
62
+ <IconAlignRight className="al-size-4" />
63
+ </ToggleGroupItem>
64
+ </ToggleGroup>
65
+ ),
66
+ };
67
+
68
+ export const Small: Story = {
69
+ render: () => (
70
+ <ToggleGroup type="single" size="sm">
71
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
72
+ <IconBold className="al-size-4" />
73
+ </ToggleGroupItem>
74
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
75
+ <IconItalic className="al-size-4" />
76
+ </ToggleGroupItem>
77
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
78
+ <IconUnderline className="al-size-4" />
79
+ </ToggleGroupItem>
80
+ </ToggleGroup>
81
+ ),
82
+ };
83
+
84
+ export const Large: Story = {
85
+ render: () => (
86
+ <ToggleGroup type="single" size="lg">
87
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
88
+ <IconBold className="al-size-4" />
89
+ </ToggleGroupItem>
90
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
91
+ <IconItalic className="al-size-4" />
92
+ </ToggleGroupItem>
93
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
94
+ <IconUnderline className="al-size-4" />
95
+ </ToggleGroupItem>
96
+ </ToggleGroup>
97
+ ),
98
+ };
99
+
100
+ export const WithText: Story = {
101
+ render: () => (
102
+ <ToggleGroup type="single" variant="outline">
103
+ <ToggleGroupItem value="left" aria-label="Align left">
104
+ <IconAlignLeft className="al-size-4" />
105
+ <span>Left</span>
106
+ </ToggleGroupItem>
107
+ <ToggleGroupItem value="center" aria-label="Align center">
108
+ <IconAlignCenter className="al-size-4" />
109
+ <span>Center</span>
110
+ </ToggleGroupItem>
111
+ <ToggleGroupItem value="right" aria-label="Align right">
112
+ <IconAlignRight className="al-size-4" />
113
+ <span>Right</span>
114
+ </ToggleGroupItem>
115
+ </ToggleGroup>
116
+ ),
117
+ };
118
+
119
+ export const Disabled: Story = {
120
+ render: () => (
121
+ <ToggleGroup type="single">
122
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
123
+ <IconBold className="al-size-4" />
124
+ </ToggleGroupItem>
125
+ <ToggleGroupItem value="italic" aria-label="Toggle italic" disabled>
126
+ <IconItalic className="al-size-4" />
127
+ </ToggleGroupItem>
128
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
129
+ <IconUnderline className="al-size-4" />
130
+ </ToggleGroupItem>
131
+ </ToggleGroup>
132
+ ),
133
+ };
134
+
135
+ export const DefaultValue: Story = {
136
+ render: () => (
137
+ <ToggleGroup type="single" defaultValue="italic" variant="outline">
138
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
139
+ <IconBold className="al-size-4" />
140
+ </ToggleGroupItem>
141
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
142
+ <IconItalic className="al-size-4" />
143
+ </ToggleGroupItem>
144
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
145
+ <IconUnderline className="al-size-4" />
146
+ </ToggleGroupItem>
147
+ </ToggleGroup>
148
+ ),
149
+ };
150
+
151
+ export const FormattingToolbar: Story = {
152
+ render: () => (
153
+ <div className="al-flex al-flex-col al-gap-4">
154
+ <ToggleGroup type="multiple" variant="outline">
155
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
156
+ <IconBold className="al-size-4" />
157
+ </ToggleGroupItem>
158
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
159
+ <IconItalic className="al-size-4" />
160
+ </ToggleGroupItem>
161
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
162
+ <IconUnderline className="al-size-4" />
163
+ </ToggleGroupItem>
164
+ </ToggleGroup>
165
+ <ToggleGroup type="single" variant="outline">
166
+ <ToggleGroupItem value="left" aria-label="Align left">
167
+ <IconAlignLeft className="al-size-4" />
168
+ </ToggleGroupItem>
169
+ <ToggleGroupItem value="center" aria-label="Align center">
170
+ <IconAlignCenter className="al-size-4" />
171
+ </ToggleGroupItem>
172
+ <ToggleGroupItem value="right" aria-label="Align right">
173
+ <IconAlignRight className="al-size-4" />
174
+ </ToggleGroupItem>
175
+ </ToggleGroup>
176
+ </div>
177
+ ),
178
+ };
@@ -1,4 +1,4 @@
1
- import { $ as s, ar as xt, aL as kt, al as vt, a5 as _t, ab as E, aM as bt, aN as wt, aO as St, aP as Et } from "./CoachForm.js";
1
+ import { a1 as s, at as xt, aN as kt, an as vt, a7 as _t, ad as E, aO as bt, aP as wt, aQ as St, aR as Et } from "./CoachForm.js";
2
2
  import { s as q } from "./redux-toolkit.modern.js";
3
3
  import { d as nt } from "./arc.js";
4
4
  var X = function() {
@@ -63,7 +63,7 @@ var X = function() {
63
63
  }
64
64
  }, "parseError"),
65
65
  parse: /* @__PURE__ */ s(function(i) {
66
- var a = this, h = [0], u = [], y = [null], o = [], S = this.table, k = "", M = 0, C = 0, B = 2, J = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), N = { yy: {} };
66
+ var a = this, h = [0], u = [], y = [null], o = [], S = this.table, k = "", M = 0, C = 0, B = 2, Q = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), N = { yy: {} };
67
67
  for (var L in this.yy)
68
68
  Object.prototype.hasOwnProperty.call(this.yy, L) && (N.yy[L] = this.yy[L]);
69
69
  v.setInput(i, N.yy), N.yy.lexer = v, N.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
@@ -77,18 +77,18 @@ var X = function() {
77
77
  s(R, "popStack");
78
78
  function A() {
79
79
  var T;
80
- return T = u.pop() || v.lex() || J, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = a.symbols_[T] || T), T;
80
+ return T = u.pop() || v.lex() || Q, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = a.symbols_[T] || T), T;
81
81
  }
82
82
  s(A, "lex");
83
- for (var w, P, I, K, z = {}, j, H, et, G; ; ) {
83
+ for (var w, P, I, J, z = {}, j, H, et, G; ; ) {
84
84
  if (P = h[h.length - 1], this.defaultActions[P] ? I = this.defaultActions[P] : ((w === null || typeof w > "u") && (w = A()), I = S[P] && S[P][w]), typeof I > "u" || !I.length || !I[0]) {
85
- var Q = "";
85
+ var K = "";
86
86
  G = [];
87
87
  for (j in S[P])
88
88
  this.terminals_[j] && j > B && G.push("'" + this.terminals_[j] + "'");
89
- v.showPosition ? Q = "Parse error on line " + (M + 1) + `:
89
+ v.showPosition ? K = "Parse error on line " + (M + 1) + `:
90
90
  ` + v.showPosition() + `
91
- Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "Parse error on line " + (M + 1) + ": Unexpected " + (w == J ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Q, {
91
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : K = "Parse error on line " + (M + 1) + ": Unexpected " + (w == Q ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(K, {
92
92
  text: v.match,
93
93
  token: this.terminals_[w] || w,
94
94
  line: v.yylineno,
@@ -111,7 +111,7 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "
111
111
  }, $ && (z._$.range = [
112
112
  o[o.length - (H || 1)].range[0],
113
113
  o[o.length - 1].range[1]
114
- ]), K = this.performAction.apply(z, [
114
+ ]), J = this.performAction.apply(z, [
115
115
  k,
116
116
  C,
117
117
  M,
@@ -119,8 +119,8 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "
119
119
  I[1],
120
120
  y,
121
121
  o
122
- ].concat(O)), typeof K < "u")
123
- return K;
122
+ ].concat(O)), typeof J < "u")
123
+ return J;
124
124
  H && (h = h.slice(0, -1 * H * 2), y = y.slice(0, -1 * H), o = o.slice(0, -1 * H)), h.push(this.productions_[I[1]][0]), y.push(z.$), o.push(z._$), et = S[h[h.length - 2]][h[h.length - 1]], h.push(et);
125
125
  break;
126
126
  case 3:
@@ -791,12 +791,12 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
791
791
  .eventWrapper {
792
792
  filter: brightness(120%);
793
793
  }
794
- `, "getStyles"), qt = Gt, Kt = {
794
+ `, "getStyles"), qt = Gt, Jt = {
795
795
  db: at,
796
796
  renderer: Ot,
797
797
  parser: Tt,
798
798
  styles: qt
799
799
  };
800
800
  export {
801
- Kt as diagram
801
+ Jt as diagram
802
802
  };
@@ -23,15 +23,22 @@ interface Feedback {
23
23
  rating?: "up" | "down";
24
24
  comment?: string;
25
25
  }
26
- interface ContextOption {
26
+ type ContextOption = {
27
27
  label: string;
28
28
  key: string;
29
- options?: {
29
+ type: "submenu";
30
+ options: {
30
31
  id: string;
31
32
  label: string;
32
33
  }[];
33
- type?: "submenu";
34
- }
34
+ icon?: ReactNode;
35
+ } | {
36
+ label: string;
37
+ key: string;
38
+ type: "trigger";
39
+ handler?: () => void;
40
+ icon?: ReactNode;
41
+ };
35
42
  interface ChatSession {
36
43
  id: string;
37
44
  messages: ChatMessage[];
@@ -43,6 +50,7 @@ interface ChatSession {
43
50
  mode?: string;
44
51
  datamates?: string[];
45
52
  status?: SessionStatusEnum;
53
+ userInput?: string;
46
54
  }
47
55
  interface FileUploadProps {
48
56
  allowedFiles: string;
@@ -90,7 +98,7 @@ interface Mode {
90
98
  icon?: ReactNode;
91
99
  }
92
100
  interface ChatbotProps {
93
- helloMessage?: React.ReactNode;
101
+ helloMessage?: ReactNode;
94
102
  assistantMeta?: AssistantMeta;
95
103
  context?: Record<string, unknown>;
96
104
  fileUploadProps?: FileUploadProps;
@@ -105,6 +113,10 @@ interface ChatbotProps {
105
113
  initialMessage?: string;
106
114
  questionFormLeftActions?: ReactNode[];
107
115
  refetchSession?: () => Promise<unknown>;
116
+ chatboxStartPosition?: "middle" | "bottom";
117
+ helloMessageFooter?: ReactNode;
118
+ handleSavePrompt?: (message: ChatMessage) => void;
119
+ showSavePromptButton?: boolean;
108
120
  }
109
121
  interface ChatbotProviderProps extends ChatbotProps {
110
122
  taskLabel?: keyof typeof TaskLabels;
@@ -127,6 +139,7 @@ interface ChatbotProviderProps extends ChatbotProps {
127
139
  sessions?: Record<string, ChatSession>;
128
140
  currentSessionId?: string;
129
141
  selectedDatamateId?: string;
142
+ handleSavePrompt?: (message: ChatMessage) => void;
130
143
  }
131
144
  type InteractionType = "text" | "select" | "multiSelect" | "confirm";
132
145
  interface InteractionChoice {
@@ -1,4 +1,4 @@
1
- import { $ as a, bt as gi, ab as Xt, aH as Wt, az as xi, au as St, at as Nt, as as di, aa as fi, af as Yt, a1 as pi, a2 as mi, ae as yi, a3 as bi, a4 as Ai, al as wi, ax as Ci, ac as Si } from "./CoachForm.js";
1
+ import { a1 as a, bv as gi, ad as Xt, aJ as Wt, aB as xi, aw as St, av as Nt, au as di, ac as fi, ah as Yt, a3 as pi, a4 as mi, ag as yi, a5 as bi, a6 as Ai, an as wi, az as Ci, ae as Si } from "./CoachForm.js";
2
2
  import "./redux-toolkit.modern.js";
3
3
  import { i as _i } from "./init.js";
4
4
  import { o as ki } from "./ordinal.js";
@@ -809,7 +809,7 @@ var j, Ht = (j = class {
809
809
  getScaleValue(t) {
810
810
  return this.scale(t) ?? this.getRange()[0];
811
811
  }
812
- }, a(K, "BandAxis"), K), Z, vi = (Z = class extends Ut {
812
+ }, a(K, "BandAxis"), K), J, vi = (J = class extends Ut {
813
813
  constructor(t, i, s, n, o) {
814
814
  super(t, n, o, i), this.domain = s, this.scale = zt().domain(this.domain).range(this.getRange());
815
815
  }
@@ -823,7 +823,7 @@ var j, Ht = (j = class {
823
823
  getScaleValue(t) {
824
824
  return this.scale(t);
825
825
  }
826
- }, a(Z, "LinearAxis"), Z);
826
+ }, a(J, "LinearAxis"), J);
827
827
  function wt(e, t, i, s) {
828
828
  const n = new Ht(s);
829
829
  return _t(e) ? new Di(
@@ -841,7 +841,7 @@ function wt(e, t, i, s) {
841
841
  );
842
842
  }
843
843
  a(wt, "getAxis");
844
- var J, Pi = (J = class {
844
+ var Z, Pi = (Z = class {
845
845
  constructor(t, i, s, n) {
846
846
  this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
847
847
  x: 0,
@@ -882,7 +882,7 @@ var J, Pi = (J = class {
882
882
  ]
883
883
  }), t;
884
884
  }
885
- }, a(J, "ChartTitle"), J);
885
+ }, a(Z, "ChartTitle"), Z);
886
886
  function $t(e, t, i, s) {
887
887
  const n = new Ht(s);
888
888
  return new Pi(n, e, t, i);
@@ -1150,18 +1150,18 @@ function vt(e, t) {
1150
1150
  A.xAxis = { type: "linear", title: A.xAxis.title, min: e, max: t }, gt = !0;
1151
1151
  }
1152
1152
  a(vt, "setXAxisRangeData");
1153
- function Zt(e) {
1153
+ function Jt(e) {
1154
1154
  A.xAxis = {
1155
1155
  type: "band",
1156
1156
  title: A.xAxis.title,
1157
1157
  categories: e.map((t) => xt(t.text))
1158
1158
  }, gt = !0;
1159
1159
  }
1160
- a(Zt, "setXAxisBand");
1161
- function Jt(e) {
1160
+ a(Jt, "setXAxisBand");
1161
+ function Zt(e) {
1162
1162
  A.yAxis.title = xt(e.text);
1163
1163
  }
1164
- a(Jt, "setYAxisTitle");
1164
+ a(Zt, "setYAxisTitle");
1165
1165
  function ti(e, t) {
1166
1166
  A.yAxis = { type: "linear", title: A.yAxis.title, min: e, max: t }, kt = !0;
1167
1167
  }
@@ -1248,8 +1248,8 @@ var Bi = /* @__PURE__ */ a(function() {
1248
1248
  setOrientation: Qt,
1249
1249
  setXAxisTitle: Kt,
1250
1250
  setXAxisRangeData: vt,
1251
- setXAxisBand: Zt,
1252
- setYAxisTitle: Jt,
1251
+ setXAxisBand: Jt,
1252
+ setYAxisTitle: Zt,
1253
1253
  setYAxisRangeData: ti,
1254
1254
  setLineData: ei,
1255
1255
  setBarData: si,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.64",
3
+ "version": "0.0.66-beta1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"