@pstdio/ui 0.43.0 → 0.43.1

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 (74) hide show
  1. package/README.md +11 -0
  2. package/dist/{MermaidComponent-X7N-8w2S.js → MermaidComponent-_cmVeKKR.js} +3 -3
  3. package/dist/{MermaidComponent-X7N-8w2S.js.map → MermaidComponent-_cmVeKKR.js.map} +1 -1
  4. package/dist/chat-ui.d.ts +85 -57
  5. package/dist/chat-ui.js +1168 -1183
  6. package/dist/chat-ui.js.map +1 -1
  7. package/dist/{collection-view-fields-CajuwtKF.d.ts → collection-view-fields-B3fhsgn7.d.ts} +2 -0
  8. package/dist/{collection-view-grouping-DnuJ1U4R.js → collection-view-grouping-jIqOrBG8.js} +2 -2
  9. package/dist/{collection-view-grouping-DnuJ1U4R.js.map → collection-view-grouping-jIqOrBG8.js.map} +1 -1
  10. package/dist/{collection-view-search-D_7Qvz7p.js → collection-view-search-KbQpKHdn.js} +767 -630
  11. package/dist/collection-view-search-KbQpKHdn.js.map +1 -0
  12. package/dist/collection-view.d.ts +1 -1
  13. package/dist/collection-view.js +2 -2
  14. package/dist/{data-table-stats-row-C8CtvdDt.js → data-table-stats-row-83mX8b1B.js} +2 -2
  15. package/dist/{data-table-stats-row-C8CtvdDt.js.map → data-table-stats-row-83mX8b1B.js.map} +1 -1
  16. package/dist/data-table.d.ts +2 -2
  17. package/dist/data-table.js +8 -8
  18. package/dist/{diff-drawer-BGQhxyOh.js → diff-drawer-BMl0zobj.js} +2 -2
  19. package/dist/{diff-drawer-BGQhxyOh.js.map → diff-drawer-BMl0zobj.js.map} +1 -1
  20. package/dist/{diff-viewer-DYcswG6O.js → diff-viewer-C5KXwq7E.js} +5 -5
  21. package/dist/{diff-viewer-DYcswG6O.js.map → diff-viewer-C5KXwq7E.js.map} +1 -1
  22. package/dist/diff.js +2 -2
  23. package/dist/{display-sort-control-n3L5WvkJ.js → display-sort-control-BCkgKET1.js} +194 -183
  24. package/dist/display-sort-control-BCkgKET1.js.map +1 -0
  25. package/dist/{edit-mode-data-table-BclZ-pWe.js → edit-mode-data-table-ScVJJT9F.js} +8 -8
  26. package/dist/{edit-mode-data-table-BclZ-pWe.js.map → edit-mode-data-table-ScVJJT9F.js.map} +1 -1
  27. package/dist/{index-5Lw7YMKy.d.ts → index-Bc2BsdD1.d.ts} +6 -0
  28. package/dist/{index-DjZsR4Ey.d.ts → index-DXpADqIg.d.ts} +8 -4
  29. package/dist/index.d.ts +49 -49
  30. package/dist/index.js +453 -455
  31. package/dist/index.js.map +1 -1
  32. package/dist/kanban-renderer.d.ts +3 -3
  33. package/dist/kanban-renderer.js +935 -745
  34. package/dist/kanban-renderer.js.map +1 -1
  35. package/dist/{list-row-CmFG_jCC.js → list-row-F8kBQGB-.js} +394 -384
  36. package/dist/list-row-F8kBQGB-.js.map +1 -0
  37. package/dist/{markdown-editor-CN4qOKky.js → markdown-editor-Dm4Fi3sX.js} +6 -6
  38. package/dist/{markdown-editor-CN4qOKky.js.map → markdown-editor-Dm4Fi3sX.js.map} +1 -1
  39. package/dist/{mermaid-renderer-DybQ_2Cp.js → mermaid-renderer-BtW_13Sz.js} +2 -2
  40. package/dist/{mermaid-renderer-DybQ_2Cp.js.map → mermaid-renderer-BtW_13Sz.js.map} +1 -1
  41. package/dist/mermaid.js +1 -1
  42. package/dist/{number-input-CyrMrDxB.js → number-input-QDqWYzTR.js} +2 -2
  43. package/dist/{number-input-CyrMrDxB.js.map → number-input-QDqWYzTR.js.map} +1 -1
  44. package/dist/{param-editor-28dBRSV4.js → param-editor-B9ASM5Lv.js} +2 -2
  45. package/dist/{param-editor-28dBRSV4.js.map → param-editor-B9ASM5Lv.js.map} +1 -1
  46. package/dist/{param-editor-field-GxhFb86w.js → param-editor-field-BmNUziwI.js} +7 -5
  47. package/dist/param-editor-field-BmNUziwI.js.map +1 -0
  48. package/dist/param-editor.js +3 -3
  49. package/dist/{prism-CnkSh-ZG.js → prism-EZSmZh-a.js} +2 -2
  50. package/dist/{prism-CnkSh-ZG.js.map → prism-EZSmZh-a.js.map} +1 -1
  51. package/dist/{rich-text-DOK4dDeb.js → rich-text-Dx5F8Zm1.js} +384 -363
  52. package/dist/rich-text-Dx5F8Zm1.js.map +1 -0
  53. package/dist/rich-text.d.ts +1 -1
  54. package/dist/rich-text.js +3 -3
  55. package/dist/{scroll-area-crJfiiuF.js → scroll-area-IeoRS73V.js} +3 -5
  56. package/dist/scroll-area-IeoRS73V.js.map +1 -0
  57. package/dist/terminal.js +1 -1
  58. package/dist/{theme-Bd_a7sU8.js → theme-CWDvF5Yn.js} +185 -73
  59. package/dist/theme-CWDvF5Yn.js.map +1 -0
  60. package/dist/theme.js +1 -1
  61. package/dist/{tree-list-B_qqiIoM.js → tree-list-Ces1hpRd.js} +2 -2
  62. package/dist/{tree-list-B_qqiIoM.js.map → tree-list-Ces1hpRd.js.map} +1 -1
  63. package/dist/{workspace-badge-oFp29Gbe.d.ts → workspace-badge-De6OQjb5.d.ts} +2 -1
  64. package/dist/{workspace-badge-BfSkiGP_.js → workspace-badge-DqQKSUJw.js} +12 -12
  65. package/dist/workspace-badge-DqQKSUJw.js.map +1 -0
  66. package/package.json +2 -2
  67. package/dist/collection-view-search-D_7Qvz7p.js.map +0 -1
  68. package/dist/display-sort-control-n3L5WvkJ.js.map +0 -1
  69. package/dist/list-row-CmFG_jCC.js.map +0 -1
  70. package/dist/param-editor-field-GxhFb86w.js.map +0 -1
  71. package/dist/rich-text-DOK4dDeb.js.map +0 -1
  72. package/dist/scroll-area-crJfiiuF.js.map +0 -1
  73. package/dist/theme-Bd_a7sU8.js.map +0 -1
  74. package/dist/workspace-badge-BfSkiGP_.js.map +0 -1
