@keboola/design 17.0.0 → 17.2.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 (191) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/dist/{AIKit-CxKkvN0q.js → AIKit-DiF0LtVr.js} +22 -14
  3. package/dist/AIKit-DiF0LtVr.js.map +1 -0
  4. package/dist/{Alert-DziS8n1H.js → Alert-BQB-og_I.js} +2 -2
  5. package/dist/{Alert-DziS8n1H.js.map → Alert-BQB-og_I.js.map} +1 -1
  6. package/dist/{AlertModal-De04fFoy.js → AlertModal-BkmyEvsR.js} +2 -2
  7. package/dist/{AlertModal-De04fFoy.js.map → AlertModal-BkmyEvsR.js.map} +1 -1
  8. package/dist/{AppShell-BUa3U7-e.js → AppShell-CDbecT-t.js} +2 -2
  9. package/dist/{AppShell-BUa3U7-e.js.map → AppShell-CDbecT-t.js.map} +1 -1
  10. package/dist/{BrandEditor-hiLBX7az.js → BrandEditor-BHE6nsob.js} +6 -6
  11. package/dist/{BrandEditor-hiLBX7az.js.map → BrandEditor-BHE6nsob.js.map} +1 -1
  12. package/dist/{BrandLogo-Dn7hhp2c.js → BrandLogo-n4Qhi1tI.js} +2 -2
  13. package/dist/{BrandLogo-Dn7hhp2c.js.map → BrandLogo-n4Qhi1tI.js.map} +1 -1
  14. package/dist/{Breadcrumb-uGFEIjFF.js → Breadcrumb-BAwQTo0c.js} +3 -3
  15. package/dist/{Breadcrumb-uGFEIjFF.js.map → Breadcrumb-BAwQTo0c.js.map} +1 -1
  16. package/dist/{Button-DbvGzEDb.js → Button-BAMX1iuI.js} +2 -2
  17. package/dist/{Button-DbvGzEDb.js.map → Button-BAMX1iuI.js.map} +1 -1
  18. package/dist/{Checkbox-B2jLlyaO.js → Checkbox-CfjpwIcg.js} +2 -2
  19. package/dist/{Checkbox-B2jLlyaO.js.map → Checkbox-CfjpwIcg.js.map} +1 -1
  20. package/dist/{Clipboard-fAkDdpEu.js → Clipboard-BaU3cDi5.js} +7 -5
  21. package/dist/Clipboard-BaU3cDi5.js.map +1 -0
  22. package/dist/{ClipboardButton-71Ugbl8c.js → ClipboardButton-BWeaQEM2.js} +5 -4
  23. package/dist/ClipboardButton-BWeaQEM2.js.map +1 -0
  24. package/dist/{CodeEditor-D_b-ZCng.js → CodeEditor-BdTxkPD4.js} +4 -4
  25. package/dist/{CodeEditor-D_b-ZCng.js.map → CodeEditor-BdTxkPD4.js.map} +1 -1
  26. package/dist/{ColorInput-Cjr1jkvy.js → ColorInput-BoVdBxJ7.js} +3 -3
  27. package/dist/{ColorInput-Cjr1jkvy.js.map → ColorInput-BoVdBxJ7.js.map} +1 -1
  28. package/dist/{ColorModeSwitch-CuPYnJ2V.js → ColorModeSwitch-BDkdmHYl.js} +2 -2
  29. package/dist/{ColorModeSwitch-CuPYnJ2V.js.map → ColorModeSwitch-BDkdmHYl.js.map} +1 -1
  30. package/dist/{Combobox-DYjvYgl3.js → Combobox-CakN_1cF.js} +6 -6
  31. package/dist/Combobox-CakN_1cF.js.map +1 -0
  32. package/dist/{Command-BcTb6GsR.js → Command-D6XYzzJf.js} +2 -2
  33. package/dist/{Command-BcTb6GsR.js.map → Command-D6XYzzJf.js.map} +1 -1
  34. package/dist/{CopyField-CnwAvQz9.js → CopyField-9WBU8thS.js} +2 -2
  35. package/dist/{CopyField-CnwAvQz9.js.map → CopyField-9WBU8thS.js.map} +1 -1
  36. package/dist/{DateInput-DJNX7Vdx.js → DateInput-CCYG0AtT.js} +3 -3
  37. package/dist/{DateInput-DJNX7Vdx.js.map → DateInput-CCYG0AtT.js.map} +1 -1
  38. package/dist/{DateRangeInput-B3g8cyS0.js → DateRangeInput-CpZK1IFp.js} +3 -3
  39. package/dist/{DateRangeInput-B3g8cyS0.js.map → DateRangeInput-CpZK1IFp.js.map} +1 -1
  40. package/dist/{DateRangePicker-48yOB2qV.js → DateRangePicker-B2AUKX7u.js} +2 -2
  41. package/dist/{DateRangePicker-48yOB2qV.js.map → DateRangePicker-B2AUKX7u.js.map} +1 -1
  42. package/dist/{FieldItem-D7eCMfMB.js → FieldItem-eM7IHBt5.js} +3 -3
  43. package/dist/{FieldItem-D7eCMfMB.js.map → FieldItem-eM7IHBt5.js.map} +1 -1
  44. package/dist/{FileUpload-DskvxhAr.js → FileUpload-d-hNPfPV.js} +2 -2
  45. package/dist/{FileUpload-DskvxhAr.js.map → FileUpload-d-hNPfPV.js.map} +1 -1
  46. package/dist/{Form-BUNW7nlt.js → Form-B_9sNehB.js} +7 -7
  47. package/dist/{Form-BUNW7nlt.js.map → Form-B_9sNehB.js.map} +1 -1
  48. package/dist/{FormGroup-QJB21LKp.js → FormGroup-D7ahkK1q.js} +3 -3
  49. package/dist/{FormGroup-QJB21LKp.js.map → FormGroup-D7ahkK1q.js.map} +1 -1
  50. package/dist/{FullScreenModal-RzY5XxiG.js → FullScreenModal-CiRKNsls.js} +2 -2
  51. package/dist/{FullScreenModal-RzY5XxiG.js.map → FullScreenModal-CiRKNsls.js.map} +1 -1
  52. package/dist/{InlineEdit-CXL0ZslO.js → InlineEdit-BzOox46S.js} +4 -4
  53. package/dist/{InlineEdit-CXL0ZslO.js.map → InlineEdit-BzOox46S.js.map} +1 -1
  54. package/dist/{InputGroup-BWeanEo7.js → InputGroup-DnGP9-ZQ.js} +2 -2
  55. package/dist/{InputGroup-BWeanEo7.js.map → InputGroup-DnGP9-ZQ.js.map} +1 -1
  56. package/dist/{Kbd-BprYCICe.js → Kbd-6velz9J-.js} +2 -2
  57. package/dist/{Kbd-BprYCICe.js.map → Kbd-6velz9J-.js.map} +1 -1
  58. package/dist/{MermaidDiagram-E3azndPk.js → MermaidDiagram-l83gco3r.js} +2 -2
  59. package/dist/{MermaidDiagram-E3azndPk.js.map → MermaidDiagram-l83gco3r.js.map} +1 -1
  60. package/dist/{Modal-Cf_kPEBW.js → Modal-CLu6Eg5p.js} +2 -2
  61. package/dist/{Modal-Cf_kPEBW.js.map → Modal-CLu6Eg5p.js.map} +1 -1
  62. package/dist/{MultiActionButtonGroup-8WQwL4UQ.js → MultiActionButtonGroup-B3-wNw7w.js} +3 -3
  63. package/dist/{MultiActionButtonGroup-8WQwL4UQ.js.map → MultiActionButtonGroup-B3-wNw7w.js.map} +1 -1
  64. package/dist/{Navbar-CRjxVboE.js → Navbar-BEc-Pqo5.js} +2 -2
  65. package/dist/{Navbar-CRjxVboE.js.map → Navbar-BEc-Pqo5.js.map} +1 -1
  66. package/dist/{PageHeader-DosMyar2.js → PageHeader-CfFKjCzo.js} +2 -2
  67. package/dist/PageHeader-CfFKjCzo.js.map +1 -0
  68. package/dist/{PageToolbar-By2HznxO.js → PageToolbar-NmiausP7.js} +2 -2
  69. package/dist/{PageToolbar-By2HznxO.js.map → PageToolbar-NmiausP7.js.map} +1 -1
  70. package/dist/{Pagination-DrXTrvfD.js → Pagination-DidOPSPB.js} +2 -2
  71. package/dist/{Pagination-DrXTrvfD.js.map → Pagination-DidOPSPB.js.map} +1 -1
  72. package/dist/{Popconfirm-BJuDOHdv.js → Popconfirm-C4ryoeGP.js} +2 -2
  73. package/dist/{Popconfirm-BJuDOHdv.js.map → Popconfirm-C4ryoeGP.js.map} +1 -1
  74. package/dist/{RadioGroup-B9oC8P15.js → RadioGroup-BIElT-nH.js} +2 -2
  75. package/dist/{RadioGroup-B9oC8P15.js.map → RadioGroup-BIElT-nH.js.map} +1 -1
  76. package/dist/{Search-OgaNjqQM.js → Search-xDWaQ2z3.js} +2 -2
  77. package/dist/{Search-OgaNjqQM.js.map → Search-xDWaQ2z3.js.map} +1 -1
  78. package/dist/{SearchInput-eLS-uvOn.js → SearchInput-BwlJ77mV.js} +3 -3
  79. package/dist/{SearchInput-eLS-uvOn.js.map → SearchInput-BwlJ77mV.js.map} +1 -1
  80. package/dist/{SectionNav-L81iJBo3.js → SectionNav-DV3Hwj-5.js} +14 -8
  81. package/dist/SectionNav-DV3Hwj-5.js.map +1 -0
  82. package/dist/{Select-DRdkdzBp.js → Select-C3Q_Xk_Z.js} +2 -2
  83. package/dist/{Select-DRdkdzBp.js.map → Select-C3Q_Xk_Z.js.map} +1 -1
  84. package/dist/{Sheet-DVb4XoJ5.js → Sheet-D7NnOyud.js} +2 -2
  85. package/dist/{Sheet-DVb4XoJ5.js.map → Sheet-D7NnOyud.js.map} +1 -1
  86. package/dist/{Sidebar-DYvodJWN.js → Sidebar-DaUDM8jm.js} +5 -5
  87. package/dist/{Sidebar-DYvodJWN.js.map → Sidebar-DaUDM8jm.js.map} +1 -1
  88. package/dist/{Slider-B9IskDxf.js → Slider-Cdl8FOvI.js} +3 -3
  89. package/dist/{Slider-B9IskDxf.js.map → Slider-Cdl8FOvI.js.map} +1 -1
  90. package/dist/{Table-BwgBm3hJ.js → Table-DtLrXt4i.js} +39 -7
  91. package/dist/Table-DtLrXt4i.js.map +1 -0
  92. package/dist/{Tabs-DmJB4l_N.js → Tabs-DUOUQKh7.js} +2 -2
  93. package/dist/{Tabs-DmJB4l_N.js.map → Tabs-DUOUQKh7.js.map} +1 -1
  94. package/dist/{TextInput--1CfZybC.js → TextInput-BAL-zOAN.js} +3 -3
  95. package/dist/{TextInput--1CfZybC.js.map → TextInput-BAL-zOAN.js.map} +1 -1
  96. package/dist/{ThemeProvider-BCHllN7d.js → ThemeProvider-MzVbTDBj.js} +2 -2
  97. package/dist/{ThemeProvider-BCHllN7d.js.map → ThemeProvider-MzVbTDBj.js.map} +1 -1
  98. package/dist/{ToggleAllTooltip-BFmA6TXf.js → ToggleAllTooltip-DQE5Lw6w.js} +2 -2
  99. package/dist/{ToggleAllTooltip-BFmA6TXf.js.map → ToggleAllTooltip-DQE5Lw6w.js.map} +1 -1
  100. package/dist/{ZoomableSvg-BRPGgaWJ.js → ZoomableSvg-CIOqAYpd.js} +4 -4
  101. package/dist/{ZoomableSvg-BRPGgaWJ.js.map → ZoomableSvg-CIOqAYpd.js.map} +1 -1
  102. package/dist/editors.js +3 -3
  103. package/dist/flint.js +3 -3
  104. package/dist/flint.js.map +1 -1
  105. package/dist/index.d.ts +410 -354
  106. package/dist/index.js +52 -50
  107. package/dist/internal/blocks/AIKit.js +1 -1
  108. package/dist/internal/blocks/AppShell.js +1 -1
  109. package/dist/internal/blocks/AuthLayout.js +1 -1
  110. package/dist/internal/blocks/BrandEditor.js +1 -1
  111. package/dist/internal/blocks/BulkActionsBar.js +55 -0
  112. package/dist/internal/blocks/BulkActionsBar.js.map +1 -0
  113. package/dist/internal/blocks/ChipEditor.js +2 -2
  114. package/dist/internal/blocks/ClipboardButton.js +1 -1
  115. package/dist/internal/blocks/ColorInput.js +1 -1
  116. package/dist/internal/blocks/ColorModeSwitch.js +1 -1
  117. package/dist/internal/blocks/Command.js +1 -1
  118. package/dist/internal/blocks/CopyField.js +1 -1
  119. package/dist/internal/blocks/DateInput.js +1 -1
  120. package/dist/internal/blocks/DateRangeInput.js +1 -1
  121. package/dist/internal/blocks/ExportMenu.js +2 -2
  122. package/dist/internal/blocks/Form/connectors/ComboboxField.js +2 -2
  123. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +1 -1
  124. package/dist/internal/blocks/Form.js +2 -2
  125. package/dist/internal/blocks/FormGroup.js +1 -1
  126. package/dist/internal/blocks/InlineEdit.js +1 -1
  127. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
  128. package/dist/internal/blocks/MultiCombobox.js +3 -3
  129. package/dist/internal/blocks/NumberInput.js +1 -1
  130. package/dist/internal/blocks/PageHeader.js +1 -1
  131. package/dist/internal/blocks/PageSection.js +31 -0
  132. package/dist/internal/blocks/PageSection.js.map +1 -0
  133. package/dist/internal/blocks/PageToolbar.js +1 -1
  134. package/dist/internal/blocks/PasswordInput.js +2 -2
  135. package/dist/internal/blocks/SearchInput.js +1 -1
  136. package/dist/internal/blocks/SearchInputWithNavigation.js +3 -3
  137. package/dist/internal/blocks/SectionNav.js +1 -1
  138. package/dist/internal/blocks/SplitButton.js +1 -1
  139. package/dist/internal/blocks/TextInput.js +1 -1
  140. package/dist/internal/blocks/Textarea.js +1 -1
  141. package/dist/internal/blocks/TimeInput.js +2 -2
  142. package/dist/internal/components/Alert.js +1 -1
  143. package/dist/internal/components/AlertModal.js +1 -1
  144. package/dist/internal/components/Avatar.js +3 -2
  145. package/dist/internal/components/Avatar.js.map +1 -1
  146. package/dist/internal/components/BrandLogo.js +1 -1
  147. package/dist/internal/components/Breadcrumb.js +1 -1
  148. package/dist/internal/components/Button.js +1 -1
  149. package/dist/internal/components/Checkbox.js +1 -1
  150. package/dist/internal/components/Clipboard.js +1 -1
  151. package/dist/internal/components/CollapsiblePanel.js +1 -1
  152. package/dist/internal/components/Combobox.js +1 -1
  153. package/dist/internal/components/DateRangePicker.js +1 -1
  154. package/dist/internal/components/FileUpload.js +1 -1
  155. package/dist/internal/components/FullScreenModal.js +1 -1
  156. package/dist/internal/components/InputGroup.js +1 -1
  157. package/dist/internal/components/Kbd.js +1 -1
  158. package/dist/internal/components/Modal.js +1 -1
  159. package/dist/internal/components/Navbar.js +1 -1
  160. package/dist/internal/components/Pagination.js +1 -1
  161. package/dist/internal/components/Popconfirm.js +1 -1
  162. package/dist/internal/components/RadioGroup.js +1 -1
  163. package/dist/internal/components/Search.js +1 -1
  164. package/dist/internal/components/Select.js +1 -1
  165. package/dist/internal/components/Sheet.js +1 -1
  166. package/dist/internal/components/Sidebar.js +1 -1
  167. package/dist/internal/components/Slider.js +1 -1
  168. package/dist/internal/components/Table.js +1 -1
  169. package/dist/internal/components/Tabs.js +1 -1
  170. package/dist/internal/components/ThemeProvider.js +1 -1
  171. package/dist/internal/components/Tooltip.js +1 -1
  172. package/dist/internal/components/Truncated.js +1 -1
  173. package/dist/internal/components/ZoomableSvg.js +1 -1
  174. package/dist/internal/utils.js +1 -1
  175. package/dist/markdown-editor.js +6 -6
  176. package/dist/mermaid.js +1 -1
  177. package/dist/rjsf.js +74 -54
  178. package/dist/rjsf.js.map +1 -1
  179. package/dist/styles.css +1 -1
  180. package/dist/testing.js +1 -1
  181. package/dist/{utils-DjFceY3H.js → utils-BxEJOnFD.js} +2 -2
  182. package/dist/{utils-DjFceY3H.js.map → utils-BxEJOnFD.js.map} +1 -1
  183. package/package.json +3 -3
  184. package/src/styles.css +11 -1
  185. package/dist/AIKit-CxKkvN0q.js.map +0 -1
  186. package/dist/Clipboard-fAkDdpEu.js.map +0 -1
  187. package/dist/ClipboardButton-71Ugbl8c.js.map +0 -1
  188. package/dist/Combobox-DYjvYgl3.js.map +0 -1
  189. package/dist/PageHeader-DosMyar2.js.map +0 -1
  190. package/dist/SectionNav-L81iJBo3.js.map +0 -1
  191. package/dist/Table-BwgBm3hJ.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @keboola/design
