@bysages/react 0.3.1 → 0.4.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.
- package/dist/{ai-response-BfKTmtCt.mjs → ai-response-B4DX7nmJ.mjs} +3 -1
- package/dist/chevron-a2nIZKN4.mjs +6 -0
- package/dist/components/accordion/index.d.mts +22 -4
- package/dist/components/accordion/index.mjs +31 -1
- package/dist/components/affix/index.d.mts +4 -1
- package/dist/components/affix/index.mjs +5 -3
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +5 -3
- package/dist/components/ai-action/index.d.mts +4 -1
- package/dist/components/ai-action/index.mjs +3 -1
- package/dist/components/ai-attachments/index.d.mts +10 -4
- package/dist/components/ai-attachments/index.mjs +16 -44
- package/dist/components/ai-message/index.d.mts +4 -1
- package/dist/components/ai-message/index.mjs +3 -1
- package/dist/components/ai-prompt-input/index.d.mts +5 -2
- package/dist/components/ai-prompt-input/index.mjs +10 -14
- package/dist/components/ai-reasoning/index.d.mts +4 -1
- package/dist/components/ai-reasoning/index.mjs +4 -2
- package/dist/components/ai-response/index.d.mts +4 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +8 -2
- package/dist/components/ai-source/index.mjs +5 -2
- package/dist/components/ai-suggestion/index.d.mts +4 -1
- package/dist/components/ai-suggestion/index.mjs +3 -1
- package/dist/components/ai-tool/index.d.mts +4 -1
- package/dist/components/ai-tool/index.mjs +4 -2
- package/dist/components/alert/index.d.mts +2 -0
- package/dist/components/alert/index.mjs +11 -18
- package/dist/components/angle-slider/index.d.mts +19 -2
- package/dist/components/angle-slider/index.mjs +31 -8
- package/dist/components/aspect-ratio/index.d.mts +4 -1
- package/dist/components/aspect-ratio/index.mjs +3 -1
- package/dist/components/autocomplete/index.d.mts +3 -1
- package/dist/components/autocomplete/index.mjs +6 -1
- package/dist/components/avatar/index.d.mts +2 -2
- package/dist/components/avatar/index.mjs +9 -2
- package/dist/components/avatar-group/index.d.mts +4 -1
- package/dist/components/avatar-group/index.mjs +3 -1
- package/dist/components/back-top/index.d.mts +7 -1
- package/dist/components/back-top/index.mjs +12 -17
- package/dist/components/badge/index.d.mts +4 -1
- package/dist/components/badge/index.mjs +3 -1
- package/dist/components/banner/index.mjs +2 -11
- package/dist/components/block-ui/index.d.mts +4 -1
- package/dist/components/block-ui/index.mjs +3 -1
- package/dist/components/button/index.d.mts +4 -1
- package/dist/components/button/index.mjs +3 -1
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +9 -10
- package/dist/components/carousel/index.d.mts +21 -1
- package/dist/components/carousel/index.mjs +43 -2
- package/dist/components/cascade-select/index.d.mts +6 -1
- package/dist/components/cascade-select/index.mjs +12 -35
- package/dist/components/checkbox/index.d.mts +20 -2
- package/dist/components/checkbox/index.mjs +28 -8
- package/dist/components/checkbox-group/index.d.mts +8 -6
- package/dist/components/checkbox-group/index.mjs +44 -48
- package/dist/components/chip/index.d.mts +4 -1
- package/dist/components/chip/index.mjs +3 -1
- package/dist/components/client-only/index.d.mts +7 -2
- package/dist/components/client-only/index.mjs +5 -1
- package/dist/components/clipboard/index.d.mts +17 -4
- package/dist/components/clipboard/index.mjs +33 -5
- package/dist/components/collapsible/index.d.mts +16 -4
- package/dist/components/collapsible/index.mjs +25 -1
- package/dist/components/color-picker/index.d.mts +20 -4
- package/dist/components/color-picker/index.mjs +56 -14
- package/dist/components/combobox/index.d.mts +27 -1
- package/dist/components/combobox/index.mjs +62 -5
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +7 -1
- package/dist/components/comment/index.d.mts +4 -1
- package/dist/components/comment/index.mjs +3 -1
- package/dist/components/config-provider/index.d.mts +4 -1
- package/dist/components/config-provider/index.mjs +3 -1
- package/dist/components/container/index.d.mts +4 -1
- package/dist/components/container/index.mjs +3 -1
- package/dist/components/data-view/index.d.mts +4 -1
- package/dist/components/data-view/index.mjs +3 -1
- package/dist/components/date-input/index.d.mts +19 -4
- package/dist/components/date-input/index.mjs +33 -9
- package/dist/components/date-picker/index.d.mts +21 -4
- package/dist/components/date-picker/index.mjs +58 -11
- package/dist/components/deferred-content/index.d.mts +4 -1
- package/dist/components/deferred-content/index.mjs +3 -1
- package/dist/components/descriptions/index.d.mts +10 -2
- package/dist/components/descriptions/index.mjs +13 -8
- package/dist/components/dialog/index.d.mts +18 -5
- package/dist/components/dialog/index.mjs +43 -1
- package/dist/components/download-trigger/index.d.mts +7 -2
- package/dist/components/download-trigger/index.mjs +5 -1
- package/dist/components/drawer/index.d.mts +18 -6
- package/dist/components/drawer/index.mjs +40 -1
- package/dist/components/dynamic-input/index.d.mts +4 -1
- package/dist/components/dynamic-input/index.mjs +10 -18
- package/dist/components/editable/index.d.mts +28 -7
- package/dist/components/editable/index.mjs +43 -4
- package/dist/components/ellipsis/index.d.mts +4 -1
- package/dist/components/ellipsis/index.mjs +3 -1
- package/dist/components/field/index.d.mts +30 -5
- package/dist/components/field/index.mjs +36 -3
- package/dist/components/fieldset/index.d.mts +19 -4
- package/dist/components/fieldset/index.mjs +28 -3
- package/dist/components/file-upload/index.d.mts +29 -9
- package/dist/components/file-upload/index.mjs +46 -10
- package/dist/components/floating-panel/index.d.mts +18 -6
- package/dist/components/floating-panel/index.mjs +55 -1
- package/dist/components/focus-trap/index.d.mts +7 -2
- package/dist/components/focus-trap/index.mjs +5 -1
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +5 -2
- package/dist/components/frame/index.d.mts +4 -8
- package/dist/components/frame/index.mjs +13 -1
- package/dist/components/grid/index.d.mts +4 -1
- package/dist/components/grid/index.mjs +3 -1
- package/dist/components/highlight/index.d.mts +3 -5
- package/dist/components/highlight/index.mjs +6 -1
- package/dist/components/hover-card/index.d.mts +20 -4
- package/dist/components/hover-card/index.mjs +32 -1
- package/dist/components/icon/index.d.mts +10 -8
- package/dist/components/icon/index.mjs +5 -3
- package/dist/components/image/index.d.mts +5 -2
- package/dist/components/image/index.mjs +14 -29
- package/dist/components/image-cropper/index.d.mts +13 -2
- package/dist/components/image-cropper/index.mjs +34 -2
- package/dist/components/image-viewer/index.d.mts +2 -24
- package/dist/components/image-viewer/index.mjs +3 -113
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +17 -1
- package/dist/components/json-tree-view/index.mjs +26 -5
- package/dist/components/kbd/index.d.mts +4 -1
- package/dist/components/kbd/index.mjs +3 -1
- package/dist/components/layout/index.d.mts +25 -7
- package/dist/components/layout/index.mjs +157 -63
- package/dist/components/link/index.d.mts +4 -1
- package/dist/components/link/index.mjs +3 -1
- package/dist/components/listbox/index.d.mts +22 -1
- package/dist/components/listbox/index.mjs +36 -4
- package/dist/components/marquee/index.d.mts +18 -1
- package/dist/components/marquee/index.mjs +34 -2
- package/dist/components/masonry/index.d.mts +4 -1
- package/dist/components/masonry/index.mjs +3 -1
- package/dist/components/media-player/index.d.mts +2 -0
- package/dist/components/media-player/index.mjs +2 -0
- package/dist/components/mentions/index.d.mts +1 -1
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.d.mts +29 -11
- package/dist/components/menu/index.mjs +34 -12
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +6 -1
- package/dist/components/navigation-menu/index.d.mts +25 -1
- package/dist/components/navigation-menu/index.mjs +36 -1
- package/dist/components/number-input/index.d.mts +28 -6
- package/dist/components/number-input/index.mjs +33 -8
- package/dist/components/order-list/index.d.mts +4 -1
- package/dist/components/order-list/index.mjs +26 -24
- package/dist/components/pagination/index.d.mts +23 -3
- package/dist/components/pagination/index.mjs +57 -12
- package/dist/components/password-input/index.d.mts +24 -6
- package/dist/components/password-input/index.mjs +31 -8
- package/dist/components/pin-input/index.d.mts +23 -5
- package/dist/components/pin-input/index.mjs +29 -7
- package/dist/components/popconfirm/index.d.mts +9 -5
- package/dist/components/popconfirm/index.mjs +23 -18
- package/dist/components/popover/index.d.mts +2 -8
- package/dist/components/popover/index.mjs +44 -4
- package/dist/components/presence/index.d.mts +10 -2
- package/dist/components/presence/index.mjs +6 -1
- package/dist/components/progress/index.d.mts +18 -3
- package/dist/components/progress/index.mjs +34 -9
- package/dist/components/progress-group/index.d.mts +4 -1
- package/dist/components/progress-group/index.mjs +4 -2
- package/dist/components/qr-code/index.d.mts +14 -1
- package/dist/components/qr-code/index.mjs +26 -2
- package/dist/components/radio-group/index.d.mts +27 -2
- package/dist/components/radio-group/index.mjs +32 -8
- package/dist/components/rating-group/index.d.mts +20 -3
- package/dist/components/rating-group/index.mjs +26 -8
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +2 -2
- package/dist/components/scroll-area/index.d.mts +14 -1
- package/dist/components/scroll-area/index.mjs +32 -2
- package/dist/components/segment-group/index.d.mts +28 -2
- package/dist/components/segment-group/index.mjs +34 -7
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.d.mts +4 -1
- package/dist/components/separator/index.mjs +3 -1
- package/dist/components/signature-pad/index.d.mts +25 -5
- package/dist/components/signature-pad/index.mjs +37 -3
- package/dist/components/skeleton/index.d.mts +4 -1
- package/dist/components/skeleton/index.mjs +3 -1
- package/dist/components/slider/index.d.mts +21 -2
- package/dist/components/slider/index.mjs +31 -8
- package/dist/components/spinner/index.d.mts +4 -1
- package/dist/components/spinner/index.mjs +3 -1
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +12 -17
- package/dist/components/splitter/index.d.mts +17 -4
- package/dist/components/splitter/index.mjs +35 -1
- package/dist/components/spotlight/index.d.mts +4 -1
- package/dist/components/spotlight/index.mjs +3 -1
- package/dist/components/stack/index.d.mts +4 -1
- package/dist/components/stack/index.mjs +6 -4
- package/dist/components/steps/index.d.mts +26 -6
- package/dist/components/steps/index.mjs +26 -11
- package/dist/components/swap/index.d.mts +11 -5
- package/dist/components/swap/index.mjs +30 -3
- package/dist/components/switch/index.d.mts +20 -2
- package/dist/components/switch/index.mjs +27 -8
- package/dist/components/table/index.d.mts +4 -1
- package/dist/components/table/index.mjs +26 -56
- package/dist/components/tabs/index.d.mts +24 -2
- package/dist/components/tabs/index.mjs +25 -9
- package/dist/components/tags-input/index.d.mts +33 -8
- package/dist/components/tags-input/index.mjs +41 -9
- package/dist/components/terminal/index.d.mts +4 -1
- package/dist/components/terminal/index.mjs +3 -1
- package/dist/components/textarea/index.d.mts +4 -1
- package/dist/components/textarea/index.mjs +3 -1
- package/dist/components/timer/index.d.mts +18 -1
- package/dist/components/timer/index.mjs +51 -2
- package/dist/components/toast/index.d.mts +3 -6
- package/dist/components/toast/index.mjs +22 -2
- package/dist/components/toc/index.d.mts +19 -5
- package/dist/components/toc/index.mjs +31 -5
- package/dist/components/toggle/index.d.mts +11 -4
- package/dist/components/toggle/index.mjs +21 -1
- package/dist/components/toggle-group/index.d.mts +26 -2
- package/dist/components/toggle-group/index.mjs +31 -6
- package/dist/components/toolbar/index.d.mts +4 -1
- package/dist/components/toolbar/index.mjs +3 -1
- package/dist/components/tooltip/index.d.mts +17 -4
- package/dist/components/tooltip/index.mjs +28 -1
- package/dist/components/tour/index.d.mts +18 -9
- package/dist/components/tour/index.mjs +44 -2
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +14 -26
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +11 -22
- package/dist/components/tree-view/index.d.mts +22 -2
- package/dist/components/tree-view/index.mjs +50 -8
- package/dist/components/typography/index.d.mts +4 -0
- package/dist/components/typography/index.mjs +1 -0
- package/dist/components/user/index.d.mts +4 -1
- package/dist/components/user/index.mjs +3 -1
- package/dist/components/virtual-list/index.d.mts +4 -1
- package/dist/components/virtual-list/index.mjs +10 -12
- package/dist/components/watermark/index.d.mts +4 -1
- package/dist/components/watermark/index.mjs +4 -2
- package/dist/family-DE_GQeeM.mjs +9 -0
- package/dist/icon-BALgGtNK.mjs +18 -0
- package/dist/id-C37UYLwJ.mjs +13 -0
- package/dist/image-viewer-Cf6thHax.mjs +141 -0
- package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
- package/dist/index-BcRdWGY-.d.mts +115 -0
- package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
- package/dist/{index-Dn5mHf1g.d.mts → index-DdNKngUQ.d.mts} +56 -17
- package/dist/index-Dj8S4eyJ.d.mts +41 -0
- package/dist/index-Eu-Bttta.d.mts +24 -0
- package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
- package/dist/index.d.mts +36 -35
- package/dist/index.mjs +11 -10
- package/dist/{input-2oezH-dY.mjs → input-C21Zzuy6.mjs} +3 -1
- package/dist/media-player-gQrnxU52.mjs +554 -0
- package/dist/{mentions-DMIBCBOd.mjs → mentions-BuWibdci.mjs} +74 -42
- package/dist/select-ozUFq0zd.mjs +121 -0
- package/package.json +3 -3
- package/dist/chevron-BeHvt46K.mjs +0 -17
- package/dist/glyph-VI989p8H.mjs +0 -14
- package/dist/select-eAHutw56.mjs +0 -70
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "./family-DE_GQeeM.mjs";
|
|
1
2
|
import { n as useComponentMessages } from "./messages-1jJWtaYU.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -100,7 +101,7 @@ function wrapResponseTables(root) {
|
|
|
100
101
|
}
|
|
101
102
|
//#endregion
|
|
102
103
|
//#region src/components/ai-response/index.tsx
|
|
103
|
-
function
|
|
104
|
+
function ResponseImpl({ content, highlighter, copyLabel, copiedLabel, ...rest }) {
|
|
104
105
|
injectComponentStyle("ai");
|
|
105
106
|
const messages = useComponentMessages();
|
|
106
107
|
const resolvedCopyLabel = copyLabel ?? messages.ai.copyCode;
|
|
@@ -127,5 +128,6 @@ function Response({ content, highlighter, copyLabel, copiedLabel, ...rest }) {
|
|
|
127
128
|
dangerouslySetInnerHTML: { __html: renderHtml(content, highlighter ? { highlighter } : void 0) }
|
|
128
129
|
});
|
|
129
130
|
}
|
|
131
|
+
const Response = withSelfRoot(ResponseImpl);
|
|
130
132
|
//#endregion
|
|
131
133
|
export { Response as t };
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { Accordion as Accordion$1 } from "@ark-ui/react/accordion";
|
|
2
2
|
//#region src/components/accordion/index.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type AccordionItem = {
|
|
4
|
+
value: string;
|
|
5
|
+
title: string;
|
|
6
|
+
content: string;
|
|
7
|
+
};
|
|
8
|
+
export interface AccordionFacadeProps {
|
|
9
|
+
value?: string[];
|
|
10
|
+
defaultValue?: string[];
|
|
11
|
+
items: AccordionItem[];
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
collapsible?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
orientation?: "horizontal" | "vertical";
|
|
16
|
+
className?: string;
|
|
17
|
+
onValueChange?: (value: string[]) => void;
|
|
18
|
+
}
|
|
19
|
+
declare function AccordionFacade({ value, defaultValue, items, multiple, collapsible, disabled, orientation, className, onValueChange }: AccordionFacadeProps): import("react").JSX.Element;
|
|
20
|
+
declare namespace AccordionFacade {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
type AccordionParts = typeof Accordion$1;
|
|
24
|
+
export declare const Accordion: typeof AccordionFacade & AccordionParts;
|
|
7
25
|
//#endregion
|
|
@@ -1,10 +1,40 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { Accordion as Accordion$1 } from "@ark-ui/react/accordion";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
6
|
//#region src/components/accordion/index.tsx
|
|
4
7
|
/** Ark's Accordion, dressed in the paper-and-ink system: a ruled sheet
|
|
5
8
|
* folded by quiet rows, unfolding with a spring-chevoned dissolve. The
|
|
6
9
|
* API is Ark's own — Root, Item, ItemTrigger, ItemContent, ItemIndicator. */
|
|
7
|
-
|
|
10
|
+
function AccordionRoot(props) {
|
|
11
|
+
const id = useElementId("accordion", props);
|
|
12
|
+
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
13
|
+
...props,
|
|
14
|
+
id
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function AccordionFacade({ value, defaultValue, items, multiple = false, collapsible = true, disabled = false, orientation = "vertical", className, onValueChange }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(AccordionRoot, {
|
|
19
|
+
className,
|
|
20
|
+
disabled,
|
|
21
|
+
multiple,
|
|
22
|
+
collapsible,
|
|
23
|
+
orientation,
|
|
24
|
+
defaultValue,
|
|
25
|
+
...value === void 0 ? {} : { value },
|
|
26
|
+
onValueChange: (details) => onValueChange?.(details.value),
|
|
27
|
+
children: items.map((item) => /* @__PURE__ */ jsxs(Accordion$1.Item, {
|
|
28
|
+
value: item.value,
|
|
29
|
+
children: [/* @__PURE__ */ jsxs(Accordion$1.ItemTrigger, { children: [item.title, /* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: iconNode("chevron-down") })] }), /* @__PURE__ */ jsx(Accordion$1.ItemContent, { children: /* @__PURE__ */ jsx("p", { children: item.content }) })]
|
|
30
|
+
}, item.value))
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
AccordionFacade.displayName = "SAccordion";
|
|
34
|
+
const Accordion = Object.assign(AccordionFacade, {
|
|
35
|
+
...Accordion$1,
|
|
36
|
+
Root: AccordionRoot
|
|
37
|
+
});
|
|
8
38
|
injectComponentStyle("accordion");
|
|
9
39
|
//#endregion
|
|
10
40
|
export { Accordion };
|
|
@@ -16,5 +16,8 @@ export interface AffixProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
/** Where it pins from the bottom instead, for footers and action bars. */
|
|
17
17
|
offsetBottom?: string;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
declare function AffixImpl({ offsetTop, offsetBottom, ...rest }: AffixProps): import("react").JSX.Element;
|
|
20
|
+
export declare const Affix: typeof AffixImpl & {
|
|
21
|
+
Root: typeof AffixImpl;
|
|
22
|
+
};
|
|
20
23
|
//#endregion
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/affix/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function AffixImpl({ offsetTop = "0px", offsetBottom = "0px", ...rest }) {
|
|
5
6
|
injectComponentStyle("affix");
|
|
6
7
|
return /* @__PURE__ */ jsx("div", {
|
|
7
8
|
...rest,
|
|
8
9
|
style: {
|
|
9
10
|
...rest.style,
|
|
10
|
-
top: offsetTop,
|
|
11
|
-
bottom: offsetBottom
|
|
11
|
+
"--bs-affix-top": offsetTop,
|
|
12
|
+
"--bs-affix-bottom": offsetBottom
|
|
12
13
|
},
|
|
13
14
|
"data-scope": "affix",
|
|
14
15
|
"data-part": "root"
|
|
15
16
|
});
|
|
16
17
|
}
|
|
18
|
+
const Affix = withSelfRoot(AffixImpl);
|
|
17
19
|
//#endregion
|
|
18
20
|
export { Affix };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FileUIPart, c as SourceUrlUIPart, d as ToolUIPart, f as UIMessage, i as DataUIPart, l as StepStartUIPart, n as AiActions, o as ReasoningUIPart, p as UIMessagePart, r as AiContent, s as SourceDocumentUIPart, t as Ai, u as TextUIPart } from "../../index-
|
|
1
|
+
import { a as FileUIPart, c as SourceUrlUIPart, d as ToolUIPart, f as UIMessage, i as DataUIPart, l as StepStartUIPart, n as AiActions, o as ReasoningUIPart, p as UIMessagePart, r as AiContent, s as SourceDocumentUIPart, t as Ai, u as TextUIPart } from "../../index-DdNKngUQ.mjs";
|
|
2
2
|
export { Ai, AiActions, AiContent, type DataUIPart, type FileUIPart, type ReasoningUIPart, type SourceDocumentUIPart, type SourceUrlUIPart, type StepStartUIPart, type TextUIPart, type ToolUIPart, type UIMessage, type UIMessagePart };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
3
|
import { Action } from "../ai-action/index.mjs";
|
|
3
4
|
import { AiMessage as Message } from "../ai-message/index.mjs";
|
|
4
5
|
import { AiPromptInput as PromptInput } from "../ai-prompt-input/index.mjs";
|
|
5
6
|
import { AiReasoning as Reasoning } from "../ai-reasoning/index.mjs";
|
|
6
|
-
import { t as Response } from "../../ai-response-
|
|
7
|
+
import { t as Response } from "../../ai-response-B4DX7nmJ.mjs";
|
|
7
8
|
import { AiSource as Source, AiSources as Sources } from "../ai-source/index.mjs";
|
|
8
9
|
import { AiSuggestion as Suggestion } from "../ai-suggestion/index.mjs";
|
|
9
10
|
import { AiTool as Tool } from "../ai-tool/index.mjs";
|
|
@@ -43,9 +44,9 @@ function AiConversation({ children, ...rest }) {
|
|
|
43
44
|
}
|
|
44
45
|
/** The bubble's inner measure — content that belongs to neither side
|
|
45
46
|
* specifically. */
|
|
46
|
-
const AiContent = part("Content", "div");
|
|
47
|
+
const AiContent = withSelfRoot(part("Content", "div"));
|
|
47
48
|
/** The quiet row under a message — copy, retry, feedback. */
|
|
48
|
-
const AiActions = part("Actions", "div");
|
|
49
|
+
const AiActions = withSelfRoot(part("Actions", "div"));
|
|
49
50
|
/** The while-it-works whisper for the in-flight turns. */
|
|
50
51
|
function AiLoader({ children, ...rest }) {
|
|
51
52
|
const messages = useComponentMessages();
|
|
@@ -61,6 +62,7 @@ function AiLoader({ children, ...rest }) {
|
|
|
61
62
|
/** The whole family under one handle — `Ai.Conversation`,
|
|
62
63
|
* `Ai.Message`, and the rest, exactly as before the split. */
|
|
63
64
|
const Ai = Object.assign(AiConversation, {
|
|
65
|
+
Root: AiConversation,
|
|
64
66
|
Conversation: AiConversation,
|
|
65
67
|
MessageContent: AiContent,
|
|
66
68
|
Actions: AiActions,
|
|
@@ -9,6 +9,9 @@ export interface ActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
9
9
|
label: string;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
declare function ActionImpl({ label, children, ...rest }: ActionProps): import("react").JSX.Element;
|
|
13
|
+
export declare const Action: typeof ActionImpl & {
|
|
14
|
+
Root: typeof ActionImpl;
|
|
15
|
+
};
|
|
13
16
|
//#endregion
|
|
14
17
|
export { Action as AiAction };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { Button } from "../button/index.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/ai-action/index.tsx
|
|
5
|
-
function
|
|
6
|
+
function ActionImpl({ label, children, ...rest }) {
|
|
6
7
|
injectComponentStyle("ai");
|
|
7
8
|
return /* @__PURE__ */ jsx(Button, {
|
|
8
9
|
variant: "ghost",
|
|
@@ -14,5 +15,6 @@ function Action({ label, children, ...rest }) {
|
|
|
14
15
|
children
|
|
15
16
|
});
|
|
16
17
|
}
|
|
18
|
+
const Action = withSelfRoot(ActionImpl);
|
|
17
19
|
//#endregion
|
|
18
20
|
export { Action, Action as AiAction };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
//#region src/components/ai-attachments/index.d.ts
|
|
3
|
-
/** One file riding the prompt: its
|
|
3
|
+
/** One file riding the prompt: its icon by extension, its name and
|
|
4
4
|
* human size, and a quiet way to take it back off. Uploading reads as
|
|
5
5
|
* a dashed ghost, error as danger ink. */
|
|
6
6
|
export interface AttachmentProps extends HTMLAttributes<HTMLSpanElement> {
|
|
7
|
-
/** The file's name — it picks the
|
|
7
|
+
/** The file's name — it picks the icon by extension. */
|
|
8
8
|
name: string;
|
|
9
9
|
/** The file's size in bytes, when known — rendered human. */
|
|
10
10
|
size?: number;
|
|
@@ -12,8 +12,14 @@ export interface AttachmentProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
12
12
|
status?: "uploading" | "ready" | "error";
|
|
13
13
|
onRemove?: () => void;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
declare function AttachmentImpl({ name, size, status, onRemove, ...rest }: AttachmentProps): import("react").JSX.Element;
|
|
16
|
+
export declare const Attachment: typeof AttachmentImpl & {
|
|
17
|
+
Root: typeof AttachmentImpl;
|
|
18
|
+
};
|
|
16
19
|
/** The row the files ride in — a wrapping line of chips. */
|
|
17
|
-
|
|
20
|
+
declare function AttachmentsImpl({ children, ...rest }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
21
|
+
export declare const Attachments: typeof AttachmentsImpl & {
|
|
22
|
+
Root: typeof AttachmentsImpl;
|
|
23
|
+
};
|
|
18
24
|
//#endregion
|
|
19
25
|
export { Attachment as AiAttachment, Attachments as AiAttachments };
|
|
@@ -1,50 +1,20 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
3
|
import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
|
|
2
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
//#region src/components/ai-attachments/index.tsx
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
fill: "none",
|
|
9
|
-
stroke: "currentColor",
|
|
10
|
-
strokeWidth: 1.5,
|
|
11
|
-
strokeLinecap: "square",
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx("rect", {
|
|
14
|
-
x: 2.5,
|
|
15
|
-
y: 3.5,
|
|
16
|
-
width: 11,
|
|
17
|
-
height: 9
|
|
18
|
-
}),
|
|
19
|
-
/* @__PURE__ */ jsx("path", { d: "M2.5 10.5 6 7l3 3 2-1.5 2.5 2" }),
|
|
20
|
-
/* @__PURE__ */ jsx("circle", {
|
|
21
|
-
cx: 6,
|
|
22
|
-
cy: 6,
|
|
23
|
-
r: .75,
|
|
24
|
-
fill: "currentColor",
|
|
25
|
-
stroke: "none"
|
|
26
|
-
})
|
|
27
|
-
]
|
|
7
|
+
const imageIcon = iconNode("image", {
|
|
8
|
+
width: 16,
|
|
9
|
+
height: 16
|
|
28
10
|
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fill: "none",
|
|
33
|
-
stroke: "currentColor",
|
|
34
|
-
strokeWidth: 1.5,
|
|
35
|
-
strokeLinecap: "square",
|
|
36
|
-
children: [/* @__PURE__ */ jsx("path", { d: "M4 2.5h5l3 3V13.5H4z" }), /* @__PURE__ */ jsx("path", { d: "M9 2.5v3h3" })]
|
|
11
|
+
const fileIcon = iconNode("file", {
|
|
12
|
+
width: 16,
|
|
13
|
+
height: 16
|
|
37
14
|
});
|
|
38
|
-
const
|
|
39
|
-
viewBox: "0 0 16 16",
|
|
15
|
+
const removeIcon = iconNode("x", {
|
|
40
16
|
width: 12,
|
|
41
|
-
height: 12
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
fill: "none",
|
|
44
|
-
stroke: "currentColor",
|
|
45
|
-
strokeWidth: 1.5,
|
|
46
|
-
strokeLinecap: "square",
|
|
47
|
-
children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8" })
|
|
17
|
+
height: 12
|
|
48
18
|
});
|
|
49
19
|
const IMAGE_EXTS = [
|
|
50
20
|
"png",
|
|
@@ -73,7 +43,7 @@ const humanSize = (bytes) => {
|
|
|
73
43
|
} while (value >= 1024 && unit < units.length - 1);
|
|
74
44
|
return `${value.toFixed(1)} ${units[unit]}`;
|
|
75
45
|
};
|
|
76
|
-
function
|
|
46
|
+
function AttachmentImpl({ name, size, status = "ready", onRemove, ...rest }) {
|
|
77
47
|
injectComponentStyle("ai");
|
|
78
48
|
const messages = useComponentMessages();
|
|
79
49
|
return /* @__PURE__ */ jsxs("span", {
|
|
@@ -82,7 +52,7 @@ function Attachment({ name, size, status = "ready", onRemove, ...rest }) {
|
|
|
82
52
|
"data-part": "attachment",
|
|
83
53
|
"data-status": status,
|
|
84
54
|
children: [
|
|
85
|
-
isImage(name) ?
|
|
55
|
+
isImage(name) ? imageIcon : fileIcon,
|
|
86
56
|
/* @__PURE__ */ jsx("span", { children: name }),
|
|
87
57
|
size !== void 0 ? /* @__PURE__ */ jsx("span", { children: humanSize(size) }) : null,
|
|
88
58
|
/* @__PURE__ */ jsx("button", {
|
|
@@ -90,13 +60,14 @@ function Attachment({ name, size, status = "ready", onRemove, ...rest }) {
|
|
|
90
60
|
"data-remove": "",
|
|
91
61
|
"aria-label": formatMessage(messages.ai.removeAttachment, { name }),
|
|
92
62
|
onClick: () => onRemove?.(),
|
|
93
|
-
children:
|
|
63
|
+
children: removeIcon
|
|
94
64
|
})
|
|
95
65
|
]
|
|
96
66
|
});
|
|
97
67
|
}
|
|
68
|
+
const Attachment = withSelfRoot(AttachmentImpl);
|
|
98
69
|
/** The row the files ride in — a wrapping line of chips. */
|
|
99
|
-
function
|
|
70
|
+
function AttachmentsImpl({ children, ...rest }) {
|
|
100
71
|
return /* @__PURE__ */ jsx("span", {
|
|
101
72
|
...rest,
|
|
102
73
|
"data-scope": "ai",
|
|
@@ -104,5 +75,6 @@ function Attachments({ children, ...rest }) {
|
|
|
104
75
|
children
|
|
105
76
|
});
|
|
106
77
|
}
|
|
78
|
+
const Attachments = withSelfRoot(AttachmentsImpl);
|
|
107
79
|
//#endregion
|
|
108
80
|
export { Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments };
|
|
@@ -6,6 +6,9 @@ export interface MessageProps extends HTMLAttributes<HTMLElement> {
|
|
|
6
6
|
role?: "user" | "assistant" | "system";
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
declare function MessageImpl({ role, children, ...rest }: MessageProps): import("react").JSX.Element;
|
|
10
|
+
export declare const Message: typeof MessageImpl & {
|
|
11
|
+
Root: typeof MessageImpl;
|
|
12
|
+
};
|
|
10
13
|
//#endregion
|
|
11
14
|
export { Message as AiMessage };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/ai-message/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function MessageImpl({ role = "assistant", children, ...rest }) {
|
|
5
6
|
injectComponentStyle("ai");
|
|
6
7
|
return /* @__PURE__ */ jsx("article", {
|
|
7
8
|
...rest,
|
|
@@ -11,5 +12,6 @@ function Message({ role = "assistant", children, ...rest }) {
|
|
|
11
12
|
children
|
|
12
13
|
});
|
|
13
14
|
}
|
|
15
|
+
const Message = withSelfRoot(MessageImpl);
|
|
14
16
|
//#endregion
|
|
15
17
|
export { Message as AiMessage, Message };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MentionEntry } from "../../index-
|
|
1
|
+
import { t as MentionEntry } from "../../index-Bbg4heDO.mjs";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
//#region src/components/ai-prompt-input/index.d.ts
|
|
4
4
|
/**
|
|
@@ -42,6 +42,9 @@ export interface PromptInputProps extends Omit<HTMLAttributes<HTMLFormElement>,
|
|
|
42
42
|
footer?: ReactNode;
|
|
43
43
|
footerEnd?: ReactNode;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
declare function PromptInputImpl({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled, busy, mentions, header, leading, trailing, footer, footerEnd, ...rest }: PromptInputProps): import("react").JSX.Element;
|
|
46
|
+
export declare const PromptInput: typeof PromptInputImpl & {
|
|
47
|
+
Root: typeof PromptInputImpl;
|
|
48
|
+
};
|
|
46
49
|
//#endregion
|
|
47
50
|
export { PromptInput as AiPromptInput };
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
3
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
4
|
import { Button } from "../button/index.mjs";
|
|
3
5
|
import { Field } from "../field/index.mjs";
|
|
4
|
-
import { n as MentionsVessel, r as useMentions } from "../../mentions-
|
|
6
|
+
import { n as MentionsVessel, r as useMentions } from "../../mentions-BuWibdci.mjs";
|
|
5
7
|
import { injectComponentStyle } from "@bysages/core";
|
|
6
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
import { useRef } from "react";
|
|
8
10
|
//#region src/components/ai-prompt-input/index.tsx
|
|
9
|
-
const
|
|
10
|
-
viewBox: "0 0 16 16",
|
|
11
|
+
const arrowUpIcon = iconNode("arrow-up", {
|
|
11
12
|
width: 14,
|
|
12
|
-
height: 14
|
|
13
|
-
"aria-hidden": "true",
|
|
14
|
-
fill: "none",
|
|
15
|
-
stroke: "currentColor",
|
|
16
|
-
strokeWidth: 1.5,
|
|
17
|
-
strokeLinecap: "square",
|
|
18
|
-
children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5" })
|
|
13
|
+
height: 14
|
|
19
14
|
});
|
|
20
|
-
const
|
|
15
|
+
const stopIcon = /* @__PURE__ */ jsx("svg", {
|
|
21
16
|
viewBox: "0 0 16 16",
|
|
22
17
|
width: 14,
|
|
23
18
|
height: 14,
|
|
@@ -40,7 +35,7 @@ function row(part, content) {
|
|
|
40
35
|
children: content
|
|
41
36
|
});
|
|
42
37
|
}
|
|
43
|
-
function
|
|
38
|
+
function PromptInputImpl({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled = false, busy = false, mentions, header, leading, trailing, footer, footerEnd, ...rest }) {
|
|
44
39
|
injectComponentStyle("ai");
|
|
45
40
|
const fieldRef = useRef(null);
|
|
46
41
|
const messages = useComponentMessages();
|
|
@@ -67,7 +62,7 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "ari
|
|
|
67
62
|
"aria-label": messages.ai.stop,
|
|
68
63
|
disabled,
|
|
69
64
|
onClick: () => onStop?.(),
|
|
70
|
-
children:
|
|
65
|
+
children: stopIcon
|
|
71
66
|
}) : /* @__PURE__ */ jsx(Button, {
|
|
72
67
|
variant: "solid",
|
|
73
68
|
size: "sm",
|
|
@@ -75,7 +70,7 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "ari
|
|
|
75
70
|
type: "submit",
|
|
76
71
|
"aria-label": messages.ai.send,
|
|
77
72
|
disabled: disabled || !value.trim(),
|
|
78
|
-
children:
|
|
73
|
+
children: arrowUpIcon
|
|
79
74
|
});
|
|
80
75
|
const hasFooter = footer != null && (!Array.isArray(footer) || footer.length > 0);
|
|
81
76
|
return /* @__PURE__ */ jsxs("form", {
|
|
@@ -135,5 +130,6 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "ari
|
|
|
135
130
|
]
|
|
136
131
|
});
|
|
137
132
|
}
|
|
133
|
+
const PromptInput = withSelfRoot(PromptInputImpl);
|
|
138
134
|
//#endregion
|
|
139
135
|
export { PromptInput as AiPromptInput, PromptInput };
|
|
@@ -8,6 +8,9 @@ export interface ReasoningProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
declare function ReasoningImpl({ label, children, ...rest }: ReasoningProps): import("react").JSX.Element;
|
|
12
|
+
export declare const Reasoning: typeof ReasoningImpl & {
|
|
13
|
+
Root: typeof ReasoningImpl;
|
|
14
|
+
};
|
|
12
15
|
//#endregion
|
|
13
16
|
export { Reasoning as AiReasoning };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { t as chevron } from "../../chevron-a2nIZKN4.mjs";
|
|
2
3
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/ai-reasoning/index.tsx
|
|
6
|
-
function
|
|
7
|
+
function ReasoningImpl({ label = "Thinking", children, ...rest }) {
|
|
7
8
|
injectComponentStyle("ai");
|
|
8
9
|
return /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
9
10
|
...rest,
|
|
@@ -15,5 +16,6 @@ function Reasoning({ label = "Thinking", children, ...rest }) {
|
|
|
15
16
|
}) })]
|
|
16
17
|
});
|
|
17
18
|
}
|
|
19
|
+
const Reasoning = withSelfRoot(ReasoningImpl);
|
|
18
20
|
//#endregion
|
|
19
21
|
export { Reasoning as AiReasoning, Reasoning };
|
|
@@ -19,6 +19,9 @@ export interface ResponseProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
19
19
|
* unset for the resolved default. */
|
|
20
20
|
copiedLabel?: string;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
declare function ResponseImpl({ content, highlighter, copyLabel, copiedLabel, ...rest }: ResponseProps): import("react").JSX.Element;
|
|
23
|
+
export declare const Response: typeof ResponseImpl & {
|
|
24
|
+
Root: typeof ResponseImpl;
|
|
25
|
+
};
|
|
23
26
|
//#endregion
|
|
24
27
|
export { Response as AiResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Response } from "../../ai-response-
|
|
1
|
+
import { t as Response } from "../../ai-response-B4DX7nmJ.mjs";
|
|
2
2
|
export { Response as AiResponse, Response };
|
|
@@ -7,11 +7,17 @@ export interface SourceProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
|
7
7
|
href: string;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
declare function SourceImpl({ href, children, ...rest }: SourceProps): import("react").JSX.Element;
|
|
11
|
+
export declare const Source: typeof SourceImpl & {
|
|
12
|
+
Root: typeof SourceImpl;
|
|
13
|
+
};
|
|
11
14
|
/** The reading list under a response: where this ink came from. */
|
|
12
15
|
export interface SourcesProps extends HTMLAttributes<HTMLOListElement> {
|
|
13
16
|
children?: ReactNode;
|
|
14
17
|
}
|
|
15
|
-
|
|
18
|
+
declare function SourcesImpl({ children, ...rest }: SourcesProps): import("react").JSX.Element;
|
|
19
|
+
export declare const Sources: typeof SourcesImpl & {
|
|
20
|
+
Root: typeof SourcesImpl;
|
|
21
|
+
};
|
|
16
22
|
//#endregion
|
|
17
23
|
export { Source as AiSource, Sources as AiSources };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/ai-source/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function SourceImpl({ href, children, ...rest }) {
|
|
5
6
|
injectComponentStyle("ai");
|
|
6
7
|
return /* @__PURE__ */ jsx("li", {
|
|
7
8
|
"data-scope": "ai",
|
|
@@ -15,7 +16,8 @@ function Source({ href, children, ...rest }) {
|
|
|
15
16
|
})
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
const Source = withSelfRoot(SourceImpl);
|
|
20
|
+
function SourcesImpl({ children, ...rest }) {
|
|
19
21
|
return /* @__PURE__ */ jsx("ol", {
|
|
20
22
|
...rest,
|
|
21
23
|
"data-scope": "ai",
|
|
@@ -23,5 +25,6 @@ function Sources({ children, ...rest }) {
|
|
|
23
25
|
children
|
|
24
26
|
});
|
|
25
27
|
}
|
|
28
|
+
const Sources = withSelfRoot(SourcesImpl);
|
|
26
29
|
//#endregion
|
|
27
30
|
export { Source as AiSource, Source, Sources as AiSources, Sources };
|
|
@@ -8,6 +8,9 @@ export interface SuggestionProps extends Omit<HTMLAttributes<HTMLButtonElement>,
|
|
|
8
8
|
prompt: string;
|
|
9
9
|
onSelect?: (prompt: string) => void;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
declare function SuggestionImpl({ prompt, onSelect, ...rest }: SuggestionProps): import("react").JSX.Element;
|
|
12
|
+
export declare const Suggestion: typeof SuggestionImpl & {
|
|
13
|
+
Root: typeof SuggestionImpl;
|
|
14
|
+
};
|
|
12
15
|
//#endregion
|
|
13
16
|
export { Suggestion as AiSuggestion };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { Button } from "../button/index.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/ai-suggestion/index.tsx
|
|
5
|
-
function
|
|
6
|
+
function SuggestionImpl({ prompt, onSelect, ...rest }) {
|
|
6
7
|
injectComponentStyle("ai");
|
|
7
8
|
return /* @__PURE__ */ jsx(Button, {
|
|
8
9
|
variant: "outline",
|
|
@@ -12,5 +13,6 @@ function Suggestion({ prompt, onSelect, ...rest }) {
|
|
|
12
13
|
children: prompt
|
|
13
14
|
});
|
|
14
15
|
}
|
|
16
|
+
const Suggestion = withSelfRoot(SuggestionImpl);
|
|
15
17
|
//#endregion
|
|
16
18
|
export { Suggestion as AiSuggestion, Suggestion };
|
|
@@ -16,6 +16,9 @@ export interface ToolProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
input?: ReactNode;
|
|
17
17
|
output?: ReactNode;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
declare function ToolImpl({ name, label, status, input, output, ...rest }: ToolProps): import("react").JSX.Element;
|
|
20
|
+
export declare const Tool: typeof ToolImpl & {
|
|
21
|
+
Root: typeof ToolImpl;
|
|
22
|
+
};
|
|
20
23
|
//#endregion
|
|
21
24
|
export { Tool as AiTool };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { t as chevron } from "../../chevron-a2nIZKN4.mjs";
|
|
2
3
|
import { Collapsible } from "../collapsible/index.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/ai-tool/index.tsx
|
|
6
|
-
function
|
|
7
|
+
function ToolImpl({ name, label, status, input, output, ...rest }) {
|
|
7
8
|
injectComponentStyle("ai");
|
|
8
9
|
return /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
9
10
|
...rest,
|
|
@@ -32,5 +33,6 @@ function Tool({ name, label, status, input, output, ...rest }) {
|
|
|
32
33
|
}) })]
|
|
33
34
|
});
|
|
34
35
|
}
|
|
36
|
+
const Tool = withSelfRoot(ToolImpl);
|
|
35
37
|
//#endregion
|
|
36
38
|
export { Tool as AiTool, Tool };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
//#region src/components/alert/index.d.ts
|
|
3
3
|
export type AlertStatus = "ink" | "info" | "success" | "warning" | "danger";
|
|
4
|
+
/** A notice
|
|
5
|
+
|
|
4
6
|
/** A notice drawn on the page: a wash of the status pigment, one heavier
|
|
5
7
|
* hairline on the leading edge, the serif for its title. Root, Icon,
|
|
6
8
|
* Body, Title, Description — the icon reads the status from the Root. */
|