@keboola/design 16.1.0 → 17.1.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 (190) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/{AIKit-Cf5plya2.js → AIKit-DyysN1kS.js} +35 -45
  3. package/dist/AIKit-DyysN1kS.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-RZ0i3w8u.js} +4 -4
  31. package/dist/{Combobox-DYjvYgl3.js.map → Combobox-RZ0i3w8u.js.map} +1 -1
  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/{PageLayout-LcvJccOW.js → PageLayout-kY31oUix.js} +2 -2
  67. package/dist/{PageLayout-LcvJccOW.js.map → PageLayout-kY31oUix.js.map} +1 -1
  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 +1 -1
  104. package/dist/index.d.ts +409 -365
  105. package/dist/index.js +52 -50
  106. package/dist/internal/blocks/AIKit.js +1 -1
  107. package/dist/internal/blocks/AppShell.js +1 -1
  108. package/dist/internal/blocks/AuthLayout.js +1 -1
  109. package/dist/internal/blocks/BrandEditor.js +1 -1
  110. package/dist/internal/blocks/BulkActionsBar.js +55 -0
  111. package/dist/internal/blocks/BulkActionsBar.js.map +1 -0
  112. package/dist/internal/blocks/ChipEditor.js +2 -2
  113. package/dist/internal/blocks/ClipboardButton.js +1 -1
  114. package/dist/internal/blocks/ColorInput.js +1 -1
  115. package/dist/internal/blocks/ColorModeSwitch.js +1 -1
  116. package/dist/internal/blocks/Command.js +1 -1
  117. package/dist/internal/blocks/CopyField.js +1 -1
  118. package/dist/internal/blocks/DateInput.js +1 -1
  119. package/dist/internal/blocks/DateRangeInput.js +1 -1
  120. package/dist/internal/blocks/EmptyState.js +7 -2
  121. package/dist/internal/blocks/EmptyState.js.map +1 -1
  122. package/dist/internal/blocks/ExportMenu.js +2 -2
  123. package/dist/internal/blocks/Form/connectors/ComboboxField.js +2 -2
  124. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +1 -1
  125. package/dist/internal/blocks/Form.js +2 -2
  126. package/dist/internal/blocks/FormGroup.js +1 -1
  127. package/dist/internal/blocks/InlineEdit.js +1 -1
  128. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
  129. package/dist/internal/blocks/MultiCombobox.js +3 -3
  130. package/dist/internal/blocks/NumberInput.js +1 -1
  131. package/dist/internal/blocks/PageLayout.js +1 -1
  132. package/dist/internal/blocks/PageSection.js +31 -0
  133. package/dist/internal/blocks/PageSection.js.map +1 -0
  134. package/dist/internal/blocks/PageToolbar.js +1 -1
  135. package/dist/internal/blocks/PasswordInput.js +2 -2
  136. package/dist/internal/blocks/SearchInput.js +1 -1
  137. package/dist/internal/blocks/SearchInputWithNavigation.js +3 -3
  138. package/dist/internal/blocks/SectionNav.js +1 -1
  139. package/dist/internal/blocks/SplitButton.js +1 -1
  140. package/dist/internal/blocks/TextInput.js +1 -1
  141. package/dist/internal/blocks/Textarea.js +1 -1
  142. package/dist/internal/blocks/TimeInput.js +2 -2
  143. package/dist/internal/components/Alert.js +1 -1
  144. package/dist/internal/components/AlertModal.js +1 -1
  145. package/dist/internal/components/Avatar.js +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 +11 -11
  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 +50 -0
  185. package/src/theme.css +10 -8
  186. package/dist/AIKit-Cf5plya2.js.map +0 -1
  187. package/dist/Clipboard-fAkDdpEu.js.map +0 -1
  188. package/dist/ClipboardButton-71Ugbl8c.js.map +0 -1
  189. package/dist/SectionNav-L81iJBo3.js.map +0 -1
  190. package/dist/Table-BwgBm3hJ.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # @keboola/design
2
2
 