2
2
 
3
+ ## 17.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - `RjsfSchemaEditor` can put a field's tooltip icon at the end of its description.
8
+
9
+ - `options.tooltip_placement: "description"` next to `options.tooltip` moves the (i) from the label to the end of the description.
10
+ - Works for regular fields and for `format: "table"` arrays.
11
+ - Without a description, or without the option, the icon stays beside the label.
12
+
13
+ ### Patch Changes
14
+
15
+ - Internal code satisfies the `anti-slop` lint rules; public APIs and behaviour are unchanged.
16
+
17
+ - `Reflect.get`, parameters typed `object` and accumulator-copying reducers give way to narrowing, precise types, `filter` and `flatMap`.
18
+ - `@keboola/api-client` keeps its `as unknown as` bridges from OpenAPI to domain types.
19
+
20
+ - `AnswerActions` lets the reader send the same Bad-answer comment again when `onDownComment` throws or rejects, so a failed send is no longer silently deduped. The error still reaches the global handler, and `onDownComment` now accepts any return type.
21
+
22
+ - `Avatar` hides its generated pattern from assistive technology: the SVG is `aria-hidden`, and the Gravatar image's `alt` names the user.
23
+
24
+ - `PageHeader.Detail` keeps its breadcrumbs row as tall as the overflow menu button whether or not `overflowActions` is passed, so the title sits at the same height on every detail page.
25
+
26
+ ## 17.1.0
27
+
28
+ ### Minor Changes
29
+
30
+ - Clipboard copy reports its outcome to the host once the copy settles:
31
+ - `Clipboard` and `ClipboardButton` take `onCopied(copied: boolean)`, called once per copy attempt with whether it succeeded, and not when a click ran no copy.
32
+ - `AnswerActions` calls `onCopy` only after the answer is on the clipboard, and the new `onCopyError` when the copy failed. `onCopy` used to fire on every click, before the copy settled and even when it failed.
33
+
34
+ - New building blocks for list and settings pages.
35
+ - `PageSection`: a titled section without a box — heading, optional description, actions on the right.
36
+ - `BulkActionsBar` and `Reveal`: the bar a table selection acts through, growing in and out with it.
37
+ - `Table.EmptyRow`: the one row of a table with nothing to show, under the table's own header.
38
+
39
+ ### Patch Changes
40
+
41
+ - `isMac` falls back to `navigator.platform` when the client hints report an empty platform (a user-agent override, DevTools emulation), so a Mac keeps the Cmd shortcuts and the `⌘` key labels.
42
+
43
+ - A glyph Inter does not ship (the `→` range join) renders from the system font again, not from `Inter Fallback`.
44
+ - `Inter Fallback` covers only the codepoints of the Inter subset (latin + latin-ext), so it stands in for Inter's own glyphs and nothing else.
45
+
46
+ - `SectionNav`: a group row's chevron opens or collapses the group without navigating.
47
+ - The rest of the row still opens the group and goes to its first section.
48
+ - The chevron has its own hover background and a padded hit area.
49
+
3
50
  ## 17.0.0
