@copilotkit/react-core 2.0.0-rc.38 → 2.0.0-rc.39

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 (61) hide show
  1. package/dist/MarkdownRendererContext-BL8ct_3U.d.mts +34 -0
  2. package/dist/MarkdownRendererContext-BL8ct_3U.d.mts.map +1 -0
  3. package/dist/MarkdownRendererContext-C2J_lgqF.d.cts +34 -0
  4. package/dist/MarkdownRendererContext-C2J_lgqF.d.cts.map +1 -0
  5. package/dist/MarkdownSurfaces-Byz821bg.mjs +324 -0
  6. package/dist/MarkdownSurfaces-Byz821bg.mjs.map +1 -0
  7. package/dist/MarkdownSurfaces-D2Ck-cbb.cjs +378 -0
  8. package/dist/MarkdownSurfaces-D2Ck-cbb.cjs.map +1 -0
  9. package/dist/{MarkdownSurfaces-BQ1HGCzB.mjs → chat-Bf0vVdo7.mjs} +642 -484
  10. package/dist/chat-Bf0vVdo7.mjs.map +1 -0
  11. package/dist/{MarkdownSurfaces-BFoO6wSB.cjs → chat-D3fxo6Ah.cjs} +663 -529
  12. package/dist/chat-D3fxo6Ah.cjs.map +1 -0
  13. package/dist/{MarkdownRendererContext-CPfNVyde.d.mts → chat-DgP2N7bD.d.mts} +31 -39
  14. package/dist/chat-DgP2N7bD.d.mts.map +1 -0
  15. package/dist/{MarkdownRendererContext-iOl2pj9l.d.cts → chat-DtHs4alO.d.cts} +31 -39
  16. package/dist/chat-DtHs4alO.d.cts.map +1 -0
  17. package/dist/generative-ui/native.cjs +66 -0
  18. package/dist/generative-ui/native.cjs.map +1 -0
  19. package/dist/generative-ui/native.d.cts +155 -0
  20. package/dist/generative-ui/native.d.cts.map +1 -0
  21. package/dist/generative-ui/native.d.mts +155 -0
  22. package/dist/generative-ui/native.d.mts.map +1 -0
  23. package/dist/generative-ui/native.mjs +24 -0
  24. package/dist/generative-ui/native.mjs.map +1 -0
  25. package/dist/generative-ui.cjs +45 -70
  26. package/dist/generative-ui.cjs.map +1 -1
  27. package/dist/generative-ui.d.cts +72 -144
  28. package/dist/generative-ui.d.cts.map +1 -1
  29. package/dist/generative-ui.d.mts +72 -144
  30. package/dist/generative-ui.d.mts.map +1 -1
  31. package/dist/generative-ui.mjs +4 -29
  32. package/dist/generative-ui.mjs.map +1 -1
  33. package/dist/headless.d.cts +58 -153
  34. package/dist/headless.d.cts.map +1 -1
  35. package/dist/hooks-2Ur8NQhj.d.cts +84 -0
  36. package/dist/hooks-2Ur8NQhj.d.cts.map +1 -0
  37. package/dist/hooks-BRYonCVu.d.mts +84 -0
  38. package/dist/hooks-BRYonCVu.d.mts.map +1 -0
  39. package/dist/index.cjs +82 -430
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +3 -2
  42. package/dist/index.d.cts.map +1 -1
  43. package/dist/index.d.mts +4 -3
  44. package/dist/index.d.mts.map +1 -1
  45. package/dist/index.mjs +5 -353
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/index.umd.js +645 -140
  48. package/dist/index.umd.js.map +1 -1
  49. package/dist/refs-BIUfn1wb.cjs +43 -0
  50. package/dist/refs-BIUfn1wb.cjs.map +1 -0
  51. package/dist/refs-CMrRm3ta.mjs +31 -0
  52. package/dist/refs-CMrRm3ta.mjs.map +1 -0
  53. package/dist/use-generative-ui-root-C12htqbK.cjs +390 -0
  54. package/dist/use-generative-ui-root-C12htqbK.cjs.map +1 -0
  55. package/dist/use-generative-ui-root-CVgsDy1f.mjs +385 -0
  56. package/dist/use-generative-ui-root-CVgsDy1f.mjs.map +1 -0
  57. package/package.json +14 -10
  58. package/dist/MarkdownRendererContext-CPfNVyde.d.mts.map +0 -1
  59. package/dist/MarkdownRendererContext-iOl2pj9l.d.cts.map +0 -1
  60. package/dist/MarkdownSurfaces-BFoO6wSB.cjs.map +0 -1
  61. package/dist/MarkdownSurfaces-BQ1HGCzB.mjs.map +0 -1
