@pstdio/ui 0.39.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.
Files changed (82) hide show
  1. package/dist/{MermaidComponent-81jr28u4.js → MermaidComponent-BCiI63_G.js} +3 -3
  2. package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-BCiI63_G.js.map} +1 -1
  3. package/dist/chat-question-bubble-w2vMbFsS.js +68 -0
  4. package/dist/chat-question-bubble-w2vMbFsS.js.map +1 -0
  5. package/dist/chat-ui.d.ts +94 -17
  6. package/dist/chat-ui.js +2240 -1476
  7. package/dist/chat-ui.js.map +1 -1
  8. package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-EiTEONdY.js} +2 -2
  9. package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-EiTEONdY.js.map} +1 -1
  10. package/dist/data-table.d.ts +27 -7
  11. package/dist/data-table.js +1035 -872
  12. package/dist/data-table.js.map +1 -1
  13. package/dist/diff-bubble-DewUd_2w.js +61 -0
  14. package/dist/diff-bubble-DewUd_2w.js.map +1 -0
  15. package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-BwZBOObe.js} +106 -85
  16. package/dist/diff-drawer-BwZBOObe.js.map +1 -0
  17. package/dist/diff-viewer-kOOd7C7h.js +574 -0
  18. package/dist/diff-viewer-kOOd7C7h.js.map +1 -0
  19. package/dist/diff.d.ts +11 -0
  20. package/dist/diff.js +107 -98
  21. package/dist/diff.js.map +1 -1
  22. package/dist/display-sort-control-DPxc0e5z.js +587 -0
  23. package/dist/display-sort-control-DPxc0e5z.js.map +1 -0
  24. package/dist/{workspace-badge-Brm3Xr3m.d.ts → host-storage-DP0RLj4i.d.ts} +15 -1
  25. package/dist/{index-BfFLdci8.d.ts → index-C9mywhyX.d.ts} +49 -13
  26. package/dist/index-D3UJyWWh.d.ts +501 -0
  27. package/dist/index.d.ts +38 -13
  28. package/dist/index.js +941 -908
  29. package/dist/index.js.map +1 -1
  30. package/dist/kanban-renderer.d.ts +2 -326
  31. package/dist/kanban-renderer.js +991 -610
  32. package/dist/kanban-renderer.js.map +1 -1
  33. package/dist/list-row-DM0DiIrN.js +1167 -0
  34. package/dist/list-row-DM0DiIrN.js.map +1 -0
  35. package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
  36. package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
  37. package/dist/mermaid.js +1 -1
  38. package/dist/param-editor.js +2 -3
  39. package/dist/prism-JVIsQMoJ.js +1029 -0
  40. package/dist/prism-JVIsQMoJ.js.map +1 -0
  41. package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
  42. package/dist/rich-text-DM24VNQZ.js +10447 -0
  43. package/dist/rich-text-DM24VNQZ.js.map +1 -0
  44. package/dist/rich-text.d.ts +2 -2
  45. package/dist/rich-text.js +2 -2
  46. package/dist/style.css +1 -1
  47. package/dist/terminal.d.ts +5 -63
  48. package/dist/terminal.js +102 -122
  49. package/dist/terminal.js.map +1 -1
  50. package/dist/{theme-BsOWAIi2.js → theme-at0rtSnX.js} +441 -246
  51. package/dist/theme-at0rtSnX.js.map +1 -0
  52. package/dist/theme-kKuLN2jb.js +80 -0
  53. package/dist/theme-kKuLN2jb.js.map +1 -0
  54. package/dist/theme-preference-BV4cbJNB.js +115 -0
  55. package/dist/theme-preference-BV4cbJNB.js.map +1 -0
  56. package/dist/theme.js +3 -2
  57. package/dist/{tree-list-WhISG-cz.js → tree-list-Cqgl8mnN.js} +400 -377
  58. package/dist/tree-list-Cqgl8mnN.js.map +1 -0
  59. package/package.json +4 -4
  60. package/dist/diff-bubble-DZsarmSG.js +0 -61
  61. package/dist/diff-bubble-DZsarmSG.js.map +0 -1
  62. package/dist/diff-drawer-45rpk3aq.js.map +0 -1
  63. package/dist/diff-viewer-DJ1B5hxL.js +0 -558
  64. package/dist/diff-viewer-DJ1B5hxL.js.map +0 -1
  65. package/dist/list-row-uqD-q4gv.js +0 -1018
  66. package/dist/list-row-uqD-q4gv.js.map +0 -1
  67. package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
  68. package/dist/param-editor-BQd4AOUP.js +0 -225
  69. package/dist/param-editor-BQd4AOUP.js.map +0 -1
  70. package/dist/param-editor-field-BJ_rLUnV.js +0 -2385
  71. package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
  72. package/dist/prism-BStPsJSB.js +0 -658
  73. package/dist/prism-BStPsJSB.js.map +0 -1
  74. package/dist/rich-text-VYAmEigU.js +0 -6979
  75. package/dist/rich-text-VYAmEigU.js.map +0 -1
  76. package/dist/slider-hwHYe98I.js +0 -423
  77. package/dist/slider-hwHYe98I.js.map +0 -1
  78. package/dist/theme-BsOWAIi2.js.map +0 -1
  79. package/dist/theme-preference-pzfuK5cH.js +0 -101
  80. package/dist/theme-preference-pzfuK5cH.js.map +0 -1
  81. package/dist/tree-list-WhISG-cz.js.map +0 -1
  82. package/dist/types-DWA3enV6.d.ts +0 -182
