wcz-layout 10.1.9 → 10.2.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/dist/{Approval-DoD-GRRH.mjs → Approval-D1TfISUL.mjs} +11 -21
  2. package/dist/Approval-D1TfISUL.mjs.map +1 -0
  3. package/dist/{LayoutTable-CRo43iWr.d.mts → ChatLayout-BmLySLXy.d.mts} +11 -18
  4. package/dist/ChatLayout-Tpuwo8-b.mjs +1622 -0
  5. package/dist/ChatLayout-Tpuwo8-b.mjs.map +1 -0
  6. package/dist/{DialogsContext-DLqA8RJ_.mjs → DialogsContext-D23fJjYR.mjs} +2 -3
  7. package/dist/DialogsContext-D23fJjYR.mjs.map +1 -0
  8. package/dist/{Email-CKUxOURX.d.mts → Email-Dz5k0UWE.d.mts} +1 -3
  9. package/dist/{Email-BzQQkbe9.mjs → Email-rnz3H0x3.mjs} +3 -5
  10. package/dist/Email-rnz3H0x3.mjs.map +1 -0
  11. package/dist/{Employee-agVPiGrJ.d.mts → Employee-C8xIlBxY.d.mts} +1 -7
  12. package/dist/{FileMeta-Be9viU7D.d.mts → FileMeta-B39e2FLC.d.mts} +1 -3
  13. package/dist/{FileMeta-DDqUju1Y.mjs → FileMeta-CPBWI_jA.mjs} +2 -3
  14. package/dist/FileMeta-CPBWI_jA.mjs.map +1 -0
  15. package/dist/{QueryClientParam-JcH0mJWl.d.mts → QueryClientParam-CTV1vj76.d.mts} +1 -3
  16. package/dist/RouterListItemButton-CF-8w-08.mjs +62 -0
  17. package/dist/RouterListItemButton-CF-8w-08.mjs.map +1 -0
  18. package/dist/{User-D4__w1I1.d.mts → User-aJksXItw.d.mts} +1 -3
  19. package/dist/{approval-L09uPzTU.mjs → approval-HB2w5jzc.mjs} +4 -5
  20. package/dist/approval-HB2w5jzc.mjs.map +1 -0
  21. package/dist/auth.d.mts +0 -4
  22. package/dist/auth.mjs +5 -6
  23. package/dist/auth.mjs.map +1 -1
  24. package/dist/components.d.mts +63 -33
  25. package/dist/components.mjs +658 -748
  26. package/dist/components.mjs.map +1 -1
  27. package/dist/{createApi-BhNkG4jz.mjs → createApi-CKgFi53y.mjs} +4 -6
  28. package/dist/createApi-CKgFi53y.mjs.map +1 -0
  29. package/dist/data/client.d.mts +2 -8
  30. package/dist/data/client.mjs +6 -9
  31. package/dist/data/client.mjs.map +1 -1
  32. package/dist/data/server.d.mts +2 -4
  33. package/dist/data/server.mjs +6 -7
  34. package/dist/data/server.mjs.map +1 -1
  35. package/dist/env-BwFl7nWc.mjs +48 -0
  36. package/dist/env-BwFl7nWc.mjs.map +1 -0
  37. package/dist/{file-Chlljz3o.mjs → file-X1sK4ok6.mjs} +7 -8
  38. package/dist/file-X1sK4ok6.mjs.map +1 -0
  39. package/dist/{file-Dl8JCcqy.mjs → file-tkfsnk5F.mjs} +8 -8
  40. package/dist/file-tkfsnk5F.mjs.map +1 -0
  41. package/dist/generatedChart-k7NEdi5Z.mjs +211 -0
  42. package/dist/generatedChart-k7NEdi5Z.mjs.map +1 -0
  43. package/dist/hooks.d.mts +30 -30
  44. package/dist/hooks.mjs +1828 -1304
  45. package/dist/hooks.mjs.map +1 -1
  46. package/dist/index.d.mts +11 -14
  47. package/dist/index.mjs +1273 -1051
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/middleware.d.mts +1 -7
  50. package/dist/middleware.mjs +5 -8
  51. package/dist/middleware.mjs.map +1 -1
  52. package/dist/models.d.mts +4 -32
  53. package/dist/models.mjs +7 -11
  54. package/dist/models.mjs.map +1 -1
  55. package/dist/{peoplesoft-D6q3cYsH.d.mts → peoplesoft-C-zPdRVj.d.mts} +3 -9
  56. package/dist/{peoplesoft-BhintHQz.mjs → peoplesoft-RnvfLbWH.mjs} +5 -25
  57. package/dist/peoplesoft-RnvfLbWH.mjs.map +1 -0
  58. package/dist/{providers-BvuZWkpD.mjs → providers-BfFg_3eo.mjs} +5 -23
  59. package/dist/providers-BfFg_3eo.mjs.map +1 -0
  60. package/dist/{tokens-XuFhVbh5.mjs → tokens-C4SErO-K.mjs} +12 -8
  61. package/dist/tokens-C4SErO-K.mjs.map +1 -0
  62. package/dist/{utils-CaeVFWF-.mjs → utils-C2MZoH9U.mjs} +8 -39
  63. package/dist/utils-C2MZoH9U.mjs.map +1 -0
  64. package/dist/{utils-Bhi0KiBx.d.mts → utils-CNYCSgip.d.mts} +3 -5
  65. package/dist/utils-DnMFybj3.mjs +27 -0
  66. package/dist/utils-DnMFybj3.mjs.map +1 -0
  67. package/dist/utils.d.mts +11 -2
  68. package/dist/utils.mjs +3 -5
  69. package/dist/vite.d.mts +0 -2
  70. package/dist/vite.mjs +2 -4
  71. package/dist/vite.mjs.map +1 -1
  72. package/package.json +131 -131
  73. package/skills/ai/SKILL.md +136 -39
  74. package/skills/client-db/SKILL.md +104 -90
  75. package/skills/db-schema/SKILL.md +28 -20
  76. package/skills/dialogs/SKILL.md +26 -38
  77. package/skills/forms/SKILL.md +133 -73
  78. package/skills/general/SKILL.md +99 -105
  79. package/skills/general/references/auth.md +70 -0
  80. package/skills/migrations/versions/migrate-v10-to-v11.md +30 -4
  81. package/skills/routing/SKILL.md +60 -58
  82. package/skills/scanning/SKILL.md +67 -0
  83. package/skills/server-functions/SKILL.md +71 -26
  84. package/skills/services/SKILL.md +4 -4
  85. package/skills/services/docs/approval.md +70 -24
  86. package/skills/services/docs/email.md +24 -3
  87. package/skills/services/docs/file.md +69 -27
  88. package/skills/services/docs/peoplesoft.md +55 -39
  89. package/skills/start/steps/03-apm-setup.md +9 -9
  90. package/skills/table/SKILL.md +250 -267
  91. package/dist/AggregatedCell-oGcwbetF.mjs +0 -559
  92. package/dist/AggregatedCell-oGcwbetF.mjs.map +0 -1
  93. package/dist/Approval-DoD-GRRH.mjs.map +0 -1
  94. package/dist/DialogsContext-DLqA8RJ_.mjs.map +0 -1
  95. package/dist/Email-BzQQkbe9.mjs.map +0 -1
  96. package/dist/FileMeta-DDqUju1Y.mjs.map +0 -1
  97. package/dist/RouterListItemButton-ULMlaQh6.mjs +0 -80
  98. package/dist/RouterListItemButton-ULMlaQh6.mjs.map +0 -1
  99. package/dist/approval-L09uPzTU.mjs.map +0 -1
  100. package/dist/createApi-BhNkG4jz.mjs.map +0 -1
  101. package/dist/file-Chlljz3o.mjs.map +0 -1
  102. package/dist/file-Dl8JCcqy.mjs.map +0 -1
  103. package/dist/peoplesoft-BhintHQz.mjs.map +0 -1
  104. package/dist/providers-BvuZWkpD.mjs.map +0 -1
  105. package/dist/tokens-XuFhVbh5.mjs.map +0 -1
  106. package/dist/utils-CaeVFWF-.mjs.map +0 -1
  107. package/skills/general/references/exports.md +0 -114