@@ -1,39 +1,13 @@
1
- import { A as GenerativeUIStateOf, C as GenerativeUIDefinitionsOf, D as GenerativeUIFunctionInput, E as GenerativeUIFunctionDefinition, O as GenerativeUIFunctionName, S as GenerativeUIComponentProps, T as GenerativeUIFunctionArgs, _ as useGenerativeUIAccessibility, b as GenerativeUIComponentDefinition, d as GenerativeUIMarkdownConfig, f as GenerativeUITheme, g as GenerativeUIAriaAttributes, h as GenerativeUIAccessibility, j as createGenerativeUI, k as GenerativeUISlotKind, l as GenerativeUIConfig, m as useGenerativeUIRuntime, o as DefaultGenerativeUIChatCard, p as GenerativeUIToolConfig, s as GenerativeUIChatSurfaceProps, t as DefaultMarkdownRendererProps, u as GenerativeUIErrorBoundaryConfig, v as CreateGenerativeUIConfig, w as GenerativeUIEventDefinition, x as GenerativeUIComponentName, y as GenerativeUI } from "./MarkdownRendererContext-CPfNVyde.mjs";
1
+ import { A as createGenerativeUI, C as GenerativeUIEventDefinition, D as GenerativeUIFunctionName, E as GenerativeUIFunctionInput, O as GenerativeUISlotKind, T as GenerativeUIFunctionDefinition, _ as CreateGenerativeUIConfig, a as GenerativeUIConfig, b as GenerativeUIComponentName, d as GenerativeUIToolConfig, f as useGenerativeUIRuntime, g as useGenerativeUIAccessibility, h as GenerativeUIAriaAttributes, k as GenerativeUIStateOf, m as GenerativeUIAccessibility, n as GenerativeUIChatSurfaceProps, o as GenerativeUIErrorBoundaryConfig, s as GenerativeUIMarkdownConfig, t as DefaultGenerativeUIChatCard, u as GenerativeUITheme, v as GenerativeUI, w as GenerativeUIFunctionArgs, x as GenerativeUIComponentProps, y as GenerativeUIComponentDefinition } from "./chat-DgP2N7bD.mjs";
2
+ import { a as childList, i as child, n as useGenerativeUIState, t as useGenerativeUIFunction } from "./hooks-BRYonCVu.mjs";
3
+ import { t as DefaultMarkdownRendererProps } from "./MarkdownRendererContext-BL8ct_3U.mjs";
2
4
  import { ReactNode } from "react";
3
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
6
  import * as zod from "zod";
5
7
  import * as _copilotkit_shared_generative_ui0 from "@copilotkit/shared/generative-ui";
6
- import { ExportA2UICatalogOptions, GenerativeUIError, GenerativeUIErrorCode, GenerativeUIErrorInfo, GenerativeUIEventHandler, GenerativeUIInvokeResult, GenerativeUIThemeValues, GenerativeUIThemeVariable, GenerativeUIThemeVariables, SchemaInput, exportA2UICatalog } from "@copilotkit/shared/generative-ui";
8
+ import { ExportA2UICatalogOptions, GenerativeUIError, GenerativeUIErrorCode, GenerativeUIErrorInfo, GenerativeUIEventHandler, GenerativeUIInvokeResult, GenerativeUIThemeValues, GenerativeUIThemeVariable, GenerativeUIThemeVariables, exportA2UICatalog } from "@copilotkit/shared/generative-ui";
7
9
  import * as zod_v4_core0 from "zod/v4/core";
8
10
 
9
- //#region src/generative-ui/refs.d.ts
10
- /**
11
- * One component id. The component receives the rendered child. Pass the
12
- * description here, not with `.describe()`, which would replace the mark.
13
- *
14
- * @example
15
- * ```ts
16
- * const tabsSchema = z.object({
17
- * tabs: z.array(z.object({ title: z.string(), child: child() })),
18
- * });
19
- * // The component gets `tabs: { title: string; child: ReactNode }[]`.
20
- * ```
21
- */
22
- declare function child(description?: string): zod.ZodPipe<zod.ZodString, zod.ZodTransform<ReactNode, string>>;
23
- /**
24
- * A list of component ids, or a template `{ componentId, path }` that
25
- * repeats one component for each item of the list at `path`. The
26
- * component receives the rendered children. Pass the description here,
27
- * not with `.describe()`.
28
- */
29
- declare function childList(description?: string): zod.ZodPipe<zod.ZodUnion<readonly [zod.ZodArray<zod.ZodString>, zod.ZodObject<{
30
- componentId: zod.ZodString;
31
- path: zod.ZodString;
32
- }, zod_v4_core0.$strip>]>, zod.ZodTransform<ReactNode, string[] | {
33
- componentId: string;
34
- path: string;
35
- }>>;
36
- //#endregion
37
11
  //#region src/generative-ui/GenerativeUISurface.d.ts