4
51
 
5
52
  ### Major Changes
@@ -1960,7 +2007,7 @@ tw:gap-2` at the call site. Consumers can drop those.
1960
2007
  `--border` / `--accent` / status tokens instead of hardcoded light values, and
1961
2008
  the SVG cache is keyed on the theme so a scheme or brand switch re-renders the
1962
2009
  diagram instead of serving the previously rendered one. Applies to ```mermaid
1963
- fences rendered through `Markdown` too.
2010
+ fences rendered through `Markdown` too.
1964
2011
 
1965
2012
  - `PageLayout.Content nav` lets the page scroll instead of containing the body, and sticky page chrome paints past the content column.
1966
2013
 
@@ -1,24 +1,24 @@
1
1
  import { cn } from "./classNames-DkX30VJU.js";
2
- import { Tooltip, TooltipProvider, isMac } from "./utils-DjFceY3H.js";
2
+ import { Tooltip, TooltipProvider, isMac } from "./utils-BxEJOnFD.js";
3
3
  import { AlertCircle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Ban, BarChart3, Bell, BookOpen, Bookmark, Box, Bug, Calendar, ChartBar, ChartPie, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle, CircleAlert, CircleCheck, CircleHelp, CirclePause, CirclePlay, CirclePlus, CircleStop, CircleX, Clock, Cloud, Cog, Copy, Database, Download, Ellipsis, ExternalLink, Eye, File, FilePen, FileText, Filter, Flag, Folder, Gauge, GitBranch, GitMerge, GitPullRequest, Globe, Hand, HardDrive, History, Hourglass, Info, Key, Layers, Lightbulb, LineChart, Link, List, ListChecks, Loader2, LoaderCircle, Lock, Mail, Maximize2, Minimize2, Minus, Package, Pause, Pencil, Pin, Play, Plus, Quote, RefreshCw, Rocket, RotateCcw, RotateCw, Save, Search, Send, Server, Settings, Shield, Sparkles, Star, Table, ThumbsDown, ThumbsUp, Trash2, TrendingDown, TrendingUp, TriangleAlert, Upload, User, Users, WandSparkles, Warehouse, Workflow, Wrench, X, XCircle, Zap } from "./icons-DDR9dFSr.js";