@@ -0,0 +1,211 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { Box } from "@mui/material";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { areaX, areaY, arrow, bandX, bandY, barX, barY, boxX, boxY, cell, colorLegend, crosshair, defineChart, differenceX, differenceY, dot, frame, hexagon, lineX, lineY, linearRegressionX, linearRegressionY, link, rect, ridgelineX, ridgelineY, ruleX, ruleY, text, tickX, tickY, vector, violinX, violinY, waffleX, waffleY } from "@tanstack/charts";
5
+ import { Chart } from "@tanstack/charts/react";
6
+ import { scaleBand } from "@tanstack/charts/scales/band";
7
+ import { scaleLinear } from "@tanstack/charts/scales/linear";
8
+ import { scalePoint } from "@tanstack/charts/scales/point";
9
+ import { tooltip } from "@tanstack/charts/tooltip";
10
+ // src/components/chat/generatedChart.tsx
11
+ const marks = {
12
+ areaX,
13
+ areaY,
14
+ arrow,
15
+ bandX,
16
+ bandY,
17
+ barX,
18
+ barY,
19
+ boxX,
20
+ boxY,
21
+ cell,
22
+ crosshair,
23
+ differenceX,
24
+ differenceY,
25
+ dot,
26
+ frame,
27
+ hexagon,
28
+ lineX,
29
+ lineY,
30
+ linearRegressionX,
31
+ linearRegressionY,
32
+ link,
33
+ rect,
34
+ ridgelineX,
35
+ ridgelineY,
36
+ ruleX,
37
+ ruleY,
38
+ text,
39
+ tickX,
40
+ tickY,
41
+ vector,
42
+ violinX,
43
+ violinY,
44
+ waffleX,
45
+ waffleY
46
+ };
47
+ const LIGHT = [
48
+ "#2a78d6",
49
+ "#eb6834",
50
+ "#1baf7a",
51
+ "#eda100",
52
+ "#e87ba4",
53
+ "#008300",
54
+ "#6250d6",
55
+ "#e34948"
56
+ ];
57
+ const DARK = [
58
+ "#3987e5",
59
+ "#d95926",
60
+ "#199e70",
61
+ "#c98500",
62
+ "#d55181",
63
+ "#008300",
64
+ "#9085e9",
65
+ "#e66767"
66
+ ];
67
+ const SERIES = LIGHT.map((_, index) => `var(--ts-chart-${index + 1})`);
68
+ const palette = (colors) => Object.fromEntries(colors.map((color, index) => [`--ts-chart-${index + 1}`, color]));
69
+ const BARS = {
70
+ maxThickness: 24,
71
+ radius: { end: 4 }
72
+ };
73
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
74
+ function positionScale(spec) {
75
+ if (spec === null) return null;
76
+ const { scale, padding, domain, ...options } = isRecord(spec) ? spec : {};
77
+ const gap = typeof padding === "number" ? padding : void 0;
78
+ const make = () => {
79
+ const made = scale === "band" ? scaleBand().padding(gap ?? .2) : scale === "point" ? scalePoint().padding(gap ?? .5) : scaleLinear();
80
+ return Array.isArray(domain) ? made.domain(domain) : made;
81
+ };
82
+ return {
83
+ ...options,
84
+ scale: Array.isArray(domain) ? make() : make
85
+ };
86
+ }
87
+ function markOf(node) {
88
+ if (!isRecord(node) || typeof node.type !== "string" || !Object.hasOwn(marks, node.type)) return [];
89
+ const type = node.type;
90
+ const { data, ...options } = isRecord(node.props) ? node.props : {};
91
+ const make = marks[type];
92
+ if (type === "crosshair" || type === "frame") return [make(options)];
93
+ return [make(Array.isArray(data) ? data : [], type === "barX" || type === "barY" ? {
94
+ ...BARS,
95
+ ...options
96
+ } : options)];
97
+ }
98
+ /** A `Chart` node: its mark children drawn on its scales, with the default tooltip. */
99
+ function GeneratedChart(t0) {
100
+ const $ = c(25);
101
+ const { node } = t0;
102
+ let t1;
103
+ if ($[0] !== node.props) {
104
+ t1 = isRecord(node.props) ? node.props : {};
105
+ $[0] = node.props;
106
+ $[1] = t1;
107
+ } else t1 = $[1];
108
+ const props = t1;
109
+ let ariaDescription;
110
+ let ariaLabel;
111
+ let aspectRatio;
112
+ let height;
113
+ let t2;
114
+ if ($[2] !== node.children || $[3] !== props) {
115
+ const { scales, color, ariaLabel: t3, ariaDescription: t4, height: t5, aspectRatio: t6, children, ...spec } = props;
116
+ ariaLabel = t3;
117
+ ariaDescription = t4;
118
+ height = t5;
119
+ aspectRatio = t6;
120
+ let t7;
121
+ if ($[9] !== scales) {
122
+ t7 = isRecord(scales) ? scales : {};
123
+ $[9] = scales;
124
+ $[10] = t7;
125
+ } else t7 = $[10];
126
+ const { x, y } = t7;
127
+ let t8;
128
+ if ($[11] !== color) {
129
+ t8 = isRecord(color) ? color : {};
130
+ $[11] = color;
131
+ $[12] = t8;
132
+ } else t8 = $[12];
133
+ const { legend, ...colors } = t8;
134
+ const nodes = node.children ?? children;
135
+ let t9;
136
+ if ($[13] !== nodes) {
137
+ t9 = Array.isArray(nodes) ? nodes : [];
138
+ $[13] = nodes;
139
+ $[14] = t9;
140
+ } else t9 = $[14];
141
+ t2 = defineChart({
142
+ ...spec,
143
+ marks: t9.flatMap(markOf),
144
+ scales: {
145
+ x: positionScale(x),
146
+ y: positionScale(y)
147
+ },
148
+ color: {
149
+ range: SERIES,
150
+ ...colors,
151
+ ...legend ? { legend: colorLegend(isRecord(legend) ? legend : {}) } : {}
152
+ },
153
+ tooltip
154
+ });
155
+ $[2] = node.children;
156
+ $[3] = props;
157
+ $[4] = ariaDescription;
158
+ $[5] = ariaLabel;
159
+ $[6] = aspectRatio;
160
+ $[7] = height;
161
+ $[8] = t2;
162
+ } else {
163
+ ariaDescription = $[4];
164
+ ariaLabel = $[5];
165
+ aspectRatio = $[6];
166
+ height = $[7];
167
+ t2 = $[8];
168
+ }
169
+ const definition = t2;
170
+ const t3 = typeof ariaLabel === "string" ? ariaLabel : "Chart";
171
+ let t4;
172
+ if ($[15] !== ariaDescription) {
173
+ t4 = typeof ariaDescription === "string" && { ariaDescription };
174
+ $[15] = ariaDescription;
175
+ $[16] = t4;
176
+ } else t4 = $[16];
177
+ let t5;
178
+ if ($[17] !== aspectRatio || $[18] !== height) {
179
+ t5 = typeof aspectRatio === "number" ? { aspectRatio } : { height: typeof height === "number" ? height : 280 };
180
+ $[17] = aspectRatio;
181
+ $[18] = height;
182
+ $[19] = t5;
183
+ } else t5 = $[19];
184
+ let t6;
185
+ if ($[20] !== definition || $[21] !== t3 || $[22] !== t4 || $[23] !== t5) {
186
+ t6 = /* @__PURE__ */ jsx(Box, {
187
+ sx: _temp,
188
+ children: /* @__PURE__ */ jsx(Chart, {
189
+ definition,
190
+ ariaLabel: t3,
191
+ ...t4,
192
+ ...t5
193
+ })
194
+ });
195
+ $[20] = definition;
196
+ $[21] = t3;
197
+ $[22] = t4;
198
+ $[23] = t5;
199
+ $[24] = t6;
200
+ } else t6 = $[24];
201
+ return t6;
202
+ }
203
+ function _temp(theme) {
204
+ return {
205
+ ...palette(LIGHT),
206
+ ...theme.applyStyles("dark", palette(DARK))
207
+ };
208
+ }
209
+ export { GeneratedChart };
210
+
211
+ //# sourceMappingURL=generatedChart-k7NEdi5Z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatedChart-k7NEdi5Z.mjs","names":["{ node }: Readonly<{ node: Record<string, unknown> }>","isRecord(node.props) ? node.props : {}","props","defineChart({\n ...(spec as object),\n marks: (Array.isArray(nodes) ? nodes : []).flatMap(markOf),\n scales: { x: positionScale(x), y: positionScale(y) },\n color: {\n range: SERIES,\n ...colors,\n ...(legend\n ? {\n legend: colorLegend(\n isRecord(legend) ? (legend as Parameters<typeof colorLegend>[0]) : {},\n ),\n }\n : {}),\n } as ChartColorOptions,\n tooltip,\n })","children","isRecord(scales) ? scales : {}","isRecord(color) ? color : {}","Array.isArray(nodes) ? nodes : []","typeof ariaDescription === \"string\" && { ariaDescription }","typeof aspectRatio === \"number\"\n ? { aspectRatio }\n : { height: typeof height === \"number\" ? height : 280 }","<Box sx={(theme) => ({ ...palette(LIGHT), ...theme.applyStyles(\"dark\", palette(DARK)) })}>\n <Chart\n definition={definition}\n ariaLabel={typeof ariaLabel === \"string\" ? ariaLabel : \"Chart\"}\n {...(typeof ariaDescription === \"string\" && { ariaDescription })}\n {...(typeof aspectRatio === \"number\"\n ? { aspectRatio }\n : { height: typeof height === \"number\" ? height : 280 })}\n />\n </Box>","typeof ariaLabel === \"string\" ? ariaLabel : \"Chart\"","(theme) => ({ ...palette(LIGHT), ...theme.applyStyles(\"dark\", palette(DARK)) })","_c"],"sources":["../src/components/chat/generatedChart.tsx"],"sourcesContent":["import { Box } from \"@mui/material\";\nimport type { ChartColorOptions, ChartMark, ChartPositionScaleOptions } from \"@tanstack/charts\";\nimport {\n areaX,\n areaY,\n arrow,\n bandX,\n bandY,\n barX,\n barY,\n boxX,\n boxY,\n cell,\n colorLegend,\n crosshair,\n defineChart,\n differenceX,\n differenceY,\n dot,\n frame,\n hexagon,\n linearRegressionX,\n linearRegressionY,\n lineX,\n lineY,\n link,\n rect,\n ridgelineX,\n ridgelineY,\n ruleX,\n ruleY,\n text,\n tickX,\n tickY,\n vector,\n violinX,\n violinY,\n waffleX,\n waffleY,\n} from \"@tanstack/charts\";\nimport { Chart } from \"@tanstack/charts/react\";\nimport { scaleBand } from \"@tanstack/charts/scales/band\";\nimport { scaleLinear } from \"@tanstack/charts/scales/linear\";\nimport { scalePoint } from \"@tanstack/charts/scales/point\";\nimport { tooltip } from \"@tanstack/charts/tooltip\";\nimport type { ChartMarkName } from \"~/lib/ai/tools/ui\";\n\nconst marks = {\n areaX,\n areaY,\n arrow,\n bandX,\n bandY,\n barX,\n barY,\n boxX,\n boxY,\n cell,\n crosshair,\n differenceX,\n differenceY,\n dot,\n frame,\n hexagon,\n lineX,\n lineY,\n linearRegressionX,\n linearRegressionY,\n link,\n rect,\n ridgelineX,\n ridgelineY,\n ruleX,\n ruleY,\n text,\n tickX,\n tickY,\n vector,\n violinX,\n violinY,\n waffleX,\n waffleY,\n} satisfies Record<ChartMarkName, unknown>;\n\n// This order is what passes the colour-blindness checks, on light and on dark paper.\nconst LIGHT = [\n \"#2a78d6\",\n \"#eb6834\",\n \"#1baf7a\",\n \"#eda100\",\n \"#e87ba4\",\n \"#008300\",\n \"#6250d6\",\n \"#e34948\",\n];\nconst DARK = [\n \"#3987e5\",\n \"#d95926\",\n \"#199e70\",\n \"#c98500\",\n \"#d55181\",\n \"#008300\",\n \"#9085e9\",\n \"#e66767\",\n];\nconst SERIES = LIGHT.map((_, index) => `var(--ts-chart-${index + 1})`);\nconst palette = (colors: Array<string>) =>\n Object.fromEntries(colors.map((color, index) => [`--ts-chart-${index + 1}`, color]));\n\nconst BARS = { maxThickness: 24, radius: { end: 4 } };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nfunction positionScale(spec: unknown): ChartPositionScaleOptions | null {\n if (spec === null) return null;\n const { scale, padding, domain, ...options } = isRecord(spec) ? spec : {};\n const gap = typeof padding === \"number\" ? padding : undefined;\n const make = () => {\n const made =\n scale === \"band\"\n ? scaleBand().padding(gap ?? 0.2)\n : scale === \"point\"\n ? scalePoint().padding(gap ?? 0.5)\n : scaleLinear();\n return Array.isArray(domain) ? made.domain(domain as never) : made;\n };\n return { ...options, scale: Array.isArray(domain) ? make() : make } as ChartPositionScaleOptions;\n}\n\ntype AnyMark = ChartMark<any, any, any, any, any, any, any>;\n\nfunction markOf(node: unknown): Array<AnyMark> {\n if (!isRecord(node) || typeof node.type !== \"string\" || !Object.hasOwn(marks, node.type))\n return [];\n const type = node.type as ChartMarkName;\n const { data, ...options } = isRecord(node.props) ? node.props : {};\n const make = marks[type] as (...args: Array<unknown>) => AnyMark;\n if (type === \"crosshair\" || type === \"frame\") return [make(options)];\n const rows = Array.isArray(data) ? data : [];\n return [make(rows, type === \"barX\" || type === \"barY\" ? { ...BARS, ...options } : options)];\n}\n\n/** A `Chart` node: its mark children drawn on its scales, with the default tooltip. */\nexport function GeneratedChart({ node }: Readonly<{ node: Record<string, unknown> }>) {\n const props = isRecord(node.props) ? node.props : {};\n const { scales, color, ariaLabel, ariaDescription, height, aspectRatio, children, ...spec } =\n props;\n const { x, y } = isRecord(scales) ? scales : {};\n const { legend, ...colors } = isRecord(color) ? color : {};\n const nodes = node.children ?? children;\n\n const definition = defineChart({\n ...(spec as object),\n marks: (Array.isArray(nodes) ? nodes : []).flatMap(markOf),\n scales: { x: positionScale(x), y: positionScale(y) },\n color: {\n range: SERIES,\n ...colors,\n ...(legend\n ? {\n legend: colorLegend(\n isRecord(legend) ? (legend as Parameters<typeof colorLegend>[0]) : {},\n ),\n }\n : {}),\n } as ChartColorOptions,\n tooltip,\n });\n\n return (\n <Box sx={(theme) => ({ ...palette(LIGHT), ...theme.applyStyles(\"dark\", palette(DARK)) })}>\n <Chart\n definition={definition}\n ariaLabel={typeof ariaLabel === \"string\" ? ariaLabel : \"Chart\"}\n {...(typeof ariaDescription === \"string\" && { ariaDescription })}\n {...(typeof aspectRatio === \"number\"\n ? { aspectRatio }\n : { height: typeof height === \"number\" ? height : 280 })}\n />\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;AA+CA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,OAAO;CACX;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,SAAS,MAAM,KAAK,GAAG,UAAU,kBAAkB,QAAQ,EAAE,EAAE;AACrE,MAAM,WAAW,WACf,OAA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;;;;;;;;;;CAKF,MAAM,aAAaD;CAsBF,MAAA,KAAA,OAAO,cAAc,WAAW,YAAY;CAClDK,IAAAA;CAAO,IAAA,EAAA,QAAA,iBAAA;EAAP,KAAA,OAAO,oBAAoB,YAAY,EAAE,gBAAgB;EAAlD,EAAA,MAAA;;;CACPC,IAAAA;CAAO,IAAA,EAAA,QAAA,eAAA,EAAA,QAES,QAAA;EAFhB,KAAA,OAAO,gBAAgB,WACxB,EAAE,YAAY,IACd,EAAE,QAAQ,OAAO,WAAW,WAAW,SAAS,IAAI;EAF5C,EAAA,MAAA;EAES,EAAA,MAAA;;;CAPzBC,IAAAA;CAEgB,IAAA,EAAA,QAAA,cAAA,EAAA,QACDC,MAAAA,EAAAA,QACNH,MAAAA,EAAAA,QACAC,IAAAA;EALT,KAAA,oBAAC,KAAD;GAAK,IAAIG;GACP,UAAA,oBAAC,OAAD;IACc;IACZ,WAAWD;IACX,GAAKH;IACL,GAAKC;GAEqD,CAAA;EAE5D,CAAA;EAPc,EAAA,MAAA;EACDE,EAAAA,MAAAA;EACNH,EAAAA,MAAAA;EACAC,EAAAA,MAAAA;;;CANX,OACEC;AAWJ;AAXa,SAAA,MAAC,OAAA;CAAW,OAAA;EAAE,GAAG,QAAQ,KAAK;EAAG,GAAG,MAAM,YAAY,QAAQ,QAAQ,IAAI,CAAC;CAAE"}
package/dist/hooks.d.mts CHANGED
@@ -1,39 +1,30 @@
1
- import { c as layoutTableFeatures, d as useTableContext, i as useLayoutTable, l as useCellContext, r as createLayoutColumnHelper, s as LayoutTableFeatures, u as useHeaderContext } from "./LayoutTable-CRo43iWr.mjs";
2
- import { t as FormOmittedProps } from "./utils-Bhi0KiBx.mjs";
1
+ import { t as FormOmittedProps } from "./utils-CNYCSgip.mjs";
2
+ import { a as useLayoutTable, c as LayoutTableFeatures, d as useHeaderContext, f as useTableContext, i as createLayoutColumnHelper, l as layoutTableFeatures, t as ChatLayout, u as useCellContext } from "./ChatLayout-BmLySLXy.mjs";
3
3
  import { AutocompleteProps, ButtonProps, CheckboxProps, RadioGroupProps, SliderProps, SwitchProps, TextFieldProps } from "@mui/material";