38
12
  interface GenerativeUISurfaceBaseProps {
39
13
  /** Target id the agent renders into. */
@@ -138,52 +112,6 @@ declare function MarkdownSurfaces({
138
112
  ...markdownProps
139
113
  }: MarkdownSurfacesProps): react_jsx_runtime0.JSX.Element;
140
114
  //#endregion
141
- //#region src/generative-ui/hooks.d.ts
142
- /** What `useGenerativeUIState` takes for one key: the input of its schema. */
143
- type StateInput<UI extends GenerativeUI<any>, Key extends keyof GenerativeUIStateOf<UI>> = SchemaInput<GenerativeUIDefinitionsOf<UI>["state"][Key]>;
144
- /**
145
- * Experimental. Gives one key of the app state declared in
146
- * `createGenerativeUI({ state })` its value. Bound props of generated
147
- * components read it. The model does not see it.
148
- *
149
- * The key is set on mount and when the value changes (compared as JSON). It
150
- * is removed on unmount.
151
- *
152
- * @param ui - The object from `createGenerativeUI`. It gives the key and the
153
- * value their types.
154
- * @param key - A top-level key of `state`.
155
- * @param value - The value of that key. It must fit the key's schema.
156
- *
157
- * @example
158
- * ```tsx
159
- * useGenerativeUIState(storeUI, "cart", { count, total, coupon, items });
160
- * ```
161
- */
162
- declare function useGenerativeUIState<UI extends GenerativeUI<any>, Key extends keyof GenerativeUIStateOf<UI> & string>(ui: UI, key: Key, value: StateInput<UI, Key>): void;
163
- /**
164
- * Experimental. Mounts the handler of a function declared in
165
- * `createGenerativeUI({ functions })`. Generated UI can call the function
166
- * only while exactly one handler for it is mounted.
167
- *
168
- * The handler gets the parsed arguments: schema defaults are set. It can
169
- * change on each render. The latest handler always runs, and the hook does
170
- * not register again.
171
- *
172
- * @param ui - The object from `createGenerativeUI`. It gives the name and the
173
- * handler arguments their types.
174
- * @param name - A key of `functions`.
175
- * @param handler - Runs when generated UI calls the function. Its return
176
- * value goes back to the caller as `{ ok: true, result }`.
177
- *
178
- * @example
179
- * ```tsx
180
- * useGenerativeUIFunction(storeUI, "addToCart", ({ productId, quantity }) =>
181
- * cart.addItem(productId, quantity),
182
- * );
183
- * ```
184
- */
185
- declare function useGenerativeUIFunction<UI extends GenerativeUI<any>, Name extends GenerativeUIFunctionName<UI>>(ui: UI, name: Name, handler: (args: GenerativeUIFunctionArgs<UI, Name>) => unknown): void;
186
- //#endregion
187
115
  //#region src/generative-ui/standard/index.d.ts
188
116
  /**
189
117
  * Experimental. The standard components: layout, text, inputs, feedback,
@@ -243,12 +171,12 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
243
171
  badge: zod.ZodOptional<zod.ZodObject<{
244
172
  label: zod.ZodString;
245
173
  color: zod.ZodOptional<zod.ZodEnum<{
174
+ secondary: "secondary";
246
175
  success: "success";
247
176
  info: "info";
248
177
  warning: "warning";
249
178
  danger: "danger";
250
179
  discovery: "discovery";
251
- secondary: "secondary";
252
180
  }>>;
253
181
  }, zod_v4_core0.$strip>>;
254
182
  rating: zod.ZodOptional<zod.ZodNumber>;
@@ -306,8 +234,6 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
306
234
  scaleDown: "scaleDown";
307
235
  }>>;
308
236
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
309
- "2xs": "2xs";
310
- xs: "xs";
311
237
  sm: "sm";
312
238
  md: "md";
313
239
  lg: "lg";
@@ -315,6 +241,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
315
241
  "2xl": "2xl";
316
242
  "3xl": "3xl";
317
243
  "4xl": "4xl";
244
+ "2xs": "2xs";
245
+ xs: "xs";
318
246
  full: "full";
319
247
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
320
248
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -441,8 +369,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
441
369
  language: zod.ZodOptional<zod.ZodString>;
442
370
  label: zod.ZodOptional<zod.ZodString>;
443
371
  kind: zod.ZodOptional<zod.ZodEnum<{
444
- subtitles: "subtitles";
445
372
  captions: "captions";
373
+ subtitles: "subtitles";
446
374
  descriptions: "descriptions";
447
375
  }>>;
448
376
  }, zod_v4_core0.$strip>>>;
@@ -682,14 +610,14 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
682
610
  text: zod.ZodOptional<zod.ZodString>;
683
611
  variant: zod.ZodOptional<zod.ZodEnum<{
684
612
  default: "default";
685
- soft: "soft";
686
613
  primary: "primary";
614
+ soft: "soft";
687
615
  borderless: "borderless";
688
616
  }>>;
689
617
  color: zod.ZodOptional<zod.ZodEnum<{
690
- danger: "danger";
691
- secondary: "secondary";
692
618
  primary: "primary";
619
+ secondary: "secondary";
620
+ danger: "danger";
693
621
  }>>;
694
622
  size: zod.ZodOptional<zod.ZodEnum<{
695
623
  sm: "sm";
@@ -744,17 +672,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
744
672
  borderColor: zod.ZodOptional<zod.ZodEnum<{
745
673
  default: "default";
746
674
  success: "success";
747
- subtle: "subtle";
748
- strong: "strong";
749
675
  info: "info";
750
676
  warning: "warning";
751
677
  caution: "caution";
752
678
  danger: "danger";
753
679
  discovery: "discovery";
680
+ subtle: "subtle";
681
+ strong: "strong";
754
682
  }>>;
755
683
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
756
- "2xs": "2xs";
757
- xs: "xs";
758
684
  sm: "sm";
759
685
  md: "md";
760
686
  lg: "lg";
@@ -762,6 +688,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
762
688
  "2xl": "2xl";
763
689
  "3xl": "3xl";
764
690
  "4xl": "4xl";
691
+ "2xs": "2xs";
692
+ xs: "xs";
765
693
  full: "full";
766
694
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
767
695
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -820,17 +748,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
820
748
  borderColor: zod.ZodOptional<zod.ZodEnum<{
821
749
  default: "default";
822
750
  success: "success";
823
- subtle: "subtle";
824
- strong: "strong";
825
751
  info: "info";
826
752
  warning: "warning";
827
753
  caution: "caution";
828
754
  danger: "danger";
829
755
  discovery: "discovery";
756
+ subtle: "subtle";
757
+ strong: "strong";
830
758
  }>>;
831
759
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
832
- "2xs": "2xs";
833
- xs: "xs";
834
760
  sm: "sm";
835
761
  md: "md";
836
762
  lg: "lg";
@@ -838,6 +764,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
838
764
  "2xl": "2xl";
839
765
  "3xl": "3xl";
840
766
  "4xl": "4xl";
767
+ "2xs": "2xs";
768
+ xs: "xs";
841
769
  full: "full";
842
770
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
843
771
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1208,12 +1136,12 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1208
1136
  weight: zod.ZodOptional<zod.ZodNumber>;
1209
1137
  text: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
1210
1138
  size: zod.ZodOptional<zod.ZodEnum<{
1211
- "2xs": "2xs";
1212
- xs: "xs";
1213
1139
  sm: "sm";
1214
1140
  md: "md";
1215
1141
  lg: "lg";
1216
1142
  "3xs": "3xs";
1143
+ "2xs": "2xs";
1144
+ xs: "xs";
1217
1145
  }>>;
1218
1146
  fontSize: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodNumber, zod.ZodString]>>;
1219
1147
  lineHeight: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodNumber, zod.ZodString]>>;
@@ -1273,12 +1201,12 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1273
1201
  htmlFor: zod.ZodOptional<zod.ZodString>;
1274
1202
  color: zod.ZodOptional<zod.ZodString>;
1275
1203
  size: zod.ZodOptional<zod.ZodEnum<{
1276
- "2xs": "2xs";
1277
- xs: "xs";
1278
1204
  sm: "sm";
1279
1205
  md: "md";
1280
1206
  lg: "lg";
1281
1207
  "3xs": "3xs";
1208
+ "2xs": "2xs";
1209
+ xs: "xs";
1282
1210
  }>>;
1283
1211
  fontWeight: zod.ZodOptional<zod.ZodEnum<{
1284
1212
  normal: "normal";
@@ -1315,12 +1243,12 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1315
1243
  Badge: zod.ZodObject<{
1316
1244
  label: zod.ZodString;
1317
1245
  color: zod.ZodOptional<zod.ZodEnum<{
1246
+ secondary: "secondary";
1318
1247
  success: "success";
1319
1248
  info: "info";
1320
1249
  warning: "warning";
1321
1250
  danger: "danger";
1322
1251
  discovery: "discovery";
1323
- secondary: "secondary";
1324
1252
  }>>;
1325
1253
  size: zod.ZodOptional<zod.ZodEnum<{
1326
1254
  sm: "sm";
@@ -1360,12 +1288,12 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1360
1288
  ShimmerText: zod.ZodObject<{
1361
1289
  text: zod.ZodString;
1362
1290
  size: zod.ZodOptional<zod.ZodEnum<{
1363
- "2xs": "2xs";
1364
- xs: "xs";
1365
1291
  sm: "sm";
1366
1292
  md: "md";
1367
1293
  lg: "lg";
1368
1294
  "3xs": "3xs";
1295
+ "2xs": "2xs";
1296
+ xs: "xs";
1369
1297
  }>>;
1370
1298
  lineThrough: zod.ZodOptional<zod.ZodBoolean>;
1371
1299
  color: zod.ZodOptional<zod.ZodString>;
@@ -1427,17 +1355,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1427
1355
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1428
1356
  default: "default";
1429
1357
  success: "success";
1430
- subtle: "subtle";
1431
- strong: "strong";
1432
1358
  info: "info";
1433
1359
  warning: "warning";
1434
1360
  caution: "caution";
1435
1361
  danger: "danger";
1436
1362
  discovery: "discovery";
1363
+ subtle: "subtle";
1364
+ strong: "strong";
1437
1365
  }>>;
1438
1366
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1439
- "2xs": "2xs";
1440
- xs: "xs";
1441
1367
  sm: "sm";
1442
1368
  md: "md";
1443
1369
  lg: "lg";
@@ -1445,6 +1371,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1445
1371
  "2xl": "2xl";
1446
1372
  "3xl": "3xl";
1447
1373
  "4xl": "4xl";
1374
+ "2xs": "2xs";
1375
+ xs: "xs";
1448
1376
  full: "full";
1449
1377
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1450
1378
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1502,17 +1430,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1502
1430
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1503
1431
  default: "default";
1504
1432
  success: "success";
1505
- subtle: "subtle";
1506
- strong: "strong";
1507
1433
  info: "info";
1508
1434
  warning: "warning";
1509
1435
  caution: "caution";
1510
1436
  danger: "danger";
1511
1437
  discovery: "discovery";
1438
+ subtle: "subtle";
1439
+ strong: "strong";
1512
1440
  }>>;
1513
1441
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1514
- "2xs": "2xs";
1515
- xs: "xs";
1516
1442
  sm: "sm";
1517
1443
  md: "md";
1518
1444
  lg: "lg";
@@ -1520,6 +1446,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1520
1446
  "2xl": "2xl";
1521
1447
  "3xl": "3xl";
1522
1448
  "4xl": "4xl";
1449
+ "2xs": "2xs";
1450
+ xs: "xs";
1523
1451
  full: "full";
1524
1452
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1525
1453
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1577,17 +1505,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1577
1505
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1578
1506
  default: "default";
1579
1507
  success: "success";
1580
- subtle: "subtle";
1581
- strong: "strong";
1582
1508
  info: "info";
1583
1509
  warning: "warning";
1584
1510
  caution: "caution";
1585
1511
  danger: "danger";
1586
1512
  discovery: "discovery";
1513
+ subtle: "subtle";
1514
+ strong: "strong";
1587
1515
  }>>;
1588
1516
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1589
- "2xs": "2xs";
1590
- xs: "xs";
1591
1517
  sm: "sm";
1592
1518
  md: "md";
1593
1519
  lg: "lg";
@@ -1595,6 +1521,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1595
1521
  "2xl": "2xl";
1596
1522
  "3xl": "3xl";
1597
1523
  "4xl": "4xl";
1524
+ "2xs": "2xs";
1525
+ xs: "xs";
1598
1526
  full: "full";
1599
1527
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1600
1528
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1655,17 +1583,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1655
1583
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1656
1584
  default: "default";
1657
1585
  success: "success";
1658
- subtle: "subtle";
1659
- strong: "strong";
1660
1586
  info: "info";
1661
1587
  warning: "warning";
1662
1588
  caution: "caution";
1663
1589
  danger: "danger";
1664
1590
  discovery: "discovery";
1591
+ subtle: "subtle";
1592
+ strong: "strong";
1665
1593
  }>>;
1666
1594
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1667
- "2xs": "2xs";
1668
- xs: "xs";
1669
1595
  sm: "sm";
1670
1596
  md: "md";
1671
1597
  lg: "lg";
@@ -1673,6 +1599,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1673
1599
  "2xl": "2xl";
1674
1600
  "3xl": "3xl";
1675
1601
  "4xl": "4xl";
1602
+ "2xs": "2xs";
1603
+ xs: "xs";
1676
1604
  full: "full";
1677
1605
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1678
1606
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1732,17 +1660,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1732
1660
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1733
1661
  default: "default";
1734
1662
  success: "success";
1735
- subtle: "subtle";
1736
- strong: "strong";
1737
1663
  info: "info";
1738
1664
  warning: "warning";
1739
1665
  caution: "caution";
1740
1666
  danger: "danger";
1741
1667
  discovery: "discovery";
1668
+ subtle: "subtle";
1669
+ strong: "strong";
1742
1670
  }>>;
1743
1671
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1744
- "2xs": "2xs";
1745
- xs: "xs";
1746
1672
  sm: "sm";
1747
1673
  md: "md";
1748
1674
  lg: "lg";
@@ -1750,6 +1676,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1750
1676
  "2xl": "2xl";
1751
1677
  "3xl": "3xl";
1752
1678
  "4xl": "4xl";
1679
+ "2xs": "2xs";
1680
+ xs: "xs";
1753
1681
  full: "full";
1754
1682
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1755
1683
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1825,17 +1753,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1825
1753
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1826
1754
  default: "default";
1827
1755
  success: "success";
1828
- subtle: "subtle";
1829
- strong: "strong";
1830
1756
  info: "info";
1831
1757
  warning: "warning";
1832
1758
  caution: "caution";
1833
1759
  danger: "danger";
1834
1760
  discovery: "discovery";
1761
+ subtle: "subtle";
1762
+ strong: "strong";
1835
1763
  }>>;
1836
1764
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1837
- "2xs": "2xs";
1838
- xs: "xs";
1839
1765
  sm: "sm";
1840
1766
  md: "md";
1841
1767
  lg: "lg";
@@ -1843,6 +1769,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1843
1769
  "2xl": "2xl";
1844
1770
  "3xl": "3xl";
1845
1771
  "4xl": "4xl";
1772
+ "2xs": "2xs";
1773
+ xs: "xs";
1846
1774
  full: "full";
1847
1775
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1848
1776
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1906,17 +1834,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1906
1834
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1907
1835
  default: "default";
1908
1836
  success: "success";
1909
- subtle: "subtle";
1910
- strong: "strong";
1911
1837
  info: "info";
1912
1838
  warning: "warning";
1913
1839
  caution: "caution";
1914
1840
  danger: "danger";
1915
1841
  discovery: "discovery";
1842
+ subtle: "subtle";
1843
+ strong: "strong";
1916
1844
  }>>;
1917
1845
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
1918
- "2xs": "2xs";
1919
- xs: "xs";
1920
1846
  sm: "sm";
1921
1847
  md: "md";
1922
1848
  lg: "lg";
@@ -1924,6 +1850,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1924
1850
  "2xl": "2xl";
1925
1851
  "3xl": "3xl";
1926
1852
  "4xl": "4xl";
1853
+ "2xs": "2xs";
1854
+ xs: "xs";
1927
1855
  full: "full";
1928
1856
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
1929
1857
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -1988,17 +1916,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
1988
1916
  borderColor: zod.ZodOptional<zod.ZodEnum<{
1989
1917
  default: "default";
1990
1918
  success: "success";
1991
- subtle: "subtle";
1992
- strong: "strong";
1993
1919
  info: "info";
1994
1920
  warning: "warning";
1995
1921
  caution: "caution";
1996
1922
  danger: "danger";
1997
1923
  discovery: "discovery";
1924
+ subtle: "subtle";
1925
+ strong: "strong";
1998
1926
  }>>;
1999
1927
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
2000
- "2xs": "2xs";
2001
- xs: "xs";
2002
1928
  sm: "sm";
2003
1929
  md: "md";
2004
1930
  lg: "lg";
@@ -2006,6 +1932,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2006
1932
  "2xl": "2xl";
2007
1933
  "3xl": "3xl";
2008
1934
  "4xl": "4xl";
1935
+ "2xs": "2xs";
1936
+ xs: "xs";
2009
1937
  full: "full";
2010
1938
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
2011
1939
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -2078,17 +2006,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2078
2006
  borderColor: zod.ZodOptional<zod.ZodEnum<{
2079
2007
  default: "default";
2080
2008
  success: "success";
2081
- subtle: "subtle";
2082
- strong: "strong";
2083
2009
  info: "info";
2084
2010
  warning: "warning";
2085
2011
  caution: "caution";
2086
2012
  danger: "danger";
2087
2013
  discovery: "discovery";
2014
+ subtle: "subtle";
2015
+ strong: "strong";
2088
2016
  }>>;
2089
2017
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
2090
- "2xs": "2xs";
2091
- xs: "xs";
2092
2018
  sm: "sm";
2093
2019
  md: "md";
2094
2020
  lg: "lg";
@@ -2096,6 +2022,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2096
2022
  "2xl": "2xl";
2097
2023
  "3xl": "3xl";
2098
2024
  "4xl": "4xl";
2025
+ "2xs": "2xs";
2026
+ xs: "xs";
2099
2027
  full: "full";
2100
2028
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
2101
2029
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -2153,17 +2081,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2153
2081
  borderColor: zod.ZodOptional<zod.ZodEnum<{
2154
2082
  default: "default";
2155
2083
  success: "success";
2156
- subtle: "subtle";
2157
- strong: "strong";
2158
2084
  info: "info";
2159
2085
  warning: "warning";
2160
2086
  caution: "caution";
2161
2087
  danger: "danger";
2162
2088
  discovery: "discovery";
2089
+ subtle: "subtle";
2090
+ strong: "strong";
2163
2091
  }>>;
2164
2092
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
2165
- "2xs": "2xs";
2166
- xs: "xs";
2167
2093
  sm: "sm";
2168
2094
  md: "md";
2169
2095
  lg: "lg";
@@ -2171,6 +2097,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2171
2097
  "2xl": "2xl";
2172
2098
  "3xl": "3xl";
2173
2099
  "4xl": "4xl";
2100
+ "2xs": "2xs";
2101
+ xs: "xs";
2174
2102
  full: "full";
2175
2103
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
2176
2104
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -2238,17 +2166,15 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2238
2166
  borderColor: zod.ZodOptional<zod.ZodEnum<{
2239
2167
  default: "default";
2240
2168
  success: "success";
2241
- subtle: "subtle";
2242
- strong: "strong";
2243
2169
  info: "info";
2244
2170
  warning: "warning";
2245
2171
  caution: "caution";
2246
2172
  danger: "danger";
2247
2173
  discovery: "discovery";
2174
+ subtle: "subtle";
2175
+ strong: "strong";
2248
2176
  }>>;
2249
2177
  radius: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodEnum<{
2250
- "2xs": "2xs";
2251
- xs: "xs";
2252
2178
  sm: "sm";
2253
2179
  md: "md";
2254
2180
  lg: "lg";
@@ -2256,6 +2182,8 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2256
2182
  "2xl": "2xl";
2257
2183
  "3xl": "3xl";
2258
2184
  "4xl": "4xl";
2185
+ "2xs": "2xs";
2186
+ xs: "xs";
2259
2187
  full: "full";
2260
2188
  }>, zod.ZodNumber, zod.ZodString, zod.ZodObject<{
2261
2189
  topLeft: zod.ZodOptional<zod.ZodString>;
@@ -2293,13 +2221,13 @@ declare const standardUI: GenerativeUI<_copilotkit_shared_generative_ui0.Generat
2293
2221
  color: zod.ZodOptional<zod.ZodEnum<{
2294
2222
  default: "default";
2295
2223
  success: "success";
2296
- subtle: "subtle";
2297
- strong: "strong";
2298
2224
  info: "info";
2299
2225
  warning: "warning";
2300
2226
  caution: "caution";
2301
2227
  danger: "danger";
2302
2228
  discovery: "discovery";
2229
+ subtle: "subtle";
2230
+ strong: "strong";
2303
2231
  }>>;
2304
2232
  size: zod.ZodOptional<zod.ZodNumber>;
2305
2233
  spacing: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodNumber, zod.ZodString]>>;
@@ -1 +1 @@
1
- {"version":3,"file":"generative-ui.d.mts","names":[],"sources":["../src/generative-ui/refs.ts","../src/generative-ui/GenerativeUISurface.tsx","../src/generative-ui/markdown/MarkdownSurfaces.tsx","../src/generative-ui/hooks.ts","../src/generative-ui/standard/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAkBA;;;;iBAAgB,KAAA,CAAM,WAAA,YAAoB,GAAA,CAAA,OAAA,CAArB,GAAA,CAAqB,SAAA,EAAA,GAAA,CAAA,YAAA,CAAA,SAAA;;;;;;;iBAU1B,SAAA,CAAU,WAAA,gBAAoB,OAAA,CAAA,GAAA,CAAA,QAAA,WAAA,GAAA,CAAA,QAAA,CAArB,GAAA,CAAqB,SAAA,OAAA,SAAA;eAAA,GAAA,CAAA,SAAA;;;;;;;;UCjBpC,4BAAA;;EAER,EAAA;;;;;EAKA,WAAA;EDAmB;ECEnB,QAAA,GAAW,SAAA;EACX,SAAA;EDHwC;;;;;;ECUxC,UAAA;AAAA;;;;;KAOU,wBAAA,YACC,YAAA,QAAoB,YAAA,SAC7B,4BAAA;EDTqB;;;;ECgBjB,EAAA,EAAI,EAAA;;;;;;;EAOJ,UAAA,YAAsB,yBAAA,CAA0B,EAAA;AAAA;EAEhD,EAAA;EAAgB,UAAA;AAAA;;;;;;;;;;;;;;;iBAmBR,mBAAA,YACH,YAAA,QAAoB,YAAA,MAAA,CAAA;EAE/B,EAAA;EACA,WAAA;EACA,EAAA;EACA,UAAA;EACA,QAAA;EACA,SAAA;EACA;AAAA,GACC,wBAAA,CAAyB,EAAA,IAAG,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;KCjE1B,aAAA,GAAgB,4BAAA;;;;;;AFCrB;KEiEY,qBAAA,GAAwB,aAAA;EFjEf,sEEmEnB,OAAA,UFnEwC;EEqExC,SAAA,UFrEwC;EEuExC,WAAA;AAAA;;;;;;;AF7DF;;;;;;;;;;;;iBEwKgB,gBAAA,CAAA;EACd,OAAA;EACA,SAAA;EACA,WAAA;EAAA,GACG;AAAA,GACF,qBAAA,GAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;KC5KnB,UAAA,YACQ,YAAA,yBACO,mBAAA,CAAoB,EAAA,KACpC,WAAA,CAAY,yBAAA,CAA0B,EAAA,WAAa,GAAA;;;AHdvD;;;;;;;;;;;;;;;;iBGkCgB,oBAAA,YACH,YAAA,yBACO,mBAAA,CAAoB,EAAA,WAAA,CACtC,EAAA,EAAI,EAAA,EAAI,GAAA,EAAK,GAAA,EAAK,KAAA,EAAO,UAAA,CAAW,EAAA,EAAI,GAAA;;;;;;;;;;;;;;;;;;;;;;;iBA0D1B,uBAAA,YACH,YAAA,oBACE,wBAAA,CAAyB,EAAA,EAAA,CAEtC,EAAA,EAAI,EAAA,EACJ,IAAA,EAAM,IAAA,EACN,OAAA,GAAU,IAAA,EAAM,wBAAA,CAAyB,EAAA,EAAI,IAAA;;;;;;;;;;;;AHrG/C;;;;;;;;;;;;;;;cI6Ba,UAAA,EAAU,YAAA,mCAAA,6BAAA;;UAGrB,GAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"generative-ui.d.mts","names":[],"sources":["../src/generative-ui/GenerativeUISurface.tsx","../src/generative-ui/markdown/MarkdownSurfaces.tsx","../src/generative-ui/standard/index.ts"],"mappings":";;;;;;;;;;;UAWU,4BAAA;;EAER,EAAA;;;;;EAKA,WAAA;;EAEA,QAAA,GAAW,SAAA;EACX,SAAA;;;;;;;EAOA,UAAA;AAAA;;;AAOF;;KAAY,wBAAA,YACC,YAAA,QAAoB,YAAA,SAC7B,4BAAA;EADS;;;;EAQL,EAAA,EAAI,EAAA;EAOkB;;;;;;EAAtB,UAAA,YAAsB,yBAAA,CAA0B,EAAA;AAAA;EAEhD,EAAA;EAAgB,UAAA;AAAA;;;;;;AAmBxB;;;;;;;;;iBAAgB,mBAAA,YACH,YAAA,QAAoB,YAAA,MAAA,CAAA;EAE/B,EAAA;EACA,WAAA;EACA,EAAA;EACA,UAAA;EACA,QAAA;EACA,SAAA;EACA;AAAA,GACC,wBAAA,CAAyB,EAAA,IAAG,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;KCjE1B,aAAA,GAAgB,4BAAA;;;;;;;KAkET,qBAAA,GAAwB,aAAA;EDxEE,sEC0EpC,OAAA,UDjEoB;ECmEpB,SAAA,UDrEA;ECuEA,WAAA;AAAA;;;;;ADtDF;;;;;;;;;;;;;;iBCiKgB,gBAAA,CAAA;EACd,OAAA;EACA,SAAA;EACA,WAAA;EAAA,GACG;AAAA,GACF,qBAAA,GAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;;;;;;ADnMiD;;;;;;;;;;;;AA6BzE;cEYa,UAAA,EAAU,YAAA,mCAAA,6BAAA;;UAGrB,GAAA,CAAA,SAAA"}
@@ -1,39 +1,14 @@
1
1
  "use client";
2
2
 
3
- import { M as IconSvg, c as SurfaceView, d as useGenerativeUIAccessibility, f as wrapperAria, g as GenerativeUINodeContext, h as useManagerVersion, l as controlAria, m as useGenerativeUIState, n as ProviderMarkdown, p as useGenerativeUIFunction, r as DefaultGenerativeUIChatCard, t as MarkdownSurfaces, u as namedRole, v as useGenerativeUIRuntime, x as createGenerativeUI, y as useRequiredGenerativeUIRuntime } from "./MarkdownSurfaces-BQ1HGCzB.mjs";
3
+ import { c as IconSvg, n as ProviderMarkdown, t as MarkdownSurfaces } from "./MarkdownSurfaces-Byz821bg.mjs";
4
+ import { S as GenerativeUINodeContext, T as useRequiredGenerativeUIRuntime, b as useGenerativeUIState, c as namedRole, l as useGenerativeUIAccessibility, m as createGenerativeUI, o as SurfaceView, s as controlAria, t as DefaultGenerativeUIChatCard, u as wrapperAria, w as useGenerativeUIRuntime, x as useManagerVersion, y as useGenerativeUIFunction } from "./chat-Bf0vVdo7.mjs";
5
+ import { n as childList, t as child } from "./refs-CMrRm3ta.mjs";
4
6
  import React, { Suspense, createContext, isValidElement, memo, useCallback, useContext, useEffect, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
5
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
8
  import { allowedComponents, scrollToSurface } from "@copilotkit/core/generative-ui";
7
- import { ACCENT, BACKDROP, CHART_CURSOR, CHART_PALETTE, FONT_WEIGHT, GenerativeUIError, INNER_PANEL_BG, ON_ACCENT, SHADOW_MD, SHADOW_SM, SHADOW_SOFT, SHADOW_XS, STANDARD_CATALOG_ID, STANDARD_CSS, STANDARD_STYLE_ID, backgroundColor, borderColor, checkMessageStyle, child as child$1, childList as childList$1, compositeDeclarations, dataDeclarations, exportA2UICatalog, feedbackDeclarations, firstFailedCheck, inputDeclarations, layoutDeclarations, mediaDeclarations, panelBackground, radius, spacing, textColor, textDeclarations, textFont, withComponents, withStandardParameterOrder } from "@copilotkit/shared/generative-ui";
9
+ import { ACCENT, BACKDROP, CHART_CURSOR, CHART_PALETTE, FONT_WEIGHT, GenerativeUIError, INNER_PANEL_BG, ON_ACCENT, SHADOW_MD, SHADOW_SM, SHADOW_SOFT, SHADOW_XS, STANDARD_CATALOG_ID, STANDARD_CSS, STANDARD_STYLE_ID, backgroundColor, borderColor, checkMessageStyle, compositeDeclarations, dataDeclarations, exportA2UICatalog, feedbackDeclarations, firstFailedCheck, inputDeclarations, layoutDeclarations, mediaDeclarations, panelBackground, radius, spacing, textColor, textDeclarations, textFont, withComponents, withStandardParameterOrder } from "@copilotkit/shared/generative-ui";
8
10
  import { createPortal } from "react-dom";
9
11
 
10
- //#region src/generative-ui/refs.ts
11
- /**
12
- * One component id. The component receives the rendered child. Pass the
13
- * description here, not with `.describe()`, which would replace the mark.
14
- *
15
- * @example
16
- * ```ts
17
- * const tabsSchema = z.object({
18
- * tabs: z.array(z.object({ title: z.string(), child: child() })),
19
- * });
20
- * // The component gets `tabs: { title: string; child: ReactNode }[]`.
21
- * ```
22
- */
23
- function child(description) {
24
- return child$1(description);
25
- }
26
- /**
27
- * A list of component ids, or a template `{ componentId, path }` that
28
- * repeats one component for each item of the list at `path`. The
29
- * component receives the rendered children. Pass the description here,
30
- * not with `.describe()`.
31
- */
32
- function childList(description) {
33
- return childList$1(description);
34
- }
35
-
36
- //#endregion
37
12
  //#region src/generative-ui/GenerativeUISurface.tsx
38
13
  const isDevelopment = () => process.env.NODE_ENV !== "production";
39
14
  /**