4
- import { Button } from "./Button-DbvGzEDb.js";
4
+ import { Button } from "./Button-BAMX1iuI.js";
5
5
  import { ButtonGroup } from "./internal/components/ButtonGroup.js";
6
- import { ClipboardButton } from "./ClipboardButton-71Ugbl8c.js";
7
- import { FullScreenModal, FullScreenModalBody, FullScreenModalHeader } from "./FullScreenModal-RzY5XxiG.js";
6
+ import { ClipboardButton } from "./ClipboardButton-BWeaQEM2.js";
7
+ import { FullScreenModal, FullScreenModalBody, FullScreenModalHeader } from "./FullScreenModal-CiRKNsls.js";
8
8
  import { Truncated } from "./internal/components/Truncated.js";
9
9
  import { useStableCallback } from "./internal/hooks/useStableCallback.js";
10
10
  import { HoverCard } from "./HoverCard-OGWKRXJ7.js";
11
- import { Command } from "./Command-BcTb6GsR.js";
12
- import { TextInput } from "./TextInput--1CfZybC.js";
11
+ import { Command } from "./Command-D6XYzzJf.js";
12
+ import { TextInput } from "./TextInput-BAL-zOAN.js";
13
13
  import { Badge } from "./Badge-CFRhducL.js";
14
14
  import { Textarea } from "./internal/blocks/Textarea.js";
