@bysages/solid 0.2.1 → 0.2.3
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-B_586r27.mjs +139 -0
- package/dist/chevron-GWEoEYdO.mjs +9 -0
- package/dist/components/accordion/index.d.mts +7 -0
- package/dist/components/accordion/index.mjs +10 -0
- package/dist/components/affix/index.d.mts +20 -0
- package/dist/components/affix/index.mjs +35 -0
- package/dist/components/ai/index.d.mts +2 -0
- package/dist/components/ai/index.mjs +69 -0
- package/dist/components/ai-action/index.d.mts +13 -0
- package/dist/components/ai-action/index.mjs +27 -0
- package/dist/components/ai-attachments/index.d.mts +20 -0
- package/dist/components/ai-attachments/index.mjs +98 -0
- package/dist/components/ai-message/index.d.mts +13 -0
- package/dist/components/ai-message/index.mjs +24 -0
- package/dist/components/ai-prompt-input/index.d.mts +45 -0
- package/dist/components/ai-prompt-input/index.mjs +136 -0
- package/dist/components/ai-reasoning/index.d.mts +13 -0
- package/dist/components/ai-reasoning/index.mjs +34 -0
- package/dist/components/ai-response/index.d.mts +20 -0
- package/dist/components/ai-response/index.mjs +2 -0
- package/dist/components/ai-source/index.d.mts +13 -0
- package/dist/components/ai-source/index.mjs +36 -0
- package/dist/components/ai-suggestion/index.d.mts +13 -0
- package/dist/components/ai-suggestion/index.mjs +22 -0
- package/dist/components/ai-tool/index.d.mts +23 -0
- package/dist/components/ai-tool/index.mjs +78 -0
- package/dist/components/alert/index.d.mts +22 -0
- package/dist/components/alert/index.mjs +92 -0
- package/dist/components/angle-slider/index.d.mts +15 -0
- package/dist/components/angle-slider/index.mjs +18 -0
- package/dist/components/aspect-ratio/index.d.mts +10 -0
- package/dist/components/aspect-ratio/index.mjs +25 -0
- package/dist/components/autocomplete/index.d.mts +21 -0
- package/dist/components/autocomplete/index.mjs +75 -0
- package/dist/components/avatar/index.d.mts +20 -0
- package/dist/components/avatar/index.mjs +15 -0
- package/dist/components/avatar-group/index.d.mts +11 -0
- package/dist/components/avatar-group/index.mjs +22 -0
- package/dist/components/back-top/index.d.mts +29 -0
- package/dist/components/back-top/index.mjs +89 -0
- package/dist/components/badge/index.d.mts +10 -0
- package/dist/components/badge/index.mjs +25 -0
- package/dist/components/banner/index.d.mts +24 -0
- package/dist/components/banner/index.mjs +71 -0
- package/dist/components/breadcrumb/index.d.mts +11 -0
- package/dist/components/breadcrumb/index.mjs +43 -0
- package/dist/components/button/index.d.mts +15 -0
- package/dist/components/button/index.mjs +45 -0
- package/dist/components/button-group/index.d.mts +23 -0
- package/dist/components/button-group/index.mjs +40 -0
- package/dist/components/calendar/index.d.mts +17 -0
- package/dist/components/calendar/index.mjs +197 -0
- package/dist/components/card/index.d.mts +11 -0
- package/dist/components/card/index.mjs +33 -0
- package/dist/components/carousel/index.d.mts +9 -0
- package/dist/components/carousel/index.mjs +12 -0
- package/dist/components/cascade-select/index.d.mts +31 -0
- package/dist/components/cascade-select/index.mjs +265 -0
- package/dist/components/checkbox/index.d.mts +15 -0
- package/dist/components/checkbox/index.mjs +18 -0
- package/dist/components/checkbox-group/index.d.mts +28 -0
- package/dist/components/checkbox-group/index.mjs +99 -0
- package/dist/components/chip/index.d.mts +12 -0
- package/dist/components/chip/index.mjs +34 -0
- package/dist/components/client-only/index.d.mts +2 -0
- package/dist/components/client-only/index.mjs +2 -0
- package/dist/components/clipboard/index.d.mts +16 -0
- package/dist/components/clipboard/index.mjs +19 -0
- package/dist/components/collapsible/index.d.mts +7 -0
- package/dist/components/collapsible/index.mjs +10 -0
- package/dist/components/collection/index.d.mts +2 -0
- package/dist/components/collection/index.mjs +2 -0
- package/dist/components/color-picker/index.d.mts +19 -0
- package/dist/components/color-picker/index.mjs +18 -0
- package/dist/components/combobox/index.d.mts +17 -0
- package/dist/components/combobox/index.mjs +18 -0
- package/dist/components/command/index.d.mts +43 -0
- package/dist/components/command/index.mjs +237 -0
- package/dist/components/comment/index.d.mts +17 -0
- package/dist/components/comment/index.mjs +86 -0
- package/dist/components/config-provider/index.d.mts +48 -0
- package/dist/components/config-provider/index.mjs +65 -0
- package/dist/components/container/index.d.mts +13 -0
- package/dist/components/container/index.mjs +25 -0
- package/dist/components/date-input/index.d.mts +15 -0
- package/dist/components/date-input/index.mjs +18 -0
- package/dist/components/date-picker/index.d.mts +17 -0
- package/dist/components/date-picker/index.mjs +18 -0
- package/dist/components/descriptions/index.d.mts +18 -0
- package/dist/components/descriptions/index.mjs +42 -0
- package/dist/components/dialog/index.d.mts +9 -0
- package/dist/components/dialog/index.mjs +11 -0
- package/dist/components/download-trigger/index.d.mts +2 -0
- package/dist/components/download-trigger/index.mjs +2 -0
- package/dist/components/drawer/index.d.mts +9 -0
- package/dist/components/drawer/index.mjs +12 -0
- package/dist/components/dynamic-input/index.d.mts +30 -0
- package/dist/components/dynamic-input/index.mjs +116 -0
- package/dist/components/editable/index.d.mts +15 -0
- package/dist/components/editable/index.mjs +18 -0
- package/dist/components/ellipsis/index.d.mts +10 -0
- package/dist/components/ellipsis/index.mjs +29 -0
- package/dist/components/empty/index.d.mts +10 -0
- package/dist/components/empty/index.mjs +31 -0
- package/dist/components/field/index.d.mts +8 -0
- package/dist/components/field/index.mjs +11 -0
- package/dist/components/fieldset/index.d.mts +7 -0
- package/dist/components/fieldset/index.mjs +10 -0
- package/dist/components/file-upload/index.d.mts +17 -0
- package/dist/components/file-upload/index.mjs +18 -0
- package/dist/components/float-button/index.d.mts +61 -0
- package/dist/components/float-button/index.mjs +128 -0
- package/dist/components/floating-panel/index.d.mts +9 -0
- package/dist/components/floating-panel/index.mjs +12 -0
- package/dist/components/focus-trap/index.d.mts +2 -0
- package/dist/components/focus-trap/index.mjs +2 -0
- package/dist/components/form/index.d.mts +2 -0
- package/dist/components/form/index.mjs +110 -0
- package/dist/components/format/index.d.mts +9 -0
- package/dist/components/format/index.mjs +10 -0
- package/dist/components/frame/index.d.mts +10 -0
- package/dist/components/frame/index.mjs +12 -0
- package/dist/components/grid/index.d.mts +13 -0
- package/dist/components/grid/index.mjs +44 -0
- package/dist/components/highlight/index.d.mts +7 -0
- package/dist/components/highlight/index.mjs +11 -0
- package/dist/components/hover-card/index.d.mts +7 -0
- package/dist/components/hover-card/index.mjs +10 -0
- package/dist/components/icon/index.d.mts +19 -0
- package/dist/components/icon/index.mjs +53 -0
- package/dist/components/image/index.d.mts +17 -0
- package/dist/components/image/index.mjs +69 -0
- package/dist/components/image-cropper/index.d.mts +8 -0
- package/dist/components/image-cropper/index.mjs +11 -0
- package/dist/components/image-viewer/index.d.mts +19 -0
- package/dist/components/image-viewer/index.mjs +143 -0
- package/dist/components/input/index.d.mts +16 -0
- package/dist/components/input/index.mjs +42 -0
- package/dist/components/input-group/index.d.mts +18 -0
- package/dist/components/input-group/index.mjs +40 -0
- package/dist/components/json-tree-view/index.d.mts +7 -0
- package/dist/components/json-tree-view/index.mjs +10 -0
- package/dist/components/kbd/index.d.mts +6 -0
- package/dist/components/kbd/index.mjs +17 -0
- package/dist/components/layout/index.d.mts +60 -0
- package/dist/components/layout/index.mjs +192 -0
- package/dist/components/link/index.d.mts +10 -0
- package/dist/components/link/index.mjs +25 -0
- package/dist/components/list/index.d.mts +26 -0
- package/dist/components/list/index.mjs +92 -0
- package/dist/components/listbox/index.d.mts +17 -0
- package/dist/components/listbox/index.mjs +19 -0
- package/dist/components/marquee/index.d.mts +7 -0
- package/dist/components/marquee/index.mjs +10 -0
- package/dist/components/masonry/index.d.mts +11 -0
- package/dist/components/masonry/index.mjs +36 -0
- package/dist/components/mentions/index.d.mts +2 -0
- package/dist/components/mentions/index.mjs +3 -0
- package/dist/components/menu/index.d.mts +13 -0
- package/dist/components/menu/index.mjs +38 -0
- package/dist/components/menubar/index.d.mts +32 -0
- package/dist/components/menubar/index.mjs +82 -0
- package/dist/components/meter/index.d.mts +21 -0
- package/dist/components/meter/index.mjs +95 -0
- package/dist/components/navigation-menu/index.d.mts +8 -0
- package/dist/components/navigation-menu/index.mjs +11 -0
- package/dist/components/number-input/index.d.mts +15 -0
- package/dist/components/number-input/index.mjs +18 -0
- package/dist/components/page-header/index.d.mts +11 -0
- package/dist/components/page-header/index.mjs +34 -0
- package/dist/components/pagination/index.d.mts +17 -0
- package/dist/components/pagination/index.mjs +18 -0
- package/dist/components/password-input/index.d.mts +15 -0
- package/dist/components/password-input/index.mjs +18 -0
- package/dist/components/pin-input/index.d.mts +14 -0
- package/dist/components/pin-input/index.mjs +18 -0
- package/dist/components/popconfirm/index.d.mts +17 -0
- package/dist/components/popconfirm/index.mjs +78 -0
- package/dist/components/popover/index.d.mts +8 -0
- package/dist/components/popover/index.mjs +11 -0
- package/dist/components/presence/index.d.mts +2 -0
- package/dist/components/presence/index.mjs +2 -0
- package/dist/components/progress/index.d.mts +15 -0
- package/dist/components/progress/index.mjs +18 -0
- package/dist/components/progress-group/index.d.mts +22 -0
- package/dist/components/progress-group/index.mjs +77 -0
- package/dist/components/qr-code/index.d.mts +8 -0
- package/dist/components/qr-code/index.mjs +11 -0
- package/dist/components/radio-group/index.d.mts +15 -0
- package/dist/components/radio-group/index.mjs +18 -0
- package/dist/components/rating-group/index.d.mts +15 -0
- package/dist/components/rating-group/index.mjs +18 -0
- package/dist/components/scroll-area/index.d.mts +7 -0
- package/dist/components/scroll-area/index.mjs +10 -0
- package/dist/components/segment-group/index.d.mts +17 -0
- package/dist/components/segment-group/index.mjs +23 -0
- package/dist/components/select/index.d.mts +17 -0
- package/dist/components/select/index.mjs +18 -0
- package/dist/components/separator/index.d.mts +11 -0
- package/dist/components/separator/index.mjs +29 -0
- package/dist/components/signature-pad/index.d.mts +8 -0
- package/dist/components/signature-pad/index.mjs +11 -0
- package/dist/components/skeleton/index.d.mts +7 -0
- package/dist/components/skeleton/index.mjs +17 -0
- package/dist/components/slider/index.d.mts +15 -0
- package/dist/components/slider/index.mjs +18 -0
- package/dist/components/spinner/index.d.mts +9 -0
- package/dist/components/spinner/index.mjs +28 -0
- package/dist/components/split-button/index.d.mts +36 -0
- package/dist/components/split-button/index.mjs +123 -0
- package/dist/components/splitter/index.d.mts +7 -0
- package/dist/components/splitter/index.mjs +10 -0
- package/dist/components/stack/index.d.mts +11 -0
- package/dist/components/stack/index.mjs +47 -0
- package/dist/components/stat/index.d.mts +17 -0
- package/dist/components/stat/index.mjs +46 -0
- package/dist/components/steps/index.d.mts +18 -0
- package/dist/components/steps/index.mjs +18 -0
- package/dist/components/swap/index.d.mts +8 -0
- package/dist/components/swap/index.mjs +11 -0
- package/dist/components/switch/index.d.mts +15 -0
- package/dist/components/switch/index.mjs +18 -0
- package/dist/components/table/index.d.mts +77 -0
- package/dist/components/table/index.mjs +740 -0
- package/dist/components/tabs/index.d.mts +17 -0
- package/dist/components/tabs/index.mjs +18 -0
- package/dist/components/tags-input/index.d.mts +16 -0
- package/dist/components/tags-input/index.mjs +18 -0
- package/dist/components/textarea/index.d.mts +14 -0
- package/dist/components/textarea/index.mjs +37 -0
- package/dist/components/timeline/index.d.mts +9 -0
- package/dist/components/timeline/index.mjs +29 -0
- package/dist/components/timer/index.d.mts +8 -0
- package/dist/components/timer/index.mjs +11 -0
- package/dist/components/toast/index.d.mts +11 -0
- package/dist/components/toast/index.mjs +13 -0
- package/dist/components/toc/index.d.mts +7 -0
- package/dist/components/toc/index.mjs +10 -0
- package/dist/components/toggle/index.d.mts +7 -0
- package/dist/components/toggle/index.mjs +10 -0
- package/dist/components/toggle-group/index.d.mts +14 -0
- package/dist/components/toggle-group/index.mjs +18 -0
- package/dist/components/tooltip/index.d.mts +7 -0
- package/dist/components/tooltip/index.mjs +10 -0
- package/dist/components/tour/index.d.mts +11 -0
- package/dist/components/tour/index.mjs +13 -0
- package/dist/components/transfer/index.d.mts +24 -0
- package/dist/components/transfer/index.mjs +166 -0
- package/dist/components/tree-select/index.d.mts +28 -0
- package/dist/components/tree-select/index.mjs +245 -0
- package/dist/components/tree-view/index.d.mts +18 -0
- package/dist/components/tree-view/index.mjs +19 -0
- package/dist/components/typography/index.d.mts +11 -0
- package/dist/components/typography/index.mjs +34 -0
- package/dist/components/watermark/index.d.mts +17 -0
- package/dist/components/watermark/index.mjs +71 -0
- package/dist/index-B1xiJ5ki.d.mts +1811 -0
- package/dist/index-B4XS2n2y.d.mts +13411 -0
- package/dist/index-DDX7x8aT.d.mts +95 -0
- package/dist/index.d.mts +128 -15019
- package/dist/index.mjs +128 -5887
- package/dist/mentions-xbI6vJAP.mjs +257 -0
- package/package.json +77 -3
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { mergeProps, spread, template, use } from "solid-js/web";
|
|
3
|
+
import { createEffect, createMemo, onMount, splitProps } from "solid-js";
|
|
4
|
+
import { renderHtml } from "@tanstack/markdown/html";
|
|
5
|
+
//#region src/components/ai-response/code-copy.ts
|
|
6
|
+
/** The two glyphs a copy affordance needs: the stamp and its
|
|
7
|
+
* confirmation. Inline SVG keeps the enhancement framework-agnostic —
|
|
8
|
+
* it lives beside the renderer's generated code HTML. */
|
|
9
|
+
const COPY_CODE_ICON = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`;
|
|
10
|
+
const COPIED_CODE_ICON = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>`;
|
|
11
|
+
/** How long the confirmation stays before the stamp returns. */
|
|
12
|
+
const REVERT_MS = 1500;
|
|
13
|
+
/** Make sure every fenced block under `host` carries its copy stamp.
|
|
14
|
+
* The stamp anchors to a wrapper outside the scrolling `pre` — inside,
|
|
15
|
+
* it would fix to the overflow area and travel out of view with the
|
|
16
|
+
* code. The renderer rebuilds the markdown as one HTML string on every
|
|
17
|
+
* stream tick, so this stays idempotent and cheap enough to re-run
|
|
18
|
+
* after each patch. */
|
|
19
|
+
function decorateCodeCopy(host, copyLabel) {
|
|
20
|
+
for (const pre of host.querySelectorAll("pre")) {
|
|
21
|
+
let body = pre.parentElement;
|
|
22
|
+
if (!body || body.getAttribute("data-part") !== "code-body") {
|
|
23
|
+
body = document.createElement("div");
|
|
24
|
+
body.setAttribute("data-scope", "ai");
|
|
25
|
+
body.setAttribute("data-part", "code-body");
|
|
26
|
+
pre.replaceWith(body);
|
|
27
|
+
body.appendChild(pre);
|
|
28
|
+
}
|
|
29
|
+
let button = body.querySelector("[data-part=\"code-copy\"]");
|
|
30
|
+
if (!button) {
|
|
31
|
+
button = document.createElement("button");
|
|
32
|
+
button.type = "button";
|
|
33
|
+
button.setAttribute("data-scope", "ai");
|
|
34
|
+
button.setAttribute("data-part", "code-copy");
|
|
35
|
+
button.innerHTML = COPY_CODE_ICON;
|
|
36
|
+
body.appendChild(button);
|
|
37
|
+
}
|
|
38
|
+
button.title = copyLabel;
|
|
39
|
+
button.setAttribute("aria-label", copyLabel);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** The one delegated click for the whole response: copy the block's
|
|
43
|
+
* text and confirm in place, then return the stamp after a beat. */
|
|
44
|
+
async function clickCodeCopy(event, copyLabel, copiedLabel) {
|
|
45
|
+
const button = event.target?.closest("[data-part=\"code-copy\"]");
|
|
46
|
+
const pre = button?.closest("[data-part=\"code-body\"]")?.querySelector("pre");
|
|
47
|
+
if (!button || !pre) return;
|
|
48
|
+
await navigator.clipboard.writeText(pre.textContent ?? "");
|
|
49
|
+
button.innerHTML = COPIED_CODE_ICON;
|
|
50
|
+
button.setAttribute("data-state", "copied");
|
|
51
|
+
button.title = copiedLabel;
|
|
52
|
+
button.setAttribute("aria-label", copiedLabel);
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
if (!button.isConnected) return;
|
|
55
|
+
button.innerHTML = COPY_CODE_ICON;
|
|
56
|
+
button.removeAttribute("data-state");
|
|
57
|
+
button.title = copyLabel;
|
|
58
|
+
button.setAttribute("aria-label", copyLabel);
|
|
59
|
+
}, REVERT_MS);
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/components/ai-response/tables.ts
|
|
63
|
+
/** Wide tables ride a scrolling lane instead of bursting the column.
|
|
64
|
+
* The lane is a plain div: the table-as-scroll-container form is what
|
|
65
|
+
* ate the mouse wheel over plain tables. Idempotent, so it can run
|
|
66
|
+
* after every stream patch. */
|
|
67
|
+
const lanes = /* @__PURE__ */ new Set();
|
|
68
|
+
let laneObserver;
|
|
69
|
+
/** A lane's verdict must follow its box — the panel around it can
|
|
70
|
+
* resize at any moment, so each lane stays observed and re-decided
|
|
71
|
+
* whenever its width changes. */
|
|
72
|
+
function watchLane(lane) {
|
|
73
|
+
if (lanes.has(lane)) return;
|
|
74
|
+
lanes.add(lane);
|
|
75
|
+
laneObserver ??= new ResizeObserver(() => {
|
|
76
|
+
for (const lane of lanes) {
|
|
77
|
+
if (!lane.isConnected) {
|
|
78
|
+
laneObserver.unobserve(lane);
|
|
79
|
+
lanes.delete(lane);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
lane.toggleAttribute("data-scrollable", lane.scrollWidth > lane.clientWidth);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
laneObserver.observe(lane);
|
|
86
|
+
}
|
|
87
|
+
function wrapResponseTables(root) {
|
|
88
|
+
for (const table of root.querySelectorAll("table")) {
|
|
89
|
+
if (table.parentElement?.hasAttribute("data-table-scroll")) continue;
|
|
90
|
+
const lane = document.createElement("div");
|
|
91
|
+
lane.setAttribute("data-table-scroll", "");
|
|
92
|
+
table.replaceWith(lane);
|
|
93
|
+
lane.append(table);
|
|
94
|
+
}
|
|
95
|
+
for (const lane of root.querySelectorAll("[data-table-scroll]")) {
|
|
96
|
+
lane.toggleAttribute("data-scrollable", lane.scrollWidth > lane.clientWidth);
|
|
97
|
+
watchLane(lane);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/ai-response/index.tsx
|
|
102
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div>`);
|
|
103
|
+
/** Markdown set on the paper. Rendering goes through
|
|
104
|
+
* `@tanstack/markdown`, whose defaults leave raw HTML and executable
|
|
105
|
+
* links inert — streaming-safe by construction. */
|
|
106
|
+
function Response(props) {
|
|
107
|
+
injectComponentStyle("ai");
|
|
108
|
+
const [own, rest] = splitProps(props, [
|
|
109
|
+
"content",
|
|
110
|
+
"highlighter",
|
|
111
|
+
"copyLabel",
|
|
112
|
+
"copiedLabel"
|
|
113
|
+
]);
|
|
114
|
+
const html = createMemo(() => renderHtml(own.content, own.highlighter ? { highlighter: own.highlighter } : void 0));
|
|
115
|
+
let root;
|
|
116
|
+
onMount(() => createEffect(() => {
|
|
117
|
+
html();
|
|
118
|
+
if (root) decorateCodeCopy(root, own.copyLabel ?? "Copy code");
|
|
119
|
+
if (root) wrapResponseTables(root);
|
|
120
|
+
}));
|
|
121
|
+
const onClick = (event) => {
|
|
122
|
+
clickCodeCopy(event, own.copyLabel ?? "Copy code", own.copiedLabel ?? "Copied");
|
|
123
|
+
};
|
|
124
|
+
return (() => {
|
|
125
|
+
var _el$ = _tmpl$();
|
|
126
|
+
use((el) => root = el, _el$);
|
|
127
|
+
spread(_el$, mergeProps(rest, {
|
|
128
|
+
"data-scope": "ai",
|
|
129
|
+
"data-part": "response",
|
|
130
|
+
"onClick": onClick,
|
|
131
|
+
get innerHTML() {
|
|
132
|
+
return html();
|
|
133
|
+
}
|
|
134
|
+
}), false, false);
|
|
135
|
+
return _el$;
|
|
136
|
+
})();
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { Response as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { template } from "solid-js/web";
|
|
2
|
+
//#region src/components/ai/chevron.tsx
|
|
3
|
+
var _tmpl$ = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"fill=none aria-hidden=true><path d="M6 4l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`);
|
|
4
|
+
/** The folding chevron the shared indicator turns. */
|
|
5
|
+
function chevron() {
|
|
6
|
+
return _tmpl$();
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { chevron as t };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Accordion as Accordion$1 } from "@ark-ui/solid/accordion";
|
|
2
|
+
//#region src/components/accordion/index.d.ts
|
|
3
|
+
/** Ark's Accordion, dressed in the paper-and-ink system: a ruled sheet
|
|
4
|
+
* folded by quiet rows, unfolding with a spring-chevoned dissolve. The
|
|
5
|
+
* API is Ark's own — Root, Item, ItemTrigger, ItemContent, ItemIndicator. */
|
|
6
|
+
export declare const Accordion: typeof Accordion$1;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Accordion as Accordion$1 } from "@ark-ui/solid/accordion";
|
|
3
|
+
//#region src/components/accordion/index.ts
|
|
4
|
+
/** Ark's Accordion, dressed in the paper-and-ink system: a ruled sheet
|
|
5
|
+
* folded by quiet rows, unfolding with a spring-chevoned dissolve. The
|
|
6
|
+
* API is Ark's own — Root, Item, ItemTrigger, ItemContent, ItemIndicator. */
|
|
7
|
+
const Accordion = Accordion$1;
|
|
8
|
+
injectComponentStyle("accordion");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Accordion };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/affix/index.d.ts
|
|
3
|
+
export interface AffixProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Where the content pins when it reaches the top of the scrolling
|
|
5
|
+
* ancestor — the height of any fixed header it must clear. */
|
|
6
|
+
offsetTop?: string;
|
|
7
|
+
/** Where it pins from the bottom instead, for footers and action bars. */
|
|
8
|
+
offsetBottom?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A nail: the wrapped content travels with the page until it reaches its
|
|
12
|
+
* offset, then stays put while the page moves on. The semantics are
|
|
13
|
+
* plain `position: sticky` — pinning is relative to the nearest
|
|
14
|
+
* *scrolling* ancestor, so the element works inside a scrollable panel
|
|
15
|
+
* exactly as it does on the page itself, and a parent with
|
|
16
|
+
* `overflow: hidden` clips the pin. Both offsets may be given: the
|
|
17
|
+
* content then holds its place inside that band.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Affix(props: AffixProps): JSX.Element;
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/affix/index.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div>`);
|
|
6
|
+
/**
|
|
7
|
+
* A nail: the wrapped content travels with the page until it reaches its
|
|
8
|
+
* offset, then stays put while the page moves on. The semantics are
|
|
9
|
+
* plain `position: sticky` — pinning is relative to the nearest
|
|
10
|
+
* *scrolling* ancestor, so the element works inside a scrollable panel
|
|
11
|
+
* exactly as it does on the page itself, and a parent with
|
|
12
|
+
* `overflow: hidden` clips the pin. Both offsets may be given: the
|
|
13
|
+
* content then holds its place inside that band.
|
|
14
|
+
*/
|
|
15
|
+
function Affix(props) {
|
|
16
|
+
injectComponentStyle("affix");
|
|
17
|
+
const [own, rest] = splitProps(props, ["offsetTop", "offsetBottom"]);
|
|
18
|
+
return (() => {
|
|
19
|
+
var _el$ = _tmpl$();
|
|
20
|
+
spread(_el$, mergeProps(rest, {
|
|
21
|
+
get style() {
|
|
22
|
+
return {
|
|
23
|
+
...rest.style,
|
|
24
|
+
top: own.offsetTop ?? "0px",
|
|
25
|
+
bottom: own.offsetBottom ?? "0px"
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
"data-scope": "affix",
|
|
29
|
+
"data-part": "root"
|
|
30
|
+
}), false, false);
|
|
31
|
+
return _el$;
|
|
32
|
+
})();
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Affix };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as AiLoader, c as ReasoningUIPart, d as StepStartUIPart, f as TextUIPart, h as UIMessagePart, i as AiConversation, l as SourceDocumentUIPart, m as UIMessage, n as AiActions, o as DataUIPart, p as ToolUIPart, r as AiContent, s as FileUIPart, t as Ai, u as SourceUrlUIPart } from "../../index-B4XS2n2y.mjs";
|
|
2
|
+
export { Ai, AiActions, AiContent, AiConversation, AiLoader, type DataUIPart, type FileUIPart, type ReasoningUIPart, type SourceDocumentUIPart, type SourceUrlUIPart, type StepStartUIPart, type TextUIPart, type ToolUIPart, type UIMessage, type UIMessagePart };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Action } from "../ai-action/index.mjs";
|
|
2
|
+
import { AiMessage as Message } from "../ai-message/index.mjs";
|
|
3
|
+
import { AiPromptInput as PromptInput } from "../ai-prompt-input/index.mjs";
|
|
4
|
+
import { AiReasoning as Reasoning } from "../ai-reasoning/index.mjs";
|
|
5
|
+
import { t as Response } from "../../ai-response-B_586r27.mjs";
|
|
6
|
+
import { AiSource as Source, AiSources as Sources } from "../ai-source/index.mjs";
|
|
7
|
+
import { AiSuggestion as Suggestion } from "../ai-suggestion/index.mjs";
|
|
8
|
+
import { AiTool as Tool } from "../ai-tool/index.mjs";
|
|
9
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
10
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
11
|
+
//#region src/components/ai/index.tsx
|
|
12
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div>`);
|
|
13
|
+
/** A conversation column: Root is the log, Message carries a role, and
|
|
14
|
+
* the speaking parts — Response, Reasoning, Tool, Sources — part the
|
|
15
|
+
* stream. The interactive folds are the shared Collapsible wearing a
|
|
16
|
+
* `data-ai` marker, so the machine work is never ours. Parts stay
|
|
17
|
+
* agnostic of any client; consumers map their message format (e.g. the
|
|
18
|
+
* `UIMessage` parts re-exported here) onto these primitives. */
|
|
19
|
+
function part(name, extra = {}) {
|
|
20
|
+
function Component(props) {
|
|
21
|
+
return (() => {
|
|
22
|
+
var _el$ = _tmpl$();
|
|
23
|
+
spread(_el$, mergeProps(extra, props, {
|
|
24
|
+
"data-scope": "ai",
|
|
25
|
+
get ["data-part"]() {
|
|
26
|
+
return name.toLowerCase();
|
|
27
|
+
}
|
|
28
|
+
}), false, false);
|
|
29
|
+
return _el$;
|
|
30
|
+
})();
|
|
31
|
+
}
|
|
32
|
+
return Component;
|
|
33
|
+
}
|
|
34
|
+
/** The log itself: the column every stroke lands in, a landmark to
|
|
35
|
+
* screen readers. */
|
|
36
|
+
const AiConversation = part("Conversation", {
|
|
37
|
+
role: "log",
|
|
38
|
+
"aria-label": "Conversation"
|
|
39
|
+
});
|
|
40
|
+
/** The bubble's inner measure — content that belongs to neither side
|
|
41
|
+
* specifically. */
|
|
42
|
+
const AiContent = part("Content");
|
|
43
|
+
/** The quiet row under a message — copy, retry, feedback. */
|
|
44
|
+
const AiActions = part("Actions");
|
|
45
|
+
/** The while-it-works whisper for the in-flight turns. */
|
|
46
|
+
const AiLoader = part("Loader", {
|
|
47
|
+
role: "status",
|
|
48
|
+
"aria-label": "Loading"
|
|
49
|
+
});
|
|
50
|
+
/** The whole family under one handle — `Ai.Conversation`,
|
|
51
|
+
* `Ai.MessageContent`, and the rest. */
|
|
52
|
+
const Ai = Object.assign(AiConversation, {
|
|
53
|
+
Conversation: AiConversation,
|
|
54
|
+
MessageContent: AiContent,
|
|
55
|
+
Actions: AiActions,
|
|
56
|
+
Loader: AiLoader,
|
|
57
|
+
Message,
|
|
58
|
+
Response,
|
|
59
|
+
Reasoning,
|
|
60
|
+
Tool,
|
|
61
|
+
Sources,
|
|
62
|
+
Source,
|
|
63
|
+
Action,
|
|
64
|
+
Suggestion,
|
|
65
|
+
PromptInput
|
|
66
|
+
});
|
|
67
|
+
injectComponentStyle("ai");
|
|
68
|
+
//#endregion
|
|
69
|
+
export { Ai, AiActions, AiContent, AiConversation, AiLoader };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/ai-action/index.d.ts
|
|
3
|
+
export interface ActionProps extends JSX.HTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** What the button does, spoken to assistive tech and shown as
|
|
5
|
+
* the hover title — copy, retry, thumbs. */
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
/** A quiet icon button — copy, retry, thumbs. The label names it to
|
|
9
|
+
* assistive tech and as the hover title. The control itself is the
|
|
10
|
+
* shared Button in its ghost register. */
|
|
11
|
+
export declare function Action(props: ActionProps): JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Action as AiAction };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
4
|
+
import { splitProps } from "solid-js";
|
|
5
|
+
//#region src/components/ai-action/index.tsx
|
|
6
|
+
/** A quiet icon button — copy, retry, thumbs. The label names it to
|
|
7
|
+
* assistive tech and as the hover title. The control itself is the
|
|
8
|
+
* shared Button in its ghost register. */
|
|
9
|
+
function Action(props) {
|
|
10
|
+
injectComponentStyle("ai");
|
|
11
|
+
const [own, rest] = splitProps(props, ["label", "children"]);
|
|
12
|
+
return createComponent(Button, mergeProps({
|
|
13
|
+
variant: "ghost",
|
|
14
|
+
size: "sm",
|
|
15
|
+
square: true,
|
|
16
|
+
get ["aria-label"]() {
|
|
17
|
+
return own.label;
|
|
18
|
+
},
|
|
19
|
+
get title() {
|
|
20
|
+
return own.label;
|
|
21
|
+
}
|
|
22
|
+
}, rest, { get children() {
|
|
23
|
+
return own.children;
|
|
24
|
+
} }));
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Action, Action as AiAction };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/ai-attachments/index.d.ts
|
|
3
|
+
export type AttachmentStatus = "uploading" | "ready" | "error";
|
|
4
|
+
export interface AttachmentProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
/** The file's name — it picks the glyph by extension. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** The file's size in bytes, when known — rendered human. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** The upload's state on the wire. */
|
|
10
|
+
status?: AttachmentStatus;
|
|
11
|
+
onRemove?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** One file riding the prompt: its glyph by extension, its name and
|
|
14
|
+
* human size, and a quiet way to take it back off. Uploading reads as
|
|
15
|
+
* a dashed ghost, error as danger ink. */
|
|
16
|
+
export declare function Attachment(props: AttachmentProps): JSX.Element;
|
|
17
|
+
/** The row the files ride in — a wrapping line of chips. */
|
|
18
|
+
export declare function Attachments(props: JSX.HTMLAttributes<HTMLSpanElement>): JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Attachment as AiAttachment, Attachments as AiAttachments };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { delegateEvents, effect, insert, memo, mergeProps, setAttribute, spread, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/ai-attachments/index.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><rect x=2.5 y=3.5 width=11 height=9></rect><path d="M2.5 10.5 6 7l3 3 2-1.5 2.5 2"></path><circle cx=6 cy=6 r=0.75 fill=currentColor stroke=none>`);
|
|
6
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><path d="M4 2.5h5l3 3V13.5H4z"></path><path d="M9 2.5v3h3">`);
|
|
7
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"width=12 height=12 aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><path d="M4 4l8 8M12 4l-8 8">`);
|
|
8
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<span><span></span><button type=button data-remove>`);
|
|
9
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<span>`);
|
|
10
|
+
function imageGlyph() {
|
|
11
|
+
return _tmpl$();
|
|
12
|
+
}
|
|
13
|
+
function fileGlyph() {
|
|
14
|
+
return _tmpl$2();
|
|
15
|
+
}
|
|
16
|
+
function removeGlyph() {
|
|
17
|
+
return _tmpl$3();
|
|
18
|
+
}
|
|
19
|
+
const IMAGE_EXTS = [
|
|
20
|
+
"png",
|
|
21
|
+
"jpg",
|
|
22
|
+
"jpeg",
|
|
23
|
+
"gif",
|
|
24
|
+
"webp",
|
|
25
|
+
"svg",
|
|
26
|
+
"avif",
|
|
27
|
+
"bmp",
|
|
28
|
+
"ico"
|
|
29
|
+
];
|
|
30
|
+
const isImage = (name) => IMAGE_EXTS.includes(name.split(".").pop()?.toLowerCase() ?? "");
|
|
31
|
+
const humanSize = (bytes) => {
|
|
32
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
33
|
+
const units = [
|
|
34
|
+
"KB",
|
|
35
|
+
"MB",
|
|
36
|
+
"GB"
|
|
37
|
+
];
|
|
38
|
+
let value = bytes;
|
|
39
|
+
let unit = -1;
|
|
40
|
+
do {
|
|
41
|
+
value /= 1024;
|
|
42
|
+
unit += 1;
|
|
43
|
+
} while (value >= 1024 && unit < units.length - 1);
|
|
44
|
+
return `${value.toFixed(1)} ${units[unit]}`;
|
|
45
|
+
};
|
|
46
|
+
/** One file riding the prompt: its glyph by extension, its name and
|
|
47
|
+
* human size, and a quiet way to take it back off. Uploading reads as
|
|
48
|
+
* a dashed ghost, error as danger ink. */
|
|
49
|
+
function Attachment(props) {
|
|
50
|
+
injectComponentStyle("ai");
|
|
51
|
+
const [own, rest] = splitProps(props, [
|
|
52
|
+
"name",
|
|
53
|
+
"size",
|
|
54
|
+
"status",
|
|
55
|
+
"onRemove"
|
|
56
|
+
]);
|
|
57
|
+
return (() => {
|
|
58
|
+
var _el$4 = _tmpl$4(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
|
|
59
|
+
spread(_el$4, mergeProps(rest, {
|
|
60
|
+
"data-scope": "ai",
|
|
61
|
+
"data-part": "attachment",
|
|
62
|
+
get ["data-status"]() {
|
|
63
|
+
return own.status ?? "ready";
|
|
64
|
+
}
|
|
65
|
+
}), false, true);
|
|
66
|
+
insert(_el$4, (() => {
|
|
67
|
+
var _c$ = memo(() => !!isImage(own.name));
|
|
68
|
+
return () => _c$() ? imageGlyph() : fileGlyph();
|
|
69
|
+
})(), _el$5);
|
|
70
|
+
insert(_el$5, () => own.name);
|
|
71
|
+
insert(_el$4, (() => {
|
|
72
|
+
var _c$2 = memo(() => own.size !== void 0);
|
|
73
|
+
return () => _c$2() ? (() => {
|
|
74
|
+
var _el$7 = _tmpl$5();
|
|
75
|
+
insert(_el$7, () => humanSize(own.size));
|
|
76
|
+
return _el$7;
|
|
77
|
+
})() : null;
|
|
78
|
+
})(), _el$6);
|
|
79
|
+
_el$6.$$click = () => own.onRemove?.();
|
|
80
|
+
insert(_el$6, removeGlyph);
|
|
81
|
+
effect(() => setAttribute(_el$6, "aria-label", `Remove ${own.name}`));
|
|
82
|
+
return _el$4;
|
|
83
|
+
})();
|
|
84
|
+
}
|
|
85
|
+
/** The row the files ride in — a wrapping line of chips. */
|
|
86
|
+
function Attachments(props) {
|
|
87
|
+
return (() => {
|
|
88
|
+
var _el$8 = _tmpl$5();
|
|
89
|
+
spread(_el$8, mergeProps(props, {
|
|
90
|
+
"data-scope": "ai",
|
|
91
|
+
"data-part": "attachments"
|
|
92
|
+
}), false, false);
|
|
93
|
+
return _el$8;
|
|
94
|
+
})();
|
|
95
|
+
}
|
|
96
|
+
delegateEvents(["click"]);
|
|
97
|
+
//#endregion
|
|
98
|
+
export { Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/ai-message/index.d.ts
|
|
3
|
+
export type MessageRole = "user" | "assistant" | "system";
|
|
4
|
+
export interface MessageProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "role"> {
|
|
5
|
+
/** Whose stroke this is — the user's words sit in a recessed
|
|
6
|
+
* bubble, the assistant speaks flat on the paper. */
|
|
7
|
+
role?: MessageRole;
|
|
8
|
+
}
|
|
9
|
+
/** Whose stroke this is — the user's words sit in a recessed bubble,
|
|
10
|
+
* the assistant speaks flat on the paper. */
|
|
11
|
+
export declare function Message(props: MessageProps): JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Message as AiMessage };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/ai-message/index.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<article>`);
|
|
6
|
+
/** Whose stroke this is — the user's words sit in a recessed bubble,
|
|
7
|
+
* the assistant speaks flat on the paper. */
|
|
8
|
+
function Message(props) {
|
|
9
|
+
injectComponentStyle("ai");
|
|
10
|
+
const [own, rest] = splitProps(props, ["role"]);
|
|
11
|
+
return (() => {
|
|
12
|
+
var _el$ = _tmpl$();
|
|
13
|
+
spread(_el$, mergeProps(rest, {
|
|
14
|
+
"data-scope": "ai",
|
|
15
|
+
"data-part": "message",
|
|
16
|
+
get ["data-role"]() {
|
|
17
|
+
return own.role ?? "assistant";
|
|
18
|
+
}
|
|
19
|
+
}), false, false);
|
|
20
|
+
return _el$;
|
|
21
|
+
})();
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Message as AiMessage, Message };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/ai-prompt-input/index.d.ts
|
|
3
|
+
export interface PromptInputProps extends Omit<JSX.HTMLAttributes<HTMLFormElement>, "onSubmit" | "value"> {
|
|
4
|
+
/** The draft in the vessel — bind `value`; it clears itself on
|
|
5
|
+
* a successful submit. */
|
|
6
|
+
value?: string;
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
onSubmit?: (value: string) => void;
|
|
9
|
+
onStop?: () => void;
|
|
10
|
+
/** The quiet invitation before the reader types. */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Still the words on the canvas, but the submit seal does
|
|
13
|
+
* nothing and Enter stays a line break. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The machine is working — the seal becomes a stop seal and
|
|
16
|
+
* Enter holds its breath. */
|
|
17
|
+
busy?: boolean;
|
|
18
|
+
/** Attachments riding above the text. */
|
|
19
|
+
header?: JSX.Element;
|
|
20
|
+
/** The tools at the text's left. */
|
|
21
|
+
leading?: JSX.Element;
|
|
22
|
+
/** The row at the text's right — the send seal falls there by
|
|
23
|
+
* default. */
|
|
24
|
+
trailing?: JSX.Element;
|
|
25
|
+
/** The tools beneath the text. */
|
|
26
|
+
footer?: JSX.Element;
|
|
27
|
+
/** The controls that close the footer row — the seal falls there
|
|
28
|
+
* when a footer exists. */
|
|
29
|
+
footerEnd?: JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
/** The prompt vessel: the shared field textarea — self-growing on the
|
|
32
|
+
* machine's autoresize — with the submit seal riding its last line.
|
|
33
|
+
* Around the body, the slot props answer the composer's anatomy:
|
|
34
|
+
* `header` for attachments riding above, `leading` for the tools at
|
|
35
|
+
* the text's left, `trailing` for the seal itself, `footer` for the
|
|
36
|
+
* tools beneath, and `footerEnd` for the controls that close the
|
|
37
|
+
* footer row — the seal falls there by default, so a model picker
|
|
38
|
+
* dropped in rides the send's shoulder. An empty slot renders no part,
|
|
39
|
+
* so the bare vessel stays one quiet line. Controlled — bind `value`
|
|
40
|
+
* and take the text on `onSubmit`. Enter sends; Shift+Enter breaks the
|
|
41
|
+
* line. While `busy` the seal becomes a stop seal and Enter holds its
|
|
42
|
+
* breath. */
|
|
43
|
+
export declare function PromptInput(props: PromptInputProps): JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { PromptInput as AiPromptInput };
|