package/README.md CHANGED
@@ -46,6 +46,17 @@ gets its own entry: `./rich-text`, `./param-editor`, `./kanban-renderer`,
46
46
  from the root entry may import one of those, or every consumer's bundler emits the
47
47
  heavy chunks even when the consumer never renders the feature.
48
48
 
49
+ ## Chat Layout
50
+
51
+ `ChatPanel` fills its parent pane. The transcript and composer share a centered
52
+ column with a maximum width of `52rem`, defined by the `chat-content` size token
53
+ and `chatContent` layer style. Narrow panes use their available width. Keep the
54
+ scroll area at the full pane width so its scrollbar stays at the pane edge.
55
+
56
+ The [chat width stories](src/components/chat-ui/components/chat-panel-width.stories.tsx)
57
+ cover wide, narrow, and empty panes. The matching Pencil frame is `Oc0qI` in
58
+ [the design system](../../design/prompt-studio-design-system.pen).
59
+
49
60
  ## Contributor Workflow
50
61
 
51
62
  1. Implement or update the component in `src/components`.
@@ -1,5 +1,5 @@
1
- import { g as e } from "./markdown-editor-CN4qOKky.js";
2
- import { t } from "./mermaid-renderer-DybQ_2Cp.js";
1
+ import { g as e } from "./markdown-editor-Dm4Fi3sX.js";
2
+ import { t } from "./mermaid-renderer-BtW_13Sz.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-X7N-8w2S.js.map
90
+ //# sourceMappingURL=MermaidComponent-_cmVeKKR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MermaidComponent-X7N-8w2S.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,CAAS;EACvB,CACF,GAEDG,EAAeH,CAAS,GACxBD,EAAa,EAAK;CAAC,GACpBL,EAAA,KAAAM,GAAAN,EAAA,KAAAE,GAAAF,EAAA,KAAAH,GAAAG,EAAA,KAAAY,KAAAA,IAAAZ,EAAA;CAVD,IAAAgB,IAA0BJ,GAUxBK;CAAA,AAAAjB,EAAA,OAAAQ,IAKDS,IAAAjB,EAAA,MAHqBi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AA,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-_cmVeKKR.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,CAAS;EACvB,CACF,GAEDG,EAAeH,CAAS,GACxBD,EAAa,EAAK;CAAC,GACpBL,EAAA,KAAAM,GAAAN,EAAA,KAAAE,GAAAF,EAAA,KAAAH,GAAAG,EAAA,KAAAY,KAAAA,IAAAZ,EAAA;CAVD,IAAAgB,IAA0BJ,GAUxBK;CAAA,AAAAjB,EAAA,OAAAQ,IAKDS,IAAAjB,E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,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"}
package/dist/chat-ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as ResourceBadgeProps, r as ScrollArea$1 } from "./resource-badge-nOWPqxFU.js";
2
- import { d as ChatLinkCandidate, f as ChatLinkHandler, j as PromptCommand, k as PromptSelectionSnapshot, m as parseChatLink, p as ChatLinkProps } from "./index-5Lw7YMKy.js";
2
+ import { d as ChatLinkCandidate, f as ChatLinkHandler, j as PromptCommand, k as PromptSelectionSnapshot, m as parseChatLink, p as ChatLinkProps } from "./index-Bc2BsdD1.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";
@@ -17,16 +17,60 @@ export declare const ChatPrimitives: {
17
17
  resource?: string | undefined | undefined;
18
18
  id?: string | undefined | undefined;
19
19
  children: ((context: import("use-stick-to-bottom").StickToBottomContext) => import("react").ReactNode) | import("react").ReactNode;
20
+ slot?: string | undefined | undefined;
21
+ style?: import("react").CSSProperties | undefined;
22
+ title?: string | undefined | undefined;
23
+ color?: string | undefined | undefined;
24
+ content?: string | undefined | undefined;
25
+ translate?: "yes" | "no" | undefined | undefined;
26
+ initial?: (import("use-stick-to-bottom").Animation | boolean) | undefined;
27
+ hidden?: boolean | undefined | undefined;
28
+ "aria-roledescription"?: string | undefined | undefined;
29
+ role?: import("react").AriaRole | undefined;
30
+ defaultChecked?: boolean | undefined | undefined;
31
+ defaultValue?: string | number | readonly string[] | undefined;
32
+ suppressContentEditableWarning?: boolean | undefined | undefined;
20
33
  suppressHydrationWarning?: boolean | undefined | undefined;
34
+ accessKey?: string | undefined | undefined;
35
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
36
+ autoFocus?: boolean | undefined | undefined;
21
37
  className?: string | undefined | undefined;
22
- color?: string | undefined | undefined;
38
+ contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
39
+ contextMenu?: string | undefined | undefined;
40
+ dir?: string | undefined | undefined;
41
+ draggable?: (boolean | "true" | "false") | undefined;
42
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
23
43
  lang?: string | undefined | undefined;
24
44
  nonce?: string | undefined | undefined;
25
- part?: string | undefined | undefined;
26
- slot?: string | undefined | undefined;
27
- style?: import("react").CSSProperties | undefined;
28
- role?: import("react").AriaRole | undefined;
45
+ spellCheck?: (boolean | "true" | "false") | undefined;
29
46
  tabIndex?: number | undefined | undefined;
47
+ radioGroup?: string | undefined | undefined;
48
+ about?: string | undefined | undefined;
49
+ datatype?: string | undefined | undefined;
50
+ inlist?: any;
51
+ prefix?: string | undefined | undefined;
52
+ property?: string | undefined | undefined;
53
+ rel?: string | undefined | undefined;
54
+ rev?: string | undefined | undefined;
55
+ typeof?: string | undefined | undefined;
56
+ vocab?: string | undefined | undefined;
57
+ autoCorrect?: string | undefined | undefined;
58
+ autoSave?: string | undefined | undefined;
59
+ itemProp?: string | undefined | undefined;
60
+ itemScope?: boolean | undefined | undefined;
61
+ itemType?: string | undefined | undefined;
62
+ itemID?: string | undefined | undefined;
63
+ itemRef?: string | undefined | undefined;
64
+ results?: number | undefined | undefined;
65
+ security?: string | undefined | undefined;
66
+ unselectable?: "on" | "off" | undefined | undefined;
67
+ popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
68
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
69
+ popoverTarget?: string | undefined | undefined;
70
+ inert?: boolean | undefined | undefined;
71
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
72
+ exportparts?: string | undefined | undefined;
73
+ part?: string | undefined | undefined;
30
74
  "aria-activedescendant"?: string | undefined | undefined;
31
75
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
32
76
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
@@ -68,7 +112,6 @@ export declare const ChatPrimitives: {
68
112
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
69
113
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
70
114
  "aria-required"?: (boolean | "true" | "false") | undefined;
71
- "aria-roledescription"?: string | undefined | undefined;
72
115
  "aria-rowcount"?: number | undefined | undefined;
73
116
  "aria-rowindex"?: number | undefined | undefined;
74
117
  "aria-rowindextext"?: string | undefined | undefined;
@@ -248,49 +291,6 @@ export declare const ChatPrimitives: {
248
291
  onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
249
292
  onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
250
293
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
251
- title?: string | undefined | undefined;
252
- content?: string | undefined | undefined;
253
- translate?: "yes" | "no" | undefined | undefined;
254
- initial?: (import("use-stick-to-bottom").Animation | boolean) | undefined;
255
- hidden?: boolean | undefined | undefined;
256
- defaultChecked?: boolean | undefined | undefined;
257
- defaultValue?: string | number | readonly string[] | undefined;
258
- suppressContentEditableWarning?: boolean | undefined | undefined;
259
- accessKey?: string | undefined | undefined;
260
- autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
261
- autoFocus?: boolean | undefined | undefined;
262
- contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
263
- contextMenu?: string | undefined | undefined;
264
- dir?: string | undefined | undefined;
265
- draggable?: (boolean | "true" | "false") | undefined;
266
- enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
267
- spellCheck?: (boolean | "true" | "false") | undefined;
268
- radioGroup?: string | undefined | undefined;
269
- about?: string | undefined | undefined;
270
- datatype?: string | undefined | undefined;
271
- inlist?: any;
272
- prefix?: string | undefined | undefined;
273
- property?: string | undefined | undefined;
274
- rel?: string | undefined | undefined;
275
- rev?: string | undefined | undefined;
276
- typeof?: string | undefined | undefined;
277
- vocab?: string | undefined | undefined;
278
- autoCorrect?: string | undefined | undefined;
279
- autoSave?: string | undefined | undefined;
280
- itemProp?: string | undefined | undefined;
281
- itemScope?: boolean | undefined | undefined;
282
- itemType?: string | undefined | undefined;
283
- itemID?: string | undefined | undefined;
284
- itemRef?: string | undefined | undefined;
285
- results?: number | undefined | undefined;
286
- security?: string | undefined | undefined;
287
- unselectable?: "on" | "off" | undefined | undefined;
288
- popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
289
- popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
290
- popoverTarget?: string | undefined | undefined;
291
- inert?: boolean | undefined | undefined;
292
- inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
293
- exportparts?: string | undefined | undefined;
294
294
  damping?: number | undefined;
295
295
  stiffness?: number | undefined;
296
296
  mass?: number | undefined;
@@ -311,12 +311,8 @@ declare const recipe: import("@chakra-ui/react").SlotRecipeDefinition<"root" | "
311
311
  flexDirection: "row";
312
312
  };
313
313
  content: {
314
- borderTopWidth: "1px";
315
- borderRightWidth: "1px";
316
- borderBottomWidth: "1px";
317
- borderLeftWidth: "1px";
318
- borderColor: "border.subtle";
319
- bg: "bg.subtle";
314
+ "--chat-message-bg": "{colors.bg.subtle}";
315
+ bg: "var(--chat-message-bg)";
320
316
  px: "xs";
321
317
  py: "xs";
322
318
  width: "full";
@@ -459,6 +455,19 @@ interface ChatInputQuestionResponse {
459
455
  answers: string[][];
460
456
  callId?: string;
461
457
  }
458
+ type ChatInputQuestionCustomAnswers = Record<string, string>;
459
+ //#endregion
460
+ //#region src/components/chat-ui/components/chat-input-question-prompt.d.ts
461
+ interface QuestionPromptControlsProps {
462
+ isEditable: boolean;
463
+ questionPrompt: ChatInputQuestionPrompt;
464
+ selectedOptionsByQuestion: Record<string, string[]>;
465
+ customAnswersByQuestion: ChatInputQuestionCustomAnswers;
466
+ onToggleOption: (question: ChatInputQuestion, questionIndex: number, optionLabel: string) => void;
467
+ onToggleOther: (question: ChatInputQuestion, questionIndex: number) => void;
468
+ onCustomAnswerChange: (question: ChatInputQuestion, questionIndex: number, answer: string) => void;
469
+ }
470
+ export declare const QuestionPromptControls: (props: QuestionPromptControlsProps) => import("react/jsx-runtime").JSX.Element;
462
471
  //#endregion
463
472
  //#region src/components/chat-ui/components/composer-decision.d.ts
464
473
  /** A native decision occupies the composer without submitting the saved draft. */
@@ -783,6 +792,25 @@ interface SendButtonProps extends IconButtonProps {
783
792
  }
784
793
  export declare const SendButton: (props: SendButtonProps) => import("react/jsx-runtime").JSX.Element;
785
794
  //#endregion
795
+ //#region src/components/chat-ui/components/use-question-prompt-state.d.ts
796
+ /**
797
+ * Holds what the person picked for the open question and derives what the form would send.
798
+ * `resetToken` clears the picks whenever the composer itself is reset, such as a new draft.
799
+ */
800
+ export declare const useQuestionPromptState: (questionPrompt: ChatInputQuestionPrompt | undefined, resetToken?: unknown) => {
801
+ signature: string;
802
+ selectedOptionsByQuestion: Record<string, string[]>;
803
+ customAnswersByQuestion: ChatInputQuestionCustomAnswers;
804
+ reset: () => void;
805
+ restore: (selected: Record<string, string[]>, custom: ChatInputQuestionCustomAnswers) => void;
806
+ toggleOption: (question: ChatInputQuestion, questionIndex: number, optionLabel: string) => void;
807
+ toggleOther: (question: ChatInputQuestion, questionIndex: number) => void;
808
+ setCustomAnswer: (question: ChatInputQuestion, questionIndex: number, answer: string) => void;
809
+ responseText: string;
810
+ hasMissingRequiredAnswer: boolean;
811
+ buildAnswers: () => string[][];
812
+ };
813
+ //#endregion
786
814
  //#region src/components/chat-ui/components/workspace-hub.d.ts
787
815
  type WorkspaceHubStatus = "ready" | "loading" | "error";
788
816
  interface ChatWorkspaceHubProps {
@@ -805,5 +833,5 @@ export declare const ChatWorkspaceHub: (props: ChatWorkspaceHubProps) => import(
805
833
  //#region src/components/chat-ui/utils/editor-state.d.ts
806
834
  export declare const createSerializedPromptState: (input?: string) => string;
807
835
  //#endregion
808
- 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 };
836
+ export { type AlertPart, type AutoScrollProps, type ChatInputProps, type ChatInputQuestion, type ChatInputQuestionCustomAnswers, type ChatInputQuestionOption, 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 QuestionPromptControlsProps, type QueuedFollowUp, type QueuedFollowUpMoveDirection, type SendButtonProps, type SessionMessage, type SessionMessagePart, type ToolPart, parseChatLink };
809
837
  export {};