3
+ ## 17.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Clipboard copy reports its outcome to the host once the copy settles:
8
+ - `Clipboard` and `ClipboardButton` take `onCopied(copied: boolean)`, called once per copy attempt with whether it succeeded, and not when a click ran no copy.
9
+ - `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.
10
+
11
+ - New building blocks for list and settings pages.
12
+ - `PageSection`: a titled section without a box — heading, optional description, actions on the right.
13
+ - `BulkActionsBar` and `Reveal`: the bar a table selection acts through, growing in and out with it.
14
+ - `Table.EmptyRow`: the one row of a table with nothing to show, under the table's own header.
15
+
16
+ ### Patch Changes
17
+
18
+ - `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.
19
+
20
+ - A glyph Inter does not ship (the `→` range join) renders from the system font again, not from `Inter Fallback`.
21
+ - `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.
22
+
23
+ - `SectionNav`: a group row's chevron opens or collapses the group without navigating.
24
+ - The rest of the row still opens the group and goes to its first section.
25
+ - The chevron has its own hover background and a padded hit area.
26
+
27
+ ## 17.0.0
28
+
29
+ ### Major Changes
30
+
31
+ - `MarkdownTable` takes no `surface` prop: its right-edge fade masks the table itself, so it reads on any background in both themes.
32
+ - The fade shows while columns remain to the right, as before.
33
+ - `MessageBubble`'s Show more fold fades the clipped text the same way.
34
+
35
+ ### Patch Changes
36
+
37
+ - `MultiCombobox` keeps its clear and open buttons on the right, outside the chip row, and wraps the input below the chips only when less than 4rem is left beside them.
38
+
39
+ - `EmptyState` wraps its centred text evenly:
40
+ - `EmptyState.Title` balances its lines (`text-wrap: balance`).
41
+ - `EmptyState.Description` avoids a lone word on its last line (`text-wrap: pretty`).
42
+
43
+ - Text keeps its place when Inter swaps in.
44
+ - `Inter Fallback` is Arial (or Liberation Sans) scaled to Inter's width, ascent and descent, one face per Inter weight.
45
+ - Every Inter stack — `html`, `--font-display`, `font-sans`, `font-display` — lists it right after `Inter`.
46
+
47
+ - `MarkdownTable` re-renders only when its overflow state changes.
48
+ - A scroll or resize that leaves the fade and the expand action as they were renders nothing.
49
+
50
+ - `scroll-fade`, `scroll-fade-y` and `scroll-fade-x` (`@keboola/design/theme` and the `@keboola/tailwind-config/scrollFade` plugin) show no fade in browsers without scroll-driven animations (Firefox), so a `Modal.Body` that does not scroll keeps its first line solid there
51
+ - Where `animation-timeline: scroll()` is unsupported, the reveal animations are off and both edges stay solid.
52
+ - `PageLayout`'s nav column applies `scroll-fade-y` without its own `@supports` guard.
53
+
54
+ - Updated dependencies:
55
+ - @keboola/tailwind-config@1.2.1
56
+
3
57
  ## 16.1.0
4
58
 
5
59
  ### Minor Changes
@@ -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";
@@ -102,7 +102,7 @@ const SIZES = {
102
102
  * - A vote can be changed but not withdrawn; pressing the pressed one re-sends it.
103
103
  * - The caller owns the recorded vote and the write.
104
104
  */
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" }) => {
105
+ 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
106
  const { button, gap } = SIZES[size];
107
107
  const votes = VOTE_BUTTONS.map(({ vote: candidate, icon }) => {
108
108
  const isRecorded = vote === candidate;
@@ -127,7 +127,7 @@ const AnswerActions = ({ copyText, vote, onVote, onCopy, actions, extraActions =
127
127
  tooltip: "Copy answer",
128
128
  size: button,
129
129
  variant: "invisible",
130
- onClick: onCopy
130
+ onCopied: (copied) => copied ? onCopy?.() : onCopyError?.()
131
131
  }) : null;
132
132
  const regenerate = onRegenerate ? /* @__PURE__ */ jsx(Tooltip, {
133
133
  tooltip: regenerateLabel,
@@ -2120,40 +2120,37 @@ Markdown.Block = MarkdownBlock;
2120
2120
  /** How much wider than its column a table has to be before the column is the wrong surface. */
2121
2121
  const EXPAND_RATIO = 1.5;
2122
2122
  /**
2123
- * The fade's end colour — must match the host's surface, or it draws a strip over the data.
2124
- *
2125
- * - Full class strings: Tailwind reads literals.
2126
- */
2127
- const FADE_SURFACE = {
2128
- card: "tw:from-card",
2129
- background: "tw:from-background"
2130
- };
2131
- /**
2132
2123
  * A table in an answer that shows when it is cut off on the right.
2133
2124
  *
2134
2125
  * - Controls sit in a fixed-height rail above the grid, so they never cover rows or shift them.
2135
2126
  * - The fade shows only while content remains to the right.
2136
- * - A painted gradient, not `tw:scroll-fade-x`: that needs scroll-driven animations, which the
2127
+ * - A static mask, not `tw:scroll-fade-x`: that needs scroll-driven animations, which the
2137
2128
  * `baseline-widely-available` build floor lacks, and must sit on `Table`'s own container.
2138
2129
  * - Past `EXPAND_RATIO` the expand action shows without hover.
2139
2130
  */
2140
- const MarkdownTable = ({ children, actions, onExpand, surface = "card", sortable = false, className }) => {
2131
+ const MarkdownTable = ({ children, actions, onExpand, sortable = false, className }) => {
2141
2132
  const frameRef = useRef(null);
2142
2133
  const [overflow, setOverflow] = useState({
2143
2134
  scrollable: false,
2144
2135
  atEnd: true,
2145
- ratio: 1
2136
+ wide: false
2146
2137
  });
2138
+ /**
2139
+ * Reads `Table`'s own container (the frame's first child); the frame stays visible for the fade.
2140
+ *
2141
+ * - Keeps the previous state while no flag flips, so a scroll or resize that crosses no edge renders nothing.
2142
+ */
2147
2143
  const measure = useCallback(() => {
2148
2144
  const box = frameRef.current?.firstElementChild;
2149
2145
  if (!box) return;
2150
2146
  const { scrollLeft, scrollWidth, clientWidth } = box;
2151
2147
  const hidden = scrollWidth - clientWidth;
2152
- setOverflow({
2148
+ const next = {
2153
2149
  scrollable: hidden > 1,
2154
2150
  atEnd: scrollLeft >= hidden - 1,
2155
- ratio: clientWidth > 0 ? scrollWidth / clientWidth : 1
2156
- });
2151
+ wide: clientWidth > 0 && scrollWidth / clientWidth >= EXPAND_RATIO
2152
+ };
2153
+ setOverflow((prev) => prev.scrollable === next.scrollable && prev.atEnd === next.atEnd && prev.wide === next.wide ? prev : next);
2157
2154
  }, []);
2158
2155
  useEffect(() => {
2159
2156
  const box = frameRef.current?.firstElementChild;
@@ -2168,7 +2165,7 @@ const MarkdownTable = ({ children, actions, onExpand, surface = "card", sortable
2168
2165
  observer.disconnect();
2169
2166
  };
2170
2167
  }, [measure]);
2171
- const showExpand = !!onExpand && overflow.scrollable && overflow.ratio >= EXPAND_RATIO;
2168
+ const showExpand = !!onExpand && overflow.scrollable && overflow.wide;
2172
2169
  return /* @__PURE__ */ jsxs("div", {
2173
2170
  className,
2174
2171
  children: [(actions || onExpand) && /* @__PURE__ */ jsxs("div", {
@@ -2184,14 +2181,10 @@ const MarkdownTable = ({ children, actions, onExpand, surface = "card", sortable
2184
2181
  children: [/* @__PURE__ */ jsx(Maximize2, { className: "tw:size-3.5" }), "Open wider"]
2185
2182
  })
2186
2183
  })]
2187
- }), /* @__PURE__ */ jsxs("div", {
2184
+ }), /* @__PURE__ */ jsx("div", {
2188
2185
  ref: frameRef,
2189
- className: "tw:relative",
2190
- children: [sortable ? /* @__PURE__ */ jsx(TableSortProvider, { children }) : children, overflow.scrollable && !overflow.atEnd && /* @__PURE__ */ jsx("span", {
2191
- "aria-hidden": true,
2192
- "data-testid": "markdown-table-fade",
2193
- className: cn("tw:pointer-events-none tw:absolute tw:inset-y-px tw:right-px tw:w-12 tw:rounded-r-[10px] tw:bg-gradient-to-l tw:to-transparent", FADE_SURFACE[surface])
2194
- })]
2186
+ className: overflow.atEnd ? void 0 : "tw:mask-r-from-[calc(100%-3rem)]",
2187
+ children: sortable ? /* @__PURE__ */ jsx(TableSortProvider, { children }) : children
2195
2188
  })]
2196
2189
  });
2197
2190
  };
@@ -2200,9 +2193,10 @@ const MarkdownTable = ({ children, actions, onExpand, surface = "card", sortable
2200
2193
  * Clips tall content at `maxHeight` behind a fade, with a Show more / Show less toggle.
2201
2194
  *
2202
2195
  * - The toggle and fade appear only while the content is taller than `maxHeight`.
2196
+ * - The fade masks the content itself, so it reads on any surface.
2203
2197
  * - Height is measured with a `ResizeObserver`; without one (jsdom) nothing is clipped.
2204
2198
  */
2205
- const CollapsedMessageBody = ({ maxHeight, fadeClassName, children }) => {
2199
+ const CollapsedMessageBody = ({ maxHeight, children }) => {
2206
2200
  const contentRef = useRef(null);
2207
2201
  const [isOverflowing, setIsOverflowing] = useState(false);
2208
2202
  const [isExpanded, setIsExpanded] = useState(false);
@@ -2216,16 +2210,13 @@ const CollapsedMessageBody = ({ maxHeight, fadeClassName, children }) => {
2216
2210
  const isClipped = isOverflowing && !isExpanded;
2217
2211
  return /* @__PURE__ */ jsxs("div", {
2218
2212
  className: "tw:flex tw:flex-col tw:items-start tw:gap-1",
2219
- children: [/* @__PURE__ */ jsxs("div", {
2220
- className: "tw:relative tw:w-full tw:overflow-hidden",
2213
+ children: [/* @__PURE__ */ jsx("div", {
2214
+ className: cn("tw:w-full tw:overflow-hidden", isClipped && "tw:mask-b-from-[calc(100%-3rem)]"),
2221
2215
  style: isClipped ? { maxHeight } : void 0,
2222
- children: [/* @__PURE__ */ jsx("div", {
2216
+ children: /* @__PURE__ */ jsx("div", {
2223
2217
  ref: contentRef,
2224
2218
  children
2225
- }), isClipped && /* @__PURE__ */ jsx("div", {
2226
- "aria-hidden": true,
2227
- className: cn("tw:pointer-events-none tw:absolute tw:inset-x-0 tw:bottom-0 tw:h-12 tw:bg-gradient-to-t tw:to-transparent", fadeClassName)
2228
- })]
2219
+ })
2229
2220
  }), isOverflowing && /* @__PURE__ */ jsx(Button, {
2230
2221
  variant: "inline",
2231
2222
  size: "small",
@@ -2344,7 +2335,6 @@ const MessageBubble = ({ variant, children, actions, createdAt, timestamp = "too
2344
2335
  }) : null;
2345
2336
  const body = collapseAfterPx === void 0 ? children : /* @__PURE__ */ jsx(CollapsedMessageBody, {
2346
2337
  maxHeight: collapseAfterPx,
2347
- fadeClassName: variant === "user" ? "tw:from-muted" : "tw:from-background",
2348
2338
  children
2349
2339
  });
2350
2340
  const hasActionsRow = isTimestampVisible || deliveryStatus !== null;
@@ -4595,4 +4585,4 @@ const UsageStats = ({ value, alert = false, children, className, ariaLabel, alig
4595
4585
  };
4596
4586
  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 };
4597
4587
 
4598
- //# sourceMappingURL=AIKit-Cf5plya2.js.map
4588
+ //# sourceMappingURL=AIKit-DyysN1kS.js.map