15
- import { Kbd, keys } from "./Kbd-BprYCICe.js";
15
+ import { Kbd, keys } from "./Kbd-6velz9J-.js";
16
16
  import { Collapsible } from "./Collapsible-zsXk4Vpp.js";
17
- import { Alert } from "./Alert-DziS8n1H.js";
18
- import { Table as Table$1, tableAriaSort } from "./Table-BwgBm3hJ.js";
17
+ import { Alert } from "./Alert-BQB-og_I.js";
18
+ import { Table as Table$1, tableAriaSort } from "./Table-DtLrXt4i.js";
19
19
  import { DiagramSkeleton } from "./internal/blocks/DiagramShared/DiagramSkeleton.js";
20
20
  import { DiagramSource, makeResponsive } from "./svgTransforms-BBxxO9T6.js";
21
- import { ZoomableSvg, toSvgFileContent } from "./ZoomableSvg-BRPGgaWJ.js";
21
+ import { ZoomableSvg, toSvgFileContent } from "./ZoomableSvg-CIOqAYpd.js";
22
22
  import { Progress } from "./internal/components/Progress.js";
23
23
  import { digitFromKeyCode, useAltDigitHotkey } from "./internal/hooks/useAltDigitHotkey.js";
24
24
  import { createContext, isValidElement, use, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
@@ -35,6 +35,8 @@ const MAX_COMMENT_LENGTH = 2e3;
35
35
  * One-line follow-up to a thumbs-down.
36
36
  *
37
37
  * - Submits on Enter or blur, trimmed, and only when the text differs from the last one sent.
38
+ * - A send that throws or rejects is forgotten, so the same text can be sent again.
39
+ * - The rejection still reaches the global handler; the input shows no error itself.
38
40
  * - Never submits an empty comment.
39
41
  */
40
42
  const AnswerCommentInput = ({ placeholder, onSubmit }) => {
@@ -44,7 +46,13 @@ const AnswerCommentInput = ({ placeholder, onSubmit }) => {
44
46
  const comment = text.trim();
45
47
  if (!comment || comment === lastSubmittedRef.current) return;
46
48
  lastSubmittedRef.current = comment;
47
- onSubmit(comment);
49
+ const forget = () => {
50
+ if (lastSubmittedRef.current === comment) lastSubmittedRef.current = "";
51
+ };
52
+ new Promise((resolve) => resolve(onSubmit(comment))).catch((error) => {
53
+ forget();
54
+ throw error;
55
+ });
48
56
  };
49
57
  const handleKeyDown = (event) => {
50
58
  if (event.key !== "Enter") return;
@@ -102,7 +110,7 @@ const SIZES = {
102
110
  * - A vote can be changed but not withdrawn; pressing the pressed one re-sends it.
103
111
  * - The caller owns the recorded vote and the write.
104
112
  */
105
- const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions = [], labels = DEFAULT_LABELS, confirmation, size = "small", layout = "inline", onDownComment, commentPlaceholder = "What was wrong? (optional)", onRegenerate, regenerateLabel = "Ask again", groupDivider = false, timestamp, voteStyle = "tinted" }) => {
113
+ const AnswerActions = ({ copyText, vote, onVote, onCopy, onCopyError, actions, extraActions = [], labels = DEFAULT_LABELS, confirmation, size = "small", layout = "inline", onDownComment, commentPlaceholder = "What was wrong? (optional)", onRegenerate, regenerateLabel = "Ask again", groupDivider = false, timestamp, voteStyle = "tinted" }) => {
106
114
  const { button, gap } = SIZES[size];
107
115
  const votes = VOTE_BUTTONS.map(({ vote: candidate, icon }) => {
108
116
  const isRecorded = vote === candidate;
@@ -127,7 +135,7 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
127
135
  tooltip: "Copy answer",
128
136
  size: button,
129
137
  variant: "invisible",
130
- onClick: onCopy
138
+ onCopied: (copied) => copied ? onCopy?.() : onCopyError?.()
131
139
  }) : null;
132
140
  const regenerate = onRegenerate ? /* @__PURE__ */ jsx(Tooltip, {
133
141
  tooltip: regenerateLabel,
@@ -4585,4 +4593,4 @@ const UsageStats = ({ value, alert = false, children, className, ariaLabel, alig
4585
4593
  };
4586
4594
  export { ANSWER_SOURCES_VISIBLE, AnswerActions, AnswerSources, AnswerSummary, AttachmentChip, CONTEXT_CHIP_EXPANDABLE_LENGTH, ChatInlineIcon, ChatNotice, CollapsibleStepHeader, ContextChip, FileDownloadChip, FileGallery, InlineStepDetail, InlineStepGroup, InlineStepLabel, JumpToLatest, Markdown, MarkdownTable, MessageBubble, ModeChip, PROMPT_INPUT_CONTAINER, PlanApproval, PlanRewritingIndicator, PromptInput, Question, QuestionBlock, SourceChip, SuggestedPrompt, ThinkingIndicator, ToolCallApproval, ToolCallChip, ToolCallStatusHeader, UsageBar, UsageStats, clampPercentage, findMentionToken, findSlashToken, formatPercentage, getChatInlineIconName, splitSealedBlocks, withholdOpenTail };
4587
4595
 
4588
- //# sourceMappingURL=AIKit-CxKkvN0q.js.map
4596
+ //# sourceMappingURL=AIKit-DiF0LtVr.js.map