4
4
  import { DatePickerProps, DateTimePickerProps, TimePickerProps } from "@mui/x-date-pickers";
5
5
  import { FC, ReactNode } from "react";
6
6
  import { useTranslation } from "react-i18next";
7
7
  import { useInView } from "react-intersection-observer";
8
+ import { UseChatReturn } from "@tanstack/ai-react";
9
+ import { AnyClientTool, RunAgentInput } from "@tanstack/ai/client";
8
10
  import { InputAttributes, NumericFormatProps } from "react-number-format/types/types";
9
11
  import { PickersTextFieldProps } from "@mui/x-date-pickers/PickersTextField";
10
- //#region src/components/form/FormTextField.d.ts
11
12
  interface FormTextFieldProps extends Omit<TextFieldProps, FormOmittedProps> {
12
13
  type?: "color" | "email" | "password" | "search" | "tel" | "text" | "url";
13
14
  }
14
- //#endregion
15
- //#region src/components/form/FormNumberField.d.ts
16
15
  interface FormNumberFieldProps extends Omit<TextFieldProps, FormOmittedProps> {
17
16
  defaultValue?: number | null;
18
17
  options?: Omit<NumericFormatProps<InputAttributes>, "customInput" | "onValueChange" | keyof InputAttributes>;
19
18
  }
