@copilotkit/react-core 2.0.0-rc.37 → 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.
- package/dist/MarkdownRendererContext-BL8ct_3U.d.mts +34 -0
- package/dist/MarkdownRendererContext-BL8ct_3U.d.mts.map +1 -0
- package/dist/MarkdownRendererContext-C2J_lgqF.d.cts +34 -0
- package/dist/MarkdownRendererContext-C2J_lgqF.d.cts.map +1 -0
- package/dist/MarkdownSurfaces-Byz821bg.mjs +324 -0
- package/dist/MarkdownSurfaces-Byz821bg.mjs.map +1 -0
- package/dist/MarkdownSurfaces-D2Ck-cbb.cjs +378 -0
- package/dist/MarkdownSurfaces-D2Ck-cbb.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-BQ1HGCzB.mjs → chat-Bf0vVdo7.mjs} +642 -484
- package/dist/chat-Bf0vVdo7.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-BFoO6wSB.cjs → chat-D3fxo6Ah.cjs} +663 -529
- package/dist/chat-D3fxo6Ah.cjs.map +1 -0
- package/dist/{MarkdownRendererContext-CPfNVyde.d.mts → chat-DgP2N7bD.d.mts} +31 -39
- package/dist/chat-DgP2N7bD.d.mts.map +1 -0
- package/dist/{MarkdownRendererContext-iOl2pj9l.d.cts → chat-DtHs4alO.d.cts} +31 -39
- package/dist/chat-DtHs4alO.d.cts.map +1 -0
- package/dist/generative-ui/native.cjs +66 -0
- package/dist/generative-ui/native.cjs.map +1 -0
- package/dist/generative-ui/native.d.cts +155 -0
- package/dist/generative-ui/native.d.cts.map +1 -0
- package/dist/generative-ui/native.d.mts +155 -0
- package/dist/generative-ui/native.d.mts.map +1 -0
- package/dist/generative-ui/native.mjs +24 -0
- package/dist/generative-ui/native.mjs.map +1 -0
- package/dist/generative-ui.cjs +45 -70
- package/dist/generative-ui.cjs.map +1 -1
- package/dist/generative-ui.d.cts +72 -144
- package/dist/generative-ui.d.cts.map +1 -1
- package/dist/generative-ui.d.mts +72 -144
- package/dist/generative-ui.d.mts.map +1 -1
- package/dist/generative-ui.mjs +4 -29
- package/dist/generative-ui.mjs.map +1 -1
- package/dist/headless.d.cts +58 -153
- package/dist/headless.d.cts.map +1 -1
- package/dist/hooks-2Ur8NQhj.d.cts +84 -0
- package/dist/hooks-2Ur8NQhj.d.cts.map +1 -0
- package/dist/hooks-BRYonCVu.d.mts +84 -0
- package/dist/hooks-BRYonCVu.d.mts.map +1 -0
- package/dist/index.cjs +82 -430
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -353
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +645 -140
- package/dist/index.umd.js.map +1 -1
- package/dist/refs-BIUfn1wb.cjs +43 -0
- package/dist/refs-BIUfn1wb.cjs.map +1 -0
- package/dist/refs-CMrRm3ta.mjs +31 -0
- package/dist/refs-CMrRm3ta.mjs.map +1 -0
- package/dist/use-generative-ui-root-C12htqbK.cjs +390 -0
- package/dist/use-generative-ui-root-C12htqbK.cjs.map +1 -0
- package/dist/use-generative-ui-root-CVgsDy1f.mjs +385 -0
- package/dist/use-generative-ui-root-CVgsDy1f.mjs.map +1 -0
- package/package.json +14 -10
- package/dist/MarkdownRendererContext-CPfNVyde.d.mts.map +0 -1
- package/dist/MarkdownRendererContext-iOl2pj9l.d.cts.map +0 -1
- package/dist/MarkdownSurfaces-BFoO6wSB.cjs.map +0 -1
- package/dist/MarkdownSurfaces-BQ1HGCzB.mjs.map +0 -1
package/dist/generative-ui.cjs
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
const
|
|
4
|
+
const require_chat = require('./chat-D3fxo6Ah.cjs');
|
|
5
|
+
const require_MarkdownSurfaces = require('./MarkdownSurfaces-D2Ck-cbb.cjs');
|
|
6
|
+
const require_refs = require('./refs-BIUfn1wb.cjs');
|
|
5
7
|
let react = require("react");
|
|
6
|
-
react =
|
|
8
|
+
react = require_chat.__toESM(react);
|
|
7
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
10
|
let _copilotkit_core_generative_ui = require("@copilotkit/core/generative-ui");
|
|
9
11
|
let _copilotkit_shared_generative_ui = require("@copilotkit/shared/generative-ui");
|
|
10
12
|
let react_dom = require("react-dom");
|
|
11
13
|
|
|
12
|
-
//#region src/generative-ui/refs.ts
|
|
13
|
-
/**
|
|
14
|
-
* One component id. The component receives the rendered child. Pass the
|
|
15
|
-
* description here, not with `.describe()`, which would replace the mark.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const tabsSchema = z.object({
|
|
20
|
-
* tabs: z.array(z.object({ title: z.string(), child: child() })),
|
|
21
|
-
* });
|
|
22
|
-
* // The component gets `tabs: { title: string; child: ReactNode }[]`.
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
function child(description) {
|
|
26
|
-
return (0, _copilotkit_shared_generative_ui.child)(description);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A list of component ids, or a template `{ componentId, path }` that
|
|
30
|
-
* repeats one component for each item of the list at `path`. The
|
|
31
|
-
* component receives the rendered children. Pass the description here,
|
|
32
|
-
* not with `.describe()`.
|
|
33
|
-
*/
|
|
34
|
-
function childList(description) {
|
|
35
|
-
return (0, _copilotkit_shared_generative_ui.childList)(description);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
14
|
//#region src/generative-ui/GenerativeUISurface.tsx
|
|
40
15
|
const isDevelopment = () => process.env.NODE_ENV !== "production";
|
|
41
16
|
/**
|
|
@@ -53,8 +28,8 @@ const isDevelopment = () => process.env.NODE_ENV !== "production";
|
|
|
53
28
|
* ```
|
|
54
29
|
*/
|
|
55
30
|
function GenerativeUISurface({ id, description, ui, components, fallback = null, className, autoScroll = true }) {
|
|
56
|
-
const runtime =
|
|
57
|
-
|
|
31
|
+
const runtime = require_chat.useRequiredGenerativeUIRuntime();
|
|
32
|
+
require_chat.useManagerVersion(runtime);
|
|
58
33
|
const otherUI = ui !== void 0 && ui !== runtime.ui;
|
|
59
34
|
(0, react.useLayoutEffect)(() => {
|
|
60
35
|
if (otherUI && isDevelopment()) console.warn(`[generativeUI] <GenerativeUISurface id="${id}">: the ui prop is not the UI of the provider (generativeUI.ui). The components are checked against the UI of the provider.`);
|
|
@@ -89,7 +64,7 @@ function GenerativeUISurface({ id, description, ui, components, fallback = null,
|
|
|
89
64
|
ref: element,
|
|
90
65
|
"data-generative-ui-surface": id,
|
|
91
66
|
className,
|
|
92
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
67
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_chat.SurfaceView, { surface })
|
|
93
68
|
});
|
|
94
69
|
}
|
|
95
70
|
|
|
@@ -153,7 +128,7 @@ const LIGHTBOX_BUTTON = {
|
|
|
153
128
|
*/
|
|
154
129
|
function Lightbox({ images, index = 0, onClose }) {
|
|
155
130
|
const [current, setCurrent] = (0, react.useState)(index);
|
|
156
|
-
const aria =
|
|
131
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
157
132
|
const count = images.length;
|
|
158
133
|
const step = (delta) => setCurrent((i) => count === 0 ? 0 : (i + delta + count) % count);
|
|
159
134
|
const closeRef = (0, react.useRef)(onClose);
|
|
@@ -573,7 +548,7 @@ function innerPanelStyle(props) {
|
|
|
573
548
|
function container(extra, attributes) {
|
|
574
549
|
return function Container(props) {
|
|
575
550
|
useStandardStyles();
|
|
576
|
-
const aria =
|
|
551
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
577
552
|
const nested = (0, react.useContext)(CardNestingContext);
|
|
578
553
|
const distance = (0, react.useContext)(CardDistanceContext);
|
|
579
554
|
const ref = (0, react.useRef)(null);
|
|
@@ -664,7 +639,7 @@ function cardShadow(props) {
|
|
|
664
639
|
}
|
|
665
640
|
function Card(props) {
|
|
666
641
|
useStandardStyles();
|
|
667
|
-
const aria =
|
|
642
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
668
643
|
const nested = (0, react.useContext)(CardNestingContext);
|
|
669
644
|
const ref = (0, react.useRef)(null);
|
|
670
645
|
useVisibleOnce(ref, props.onVisible);
|
|
@@ -1314,7 +1289,7 @@ const OBJECT_FIT = {
|
|
|
1314
1289
|
scaleDown: "scale-down"
|
|
1315
1290
|
};
|
|
1316
1291
|
function Image(props) {
|
|
1317
|
-
const aria =
|
|
1292
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
1318
1293
|
const [failed, setFailed] = (0, react.useState)(false);
|
|
1319
1294
|
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
1320
1295
|
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
@@ -1492,7 +1467,7 @@ function lucideNameOf(name) {
|
|
|
1492
1467
|
return A2UI_ICONS[name] ?? name;
|
|
1493
1468
|
}
|
|
1494
1469
|
function Icon(props) {
|
|
1495
|
-
const aria =
|
|
1470
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
1496
1471
|
const label = aria["aria-label"] ?? props.label;
|
|
1497
1472
|
const size = props.size ?? "md";
|
|
1498
1473
|
const style = { flexGrow: props.weight };
|
|
@@ -1561,7 +1536,7 @@ function Favicon(props) {
|
|
|
1561
1536
|
* 4px steps like the layout spacing).
|
|
1562
1537
|
*/
|
|
1563
1538
|
function Svg(props) {
|
|
1564
|
-
const aria =
|
|
1539
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
1565
1540
|
const label = aria["aria-label"] ?? props.label;
|
|
1566
1541
|
const a11y = label === void 0 ? { "aria-hidden": true } : {
|
|
1567
1542
|
role: "img",
|
|
@@ -1752,7 +1727,7 @@ function VideoLink({ url, title, box, aria }) {
|
|
|
1752
1727
|
});
|
|
1753
1728
|
}
|
|
1754
1729
|
function Video(props) {
|
|
1755
|
-
const aria =
|
|
1730
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
1756
1731
|
const [isPlaying, setIsPlaying] = (0, react.useState)(false);
|
|
1757
1732
|
const [failedUrl, setFailedUrl] = (0, react.useState)();
|
|
1758
1733
|
const youTubeId = youTubeIdOf(props.url);
|
|
@@ -1851,7 +1826,7 @@ function Video(props) {
|
|
|
1851
1826
|
});
|
|
1852
1827
|
}
|
|
1853
1828
|
function AudioPlayer(props) {
|
|
1854
|
-
const aria =
|
|
1829
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
1855
1830
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("figure", {
|
|
1856
1831
|
"data-a2ui-std": "",
|
|
1857
1832
|
...aria,
|
|
@@ -2158,8 +2133,8 @@ const FOLLOW_UP_EVENT = "follow_up";
|
|
|
2158
2133
|
* the engine turns into a visible user message with that text.
|
|
2159
2134
|
*/
|
|
2160
2135
|
function useFollowUpSend(onFollowUp) {
|
|
2161
|
-
const runtime =
|
|
2162
|
-
const node = (0, react.useContext)(
|
|
2136
|
+
const runtime = require_chat.useGenerativeUIRuntime();
|
|
2137
|
+
const node = (0, react.useContext)(require_chat.GenerativeUINodeContext);
|
|
2163
2138
|
return (message) => {
|
|
2164
2139
|
if (onFollowUp) {
|
|
2165
2140
|
onFollowUp({ message });
|
|
@@ -3027,7 +3002,7 @@ function MapView(props) {
|
|
|
3027
3002
|
const [status, setStatus] = (0, react.useState)("loading");
|
|
3028
3003
|
const setSelectedRef = (0, react.useRef)(props.setSelected);
|
|
3029
3004
|
setSelectedRef.current = props.setSelected;
|
|
3030
|
-
const { theme } =
|
|
3005
|
+
const { theme } = require_chat.useRequiredGenerativeUIRuntime();
|
|
3031
3006
|
const styleUrl = useIsDark(containerRef) ? theme?.dark?.mapStyle || theme?.mapStyle || DEFAULT_DARK_MAP_STYLE : theme?.mapStyle || DEFAULT_MAP_STYLE;
|
|
3032
3007
|
(0, react.useEffect)(() => {
|
|
3033
3008
|
let isCancelled = false;
|
|
@@ -3351,7 +3326,7 @@ function Table(props) {
|
|
|
3351
3326
|
});
|
|
3352
3327
|
}
|
|
3353
3328
|
function TableSection(props) {
|
|
3354
|
-
const aria =
|
|
3329
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
3355
3330
|
const parent = (0, react.useContext)(TableContext);
|
|
3356
3331
|
const isHeader = props.header === true;
|
|
3357
3332
|
const Tag = isHeader ? "thead" : "tbody";
|
|
@@ -3368,7 +3343,7 @@ function TableSection(props) {
|
|
|
3368
3343
|
});
|
|
3369
3344
|
}
|
|
3370
3345
|
function TableRow(props) {
|
|
3371
|
-
const aria =
|
|
3346
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
3372
3347
|
const parent = (0, react.useContext)(TableContext);
|
|
3373
3348
|
const isHeader = props.header === true || parent?.isHeader === true;
|
|
3374
3349
|
const dividers = parent?.dividers ?? true;
|
|
@@ -3396,7 +3371,7 @@ function TableRow(props) {
|
|
|
3396
3371
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(isHeader ? "thead" : "tbody", { children: row });
|
|
3397
3372
|
}
|
|
3398
3373
|
function TableCell(props) {
|
|
3399
|
-
const aria =
|
|
3374
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
3400
3375
|
const parent = (0, react.useContext)(TableContext);
|
|
3401
3376
|
const isHeader = props.header === true || parent?.isHeader === true;
|
|
3402
3377
|
const scope = parent?.isHeader ? "col" : "row";
|
|
@@ -3807,7 +3782,7 @@ function Popover(props) {
|
|
|
3807
3782
|
});
|
|
3808
3783
|
}
|
|
3809
3784
|
function PopoverTrigger(props) {
|
|
3810
|
-
const aria =
|
|
3785
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
3811
3786
|
useFeedbackStyles();
|
|
3812
3787
|
const popover = (0, react.useContext)(PopoverContext);
|
|
3813
3788
|
if (!popover) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.children });
|
|
@@ -3933,7 +3908,7 @@ const DISABLED = "[disabled],[aria-disabled=\"true\"]";
|
|
|
3933
3908
|
*/
|
|
3934
3909
|
function Modal(props) {
|
|
3935
3910
|
useFeedbackStyles();
|
|
3936
|
-
const aria =
|
|
3911
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
3937
3912
|
const id = (0, react.useId)();
|
|
3938
3913
|
const [ownOpen, setOwnOpen] = (0, react.useState)(false);
|
|
3939
3914
|
const open = props.open ?? ownOpen;
|
|
@@ -3963,7 +3938,7 @@ function Modal(props) {
|
|
|
3963
3938
|
});
|
|
3964
3939
|
return () => observer.disconnect();
|
|
3965
3940
|
}, []);
|
|
3966
|
-
const theme =
|
|
3941
|
+
const theme = require_chat.useGenerativeUIRuntime()?.theme;
|
|
3967
3942
|
const portalStyle = (0, react.useMemo)(() => {
|
|
3968
3943
|
const { mapStyle: _mapStyle, ...variables } = theme ?? {};
|
|
3969
3944
|
return {
|
|
@@ -4246,7 +4221,7 @@ const FIELD_LABEL_STYLE = {
|
|
|
4246
4221
|
* `aria-labelledby`.
|
|
4247
4222
|
*/
|
|
4248
4223
|
function Field({ label, htmlFor, labelId, weight, error, onBlur, children }) {
|
|
4249
|
-
const aria =
|
|
4224
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4250
4225
|
const isNamed = aria["aria-label"] !== void 0 || aria["aria-description"] !== void 0;
|
|
4251
4226
|
const labelElement = htmlFor !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
4252
4227
|
htmlFor,
|
|
@@ -4321,7 +4296,7 @@ function buttonVariantStyle(variant, color) {
|
|
|
4321
4296
|
}
|
|
4322
4297
|
function Button(props) {
|
|
4323
4298
|
useStandardStyles();
|
|
4324
|
-
const aria =
|
|
4299
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4325
4300
|
const [isCopied, setIsCopied] = (0, react.useState)(false);
|
|
4326
4301
|
const buttonSize = props.size ?? "lg";
|
|
4327
4302
|
const failedCheck = (0, _copilotkit_shared_generative_ui.firstFailedCheck)(props.checks);
|
|
@@ -4400,7 +4375,7 @@ function Button(props) {
|
|
|
4400
4375
|
*/
|
|
4401
4376
|
function Pressable(props) {
|
|
4402
4377
|
useStandardStyles();
|
|
4403
|
-
const aria =
|
|
4378
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4404
4379
|
const isDisabled = Boolean(props.disabled);
|
|
4405
4380
|
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
4406
4381
|
const ref = (0, react.useRef)(null);
|
|
@@ -4470,7 +4445,7 @@ const TEXT_FIELD_TYPE = {
|
|
|
4470
4445
|
};
|
|
4471
4446
|
function TextField(props) {
|
|
4472
4447
|
useStandardStyles();
|
|
4473
|
-
const aria =
|
|
4448
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4474
4449
|
const id = (0, react.useId)();
|
|
4475
4450
|
const ref = (0, react.useRef)(null);
|
|
4476
4451
|
const variant = props.variant ?? "shortText";
|
|
@@ -4515,7 +4490,7 @@ function TextField(props) {
|
|
|
4515
4490
|
}
|
|
4516
4491
|
function TextArea(props) {
|
|
4517
4492
|
useStandardStyles();
|
|
4518
|
-
const aria =
|
|
4493
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4519
4494
|
const id = (0, react.useId)();
|
|
4520
4495
|
const areaSize = props.size ?? "xl";
|
|
4521
4496
|
const check = useChecks(props.checks, props.value);
|
|
@@ -4670,7 +4645,7 @@ function timeSlots(step, min, max, current) {
|
|
|
4670
4645
|
*/
|
|
4671
4646
|
function DateTimeInput(props) {
|
|
4672
4647
|
useStandardStyles();
|
|
4673
|
-
const aria =
|
|
4648
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4674
4649
|
const id = (0, react.useId)();
|
|
4675
4650
|
const labelId = (0, react.useId)();
|
|
4676
4651
|
const summaryId = (0, react.useId)();
|
|
@@ -4983,7 +4958,7 @@ function ChoicePicker(props) {
|
|
|
4983
4958
|
}
|
|
4984
4959
|
function Select(props) {
|
|
4985
4960
|
useStandardStyles();
|
|
4986
|
-
const aria =
|
|
4961
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
4987
4962
|
const id = (0, react.useId)();
|
|
4988
4963
|
const options = normalizeOptions(props.options);
|
|
4989
4964
|
const value = asText(props.value);
|
|
@@ -5047,7 +5022,7 @@ function Select(props) {
|
|
|
5047
5022
|
}
|
|
5048
5023
|
function CheckBox(props) {
|
|
5049
5024
|
useStandardStyles();
|
|
5050
|
-
const aria =
|
|
5025
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
5051
5026
|
const isChecked = Boolean(props.value);
|
|
5052
5027
|
const hasLabel = props.label !== void 0 && props.label !== "";
|
|
5053
5028
|
const check = useChecks(props.checks, props.value);
|
|
@@ -5093,7 +5068,7 @@ function CheckBox(props) {
|
|
|
5093
5068
|
}
|
|
5094
5069
|
function Radio(props) {
|
|
5095
5070
|
useStandardStyles();
|
|
5096
|
-
const aria =
|
|
5071
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
5097
5072
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5098
5073
|
...(0, _copilotkit_core_generative_ui.wrapperAria)(aria),
|
|
5099
5074
|
style: {
|
|
@@ -5132,7 +5107,7 @@ function radioOptionStyle(variant, isSelected) {
|
|
|
5132
5107
|
/** Native radios in a fieldset, so the arrow keys work without extra code. */
|
|
5133
5108
|
function RadioGroup(props) {
|
|
5134
5109
|
useStandardStyles();
|
|
5135
|
-
const aria =
|
|
5110
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
5136
5111
|
const fallbackName = (0, react.useId)();
|
|
5137
5112
|
const name = props.name ?? fallbackName;
|
|
5138
5113
|
const options = normalizeOptions(props.options);
|
|
@@ -5303,7 +5278,7 @@ function SegmentedControl(props) {
|
|
|
5303
5278
|
}
|
|
5304
5279
|
function Slider(props) {
|
|
5305
5280
|
useStandardStyles();
|
|
5306
|
-
const aria =
|
|
5281
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
5307
5282
|
const id = (0, react.useId)();
|
|
5308
5283
|
const listId = (0, react.useId)();
|
|
5309
5284
|
const min = props.min ?? 0;
|
|
@@ -5495,7 +5470,7 @@ const HIGHLIGHT = {
|
|
|
5495
5470
|
};
|
|
5496
5471
|
function Text(props) {
|
|
5497
5472
|
useStandardStyles();
|
|
5498
|
-
const aria =
|
|
5473
|
+
const aria = require_chat.useGenerativeUIAccessibility();
|
|
5499
5474
|
const highlight = props.highlight === true ? HIGHLIGHT.orange : props.highlight ? HIGHLIGHT[props.highlight] : void 0;
|
|
5500
5475
|
const decoration = [props.underline ? "underline" : "", props.lineThrough ? "line-through" : ""].filter(Boolean).join(" ");
|
|
5501
5476
|
const typography = typographyStyle(props);
|
|
@@ -5845,13 +5820,13 @@ const orderedComponents = (0, _copilotkit_shared_generative_ui.withStandardParam
|
|
|
5845
5820
|
* });
|
|
5846
5821
|
* ```
|
|
5847
5822
|
*/
|
|
5848
|
-
const standardUI =
|
|
5823
|
+
const standardUI = require_chat.createGenerativeUI({
|
|
5849
5824
|
id: _copilotkit_shared_generative_ui.STANDARD_CATALOG_ID,
|
|
5850
5825
|
components: orderedComponents
|
|
5851
5826
|
});
|
|
5852
5827
|
|
|
5853
5828
|
//#endregion
|
|
5854
|
-
exports.DefaultGenerativeUIChatCard =
|
|
5829
|
+
exports.DefaultGenerativeUIChatCard = require_chat.DefaultGenerativeUIChatCard;
|
|
5855
5830
|
Object.defineProperty(exports, 'GenerativeUIError', {
|
|
5856
5831
|
enumerable: true,
|
|
5857
5832
|
get: function () {
|
|
@@ -5860,9 +5835,9 @@ Object.defineProperty(exports, 'GenerativeUIError', {
|
|
|
5860
5835
|
});
|
|
5861
5836
|
exports.GenerativeUISurface = GenerativeUISurface;
|
|
5862
5837
|
exports.MarkdownSurfaces = require_MarkdownSurfaces.MarkdownSurfaces;
|
|
5863
|
-
exports.child = child;
|
|
5864
|
-
exports.childList = childList;
|
|
5865
|
-
exports.createGenerativeUI =
|
|
5838
|
+
exports.child = require_refs.child;
|
|
5839
|
+
exports.childList = require_refs.childList;
|
|
5840
|
+
exports.createGenerativeUI = require_chat.createGenerativeUI;
|
|
5866
5841
|
Object.defineProperty(exports, 'exportA2UICatalog', {
|
|
5867
5842
|
enumerable: true,
|
|
5868
5843
|
get: function () {
|
|
@@ -5870,8 +5845,8 @@ Object.defineProperty(exports, 'exportA2UICatalog', {
|
|
|
5870
5845
|
}
|
|
5871
5846
|
});
|
|
5872
5847
|
exports.standardUI = standardUI;
|
|
5873
|
-
exports.useGenerativeUIAccessibility =
|
|
5874
|
-
exports.useGenerativeUIFunction =
|
|
5875
|
-
exports.useGenerativeUIRuntime =
|
|
5876
|
-
exports.useGenerativeUIState =
|
|
5848
|
+
exports.useGenerativeUIAccessibility = require_chat.useGenerativeUIAccessibility;
|
|
5849
|
+
exports.useGenerativeUIFunction = require_chat.useGenerativeUIFunction;
|
|
5850
|
+
exports.useGenerativeUIRuntime = require_chat.useGenerativeUIRuntime;
|
|
5851
|
+
exports.useGenerativeUIState = require_chat.useGenerativeUIState;
|
|
5877
5852
|
//# sourceMappingURL=generative-ui.cjs.map
|