@pstdio/ui 0.40.0 → 0.41.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/{MermaidComponent-81jr28u4.js → MermaidComponent-BCiI63_G.js} +3 -3
- package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-BCiI63_G.js.map} +1 -1
- package/dist/chat-question-bubble-w2vMbFsS.js +68 -0
- package/dist/chat-question-bubble-w2vMbFsS.js.map +1 -0
- package/dist/chat-ui.d.ts +96 -21
- package/dist/chat-ui.js +2091 -1441
- package/dist/chat-ui.js.map +1 -1
- package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-EiTEONdY.js} +2 -2
- package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-EiTEONdY.js.map} +1 -1
- package/dist/data-table.d.ts +27 -7
- package/dist/data-table.js +1035 -872
- package/dist/data-table.js.map +1 -1
- package/dist/diff-bubble-DewUd_2w.js +61 -0
- package/dist/diff-bubble-DewUd_2w.js.map +1 -0
- package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-BwZBOObe.js} +106 -85
- package/dist/diff-drawer-BwZBOObe.js.map +1 -0
- package/dist/diff-viewer-kOOd7C7h.js +574 -0
- package/dist/diff-viewer-kOOd7C7h.js.map +1 -0
- package/dist/diff.d.ts +11 -0
- package/dist/diff.js +107 -98
- package/dist/diff.js.map +1 -1
- package/dist/display-sort-control-DPxc0e5z.js +587 -0
- package/dist/display-sort-control-DPxc0e5z.js.map +1 -0
- package/dist/{workspace-badge-Brm3Xr3m.d.ts → host-storage-DP0RLj4i.d.ts} +15 -1
- package/dist/{index-Bfddrlz8.d.ts → index-C9mywhyX.d.ts} +50 -14
- package/dist/index-D3UJyWWh.d.ts +501 -0
- package/dist/{index-CbtbcvKm.d.ts → index-DlmvvQ6x.d.ts} +1 -1
- package/dist/index.d.ts +44 -19
- package/dist/index.js +941 -908
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -326
- package/dist/kanban-renderer.js +991 -610
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-DM0DiIrN.js +1167 -0
- package/dist/list-row-DM0DiIrN.js.map +1 -0
- package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
- package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
- package/dist/mermaid.js +1 -1
- package/dist/param-editor.js +2 -3
- package/dist/prism-JVIsQMoJ.js +1029 -0
- package/dist/prism-JVIsQMoJ.js.map +1 -0
- package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
- package/dist/rich-text-DM24VNQZ.js +10447 -0
- package/dist/rich-text-DM24VNQZ.js.map +1 -0
- package/dist/rich-text.d.ts +2 -2
- package/dist/rich-text.js +2 -2
- package/dist/style.css +1 -1
- package/dist/terminal.d.ts +5 -63
- package/dist/terminal.js +102 -122
- package/dist/terminal.js.map +1 -1
- package/dist/{theme-CbmSEbRF.js → theme-at0rtSnX.js} +435 -245
- package/dist/theme-at0rtSnX.js.map +1 -0
- package/dist/theme-kKuLN2jb.js +80 -0
- package/dist/theme-kKuLN2jb.js.map +1 -0
- package/dist/theme-preference-BV4cbJNB.js +115 -0
- package/dist/theme-preference-BV4cbJNB.js.map +1 -0
- package/dist/theme.js +3 -2
- package/dist/{tree-list-BNZwjQZA.js → tree-list-Cqgl8mnN.js} +255 -250
- package/dist/tree-list-Cqgl8mnN.js.map +1 -0
- package/package.json +4 -4
- package/dist/diff-bubble-DZsarmSG.js +0 -61
- package/dist/diff-bubble-DZsarmSG.js.map +0 -1
- package/dist/diff-drawer-45rpk3aq.js.map +0 -1
- package/dist/diff-viewer-BP_mI6Wx.js +0 -558
- package/dist/diff-viewer-BP_mI6Wx.js.map +0 -1
- package/dist/list-row-uqD-q4gv.js +0 -1018
- package/dist/list-row-uqD-q4gv.js.map +0 -1
- package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
- package/dist/param-editor-BQd4AOUP.js +0 -225
- package/dist/param-editor-BQd4AOUP.js.map +0 -1
- package/dist/param-editor-field-BJ_rLUnV.js +0 -2385
- package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
- package/dist/prism-BStPsJSB.js +0 -658
- package/dist/prism-BStPsJSB.js.map +0 -1
- package/dist/rich-text-VYAmEigU.js +0 -6979
- package/dist/rich-text-VYAmEigU.js.map +0 -1
- package/dist/slider-hwHYe98I.js +0 -423
- package/dist/slider-hwHYe98I.js.map +0 -1
- package/dist/theme-CbmSEbRF.js.map +0 -1
- package/dist/theme-preference-pzfuK5cH.js +0 -101
- package/dist/theme-preference-pzfuK5cH.js.map +0 -1
- package/dist/tree-list-BNZwjQZA.js.map +0 -1
- package/dist/types-DWA3enV6.d.ts +0 -182
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as e } from "./rich-text-
|
|
2
|
-
import { t } from "./mermaid-renderer-
|
|
1
|
+
import { f as e } from "./rich-text-DM24VNQZ.js";
|
|
2
|
+
import { t } from "./mermaid-renderer-0PmNkOXI.js";
|
|
3
3
|
import { Box as n, Button as r, Flex as i, Textarea as a } from "@chakra-ui/react";
|
|
4
4
|
import { c as o } from "react/compiler-runtime";
|
|
5
5
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -87,4 +87,4 @@ function m(m) {
|
|
|
87
87
|
//#endregion
|
|
88
88
|
export { m as default };
|
|
89
89
|
|
|
90
|
-
//# sourceMappingURL=MermaidComponent-
|
|
90
|
+
//# sourceMappingURL=MermaidComponent-BCiI63_G.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidComponent-
|
|
1
|
+
{"version":3,"file":"MermaidComponent-BCiI63_G.js","names":["Box","Button","Flex","Textarea","useLexicalComposerContext","useLexicalEditable","$getNodeByKey","useEffect","useState","MermaidRenderer","$isMermaidNode","MermaidComponentProps","code","nodeKey","MermaidComponent","props","$","_c","editor","isEditable","isEditing","setIsEditing","draftCode","setDraftCode","previewCode","setPreviewCode","t0","t1","t2","update","node","setCode","commitCodeChanges","t3","cancelEditing","t4","undefined","t5","t6","t7","Symbol","for","event","target","value","t8","t9","_c","$isMermaidNode","MermaidComponent","$","c","props","editor","useLexicalComposerContext","isEditable","useLexicalEditable","isEditing","setIsEditing","useState","draftCode","setDraftCode","code","previewCode","setPreviewCode","t0","t1","useEffect","t2","nodeKey","node","$getNodeByKey","commitCodeChanges","t3","cancelEditing","t4","t5","MermaidRenderer","Button","t6","Flex","t7","event","t8","Box","Textarea","t9"],"sources":["../src/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.tsx"],"sourcesContent":["import { Box, Button, Flex, Textarea } from \"@chakra-ui/react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useLexicalEditable } from \"@lexical/react/useLexicalEditable\";\nimport { $getNodeByKey } from \"lexical\";\nimport { useEffect, useState } from \"react\";\nimport { MermaidRenderer } from \"@/components/mermaid-renderer\";\nimport { $isMermaidNode } from \"./MermaidNode\";\n\ninterface MermaidComponentProps {\n code: string;\n nodeKey: string;\n}\n\nexport default function MermaidComponent(props: MermaidComponentProps) {\n const { code, nodeKey } = props;\n const [editor] = useLexicalComposerContext();\n const isEditable = useLexicalEditable();\n const [isEditing, setIsEditing] = useState(false);\n const [draftCode, setDraftCode] = useState(code);\n const [previewCode, setPreviewCode] = useState(code);\n\n useEffect(() => {\n setDraftCode(code);\n setPreviewCode(code);\n }, [code]);\n\n const commitCodeChanges = () => {\n editor.update(() => {\n const node = $getNodeByKey(nodeKey);\n if ($isMermaidNode(node)) {\n node.setCode(draftCode);\n }\n });\n\n setPreviewCode(draftCode);\n setIsEditing(false);\n };\n\n const cancelEditing = () => {\n setDraftCode(previewCode);\n setIsEditing(false);\n };\n\n if (!isEditing) {\n return (\n <MermaidRenderer\n key={previewCode}\n code={previewCode}\n isEditable={isEditable}\n onRequestEdit={isEditable ? () => setIsEditing(true) : undefined}\n />\n );\n }\n\n return (\n <Box borderWidth=\"1px\" borderColor=\"border.subtle\" borderRadius=\"md\" overflow=\"hidden\" width=\"100%\">\n <Flex justifyContent=\"flex-end\" alignItems=\"center\" gap=\"xs\" paddingX=\"sm\" paddingY=\"xs\" bg=\"bg.muted\">\n <Button size=\"xs\" variant=\"subtle\" onClick={cancelEditing}>\n Cancel\n </Button>\n <Button size=\"xs\" onClick={commitCodeChanges}>\n Preview\n </Button>\n </Flex>\n <Box padding=\"sm\" bg=\"bg.muted\">\n <Textarea\n value={draftCode}\n onChange={(event) => setDraftCode(event.target.value)}\n minHeight=\"180px\"\n resize=\"vertical\"\n fontFamily=\"mono\"\n fontSize=\"sm\"\n spellCheck={false}\n />\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;AAaA,SAAec,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GACb,EAAAL,SAAAC,eAA0BE,GAC1B,CAAAG,KAAiBd,EAA0B,GAC3Ce,IAAmBd,EAAmB,GACtC,CAAAe,GAAAC,KAAkCb,EAAS,EAAK,GAChD,CAAAc,GAAAC,KAAkCf,EAASI,CAAI,GAC/C,CAAAY,GAAAC,KAAsCjB,EAASI,CAAI,GAAEc,GAAAC;CAErDpB,AAFqDS,EAAA,OAAAJ,KAK5Cc,IAAAV,EAAA,IAAAW,IAAAX,EAAA,OAHCU,UAAA;EAERD,AADAF,EAAaX,CAAI,GACjBa,EAAeb,CAAI;CAAC,GACnBe,IAAA,CAACf,CAAI,GAACI,EAAA,KAAAJ,GAAAI,EAAA,KAAAU,GAAAV,EAAA,KAAAW,IAHTpB,EAAUmB,GAGPC,CAAM;CAAC,IAAAC;CAAA,AAAAZ,EAAA,OAAAM,KAAAN,EAAA,OAAAE,KAAAF,EAAA,OAAAH,KAEgBe,UAAA;EASxBP,AARAH,EAAMW,aAAQ;GACZ,IAAAC,IAAaxB,EAAcO,CAAO;GAClC,AAAIH,EAAeoB,CAAI,KACrBA,EAAIC,QAAST,CA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|
+
flexWrap: "wrap",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
gap: "xs",
|
|
9
|
+
px: "sm",
|
|
10
|
+
py: "xs",
|
|
11
|
+
width: "fit-content",
|
|
12
|
+
maxWidth: "full",
|
|
13
|
+
textAlign: "left",
|
|
14
|
+
textStyle: "label/S/regular",
|
|
15
|
+
borderRadius: "xs",
|
|
16
|
+
border: "border",
|
|
17
|
+
borderColor: "border",
|
|
18
|
+
color: "fg",
|
|
19
|
+
bg: "bg.subtle",
|
|
20
|
+
cursor: "pointer",
|
|
21
|
+
_hover: { bg: "bg.hover" },
|
|
22
|
+
_expanded: {
|
|
23
|
+
bg: "bg.active",
|
|
24
|
+
borderColor: "border.accent"
|
|
25
|
+
},
|
|
26
|
+
_focusVisible: {
|
|
27
|
+
outline: "2px solid {colors.border.accent}",
|
|
28
|
+
outlineOffset: "2px"
|
|
29
|
+
},
|
|
30
|
+
"& [data-question-text]": {
|
|
31
|
+
minWidth: "0",
|
|
32
|
+
maxWidth: "full",
|
|
33
|
+
whiteSpace: "pre-wrap",
|
|
34
|
+
overflowWrap: "anywhere"
|
|
35
|
+
},
|
|
36
|
+
"& [data-question-answer-row]": {
|
|
37
|
+
display: "flex",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
gap: "xs",
|
|
40
|
+
maxWidth: "full"
|
|
41
|
+
},
|
|
42
|
+
"& [data-question-answer]": {
|
|
43
|
+
color: "fg.muted",
|
|
44
|
+
fontWeight: "medium",
|
|
45
|
+
overflowWrap: "anywhere",
|
|
46
|
+
minWidth: "0"
|
|
47
|
+
},
|
|
48
|
+
"& svg": {
|
|
49
|
+
width: "3",
|
|
50
|
+
height: "3",
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
color: "fg.muted"
|
|
53
|
+
},
|
|
54
|
+
"&[data-state=answered]": {
|
|
55
|
+
cursor: "default",
|
|
56
|
+
_hover: { bg: "bg.subtle" },
|
|
57
|
+
"& [data-question-answer]": { color: "fg" }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
variants: { multiline: { true: {
|
|
61
|
+
flexDirection: "column",
|
|
62
|
+
alignItems: "start"
|
|
63
|
+
} } }
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { t };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=chat-question-bubble-w2vMbFsS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-question-bubble-w2vMbFsS.js","names":["defineRecipe","chatQuestionBubbleRecipe","base","display","flexWrap","alignItems","gap","px","py","width","maxWidth","textAlign","textStyle","borderRadius","border","borderColor","color","bg","cursor","_hover","_expanded","_focusVisible","outline","outlineOffset","minWidth","whiteSpace","overflowWrap","fontWeight","height","flexShrink","variants","multiline","true","flexDirection","chatQuestionBubbleRecipe","defineRecipe"],"sources":["../src/theme/recipes/chat-question-bubble.ts"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const chatQuestionBubbleRecipe = defineRecipe({\n base: {\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \"xs\",\n px: \"sm\",\n py: \"xs\",\n width: \"fit-content\",\n maxWidth: \"full\",\n textAlign: \"left\",\n textStyle: \"label/S/regular\",\n borderRadius: \"xs\",\n border: \"border\",\n borderColor: \"border\",\n color: \"fg\",\n bg: \"bg.subtle\",\n cursor: \"pointer\",\n _hover: { bg: \"bg.hover\" },\n _expanded: { bg: \"bg.active\", borderColor: \"border.accent\" },\n _focusVisible: { outline: \"2px solid {colors.border.accent}\", outlineOffset: \"2px\" },\n \"& [data-question-text]\": { minWidth: \"0\", maxWidth: \"full\", whiteSpace: \"pre-wrap\", overflowWrap: \"anywhere\" },\n \"& [data-question-answer-row]\": { display: \"flex\", alignItems: \"center\", gap: \"xs\", maxWidth: \"full\" },\n \"& [data-question-answer]\": { color: \"fg.muted\", fontWeight: \"medium\", overflowWrap: \"anywhere\", minWidth: \"0\" },\n \"& svg\": { width: \"3\", height: \"3\", flexShrink: 0, color: \"fg.muted\" },\n \"&[data-state=answered]\": {\n cursor: \"default\",\n _hover: { bg: \"bg.subtle\" },\n \"& [data-question-answer]\": { color: \"fg\" },\n },\n },\n variants: {\n multiline: {\n true: { flexDirection: \"column\", alignItems: \"start\" },\n },\n },\n});\n"],"mappings":";;AAEA,IAAaC,IAA2BD,EAAa;CACnDE,MAAM;EACJC,SAAS;EACTC,UAAU;EACVC,YAAY;EACZC,KAAK;EACLC,IAAI;EACJC,IAAI;EACJC,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,WAAW;EACXC,cAAc;EACdC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,QAAQ,EAAEF,IAAI,WAAW;EACzBG,WAAW;GAAEH,IAAI;GAAaF,aAAa;EAAgB;EAC3DM,eAAe;GAAEC,SAAS;GAAoCC,eAAe;EAAM;EACnF,0BAA0B;GAAEC,UAAU;GAAKd,UAAU;GAAQe,YAAY;GAAYC,cAAc;EAAW;EAC9G,gCAAgC;GAAEvB,SAAS;GAAQE,YAAY;GAAUC,KAAK;GAAMI,UAAU;EAAO;EACrG,4BAA4B;GAAEM,OAAO;GAAYW,YAAY;GAAUD,cAAc;GAAYF,UAAU;EAAI;EAC/G,SAAS;GAAEf,OAAO;GAAKmB,QAAQ;GAAKC,YAAY;GAAGb,OAAO;EAAW;EACrE,0BAA0B;GACxBE,QAAQ;GACRC,QAAQ,EAAEF,IAAI,YAAY;GAC1B,4BAA4B,EAAED,OAAO,KAAK;EAC5C;CACF;CACAc,UAAU,EACRC,WAAW,EACTC,MAAM;EAAEC,eAAe;EAAU5B,YAAY;CAAQ,EACvD,EACF;AACF,CAAC"}
|
package/dist/chat-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ResourceBadgeProps, r as ScrollArea$1 } from "./resource-badge-
|
|
2
|
-
import {
|
|
1
|
+
import { n as ResourceBadgeProps, r as ScrollArea$1 } from "./resource-badge-nOWPqxFU.js";
|
|
2
|
+
import { A as PromptCommand, d as ChatLinkCandidate, f as ChatLinkHandler, m as parseChatLink, p as ChatLinkProps } from "./index-C9mywhyX.js";
|
|
3
3
|
import { HTMLChakraProps, IconButtonProps, RecipeVariantProps } from "@chakra-ui/react";
|
|
4
4
|
import { StickToBottom } from "use-stick-to-bottom";
|
|
5
5
|
import { ReactNode } from "react";
|
|
@@ -13,16 +13,20 @@ export declare const ChatPrimitives: {
|
|
|
13
13
|
onChange?: import("react").ChangeEventHandler<HTMLDivElement, Element> | undefined;
|
|
14
14
|
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
15
15
|
onSubmit?: import("react").SubmitEventHandler<HTMLDivElement> | undefined;
|
|
16
|
-
|
|
16
|
+
is?: string | undefined | undefined;
|
|
17
|
+
resource?: string | undefined | undefined;
|
|
18
|
+
children: ((context: import("use-stick-to-bottom").StickToBottomContext) => import("react").ReactNode) | import("react").ReactNode;
|
|
19
|
+
id?: string | undefined | undefined;
|
|
20
|
+
slot?: string | undefined | undefined;
|
|
21
|
+
style?: import("react").CSSProperties | undefined;
|
|
22
|
+
title?: string | undefined | undefined;
|
|
17
23
|
color?: string | undefined | undefined;
|
|
24
|
+
content?: string | undefined | undefined;
|
|
18
25
|
translate?: "yes" | "no" | undefined | undefined;
|
|
19
26
|
initial?: (import("use-stick-to-bottom").Animation | boolean) | undefined;
|
|
20
27
|
hidden?: boolean | undefined | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
slot?: string | undefined | undefined;
|
|
24
|
-
style?: import("react").CSSProperties | undefined;
|
|
25
|
-
title?: string | undefined | undefined;
|
|
28
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
29
|
+
role?: import("react").AriaRole | undefined;
|
|
26
30
|
defaultChecked?: boolean | undefined | undefined;
|
|
27
31
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
28
32
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -36,19 +40,17 @@ export declare const ChatPrimitives: {
|
|
|
36
40
|
dir?: string | undefined | undefined;
|
|
37
41
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
38
42
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
39
|
-
id?: string | undefined | undefined;
|
|
40
43
|
lang?: string | undefined | undefined;
|
|
41
44
|
nonce?: string | undefined | undefined;
|
|
42
45
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
43
46
|
tabIndex?: number | undefined | undefined;
|
|
44
|
-
|
|
47
|
+
radioGroup?: string | undefined | undefined;
|
|
45
48
|
about?: string | undefined | undefined;
|
|
46
49
|
datatype?: string | undefined | undefined;
|
|
47
50
|
inlist?: any;
|
|
48
51
|
prefix?: string | undefined | undefined;
|
|
49
52
|
property?: string | undefined | undefined;
|
|
50
53
|
rel?: string | undefined | undefined;
|
|
51
|
-
resource?: string | undefined | undefined;
|
|
52
54
|
rev?: string | undefined | undefined;
|
|
53
55
|
typeof?: string | undefined | undefined;
|
|
54
56
|
vocab?: string | undefined | undefined;
|
|
@@ -62,11 +64,11 @@ export declare const ChatPrimitives: {
|
|
|
62
64
|
results?: number | undefined | undefined;
|
|
63
65
|
security?: string | undefined | undefined;
|
|
64
66
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
67
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
65
68
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
66
69
|
popoverTarget?: string | undefined | undefined;
|
|
67
70
|
inert?: boolean | undefined | undefined;
|
|
68
71
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
69
|
-
is?: string | undefined | undefined;
|
|
70
72
|
exportparts?: string | undefined | undefined;
|
|
71
73
|
part?: string | undefined | undefined;
|
|
72
74
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
@@ -110,7 +112,6 @@ export declare const ChatPrimitives: {
|
|
|
110
112
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
111
113
|
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
112
114
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
113
|
-
"aria-roledescription"?: string | undefined | undefined;
|
|
114
115
|
"aria-rowcount"?: number | undefined | undefined;
|
|
115
116
|
"aria-rowindex"?: number | undefined | undefined;
|
|
116
117
|
"aria-rowindextext"?: string | undefined | undefined;
|
|
@@ -122,7 +123,6 @@ export declare const ChatPrimitives: {
|
|
|
122
123
|
"aria-valuemin"?: number | undefined | undefined;
|
|
123
124
|
"aria-valuenow"?: number | undefined | undefined;
|
|
124
125
|
"aria-valuetext"?: string | undefined | undefined;
|
|
125
|
-
children: ((context: import("use-stick-to-bottom").StickToBottomContext) => import("react").ReactNode) | import("react").ReactNode;
|
|
126
126
|
dangerouslySetInnerHTML?: {
|
|
127
127
|
__html: string | TrustedHTML;
|
|
128
128
|
} | undefined | undefined;
|
|
@@ -451,13 +451,37 @@ interface ChatInputQuestion {
|
|
|
451
451
|
}
|
|
452
452
|
interface ChatInputQuestionPrompt {
|
|
453
453
|
questions: ChatInputQuestion[];
|
|
454
|
+
callId?: string;
|
|
455
|
+
/** Async requests open from their chat bubble and preselect their first offered options. */
|
|
456
|
+
delivery?: "async";
|
|
454
457
|
}
|
|
455
458
|
interface ChatInputQuestionResponse {
|
|
456
459
|
answers: string[][];
|
|
460
|
+
callId?: string;
|
|
461
|
+
}
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region src/components/chat-ui/components/composer-decision.d.ts
|
|
464
|
+
/** A native decision occupies the composer without submitting the saved draft. */
|
|
465
|
+
interface ComposerDecision {
|
|
466
|
+
id: string;
|
|
467
|
+
controls?: ReactNode;
|
|
468
|
+
model?: string;
|
|
469
|
+
pending?: boolean;
|
|
470
|
+
actions: {
|
|
471
|
+
id: string;
|
|
472
|
+
label: string;
|
|
473
|
+
variant: "primary" | "subtle" | "ghost";
|
|
474
|
+
disabled?: boolean;
|
|
475
|
+
}[];
|
|
476
|
+
onAction: (actionId: string) => void | Promise<void>;
|
|
457
477
|
}
|
|
458
478
|
//#endregion
|
|
459
479
|
//#region src/components/chat-ui/components/chat-input.d.ts
|
|
460
480
|
interface ChatInputProps {
|
|
481
|
+
/**
|
|
482
|
+
* Serialized editor state for the text to show. The editor adopts it whenever its text differs
|
|
483
|
+
* from what the editor shows, so a host can pass its live draft. It is never echoed to `onChange`.
|
|
484
|
+
*/
|
|
461
485
|
defaultState: string;
|
|
462
486
|
/** Plain-text prompts from the active conversation, newest first. */
|
|
463
487
|
recentUserMessages?: string[];
|
|
@@ -476,15 +500,17 @@ interface ChatInputProps {
|
|
|
476
500
|
onChange?: (text: string) => void;
|
|
477
501
|
attachmentList?: ReactNode;
|
|
478
502
|
actions?: ReactNode;
|
|
503
|
+
/** Attachment controls shown only while editing a message draft. */
|
|
504
|
+
attachmentActions?: ReactNode;
|
|
479
505
|
attachedToTop?: boolean;
|
|
480
506
|
/** Recede the resting border to border.subtle when nested inside a stronger shell (the workspace hub). */
|
|
481
507
|
recessed?: boolean;
|
|
482
508
|
questionPrompt?: ChatInputQuestionPrompt;
|
|
509
|
+
decision?: ComposerDecision;
|
|
483
510
|
autoFocus?: boolean;
|
|
484
511
|
focusSignal?: number;
|
|
485
512
|
submitTitle?: string;
|
|
486
|
-
|
|
487
|
-
onAddReference?: (resourceId: string, resourceType: ReferenceItem["resourceType"]) => void;
|
|
513
|
+
commands?: PromptCommand[];
|
|
488
514
|
}
|
|
489
515
|
export declare const ChatInput: (props: ChatInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
490
516
|
//#endregion
|
|
@@ -597,7 +623,7 @@ type QueuedFollowUpMoveDirection = "up" | "down";
|
|
|
597
623
|
//#endregion
|
|
598
624
|
//#region src/components/chat-ui/components/chat-panel.d.ts
|
|
599
625
|
/** Full conversation shell for agent sessions, including messages, input, attachments, and host-provided slots. */
|
|
600
|
-
interface ChatPanelProps {
|
|
626
|
+
interface ChatPanelProps extends ChatLinkProps {
|
|
601
627
|
/** Stable conversation identity used to reset ready state when switching sessions. */
|
|
602
628
|
conversationKey?: string;
|
|
603
629
|
messages: SessionMessage[];
|
|
@@ -616,8 +642,11 @@ interface ChatPanelProps {
|
|
|
616
642
|
onAttachFiles?: (files: File[]) => void;
|
|
617
643
|
onAttachText?: (text: string) => void;
|
|
618
644
|
onChatInputChange?: (text: string) => void;
|
|
619
|
-
/**
|
|
645
|
+
/** Controls shared by the message and question toolbars (model, params). */
|
|
620
646
|
actions?: ReactNode;
|
|
647
|
+
/** Attachment controls shown only while editing a message draft. */
|
|
648
|
+
attachmentActions?: ReactNode;
|
|
649
|
+
composerHeader?: ReactNode;
|
|
621
650
|
attachedResources?: string[];
|
|
622
651
|
onClearAttachments?: () => void;
|
|
623
652
|
attachmentList?: ReactNode;
|
|
@@ -631,13 +660,13 @@ interface ChatPanelProps {
|
|
|
631
660
|
/** Blocks sending while the editor stays usable, for example while no model is selected. */
|
|
632
661
|
submitDisabled?: boolean;
|
|
633
662
|
chatInputQuestionPrompt?: ChatInputQuestionPrompt;
|
|
663
|
+
composerDecision?: ComposerDecision;
|
|
634
664
|
chatInputAutoFocus?: boolean;
|
|
635
665
|
queuedFollowUps?: QueuedFollowUp[];
|
|
636
666
|
onQueuedFollowUpUpdate?: (itemId: string, prompt: string) => void;
|
|
637
667
|
onQueuedFollowUpRemove?: (itemId: string) => void;
|
|
638
668
|
onQueuedFollowUpMove?: (itemId: string, direction: QueuedFollowUpMoveDirection, steps?: number) => void;
|
|
639
|
-
|
|
640
|
-
onChatInputAddReference?: (resourceId: string, resourceType: ReferenceItem["resourceType"]) => void;
|
|
669
|
+
chatInputCommands?: PromptCommand[];
|
|
641
670
|
}
|
|
642
671
|
export declare const ChatPanel: (props: ChatPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
643
672
|
//#endregion
|
|
@@ -667,6 +696,52 @@ interface ConversationBrowseProps {
|
|
|
667
696
|
*/
|
|
668
697
|
export declare const ConversationBrowse: (props: ConversationBrowseProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
669
698
|
//#endregion
|
|
699
|
+
//#region src/components/chat-ui/components/harness-controls.d.ts
|
|
700
|
+
interface HarnessAction {
|
|
701
|
+
id: string;
|
|
702
|
+
label: string;
|
|
703
|
+
icon?: string;
|
|
704
|
+
argument?: {
|
|
705
|
+
label: string;
|
|
706
|
+
value?: string;
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
interface HarnessMode {
|
|
710
|
+
id: string;
|
|
711
|
+
label: string;
|
|
712
|
+
description: string;
|
|
713
|
+
state: string;
|
|
714
|
+
indicator?: {
|
|
715
|
+
label: string;
|
|
716
|
+
tone: "neutral" | "info" | "success" | "warning" | "error";
|
|
717
|
+
};
|
|
718
|
+
tagText?: string;
|
|
719
|
+
closeActionId?: string;
|
|
720
|
+
confirmation?: {
|
|
721
|
+
id: string;
|
|
722
|
+
title: string;
|
|
723
|
+
actionId: string;
|
|
724
|
+
cancelLabel?: string;
|
|
725
|
+
};
|
|
726
|
+
actions: HarnessAction[];
|
|
727
|
+
}
|
|
728
|
+
interface LocalTag {
|
|
729
|
+
label: string;
|
|
730
|
+
description: string;
|
|
731
|
+
onClose: () => void;
|
|
732
|
+
closeLabel?: string;
|
|
733
|
+
}
|
|
734
|
+
interface HarnessControlsProps {
|
|
735
|
+
modes: HarnessMode[];
|
|
736
|
+
draftTag?: LocalTag;
|
|
737
|
+
sentTag?: LocalTag;
|
|
738
|
+
pending?: boolean;
|
|
739
|
+
unavailable?: boolean;
|
|
740
|
+
onRequestConfirmation?: (modeId: string) => void;
|
|
741
|
+
onAction: (modeId: string, actionId: string, argument?: string, modeSnapshot?: HarnessMode) => Promise<void>;
|
|
742
|
+
}
|
|
743
|
+
export declare const HarnessControls: (props: HarnessControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
744
|
+
//#endregion
|
|
670
745
|
//#region src/components/chat-ui/components/send-button.d.ts
|
|
671
746
|
interface SendButtonProps extends IconButtonProps {
|
|
672
747
|
shortcut?: string;
|
|
@@ -697,5 +772,5 @@ export declare const ChatWorkspaceHub: (props: ChatWorkspaceHubProps) => import(
|
|
|
697
772
|
//#region src/components/chat-ui/utils/editor-state.d.ts
|
|
698
773
|
export declare const createSerializedPromptState: (input?: string) => string;
|
|
699
774
|
//#endregion
|
|
700
|
-
export type
|
|
775
|
+
export { type AlertPart, type AutoScrollProps, type ChatInputProps, type ChatInputQuestionPrompt, type ChatInputQuestionResponse, type ChatLinkCandidate, type ChatLinkHandler, type ChatLinkProps, type ChatMessagePart, type ComposerDecision, type ConversationBrowseItem, type ConversationContentProps, type ConversationRootProps, type ConversationScrollButtonProps, type HarnessControlsProps, type MessageContentProps, type MessageRootProps, type QueuedFollowUp, type QueuedFollowUpMoveDirection, type SendButtonProps, type SessionMessage, type SessionMessagePart, type ToolPart, parseChatLink };
|
|
701
776
|
export {};
|