20
- //#endregion
21
- //#region src/components/form/FormAutocomplete.d.ts
22
19
  interface FormAutocompleteProps extends Omit<AutocompleteProps<any, boolean, boolean, boolean>, FormOmittedProps> {
23
20
  textFieldProps?: Omit<TextFieldProps, FormOmittedProps>;
24
21
  }
25
- //#endregion
26
- //#region src/components/form/FormCheckbox.d.ts
27
22
  interface FormCheckboxProps extends Omit<CheckboxProps, FormOmittedProps> {
28
23
  label?: string;
29
24
  }
30
- //#endregion
31
- //#region src/components/form/FormSwitch.d.ts
32
25
  interface FormSwitchProps extends Omit<SwitchProps, FormOmittedProps> {
33
26
  label?: string;
34
27
  }
35
- //#endregion
36
- //#region src/components/form/FormRadioGroup.d.ts
37
28
  interface Option {
38
29
  label: string;
39
30
  value: string | number;
@@ -42,31 +33,19 @@ interface FormRadioGroupProps extends Omit<RadioGroupProps, FormOmittedProps> {
42
33
  label?: string;
43
34
  options: Array<Option>;
44
35
  }
45
- //#endregion
46
- //#region src/components/form/FormSlider.d.ts
47
36
  interface FormSliderProps extends Omit<SliderProps, FormOmittedProps> {
48
37
  label?: string;
49
38
  }
50
- //#endregion
51
- //#region src/components/form/FormDatePicker.d.ts
52
39
  interface FormDatePickerProps extends Omit<DatePickerProps, FormOmittedProps> {
53
40
  textFieldProps?: Partial<PickersTextFieldProps>;
54
41
  }
55
- //#endregion
56
- //#region src/components/form/FormTimePicker.d.ts
57
42
  interface FormTimePickerProps extends Omit<TimePickerProps, FormOmittedProps> {
58
43
  textFieldProps?: Partial<PickersTextFieldProps>;
59
44
  }
60
- //#endregion
61
- //#region src/components/form/FormDateTimePicker.d.ts
62
45
  interface FormDateTimePickerProps extends Omit<DateTimePickerProps, FormOmittedProps> {
63
46
  textFieldProps?: Partial<PickersTextFieldProps>;
64
47
  }
65
- //#endregion
66
- //#region src/components/form/FormSubmitButton.d.ts
67
48
  type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
68
- //#endregion
69
- //#region src/hooks/useForm.d.ts
70
49
  declare const fieldContext: import("react").Context<import("@tanstack/form-core").AnyFieldApi>, useFieldContext: <TData>() => import("@tanstack/form-core").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, formContext: import("react").Context<import("@tanstack/form-core").AnyFormApi>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
71
50
  export declare const useLayoutForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/form-core").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
72
51
  readonly TextField: import("react").FC<FormTextFieldProps>;
@@ -110,8 +89,6 @@ export declare const useLayoutForm: <TFormData, TOnMount extends undefined | imp
110
89
  readonly SubmitButton: import("react").FC<FormSubmitButtonProps>;
111
90
  }>;