@@ -1,5 +1,5 @@
1
- import { f as e } from "./rich-text-VYAmEigU.js";
2
- import { t } from "./mermaid-renderer-DImi0fDp.js";
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-81jr28u4.js.map
90
+ //# sourceMappingURL=MermaidComponent-BCiI63_G.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MermaidComponent-81jr28u4.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,AA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;CAAvC,CAAA,GAEEhB,EAAA,MAAAgB,GAAAhB,EAAA,MAAAqB;CAAA,IAAAC;CAAA,AAAAtB,EAAA,QAAAmB,KAAAnB,EAAA,QAAAqB,KANXC,IAAA,kBAAC0C,GAAD;EAAqB,gBAAA;EAAsB,YAAA;EAAa,KAAA;EAAc,UAAA;EAAc,UAAA;EAAQ,IAAA;EAA5F,UAAA,CACE7C,GAGAE,CAJG;KAOErB,EAAA,MAAAmB,GAAAnB,EAAA,MAAAqB,GAAArB,EAAA,MAAAsB,KAAAA,IAAAtB,EAAA;CAAA,IAAAuB;CAAA,AAAAvB,EAAA,QAAAwB,OAAAC,IAAA,2BAAA,KAIOF,KAAAG,MAAWnB,EAAamB,EAAKC,OAAOC,KAAM,GAAC5B,EAAA,MAAAuB,KAAAA,IAAAvB,EAAA;CAAA,IAAA6B;CAAA,AAAA7B,EAAA,QAAAM,IAOnDuB,IAAA7B,EAAA,OAVN6B,IAAA,kBAACuC,GAAD;EAAa,SAAA;EAAQ,IAAA;EACnB,UAAA,kBAACC,GAAD;GACS/D,OAAAA;GACG,UAAAiB;GACA,WAAA;GACH,QAAA;GACI,YAAA;GACF,UAAA;GACG,YAAA;EAAK,CAAA;CARjB,CAAA,GAUEvB,EAAA,MAAAM,GAAAN,EAAA,MAAA6B;CAAA,IAAAC;CACF,OADE9B,EAAA,QAAAsB,KAAAtB,EAAA,QAAA6B,KAnBRC,IAAA,kBAACsC,GAAD;EAAiB,aAAA;EAAkB,aAAA;EAA6B,cAAA;EAAc,UAAA;EAAe,OAAA;EAA7F,UAAA,CACE9C,GAQAO,CATE;KAoBE7B,EAAA,MAAAsB,GAAAtB,EAAA,MAAA6B,GAAA7B,EAAA,MAAA8B,KAAAA,IAAA9B,EAAA,KApBN8B;AAoBM"}
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,CAA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",
6
+ 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-95WPVlZf.js";
2
- import { T as ReferenceItem } from "./index-BfFLdci8.js";
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";
@@ -10,6 +10,13 @@ type ConversationScrollButtonProps = IconButtonProps;
10
10
  export declare const ChatPrimitives: {
11
11
  readonly Root: import("@chakra-ui/react").ChakraComponent<import("react").ElementType, {
12
12
  resize?: import("use-stick-to-bottom").Animation | undefined;
13
+ onChange?: import("react").ChangeEventHandler<HTMLDivElement, Element> | undefined;
14
+ onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
15
+ onSubmit?: import("react").SubmitEventHandler<HTMLDivElement> | undefined;
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;
13
20
  slot?: string | undefined | undefined;
14
21
  style?: import("react").CSSProperties | undefined;
15
22
  title?: string | undefined | undefined;
@@ -20,7 +27,6 @@ export declare const ChatPrimitives: {
20
27
  hidden?: boolean | undefined | undefined;
21
28
  "aria-roledescription"?: string | undefined | undefined;
22
29
  role?: import("react").AriaRole | undefined;
23
- children: ((context: import("use-stick-to-bottom").StickToBottomContext) => import("react").ReactNode) | import("react").ReactNode;
24
30
  defaultChecked?: boolean | undefined | undefined;
25
31
  defaultValue?: string | number | readonly string[] | undefined;
26
32
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -34,7 +40,6 @@ export declare const ChatPrimitives: {
34
40
  dir?: string | undefined | undefined;
35
41
  draggable?: (boolean | "true" | "false") | undefined;
36
42
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
37
- id?: string | undefined | undefined;
38
43
  lang?: string | undefined | undefined;
39
44
  nonce?: string | undefined | undefined;
40
45
  spellCheck?: (boolean | "true" | "false") | undefined;
@@ -46,7 +51,6 @@ export declare const ChatPrimitives: {
46
51
  prefix?: string | undefined | undefined;
47
52
  property?: string | undefined | undefined;
48
53
  rel?: string | undefined | undefined;
49
- resource?: string | undefined | undefined;
50
54
  rev?: string | undefined | undefined;
51
55
  typeof?: string | undefined | undefined;
52
56
  vocab?: string | undefined | undefined;
@@ -65,7 +69,6 @@ export declare const ChatPrimitives: {
65
69
  popoverTarget?: string | undefined | undefined;
66
70
  inert?: boolean | undefined | undefined;
67
71
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
68
- is?: string | undefined | undefined;
69
72
  exportparts?: string | undefined | undefined;
70
73
  part?: string | undefined | undefined;
71
74
  "aria-activedescendant"?: string | undefined | undefined;
@@ -139,7 +142,6 @@ export declare const ChatPrimitives: {
139
142
  onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
140
143
  onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
141
144
  onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
142
- onChange?: import("react").ChangeEventHandler<HTMLDivElement, Element> | undefined;
143
145
  onChangeCapture?: import("react").ChangeEventHandler<HTMLDivElement, Element> | undefined;
144
146
  onBeforeInput?: import("react").InputEventHandler<HTMLDivElement> | undefined;
145
147
  onBeforeInputCapture?: import("react").InputEventHandler<HTMLDivElement> | undefined;
@@ -147,13 +149,11 @@ export declare const ChatPrimitives: {
147
149
  onInputCapture?: import("react").InputEventHandler<HTMLDivElement> | undefined;
148
150
  onReset?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
149
151
  onResetCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
150
- onSubmit?: import("react").SubmitEventHandler<HTMLDivElement> | undefined;
151
152
  onSubmitCapture?: import("react").SubmitEventHandler<HTMLDivElement> | undefined;
152
153
  onInvalid?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
153
154
  onInvalidCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
154
155
  onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
155
156
  onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
156
- onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
157
157
  onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
158
158
  onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
159
159
  onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
@@ -436,7 +436,7 @@ interface AutoScrollProps {
436
436
  }
437
437
  export declare function AutoScroll(props: AutoScrollProps): null;
438
438
  //#endregion
439
- //#region src/components/chat-ui/components/chat-input-question-prompt.d.ts
439
+ //#region src/components/chat-ui/components/chat-input-question-answers.d.ts
440
440
  interface ChatInputQuestionOption {
441
441
  label: string;
442
442
  description?: string;
@@ -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
- references?: ReferenceItem[];
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,12 +623,14 @@ 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[];
604
630
  loading?: boolean;
605
631
  streaming?: boolean;
632
+ /** Current run start in milliseconds. Without an anchor, elapsed time starts when streaming mounts. */
633
+ streamingStartedAt?: number;
606
634
  emptyStateTitle: string;
607
635
  emptyStateDescription: string;
608
636
  emptyStateContent?: ReactNode;
@@ -614,8 +642,11 @@ interface ChatPanelProps {
614
642
  onAttachFiles?: (files: File[]) => void;
615
643
  onAttachText?: (text: string) => void;
616
644
  onChatInputChange?: (text: string) => void;
617
- /** Extra controls rendered in the chat input toolbar (attach, model, params). */
645
+ /** Controls shared by the message and question toolbars (model, params). */
618
646
  actions?: ReactNode;
647
+ /** Attachment controls shown only while editing a message draft. */
648
+ attachmentActions?: ReactNode;
649
+ composerHeader?: ReactNode;
619
650
  attachedResources?: string[];
620
651
  onClearAttachments?: () => void;
621
652
  attachmentList?: ReactNode;
@@ -629,13 +660,13 @@ interface ChatPanelProps {
629
660
  /** Blocks sending while the editor stays usable, for example while no model is selected. */
630
661
  submitDisabled?: boolean;
631
662
  chatInputQuestionPrompt?: ChatInputQuestionPrompt;
663
+ composerDecision?: ComposerDecision;
632
664
  chatInputAutoFocus?: boolean;
633
665
  queuedFollowUps?: QueuedFollowUp[];
634
666
  onQueuedFollowUpUpdate?: (itemId: string, prompt: string) => void;
635
667
  onQueuedFollowUpRemove?: (itemId: string) => void;
636
668
  onQueuedFollowUpMove?: (itemId: string, direction: QueuedFollowUpMoveDirection, steps?: number) => void;
637
- chatInputReferences?: ReferenceItem[];
638
- onChatInputAddReference?: (resourceId: string, resourceType: ReferenceItem["resourceType"]) => void;
669
+ chatInputCommands?: PromptCommand[];
639
670
  }
640
671
  export declare const ChatPanel: (props: ChatPanelProps) => import("react/jsx-runtime").JSX.Element;
641
672
  //#endregion
@@ -665,6 +696,52 @@ interface ConversationBrowseProps {
665
696
  */
666
697
  export declare const ConversationBrowse: (props: ConversationBrowseProps) => import("react/jsx-runtime").JSX.Element | null;
667
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
668
745
  //#region src/components/chat-ui/components/send-button.d.ts
669
746
  interface SendButtonProps extends IconButtonProps {
670
747
  shortcut?: string;
@@ -695,5 +772,5 @@ export declare const ChatWorkspaceHub: (props: ChatWorkspaceHubProps) => import(
695
772
  //#region src/components/chat-ui/utils/editor-state.d.ts
696
773
  export declare const createSerializedPromptState: (input?: string) => string;
697
774
  //#endregion
698
- export type { AlertPart, AutoScrollProps, ChatInputProps, ChatInputQuestionPrompt, ChatInputQuestionResponse, ChatMessagePart, ConversationBrowseItem, ConversationContentProps, ConversationRootProps, ConversationScrollButtonProps, MessageContentProps, MessageRootProps, QueuedFollowUp, QueuedFollowUpMoveDirection, SendButtonProps, SessionMessage, SessionMessagePart, ToolPart };
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 };
699
776
  export {};