112
91
  }>>;
113
- //#endregion
114
- //#region src/hooks/useDialogs.d.ts
115
92
  interface OpenDialogOptions<TResult> {
116
93
  onClose?: (result: TResult) => Promise<void>;
117
94
  }
@@ -143,8 +120,6 @@ interface DialogHook {
143
120
  close: CloseDialog;
144
121
  }
145
122
  export declare function useDialogs(): DialogHook;
146
- //#endregion
147
- //#region src/hooks/useScanDetection.d.ts
148
123
  interface Config {
149
124
  /** Time to wait from last character to then trigger an evaluation of the buffer. Defaults to 100ms. */
150
125
  timeToEvaluate?: number;
@@ -172,6 +147,31 @@ interface Config {
172
147
  enabled?: boolean;
173
148
  }
174
149
  export declare const useScanDetection: ({ timeToEvaluate, averageWaitTime, startCharacter, endCharacter, onComplete, onError, minLength, ignoreIfFocusOn, stopPropagation, preventDefault, container, enabled }: Config) => void;
175
- //#endregion
150
+ /** The app's chat server function: takes the AG-UI `RunAgentInput`, returns `toServerSentEventsResponse(...)`. */
151
+ type ChatServerFn = (options: {
152
+ data: RunAgentInput;
153
+ signal: AbortSignal;
154
+ }) => Promise<Response>;
155
+ type LayoutChatOptions = {
156
+ /** The conversation's name. Each signed-in user keeps their own copy in localStorage. */
157
+ threadId: string;
158
+ /**
159
+ * Extra client tools, `toolDefinition(...).client(run)`: `run` executes in the browser, so it can
160
+ * use hooks from the calling component. Fixed for the chat's lifetime.
161
+ */
162
+ tools?: ReadonlyArray<AnyClientTool>;
163
+ /** Data the server reads as `forwardedProps`. */
164
+ forwardedProps?: Record<string, unknown>;
165
+ };
166
+ /**
167
+ * Binds a chat server function once, at module scope:
168
+ * `const { useLayoutChat, LayoutChat } = createLayoutChatHook(chatFn)`, then
169
+ * `<LayoutChat chat={useLayoutChat({ threadId })} />` inside a parent with a height (e.g. `Fullscreen`),
170
+ * or in a component given to `LayoutProvider`'s `options.chat`, docked beside every page.
171
+ */
172
+ export declare function createLayoutChatHook(serverFn: ChatServerFn): {
173
+ useLayoutChat: ({ threadId, tools, forwardedProps }: LayoutChatOptions) => UseChatReturn;
174
+ LayoutChat: typeof ChatLayout;
175
+ };
176
176
  export { type DialogProps, type LayoutTableFeatures, createLayoutColumnHelper, layoutTableFeatures, useCellContext, useFieldContext, useFormContext, useHeaderContext, useInView, useLayoutTable, useTableContext, useTranslation };
177
177
  //# sourceMappingURL=hooks.d.mts.map