@eifi1/ui-kit 0.21.0 → 0.23.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 (320) hide show
  1. package/README.md +42 -25
  2. package/dist/chart.d.ts +19 -14
  3. package/dist/components/account-chips.d.ts +10 -3
  4. package/dist/components/account-chips.js +5 -2
  5. package/dist/components/account-chips.js.map +1 -1
  6. package/dist/components/account-settings.d.ts +33 -2
  7. package/dist/components/account-settings.js +43 -21
  8. package/dist/components/account-settings.js.map +1 -1
  9. package/dist/components/amount-input.d.ts +53 -14
  10. package/dist/components/amount-input.js +17 -28
  11. package/dist/components/amount-input.js.map +1 -1
  12. package/dist/components/autocomplete.d.ts +29 -0
  13. package/dist/components/autocomplete.js +134 -104
  14. package/dist/components/autocomplete.js.map +1 -1
  15. package/dist/components/button-group.d.ts +19 -14
  16. package/dist/components/calculator.d.ts +19 -14
  17. package/dist/components/checkbox-group.d.ts +104 -0
  18. package/dist/components/checkbox-group.js +111 -0
  19. package/dist/components/checkbox-group.js.map +1 -0
  20. package/dist/components/checkbox.d.ts +19 -0
  21. package/dist/components/checkbox.js +30 -7
  22. package/dist/components/checkbox.js.map +1 -1
  23. package/dist/components/chip.d.ts +18 -0
  24. package/dist/components/chip.js +47 -10
  25. package/dist/components/chip.js.map +1 -1
  26. package/dist/components/column-mapper.d.ts +182 -0
  27. package/dist/components/column-mapper.js +375 -0
  28. package/dist/components/column-mapper.js.map +1 -0
  29. package/dist/components/combobox-core.d.ts +39 -2
  30. package/dist/components/combobox-core.js +29 -6
  31. package/dist/components/combobox-core.js.map +1 -1
  32. package/dist/components/combobox.d.ts +91 -2
  33. package/dist/components/combobox.js +454 -308
  34. package/dist/components/combobox.js.map +1 -1
  35. package/dist/components/confirm-dialog.d.ts +69 -161
  36. package/dist/components/confirm-dialog.js +7 -8
  37. package/dist/components/confirm-dialog.js.map +1 -1
  38. package/dist/components/copy-button.d.ts +16 -11
  39. package/dist/components/country-select.d.ts +167 -0
  40. package/dist/components/country-select.js +293 -0
  41. package/dist/components/country-select.js.map +1 -0
  42. package/dist/components/currency-select.d.ts +17 -1
  43. package/dist/components/currency-select.js +56 -23
  44. package/dist/components/currency-select.js.map +1 -1
  45. package/dist/components/danger-confirm.d.ts +69 -166
  46. package/dist/components/danger-confirm.js +144 -50
  47. package/dist/components/danger-confirm.js.map +1 -1
  48. package/dist/components/data-table-cells.d.ts +1 -2
  49. package/dist/components/data-table-filter-popover.d.ts +1 -2
  50. package/dist/components/data-table-filters.d.ts +1 -2
  51. package/dist/components/data-table-labels.d.ts +4 -97
  52. package/dist/components/data-table-labels.js +9 -1
  53. package/dist/components/data-table-labels.js.map +1 -1
  54. package/dist/components/data-table-pagination.d.ts +3 -1
  55. package/dist/components/data-table.d.ts +1 -2
  56. package/dist/components/data-table.js +98 -3
  57. package/dist/components/data-table.js.map +1 -1
  58. package/dist/components/date-picker.d.ts +66 -5
  59. package/dist/components/date-picker.js +378 -66
  60. package/dist/components/date-picker.js.map +1 -1
  61. package/dist/components/entity-combobox.d.ts +42 -1
  62. package/dist/components/entity-combobox.js +154 -113
  63. package/dist/components/entity-combobox.js.map +1 -1
  64. package/dist/components/facing-pair.d.ts +19 -14
  65. package/dist/components/field-parts.d.ts +224 -0
  66. package/dist/components/field-parts.js +156 -0
  67. package/dist/components/field-parts.js.map +1 -0
  68. package/dist/components/field-strip.d.ts +105 -0
  69. package/dist/components/field-strip.js +46 -0
  70. package/dist/components/field-strip.js.map +1 -0
  71. package/dist/components/file-button.d.ts +19 -14
  72. package/dist/components/file-button.js +13 -3
  73. package/dist/components/file-button.js.map +1 -1
  74. package/dist/components/file-dropzone.d.ts +41 -15
  75. package/dist/components/file-dropzone.js +57 -34
  76. package/dist/components/file-dropzone.js.map +1 -1
  77. package/dist/components/form-actions.d.ts +18 -13
  78. package/dist/components/form-actions.js +69 -5
  79. package/dist/components/form-actions.js.map +1 -1
  80. package/dist/components/iban-input.d.ts +69 -0
  81. package/dist/components/iban-input.js +125 -0
  82. package/dist/components/iban-input.js.map +1 -0
  83. package/dist/components/icon-picker.d.ts +21 -2
  84. package/dist/components/icon-picker.js +19 -4
  85. package/dist/components/icon-picker.js.map +1 -1
  86. package/dist/components/inline-edit-field.d.ts +167 -0
  87. package/dist/components/inline-edit-field.js +293 -0
  88. package/dist/components/inline-edit-field.js.map +1 -0
  89. package/dist/components/language-select.d.ts +130 -0
  90. package/dist/components/language-select.js +18 -0
  91. package/dist/components/language-select.js.map +1 -0
  92. package/dist/components/line-items.d.ts +25 -3
  93. package/dist/components/line-items.js +55 -46
  94. package/dist/components/line-items.js.map +1 -1
  95. package/dist/components/list.d.ts +25 -0
  96. package/dist/components/list.js +16 -5
  97. package/dist/components/list.js.map +1 -1
  98. package/dist/components/money-field.d.ts +32 -14
  99. package/dist/components/money-field.js.map +1 -1
  100. package/dist/components/month-picker.d.ts +52 -4
  101. package/dist/components/month-picker.js +291 -86
  102. package/dist/components/month-picker.js.map +1 -1
  103. package/dist/components/multi-entity-combobox.d.ts +26 -1
  104. package/dist/components/multi-entity-combobox.js +143 -102
  105. package/dist/components/multi-entity-combobox.js.map +1 -1
  106. package/dist/components/multi-select.d.ts +8 -1
  107. package/dist/components/multi-select.js +9 -4
  108. package/dist/components/multi-select.js.map +1 -1
  109. package/dist/components/number-field.d.ts +34 -19
  110. package/dist/components/number-field.js +6 -20
  111. package/dist/components/number-field.js.map +1 -1
  112. package/dist/components/number-input.d.ts +79 -19
  113. package/dist/components/number-input.js +90 -38
  114. package/dist/components/number-input.js.map +1 -1
  115. package/dist/components/numpad-sheet.d.ts +19 -14
  116. package/dist/components/one-time-code-input.d.ts +100 -0
  117. package/dist/components/one-time-code-input.js +137 -0
  118. package/dist/components/one-time-code-input.js.map +1 -0
  119. package/dist/components/phone-input.d.ts +69 -0
  120. package/dist/components/phone-input.js +171 -0
  121. package/dist/components/phone-input.js.map +1 -0
  122. package/dist/components/reauth-dialog.d.ts +2 -2
  123. package/dist/components/reauth-dialog.js +6 -8
  124. package/dist/components/reauth-dialog.js.map +1 -1
  125. package/dist/components/series-chart.d.ts +19 -14
  126. package/dist/components/settings-fields.d.ts +19 -14
  127. package/dist/components/share-card.d.ts +16 -11
  128. package/dist/components/sign-chip.d.ts +66 -0
  129. package/dist/components/sign-chip.js +39 -0
  130. package/dist/components/sign-chip.js.map +1 -0
  131. package/dist/components/swatch-picker.d.ts +43 -2
  132. package/dist/components/swatch-picker.js +80 -32
  133. package/dist/components/swatch-picker.js.map +1 -1
  134. package/dist/components/switch.d.ts +19 -0
  135. package/dist/components/switch.js +24 -6
  136. package/dist/components/switch.js.map +1 -1
  137. package/dist/components/text-link.d.ts +18 -13
  138. package/dist/components/tile-radio.d.ts +88 -13
  139. package/dist/components/tile-radio.js +28 -11
  140. package/dist/components/tile-radio.js.map +1 -1
  141. package/dist/components/time-input.d.ts +24 -15
  142. package/dist/components/time-input.js.map +1 -1
  143. package/dist/components/toggle-group.d.ts +47 -1
  144. package/dist/components/toggle-group.js +110 -69
  145. package/dist/components/toggle-group.js.map +1 -1
  146. package/dist/components/trigger-aria.d.ts +3 -0
  147. package/dist/components/trigger-aria.js +3 -1
  148. package/dist/components/trigger-aria.js.map +1 -1
  149. package/dist/components/ui.d.ts +16 -11
  150. package/dist/components/ui.js +284 -88
  151. package/dist/components/ui.js.map +1 -1
  152. package/dist/components/use-table-state.d.ts +1 -2
  153. package/dist/{data-table-3mi2R3so.d.ts → data-table-labels-B7OdnM0S.d.ts} +140 -3
  154. package/dist/data-table.d.ts +1 -2
  155. package/dist/data-table.js +2 -1
  156. package/dist/data-table.js.map +1 -1
  157. package/dist/feedback/feedback-attachment.d.ts +1 -1
  158. package/dist/feedback/feedback-attachment.js +348 -41
  159. package/dist/feedback/feedback-attachment.js.map +1 -1
  160. package/dist/feedback/feedback-dialog.d.ts +1 -1
  161. package/dist/feedback/feedback-dialog.js.map +1 -1
  162. package/dist/feedback/feedback-inbox.d.ts +3 -2
  163. package/dist/feedback/feedback-inbox.js.map +1 -1
  164. package/dist/feedback/feedback-thread.d.ts +68 -253
  165. package/dist/feedback/feedback-thread.js +46 -10
  166. package/dist/feedback/feedback-thread.js.map +1 -1
  167. package/dist/{kit-labels-D1J2_jyD.d.ts → feedback-BxeQVzwq.d.ts} +1206 -20
  168. package/dist/{feedback-attachment-WFiXJ8We.d.ts → feedback-attachment-fGAzZPf0.d.ts} +178 -11
  169. package/dist/feedback.d.ts +66 -2
  170. package/dist/hooks/use-file-drop.d.ts +19 -14
  171. package/dist/i18n/defaults.d.ts +19 -14
  172. package/dist/i18n/defaults.js +19 -2
  173. package/dist/i18n/defaults.js.map +1 -1
  174. package/dist/i18n/german.d.ts +19 -14
  175. package/dist/i18n/german.js +84 -5
  176. package/dist/i18n/german.js.map +1 -1
  177. package/dist/i18n/kit-labels.d.ts +15 -10
  178. package/dist/i18n/kit-labels.js +8 -2
  179. package/dist/i18n/kit-labels.js.map +1 -1
  180. package/dist/i18n/languages.d.ts +19 -14
  181. package/dist/i18n/locales/de-CH.d.ts +19 -14
  182. package/dist/i18n/locales/en.d.ts +19 -14
  183. package/dist/i18n/locales/en.js +16 -0
  184. package/dist/i18n/locales/en.js.map +1 -1
  185. package/dist/i18n/locales/es.d.ts +19 -14
  186. package/dist/i18n/locales/es.js +83 -5
  187. package/dist/i18n/locales/es.js.map +1 -1
  188. package/dist/i18n/locales/fr.d.ts +19 -14
  189. package/dist/i18n/locales/fr.js +82 -5
  190. package/dist/i18n/locales/fr.js.map +1 -1
  191. package/dist/i18n/locales/hu.d.ts +19 -14
  192. package/dist/i18n/locales/hu.js +85 -5
  193. package/dist/i18n/locales/hu.js.map +1 -1
  194. package/dist/i18n/locales/it.d.ts +19 -14
  195. package/dist/i18n/locales/it.js +84 -5
  196. package/dist/i18n/locales/it.js.map +1 -1
  197. package/dist/i18n/locales/zh.d.ts +19 -14
  198. package/dist/i18n/locales/zh.js +80 -5
  199. package/dist/i18n/locales/zh.js.map +1 -1
  200. package/dist/i18n/review.d.ts +19 -14
  201. package/dist/i18n/review.js +27 -1
  202. package/dist/i18n/review.js.map +1 -1
  203. package/dist/index.d.ts +21 -10
  204. package/dist/index.js +73 -2
  205. package/dist/index.js.map +1 -1
  206. package/dist/lib/column-mapping.d.ts +81 -0
  207. package/dist/lib/column-mapping.js +108 -0
  208. package/dist/lib/column-mapping.js.map +1 -0
  209. package/dist/lib/countries.d.ts +43 -0
  210. package/dist/lib/countries.js +39 -0
  211. package/dist/lib/countries.js.map +1 -0
  212. package/dist/lib/decimal-marks.d.ts +46 -0
  213. package/dist/lib/decimal-marks.js +40 -0
  214. package/dist/lib/decimal-marks.js.map +1 -0
  215. package/dist/lib/iban.d.ts +98 -0
  216. package/dist/lib/iban.js +154 -0
  217. package/dist/lib/iban.js.map +1 -0
  218. package/dist/lib/isin.d.ts +30 -0
  219. package/dist/lib/isin.js +36 -0
  220. package/dist/lib/isin.js.map +1 -0
  221. package/dist/lib/phone.d.ts +69 -0
  222. package/dist/lib/phone.js +121 -0
  223. package/dist/lib/phone.js.map +1 -0
  224. package/dist/lib/table-text.d.ts +109 -1
  225. package/dist/lib/table-text.js +122 -1
  226. package/dist/lib/table-text.js.map +1 -1
  227. package/dist/rhf/fields.d.ts +233 -18
  228. package/dist/rhf/fields.js +456 -3
  229. package/dist/rhf/fields.js.map +1 -1
  230. package/dist/rhf/form.d.ts +19 -14
  231. package/dist/rhf.d.ts +22 -15
  232. package/dist/rhf.js.map +1 -1
  233. package/dist/shell/app-shell.d.ts +18 -13
  234. package/dist/shell/top-bar-brand.d.ts +19 -14
  235. package/dist/shell/topbar-action-menu.d.ts +36 -3
  236. package/dist/shell/topbar-action-menu.js +74 -33
  237. package/dist/shell/topbar-action-menu.js.map +1 -1
  238. package/dist/shell.d.ts +18 -13
  239. package/dist/table-text.d.ts +1 -1
  240. package/dist/tour/tour.js +20 -24
  241. package/dist/tour/tour.js.map +1 -1
  242. package/dist/wizard/stepper-nav.d.ts +49 -16
  243. package/dist/wizard/stepper-nav.js +4 -0
  244. package/dist/wizard/stepper-nav.js.map +1 -1
  245. package/dist/wizard.d.ts +19 -14
  246. package/package.json +1 -1
  247. package/src/components/account-chips.tsx +17 -3
  248. package/src/components/account-settings.tsx +92 -26
  249. package/src/components/amount-input.tsx +68 -56
  250. package/src/components/autocomplete.tsx +198 -114
  251. package/src/components/checkbox-group.tsx +229 -0
  252. package/src/components/checkbox.tsx +72 -8
  253. package/src/components/chip.tsx +80 -10
  254. package/src/components/column-mapper.tsx +666 -0
  255. package/src/components/combobox-core.tsx +82 -9
  256. package/src/components/combobox.tsx +661 -340
  257. package/src/components/confirm-dialog.tsx +12 -8
  258. package/src/components/country-select.tsx +556 -0
  259. package/src/components/currency-select.tsx +109 -33
  260. package/src/components/danger-confirm.tsx +429 -82
  261. package/src/components/data-table-labels.ts +16 -1
  262. package/src/components/data-table.tsx +175 -6
  263. package/src/components/date-picker.tsx +595 -71
  264. package/src/components/entity-combobox.tsx +235 -124
  265. package/src/components/field-parts.tsx +403 -0
  266. package/src/components/field-strip.tsx +149 -0
  267. package/src/components/file-button.tsx +36 -3
  268. package/src/components/file-dropzone.tsx +106 -38
  269. package/src/components/form-actions.tsx +147 -6
  270. package/src/components/iban-input.tsx +231 -0
  271. package/src/components/icon-picker.tsx +47 -6
  272. package/src/components/inline-edit-field.tsx +533 -0
  273. package/src/components/language-select.tsx +78 -0
  274. package/src/components/line-items.tsx +35 -2
  275. package/src/components/list.tsx +55 -6
  276. package/src/components/money-field.tsx +13 -0
  277. package/src/components/month-picker.tsx +400 -63
  278. package/src/components/multi-entity-combobox.tsx +207 -120
  279. package/src/components/multi-select.tsx +80 -58
  280. package/src/components/number-field.tsx +28 -46
  281. package/src/components/number-input.tsx +210 -43
  282. package/src/components/one-time-code-input.tsx +288 -0
  283. package/src/components/phone-input.tsx +299 -0
  284. package/src/components/reauth-dialog.tsx +17 -18
  285. package/src/components/sign-chip.tsx +103 -0
  286. package/src/components/swatch-picker.tsx +143 -31
  287. package/src/components/switch.tsx +58 -7
  288. package/src/components/tile-radio.tsx +145 -29
  289. package/src/components/time-input.tsx +8 -1
  290. package/src/components/toggle-group.tsx +206 -73
  291. package/src/components/trigger-aria.ts +5 -0
  292. package/src/components/ui.tsx +479 -138
  293. package/src/data-table.ts +2 -1
  294. package/src/feedback/feedback-attachment.tsx +597 -46
  295. package/src/feedback/feedback-dialog.tsx +9 -3
  296. package/src/feedback/feedback-inbox.tsx +3 -2
  297. package/src/feedback/feedback-thread.tsx +113 -9
  298. package/src/i18n/defaults.ts +18 -1
  299. package/src/i18n/german.ts +89 -0
  300. package/src/i18n/kit-labels.tsx +82 -2
  301. package/src/i18n/locales/en.ts +36 -4
  302. package/src/i18n/locales/es.ts +87 -0
  303. package/src/i18n/locales/fr.ts +87 -0
  304. package/src/i18n/locales/hu.ts +83 -0
  305. package/src/i18n/locales/it.ts +88 -0
  306. package/src/i18n/locales/zh.ts +76 -0
  307. package/src/i18n/review.ts +26 -0
  308. package/src/index.ts +71 -3
  309. package/src/lib/column-mapping.ts +234 -0
  310. package/src/lib/countries.ts +91 -0
  311. package/src/lib/decimal-marks.ts +99 -0
  312. package/src/lib/iban.ts +171 -0
  313. package/src/lib/isin.ts +62 -0
  314. package/src/lib/phone.ts +211 -0
  315. package/src/lib/table-text.ts +271 -0
  316. package/src/rhf/fields.tsx +860 -9
  317. package/src/rhf.ts +3 -1
  318. package/src/shell/topbar-action-menu.tsx +134 -38
  319. package/src/tour/tour.tsx +66 -28
  320. package/src/wizard/stepper-nav.tsx +35 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/feedback/feedback-thread.tsx"],"sourcesContent":["import { useEffect, useImperativeHandle, useLayoutEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { ReactNode, Ref } from \"react\";\nimport { ImageIcon, ImageOff, Paperclip, Send } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { formatDate, formatRelativeTime } from \"../lib/format\";\nimport { Button, EmptyState, Spinner, Textarea } from \"../components/ui\";\nimport { Skeleton } from \"../components/skeleton\";\nimport { Tooltip } from \"../components/tooltip\";\nimport { useKitFileLabels, useKitLabels, useKitLocale } from \"../i18n/kit-labels\";\nimport { FeedbackAttachmentField } from \"./feedback-attachment\";\nimport type { FeedbackNoteAttachment } from \"./feedback-inbox\";\nimport type { FeedbackAttachmentLabels } from \"./feedback-dialog\";\n\n/**\n * The conversation under a report: who said what, when, with what attached — and the\n * box to answer in.\n *\n * Both apps had written it by hand. kastlan's feedback page grew a comment list of\n * bordered boxes with `slate-*` literals (feedback-page.tsx, \"keksdose left this\n * unbuilt\"), and keksdose built the same thing a second time for support\n * (support-thread.tsx) with sides, bubbles and a composer that clears only what it\n * sent. This is that second one, generalised: the kit owns the look and the\n * behaviour, the app owns the data, the upload and every word it does not share.\n *\n * **Own vs other** is the caller's per message (`own`), not a comparison the kit makes\n * against a user id: whose message sits at the END side depends on who is reading,\n * and only the app knows that (keksdose's support thread labelled a member's question\n * \"Du\" in the admin panel the first time round, by reading the wrong field).\n *\n * **Redaction.** A thread is somebody's words about their own data — exactly what a\n * host's demo / screen-share mode blurs. Bodies, authors and attachments carry\n * `data-private` (the attribute `Tooltip redact` and `StatTile sensitive` use) unless\n * `redact={false}`.\n *\n * **RTL.** Sides are logical — `justify-end` is the reading end, and the bubble's\n * tucked corner is `rounded-ee` / `rounded-es` — and each body is `dir=\"auto\"`, so a\n * Hebrew reply in an English thread (or the reverse) lays out as its own language.\n *\n * **A chat, too** (keksdose G4/G5). keksdose's support chat is the same conversation\n * read the chat way: status lines between the messages (\"Closed automatically\",\n * \"Reopened\"), a day line where the date changes, clock times under it, Enter to send\n * and several files uploaded ahead of the send. Each of those is an opt-in here\n * (`kind: \"event\"`, `daySeparators`, `timeFormat=\"clock\"`, `sendOn=\"enter\"`,\n * `attachmentSlot` + `canSend`), so the feedback thread's defaults stay as they were.\n */\n\n/* ── Labels ───────────────────────────────────────────────────────────────── */\n\n/** The `feedbackThread` namespace of `<UiKitProvider labels>`. */\nexport interface FeedbackThreadLabels {\n /** Accessible name of the message list. */\n thread: string;\n empty: string;\n loading: string;\n /** Author line of an `own` message that has no `author` of its own. */\n you: string;\n /** The badge beside a `staff` author. */\n staff: string;\n /** Accessible name of a message's attachment list. */\n attachments: string;\n}\n\nexport const DEFAULT_FEEDBACK_THREAD_LABELS: FeedbackThreadLabels = {\n thread: \"Comments\",\n empty: \"No comments yet\",\n loading: \"Loading comments…\",\n you: \"You\",\n staff: \"Staff\",\n attachments: \"Attachments\",\n};\n\n/** The `feedbackComposer` namespace of `<UiKitProvider labels>`. The attach buttons'\n * words are `feedbackAttachment`'s, shared with the dialog and the note editor. */\nexport interface FeedbackComposerLabels {\n /** Accessible name of the text box. */\n field: string;\n placeholder: string;\n send: string;\n /** The shortcut line, given the platform's modifier (\"Ctrl\" or \"⌘\"). */\n sendHint: (modifier: string) => string;\n /** The shortcut line under `sendOn=\"enter\"` (keksdose G5): Enter sends, so say how a\n * new line is made. */\n sendHintEnter: string;\n}\n\nexport const DEFAULT_FEEDBACK_COMPOSER_LABELS: FeedbackComposerLabels = {\n field: \"Write a comment\",\n placeholder: \"Write a comment…\",\n send: \"Send\",\n sendHint: (modifier) => `${modifier} + Enter to send`,\n sendHintEnter: \"Enter to send, Shift + Enter for a new line\",\n};\n\n/* ── Thread ───────────────────────────────────────────────────────────────── */\n\nexport interface FeedbackThreadAttachment {\n id?: string | number;\n name: string;\n /** Where to open it. Left out, the attachment is listed by name only. */\n url?: string;\n /** MIME type; an `image/*` with a `url` is shown as a thumbnail. */\n type?: string;\n /** Bytes, shown beside a non-image. */\n size?: number;\n}\n\nexport interface FeedbackThreadMessage {\n /** Leave out, or `\"message\"`. `\"event\"` is a {@link FeedbackThreadEvent}. */\n kind?: \"message\";\n id: string | number;\n /** Who wrote it. Left out on an `own` message, it reads \"You\". */\n author?: ReactNode;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: string;\n attachments?: readonly FeedbackThreadAttachment[];\n /** Written by whoever is reading: sits at the end side, in the brand tint. */\n own?: boolean;\n /** Written by the team rather than a user: gets the \"Staff\" badge. */\n staff?: boolean;\n}\n\n/**\n * A line in the thread that nobody wrote — \"Closed automatically\", \"Marked as\n * resolved\", \"Reopened\" — drawn centred and muted with its time, no author, no side,\n * no bubble.\n *\n * keksdose G4: its support chat interleaves these with the messages, and as a message\n * they came out as a bubble from nobody at the start side, which reads as the member\n * having said \"resolved\". Word it for the READER, as with `own`: the app knows whether\n * \"you reopened it\" or \"Anna reopened it\" is true for the person looking.\n *\n * The text is the app's, not somebody's words about their data, so it is NOT tagged\n * `data-private`; one that names a person can wrap the name in its own\n * `<span data-private>` (`body` is a node for that reason).\n */\nexport interface FeedbackThreadEvent {\n kind: \"event\";\n id: string | number;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: ReactNode;\n}\n\n/** One row of a {@link FeedbackThread}: a message, or an event line between them. */\nexport type FeedbackThreadItem = FeedbackThreadMessage | FeedbackThreadEvent;\n\nexport interface FeedbackThreadProps {\n /** Oldest first. Event lines ({@link FeedbackThreadEvent}) sit among the messages. */\n messages: readonly FeedbackThreadItem[];\n loading?: boolean;\n /** Replaces the default \"No comments yet\". */\n empty?: ReactNode;\n /**\n * Draw one attachment yourself — for files behind auth, which a plain `<img src>`\n * cannot fetch (kastlan's `AuthedImage`), or a lightbox. The default is a thumbnail\n * link for an image with a `url`, a file link otherwise.\n */\n renderAttachment?: (attachment: FeedbackThreadAttachment, message: FeedbackThreadMessage) => ReactNode;\n /** Tag bodies, authors and attachments `data-private`. Default true. */\n redact?: boolean;\n /**\n * How a row's time reads. `\"relative\"` (default): \"5 minutes ago\", a date past six\n * days — right for a report's comments, read days apart. `\"clock\"`: the time of day\n * in the locale (\"14:05\", \"2:05 PM\") — the chat look, keksdose G4; pair it with\n * `daySeparators`, which say which day that clock time is on. Either way the full\n * date and time is in the Tooltip.\n */\n timeFormat?: \"relative\" | \"clock\";\n /**\n * A centred day line before the first row and wherever the next row is on another\n * calendar day (the device's zone): \"Today\", \"Yesterday\", else the date — keksdose\n * G4. \"Today\" / \"Yesterday\" are `Intl.RelativeTimeFormat`'s own words in the kit\n * locale, so there is no label to translate. Default false.\n */\n daySeparators?: boolean;\n /** \"Now\" for the relative times and the day lines — pin it in tests and stories.\n * Default: the clock. */\n now?: Date | number;\n /** Overrides the provider's locale for the times. */\n locale?: string;\n labels?: Partial<FeedbackThreadLabels>;\n className?: string;\n}\n\nexport function FeedbackThread({\n messages,\n loading = false,\n empty,\n renderAttachment,\n redact = true,\n now,\n locale: localeProp,\n timeFormat = \"relative\",\n daySeparators = false,\n labels: labelsProp,\n className,\n}: FeedbackThreadProps) {\n const labels = useKitLabels(\"feedbackThread\", DEFAULT_FEEDBACK_THREAD_LABELS, labelsProp);\n const locale = useKitLocale(localeProp);\n const file = useKitFileLabels();\n const priv = redact ? \"\" : undefined;\n const clock = useMinuteClock(now === undefined);\n const reference = now === undefined ? clock : +now;\n\n if (loading && messages.length === 0) {\n return <Skeleton lines={3} label={labels.loading} className={className} />;\n }\n if (messages.length === 0) {\n return (\n <EmptyState\n variant=\"inline\"\n size=\"sm\"\n title={empty ?? labels.empty}\n className={cn(\"justify-start\", className)}\n />\n );\n }\n\n // Per row, the calendar day of the last readable date up to it — what a day line\n // compares against.\n const days: (number | null)[] = [];\n for (const message of messages) {\n const date = toDate(message.createdAt);\n days.push(date ? dayNumber(date) : (days.at(-1) ?? null));\n }\n\n return (\n <ol aria-label={labels.thread} aria-busy={loading || undefined} className={cn(\"space-y-3\", className)}>\n {messages.flatMap((message, index) => {\n const date = toDate(message.createdAt);\n const time = date && (\n // The kit's Tooltip, not a native title: one tooltip look app-wide\n // (keksdose F0 / dev#523).\n <Tooltip label={new Intl.DateTimeFormat(locale, { dateStyle: \"full\", timeStyle: \"short\" }).format(date)}>\n <time dateTime={date.toISOString()} className=\"tabular-nums\">\n {timeFormat === \"clock\"\n ? formatDate(date, \"time\", { locale })\n : formatRelativeTime(date, {\n now: reference,\n locale,\n // Past the kit's day steps it is a date: \"2 weeks ago\" makes\n // the reader do arithmetic the date already did.\n absoluteAfterDays: 6.5,\n })}\n </time>\n </Tooltip>\n );\n const rows: ReactNode[] = [];\n const day = date && dayNumber(date);\n // Against the last row WITH a readable date: an unparseable one neither starts\n // a day nor hides the next change.\n if (daySeparators && date && day !== days[index - 1]) {\n rows.push(<DaySeparator key={`day-${message.id}`} date={date} now={reference} locale={locale} />);\n }\n if (message.kind === \"event\") {\n // A list item like the rest, so \"Reopened\" is read in its place, but not an\n // article: an article is somebody's post, and this has no author.\n rows.push(\n <li\n key={message.id}\n data-event=\"\"\n className=\"flex flex-wrap items-baseline justify-center gap-x-2 px-4 text-center text-xs text-[var(--text-muted)]\"\n >\n <span>{message.body}</span>\n {time && <span className=\"text-[11px]\">{time}</span>}\n </li>,\n );\n return rows;\n }\n const author = message.author ?? (message.own ? labels.you : null);\n const attachments = message.attachments ?? [];\n rows.push(\n <li\n key={message.id}\n className={cn(\"flex\", message.own ? \"justify-end\" : \"justify-start\")}\n data-own={message.own ? \"\" : undefined}\n >\n <article\n className={cn(\n \"max-w-[85%] min-w-0 rounded-lg px-3 py-2 text-sm\",\n message.own\n ? \"rounded-ee-sm bg-[var(--brand-bg)]\"\n : \"rounded-es-sm bg-[var(--bg-surface-2)]\",\n )}\n >\n <header className=\"mb-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-[var(--text-muted)]\">\n {author != null && (\n <span data-private={priv} className=\"font-medium text-[var(--text-secondary)]\">\n {author}\n </span>\n )}\n {message.staff && (\n <span className=\"rounded border border-[var(--border)] bg-[var(--bg-surface)] px-1 text-[10px] font-medium uppercase tracking-wide text-[var(--text-secondary)]\">\n {labels.staff}\n </span>\n )}\n {time}\n </header>\n {message.body && (\n <p\n data-private={priv}\n dir=\"auto\"\n className=\"whitespace-pre-wrap break-words text-start text-[var(--text-primary)]\"\n >\n {message.body}\n </p>\n )}\n {attachments.length > 0 && (\n <ul aria-label={labels.attachments} data-private={priv} className=\"mt-2 flex flex-wrap gap-2\">\n {attachments.map((attachment, index) => (\n <li key={attachment.id ?? `${index}-${attachment.name}`} className=\"min-w-0\">\n {renderAttachment ? (\n renderAttachment(attachment, message)\n ) : (\n <DefaultAttachment attachment={attachment} size={file.size} />\n )}\n </li>\n ))}\n </ul>\n )}\n </article>\n </li>,\n );\n return rows;\n })}\n </ol>\n );\n}\n\nfunction DefaultAttachment({\n attachment,\n size,\n}: {\n attachment: FeedbackThreadAttachment;\n size: (bytes: number) => string;\n}) {\n const { name, url, type } = attachment;\n if (url && type?.startsWith(\"image/\")) return <ImageThumbnail url={url} name={name} />;\n const content = (\n <>\n <Paperclip className=\"size-3.5 shrink-0\" aria-hidden />\n <span className=\"truncate\">{name}</span>\n {attachment.size !== undefined && (\n <span className=\"shrink-0 text-[var(--text-muted)]\">{size(attachment.size)}</span>\n )}\n </>\n );\n const chip =\n \"inline-flex max-w-full items-center gap-1 rounded border border-[var(--border)] bg-[var(--bg-surface)] px-2 py-1 text-xs text-[var(--text-secondary)]\";\n return url ? (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(chip, \"hover:bg-[var(--bg-hover)]\")}>\n {content}\n </a>\n ) : (\n <span className={chip}>{content}</span>\n );\n}\n\n/** An image attachment's thumbnail. The box is drawn before the picture arrives —\n * `loading=\"lazy\"` leaves it empty until it nears the viewport, and a URL that has\n * expired never fills it — and an empty bordered square read as a broken layout, not\n * as a picture. So the box carries an image glyph underneath until the picture\n * covers it, and swaps it for a broken-image glyph when the load fails. */\nfunction ImageThumbnail({ url, name }: { url: string; name: string }) {\n // Keyed on the URL, so a message whose attachment is replaced tries the new one.\n const [failedUrl, setFailedUrl] = useState<string | null>(null);\n const failed = failedUrl === url;\n const Glyph = failed ? ImageOff : ImageIcon;\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"relative block h-20 w-20 overflow-hidden rounded border border-[var(--border)] bg-[var(--bg-surface-2)]\"\n >\n <Glyph aria-hidden className=\"absolute inset-0 m-auto size-6 text-[var(--text-muted)]\" />\n {!failed && (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- load/error are resource events, not interactions\n <img\n src={url}\n alt={name}\n loading=\"lazy\"\n onError={() => setFailedUrl(url)}\n className=\"relative h-full w-full object-cover\"\n />\n )}\n {/* The <img> and its alt are gone once it failed; the link still needs a name. */}\n {failed && <span className=\"sr-only\">{name}</span>}\n </a>\n );\n}\n\n/** The time, refreshed once a minute while `active`, so \"2 minutes ago\" does not stay\n * \"just now\" on a page left open. Read in state rather than in render, which must be\n * pure. */\nfunction useMinuteClock(active: boolean): number {\n const [time, setTime] = useState(() => Date.now());\n useEffect(() => {\n if (!active) return;\n const id = setInterval(() => setTime(Date.now()), 60_000);\n return () => clearInterval(id);\n }, [active]);\n return time;\n}\n\n/** The local calendar day as one number (20260926), for \"same day?\" and keys. */\nfunction dayNumber(date: Date): number {\n return date.getFullYear() * 10_000 + (date.getMonth() + 1) * 100 + date.getDate();\n}\n\n/**\n * The day line of `daySeparators` (keksdose G4): \"Today\" / \"Yesterday\" from\n * `Intl.RelativeTimeFormat` (`numeric: \"auto\"`) — the locale's own words, capitalised\n * for a line that stands alone (\"heute\" → \"Heute\"; a script without case is left as\n * is) — else the weekday and date, with the year only when it is not this one.\n *\n * Counted in calendar days, not 24-hour spans: 23:50 yesterday is \"Yesterday\" at\n * 00:10 today.\n */\nfunction DaySeparator({ date, now, locale }: { date: Date; now: number; locale: string | undefined }) {\n const today = new Date(now);\n const days = Math.round(\n (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) -\n Date.UTC(today.getFullYear(), today.getMonth(), today.getDate())) /\n 86_400_000,\n );\n let label: string;\n if (days === 0 || days === -1) {\n const word = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" }).format(days + 0, \"day\");\n label = word.charAt(0).toLocaleUpperCase(locale) + word.slice(1);\n } else {\n label = formatDate(\n date,\n {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n ...(date.getFullYear() === today.getFullYear() ? null : { year: \"numeric\" }),\n },\n { locale },\n );\n }\n const y = String(date.getFullYear()).padStart(4, \"0\");\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return (\n <li data-day-separator=\"\" className=\"flex items-center gap-3 py-1 text-xs text-[var(--text-muted)]\">\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n <time dateTime={`${y}-${m}-${d}`} className=\"font-medium\">\n {label}\n </time>\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n </li>\n );\n}\n\nfunction toDate(value: Date | string | number): Date | null {\n const date = value instanceof Date ? value : new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/* ── Composer ─────────────────────────────────────────────────────────────── */\n\n/** What the composer's attach control takes — {@link FeedbackNoteAttachment} with the\n * labels optional, since the field reads `feedbackAttachment` from the provider. */\nexport type FeedbackComposerAttachment = Omit<FeedbackNoteAttachment, \"labels\"> & {\n labels?: Partial<FeedbackAttachmentLabels>;\n};\n\nexport interface FeedbackComposerProps {\n /**\n * Send the comment. Return the promise: the box clears when it RESOLVES, and only of\n * what was sent — text typed while it was in flight stays. A rejection keeps\n * everything for a retry (surface the error yourself; the composer stays quiet).\n *\n * `attachment` is the built-in field's one picture. Files the host uploaded ahead\n * (`attachmentSlot`) are the host's state, read by the host here — and `body` may be\n * `\"\"` when `canSend` let an attachments-only message go.\n */\n onSend: (body: string, attachment: File | null) => void | Promise<unknown>;\n /** The send is in flight: a spinner on the button and no second send. */\n pending?: boolean;\n /** Offer one picture with the comment (file, paste or `onCaptureScreenshot`).\n * `true` for the defaults. Left out, the composer is text only. */\n attachment?: boolean | FeedbackComposerAttachment;\n /**\n * The host's own attach control, in the row with Send where the built-in field sits\n * (after it, if both are on) — keksdose G5: its support chat uploads up to N files\n * AHEAD of the send and sends their refs, which one `File` in `onSend` cannot carry.\n * The slot is the host's picker plus the chips of what is uploaded; the upload, the\n * refs and clearing them once `onSend` resolves stay with the host. Pair it with\n * `canSend`.\n */\n attachmentSlot?: ReactNode;\n /**\n * Whether Send is enabled, over the composer's own rule (some text in the box) —\n * for state the composer cannot see, i.e. `attachmentSlot`'s (keksdose G5): `true`\n * with files ready makes an empty draft sendable (`onSend(\"\", null)`), `false` while\n * an upload is still running holds even a written reply back. Left out, the text\n * decides. `pending` blocks a send either way.\n */\n canSend?: boolean;\n /**\n * Which key sends. `\"mod-enter\"` (default): Ctrl/⌘+Enter, the report dialog's and\n * note editor's shortcut, with plain Enter a new line — feedback is written in\n * paragraphs. `\"enter\"`: the chat way (keksdose G5) — Enter sends, Shift+Enter is a\n * new line, Ctrl/⌘+Enter still sends; an Enter that confirms an IME composition\n * (Japanese, Chinese input) is the IME's, never a send.\n */\n sendOn?: \"mod-enter\" | \"enter\";\n /** Rendered INSTEAD of the composer — the thread is closed, or read-only for this\n * reader. */\n disabledReason?: ReactNode;\n rows?: number;\n /**\n * The box's hint, over the `placeholder` label — keksdose F9: an admin answering a\n * support ticket is asked something else (\"Reply to Anna…\") than a member adding to\n * their own report, and one provider-wide label cannot say both.\n */\n placeholder?: string;\n /**\n * The draft, controlled — for a host that keeps it itself (saves it per ticket,\n * prefills a template). Left out, the composer keeps its own. Either way a send\n * that resolves clears only what was sent: controlled, that is an\n * `onValueChange(\"\")` the host receives like any keystroke, and only if the draft\n * is still the one that went out.\n */\n value?: string;\n /** Every change to the draft — typing, {@link FeedbackComposerHandle.insertText}, the\n * clear after a send. Required to change a controlled `value`. */\n onValueChange?: (value: string) => void;\n /** {@link FeedbackComposerHandle}: put text into the draft from outside (canned-reply\n * chips) or focus the box. */\n ref?: Ref<FeedbackComposerHandle>;\n labels?: Partial<FeedbackComposerLabels>;\n className?: string;\n}\n\n/**\n * What a {@link FeedbackComposer} `ref` holds.\n *\n * keksdose F9: the support admin answers the same five questions all day and wants\n * chips above the box (\"Thanks, fixed in the next release\") that drop their text in\n * where the caret is. A controlled `value` alone cannot do that well — the host sees\n * the string, not the caret, so it could only append — so the composer, which owns\n * the textarea, does the splice.\n */\nexport interface FeedbackComposerHandle {\n /**\n * Insert `text` at the caret, replacing any selection (the caret the box last had:\n * a click on a chip blurs it, and the selection survives the blur), then focus the\n * box with the caret after the inserted text so the reply can go on. Nothing is\n * added around it — put a space or a newline in `text` if the reply needs one. A\n * no-op while `disabledReason` replaces the box.\n */\n insertText: (text: string) => void;\n focus: () => void;\n}\n\nconst noSubscribe = () => () => {};\nconst isApple = () =>\n typeof navigator !== \"undefined\" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent);\n\n/**\n * The answer box under a {@link FeedbackThread}: a textarea, an optional picture,\n * and Send — Ctrl/⌘+Enter sends, the shortcut the report dialog and the note editor\n * use, so the habit carries across the feature. Plain Enter is a new line: feedback is\n * written in paragraphs, unlike a chat — which `sendOn=\"enter\"` is for (keksdose G5).\n */\nexport function FeedbackComposer({\n onSend,\n pending = false,\n attachment,\n attachmentSlot,\n canSend: canSendProp,\n sendOn = \"mod-enter\",\n disabledReason,\n rows = 3,\n placeholder,\n value,\n onValueChange,\n ref,\n labels: labelsProp,\n className,\n}: FeedbackComposerProps) {\n const labels = useKitLabels(\"feedbackComposer\", DEFAULT_FEEDBACK_COMPOSER_LABELS, labelsProp);\n const [ownDraft, setOwnDraft] = useState(\"\");\n const controlled = value !== undefined;\n const draft = controlled ? value : ownDraft;\n const [file, setFile] = useState<File | null>(null);\n const root = useRef<HTMLDivElement>(null);\n const box = useRef<HTMLTextAreaElement>(null);\n // The draft as of the last commit. The send's `.then` and `insertText` run after\n // renders their closure did not see — text typed while the send was in flight, a\n // second chip clicked before the first one's render — and must not act on a stale\n // string (for a controlled draft there is no updater function to lean on).\n const latest = useRef(draft);\n useLayoutEffect(() => {\n latest.current = draft;\n });\n // Where the caret goes once an inserted text has rendered.\n const caret = useRef<number | null>(null);\n useLayoutEffect(() => {\n const el = box.current;\n if (caret.current === null || !el) return;\n el.focus();\n el.setSelectionRange(caret.current, caret.current);\n caret.current = null;\n });\n\n const setDraft = (next: string) => {\n latest.current = next;\n if (!controlled) setOwnDraft(next);\n onValueChange?.(next);\n };\n\n useImperativeHandle(ref, () => ({\n insertText: (text) => {\n const el = box.current;\n if (!el) return;\n const current = latest.current;\n // A second insert before the first has rendered goes after the first, not at the\n // textarea's not-yet-moved caret. Otherwise the textarea's selection, which may\n // be past the end of a controlled value the host has just shortened: clamp it.\n const pending = caret.current;\n const start = Math.min(pending ?? el.selectionStart ?? current.length, current.length);\n const end = pending ?? Math.max(start, Math.min(el.selectionEnd ?? start, current.length));\n caret.current = start + text.length;\n setDraft(current.slice(0, start) + text + current.slice(end));\n },\n focus: () => box.current?.focus(),\n }));\n // The server snapshot is \"Ctrl\"; the client corrects it after hydration.\n const modifier = useSyncExternalStore(\n noSubscribe,\n () => (isApple() ? \"⌘\" : \"Ctrl\"),\n () => \"Ctrl\",\n );\n\n if (disabledReason != null && disabledReason !== false) {\n return <p className={cn(\"text-xs text-[var(--text-muted)]\", className)}>{disabledReason}</p>;\n }\n\n const canSend = (canSendProp ?? draft.trim().length > 0) && !pending;\n const send = () => {\n if (!canSend) return;\n const sentDraft = draft;\n const sentFile = file;\n Promise.resolve(onSend(draft.trim(), file))\n .then(() => {\n if (latest.current === sentDraft) setDraft(\"\");\n setFile((current) => (current === sentFile ? null : current));\n })\n .catch(() => {});\n };\n\n const config = attachment === true ? {} : attachment || null;\n\n return (\n <div ref={root} className={cn(\"space-y-2\", className)}>\n <Textarea\n rows={rows}\n dir=\"auto\"\n aria-label={labels.field}\n ref={box}\n placeholder={placeholder ?? labels.placeholder}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key !== \"Enter\") return;\n const mod = event.ctrlKey || event.metaKey;\n // Under \"enter\": plain Enter sends, Shift+Enter falls through to the\n // textarea's new line, and an Enter that ends an IME composition is the\n // IME's (keyCode 229 is how Safari reports it after the composition ended).\n const chat =\n sendOn === \"enter\" &&\n !event.shiftKey &&\n !event.altKey &&\n !event.nativeEvent.isComposing &&\n event.keyCode !== 229;\n if (mod || chat) {\n event.preventDefault();\n send();\n }\n }}\n />\n <div className=\"flex flex-wrap items-end justify-between gap-2\">\n {config || attachmentSlot != null ? (\n <div className=\"flex min-w-0 flex-wrap items-end gap-2\">\n {config && (\n <FeedbackAttachmentField\n value={file}\n onChange={setFile}\n labels={config.labels}\n accept={config.accept}\n maxBytes={config.maxBytes}\n onError={config.onError}\n onCaptureScreenshot={config.onCaptureScreenshot}\n // The box is this field's sibling; a paste in it bubbles to `root`.\n pasteFrom={root}\n />\n )}\n {attachmentSlot}\n </div>\n ) : (\n <span />\n )}\n <div className=\"ms-auto flex items-center gap-2\">\n <span className=\"text-xs text-[var(--text-placeholder)]\">\n {sendOn === \"enter\" ? labels.sendHintEnter : labels.sendHint(modifier)}\n </span>\n <Button onClick={send} disabled={!canSend} aria-busy={pending || undefined}>\n {pending ? (\n <Spinner label={null} className=\"size-4\" />\n ) : (\n <Send className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n )}\n {labels.send}\n </Button>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";AA8MW,SAsIP,UAtIO,KAqDC,YArDD;AA9MX,SAAS,WAAW,qBAAqB,iBAAiB,QAAQ,UAAU,4BAA4B;AAExG,SAAS,WAAW,UAAU,WAAW,YAAY;AACrD,SAAS,UAAU;AACnB,SAAS,YAAY,0BAA0B;AAC/C,SAAS,QAAQ,YAAY,SAAS,gBAAgB;AACtD,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,kBAAkB,cAAc,oBAAoB;AAC7D,SAAS,+BAA+B;AAqDjC,MAAM,iCAAuD;AAAA,EAClE,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AACf;AAgBO,MAAM,mCAA2D;AAAA,EACtE,OAAO;AAAA,EACP,aAAa;AAA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AK;AAAA,UACP;AAAA,QACF;AAAA;AAAA,IACF;AAAA,IACA,qBAAC,SAAI,WAAU,kDACZ;AAAA,gBAAU,kBAAkB,OAC3B,qBAAC,SAAI,WAAU,0CACZ;AAAA,kBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ,OAAO;AAAA,YACf,QAAQ,OAAO;AAAA,YACf,UAAU,OAAO;AAAA,YACjB,SAAS,OAAO;AAAA,YAChB,qBAAqB,OAAO;AAAA,YAE5B,WAAW;AAAA;AAAA,QACb;AAAA,QAED;AAAA,SACH,IAEA,oBAAC,UAAK;AAAA,MAER,qBAAC,SAAI,WAAU,mCACb;AAAA,4BAAC,UAAK,WAAU,0CACb,qBAAW,UAAU,OAAO,gBAAgB,OAAO,SAAS,QAAQ,GACvE;AAAA,QACA,qBAAC,UAAO,SAAS,MAAM,UAAU,CAAC,SAAS,aAAW,WAAW,QAC9D;AAAA,oBACC,oBAAC,WAAQ,OAAO,MAAM,WAAU,UAAS,IAEzC,oBAAC,QAAK,WAAU,2BAA0B,eAAW,MAAC;AAAA,UAEvD,OAAO;AAAA,WACV;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAEJ;","names":["index","pending"]}
1
+ {"version":3,"sources":["../../src/feedback/feedback-thread.tsx"],"sourcesContent":["import { useEffect, useId, useImperativeHandle, useLayoutEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { ReactNode, Ref } from \"react\";\nimport { ImageIcon, ImageOff, Paperclip, Send } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { formatDate, formatRelativeTime } from \"../lib/format\";\nimport { Button, EmptyState, Spinner, Textarea } from \"../components/ui\";\nimport type { CharacterCountLabels } from \"../components/ui\";\nimport { Skeleton } from \"../components/skeleton\";\nimport { Tooltip } from \"../components/tooltip\";\nimport { useKitFileLabels, useKitLabels, useKitLocale } from \"../i18n/kit-labels\";\nimport { FeedbackAttachmentField } from \"./feedback-attachment\";\nimport type { FeedbackAttachmentFieldSingleProps } from \"./feedback-attachment\";\nimport type { FeedbackNoteAttachment } from \"./feedback-inbox\";\nimport type { FeedbackAttachmentLabels } from \"./feedback-dialog\";\n\n/**\n * The conversation under a report: who said what, when, with what attached — and the\n * box to answer in.\n *\n * Both apps had written it by hand. kastlan's feedback page grew a comment list of\n * bordered boxes with `slate-*` literals (feedback-page.tsx, \"keksdose left this\n * unbuilt\"), and keksdose built the same thing a second time for support\n * (support-thread.tsx) with sides, bubbles and a composer that clears only what it\n * sent. This is that second one, generalised: the kit owns the look and the\n * behaviour, the app owns the data, the upload and every word it does not share.\n *\n * **Own vs other** is the caller's per message (`own`), not a comparison the kit makes\n * against a user id: whose message sits at the END side depends on who is reading,\n * and only the app knows that (keksdose's support thread labelled a member's question\n * \"Du\" in the admin panel the first time round, by reading the wrong field).\n *\n * **Redaction.** A thread is somebody's words about their own data — exactly what a\n * host's demo / screen-share mode blurs. Bodies, authors and attachments carry\n * `data-private` (the attribute `Tooltip redact` and `StatTile sensitive` use) unless\n * `redact={false}`.\n *\n * **RTL.** Sides are logical — `justify-end` is the reading end, and the bubble's\n * tucked corner is `rounded-ee` / `rounded-es` — and each body is `dir=\"auto\"`, so a\n * Hebrew reply in an English thread (or the reverse) lays out as its own language.\n *\n * **A chat, too** (keksdose G4/G5). keksdose's support chat is the same conversation\n * read the chat way: status lines between the messages (\"Closed automatically\",\n * \"Reopened\"), a day line where the date changes, clock times under it, Enter to send\n * and several files uploaded ahead of the send. Each of those is an opt-in here\n * (`kind: \"event\"`, `daySeparators`, `timeFormat=\"clock\"`, `sendOn=\"enter\"`,\n * `attachmentSlot` + `canSend`), so the feedback thread's defaults stay as they were.\n */\n\n/* ── Labels ───────────────────────────────────────────────────────────────── */\n\n/** The `feedbackThread` namespace of `<UiKitProvider labels>`. */\nexport interface FeedbackThreadLabels {\n /** Accessible name of the message list. */\n thread: string;\n empty: string;\n loading: string;\n /** Author line of an `own` message that has no `author` of its own. */\n you: string;\n /** The badge beside a `staff` author. */\n staff: string;\n /** Accessible name of a message's attachment list. */\n attachments: string;\n}\n\nexport const DEFAULT_FEEDBACK_THREAD_LABELS: FeedbackThreadLabels = {\n thread: \"Comments\",\n empty: \"No comments yet\",\n loading: \"Loading comments…\",\n you: \"You\",\n staff: \"Staff\",\n attachments: \"Attachments\",\n};\n\n/** The `feedbackComposer` namespace of `<UiKitProvider labels>`. The attach buttons'\n * words are `feedbackAttachment`'s, shared with the dialog and the note editor. */\nexport interface FeedbackComposerLabels {\n /** Accessible name of the text box. */\n field: string;\n placeholder: string;\n send: string;\n /** The shortcut line, given the platform's modifier (\"Ctrl\" or \"⌘\"). */\n sendHint: (modifier: string) => string;\n /** The shortcut line under `sendOn=\"enter\"` (keksdose G5): Enter sends, so say how a\n * new line is made. */\n sendHintEnter: string;\n}\n\nexport const DEFAULT_FEEDBACK_COMPOSER_LABELS: FeedbackComposerLabels = {\n field: \"Write a comment\",\n placeholder: \"Write a comment…\",\n send: \"Send\",\n sendHint: (modifier) => `${modifier} + Enter to send`,\n sendHintEnter: \"Enter to send, Shift + Enter for a new line\",\n};\n\n/* ── Thread ───────────────────────────────────────────────────────────────── */\n\nexport interface FeedbackThreadAttachment {\n id?: string | number;\n name: string;\n /** Where to open it. Left out, the attachment is listed by name only. */\n url?: string;\n /** MIME type; an `image/*` with a `url` is shown as a thumbnail. */\n type?: string;\n /** Bytes, shown beside a non-image. */\n size?: number;\n}\n\nexport interface FeedbackThreadMessage {\n /** Leave out, or `\"message\"`. `\"event\"` is a {@link FeedbackThreadEvent}. */\n kind?: \"message\";\n id: string | number;\n /** Who wrote it. Left out on an `own` message, it reads \"You\". */\n author?: ReactNode;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: string;\n attachments?: readonly FeedbackThreadAttachment[];\n /** Written by whoever is reading: sits at the end side, in the brand tint. */\n own?: boolean;\n /** Written by the team rather than a user: gets the \"Staff\" badge. */\n staff?: boolean;\n}\n\n/**\n * A line in the thread that nobody wrote — \"Closed automatically\", \"Marked as\n * resolved\", \"Reopened\" — drawn centred and muted with its time, no author, no side,\n * no bubble.\n *\n * keksdose G4: its support chat interleaves these with the messages, and as a message\n * they came out as a bubble from nobody at the start side, which reads as the member\n * having said \"resolved\". Word it for the READER, as with `own`: the app knows whether\n * \"you reopened it\" or \"Anna reopened it\" is true for the person looking.\n *\n * The text is the app's, not somebody's words about their data, so it is NOT tagged\n * `data-private`; one that names a person can wrap the name in its own\n * `<span data-private>` (`body` is a node for that reason).\n */\nexport interface FeedbackThreadEvent {\n kind: \"event\";\n id: string | number;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: ReactNode;\n}\n\n/** One row of a {@link FeedbackThread}: a message, or an event line between them. */\nexport type FeedbackThreadItem = FeedbackThreadMessage | FeedbackThreadEvent;\n\nexport interface FeedbackThreadProps {\n /** Oldest first. Event lines ({@link FeedbackThreadEvent}) sit among the messages. */\n messages: readonly FeedbackThreadItem[];\n loading?: boolean;\n /** Replaces the default \"No comments yet\". */\n empty?: ReactNode;\n /**\n * Draw one attachment yourself — for files behind auth, which a plain `<img src>`\n * cannot fetch (kastlan's `AuthedImage`), or a lightbox. The default is a thumbnail\n * link for an image with a `url`, a file link otherwise.\n */\n renderAttachment?: (attachment: FeedbackThreadAttachment, message: FeedbackThreadMessage) => ReactNode;\n /** Tag bodies, authors and attachments `data-private`. Default true. */\n redact?: boolean;\n /**\n * How a row's time reads. `\"relative\"` (default): \"5 minutes ago\", a date past six\n * days — right for a report's comments, read days apart. `\"clock\"`: the time of day\n * in the locale (\"14:05\", \"2:05 PM\") — the chat look, keksdose G4; pair it with\n * `daySeparators`, which say which day that clock time is on. Either way the full\n * date and time is in the Tooltip.\n */\n timeFormat?: \"relative\" | \"clock\";\n /**\n * A centred day line before the first row and wherever the next row is on another\n * calendar day (the device's zone): \"Today\", \"Yesterday\", else the date — keksdose\n * G4. \"Today\" / \"Yesterday\" are `Intl.RelativeTimeFormat`'s own words in the kit\n * locale, so there is no label to translate. Default false.\n */\n daySeparators?: boolean;\n /** \"Now\" for the relative times and the day lines — pin it in tests and stories.\n * Default: the clock. */\n now?: Date | number;\n /** Overrides the provider's locale for the times. */\n locale?: string;\n labels?: Partial<FeedbackThreadLabels>;\n className?: string;\n}\n\nexport function FeedbackThread({\n messages,\n loading = false,\n empty,\n renderAttachment,\n redact = true,\n now,\n locale: localeProp,\n timeFormat = \"relative\",\n daySeparators = false,\n labels: labelsProp,\n className,\n}: FeedbackThreadProps) {\n const labels = useKitLabels(\"feedbackThread\", DEFAULT_FEEDBACK_THREAD_LABELS, labelsProp);\n const locale = useKitLocale(localeProp);\n const file = useKitFileLabels();\n const priv = redact ? \"\" : undefined;\n const clock = useMinuteClock(now === undefined);\n const reference = now === undefined ? clock : +now;\n\n if (loading && messages.length === 0) {\n return <Skeleton lines={3} label={labels.loading} className={className} />;\n }\n if (messages.length === 0) {\n return (\n <EmptyState\n variant=\"inline\"\n size=\"sm\"\n title={empty ?? labels.empty}\n className={cn(\"justify-start\", className)}\n />\n );\n }\n\n // Per row, the calendar day of the last readable date up to it — what a day line\n // compares against.\n const days: (number | null)[] = [];\n for (const message of messages) {\n const date = toDate(message.createdAt);\n days.push(date ? dayNumber(date) : (days.at(-1) ?? null));\n }\n\n return (\n <ol aria-label={labels.thread} aria-busy={loading || undefined} className={cn(\"space-y-3\", className)}>\n {messages.flatMap((message, index) => {\n const date = toDate(message.createdAt);\n const time = date && (\n // The kit's Tooltip, not a native title: one tooltip look app-wide\n // (keksdose F0 / dev#523).\n <Tooltip label={new Intl.DateTimeFormat(locale, { dateStyle: \"full\", timeStyle: \"short\" }).format(date)}>\n <time dateTime={date.toISOString()} className=\"tabular-nums\">\n {timeFormat === \"clock\"\n ? formatDate(date, \"time\", { locale })\n : formatRelativeTime(date, {\n now: reference,\n locale,\n // Past the kit's day steps it is a date: \"2 weeks ago\" makes\n // the reader do arithmetic the date already did.\n absoluteAfterDays: 6.5,\n })}\n </time>\n </Tooltip>\n );\n const rows: ReactNode[] = [];\n const day = date && dayNumber(date);\n // Against the last row WITH a readable date: an unparseable one neither starts\n // a day nor hides the next change.\n if (daySeparators && date && day !== days[index - 1]) {\n rows.push(<DaySeparator key={`day-${message.id}`} date={date} now={reference} locale={locale} />);\n }\n if (message.kind === \"event\") {\n // A list item like the rest, so \"Reopened\" is read in its place, but not an\n // article: an article is somebody's post, and this has no author.\n rows.push(\n <li\n key={message.id}\n data-event=\"\"\n className=\"flex flex-wrap items-baseline justify-center gap-x-2 px-4 text-center text-xs text-[var(--text-muted)]\"\n >\n <span>{message.body}</span>\n {time && <span className=\"text-[11px]\">{time}</span>}\n </li>,\n );\n return rows;\n }\n const author = message.author ?? (message.own ? labels.you : null);\n const attachments = message.attachments ?? [];\n rows.push(\n <li\n key={message.id}\n className={cn(\"flex\", message.own ? \"justify-end\" : \"justify-start\")}\n data-own={message.own ? \"\" : undefined}\n >\n <article\n className={cn(\n \"max-w-[85%] min-w-0 rounded-lg px-3 py-2 text-sm\",\n message.own\n ? \"rounded-ee-sm bg-[var(--brand-bg)]\"\n : \"rounded-es-sm bg-[var(--bg-surface-2)]\",\n )}\n >\n <header className=\"mb-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-[var(--text-muted)]\">\n {author != null && (\n <span data-private={priv} className=\"font-medium text-[var(--text-secondary)]\">\n {author}\n </span>\n )}\n {message.staff && (\n <span className=\"rounded border border-[var(--border)] bg-[var(--bg-surface)] px-1 text-[10px] font-medium uppercase tracking-wide text-[var(--text-secondary)]\">\n {labels.staff}\n </span>\n )}\n {time}\n </header>\n {message.body && (\n <p\n data-private={priv}\n dir=\"auto\"\n className=\"whitespace-pre-wrap break-words text-start text-[var(--text-primary)]\"\n >\n {message.body}\n </p>\n )}\n {attachments.length > 0 && (\n <ul aria-label={labels.attachments} data-private={priv} className=\"mt-2 flex flex-wrap gap-2\">\n {attachments.map((attachment, index) => (\n <li key={attachment.id ?? `${index}-${attachment.name}`} className=\"min-w-0\">\n {renderAttachment ? (\n renderAttachment(attachment, message)\n ) : (\n <DefaultAttachment attachment={attachment} size={file.size} />\n )}\n </li>\n ))}\n </ul>\n )}\n </article>\n </li>,\n );\n return rows;\n })}\n </ol>\n );\n}\n\nfunction DefaultAttachment({\n attachment,\n size,\n}: {\n attachment: FeedbackThreadAttachment;\n size: (bytes: number) => string;\n}) {\n const { name, url, type } = attachment;\n if (url && type?.startsWith(\"image/\")) return <ImageThumbnail url={url} name={name} />;\n const content = (\n <>\n <Paperclip className=\"size-3.5 shrink-0\" aria-hidden />\n <span className=\"truncate\">{name}</span>\n {attachment.size !== undefined && (\n <span className=\"shrink-0 text-[var(--text-muted)]\">{size(attachment.size)}</span>\n )}\n </>\n );\n const chip =\n \"inline-flex max-w-full items-center gap-1 rounded border border-[var(--border)] bg-[var(--bg-surface)] px-2 py-1 text-xs text-[var(--text-secondary)]\";\n return url ? (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(chip, \"hover:bg-[var(--bg-hover)]\")}>\n {content}\n </a>\n ) : (\n <span className={chip}>{content}</span>\n );\n}\n\n/** An image attachment's thumbnail. The box is drawn before the picture arrives —\n * `loading=\"lazy\"` leaves it empty until it nears the viewport, and a URL that has\n * expired never fills it — and an empty bordered square read as a broken layout, not\n * as a picture. So the box carries an image glyph underneath until the picture\n * covers it, and swaps it for a broken-image glyph when the load fails. */\nfunction ImageThumbnail({ url, name }: { url: string; name: string }) {\n // Keyed on the URL, so a message whose attachment is replaced tries the new one.\n const [failedUrl, setFailedUrl] = useState<string | null>(null);\n const failed = failedUrl === url;\n const Glyph = failed ? ImageOff : ImageIcon;\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"relative block h-20 w-20 overflow-hidden rounded border border-[var(--border)] bg-[var(--bg-surface-2)]\"\n >\n <Glyph aria-hidden className=\"absolute inset-0 m-auto size-6 text-[var(--text-muted)]\" />\n {!failed && (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- load/error are resource events, not interactions\n <img\n src={url}\n alt={name}\n loading=\"lazy\"\n onError={() => setFailedUrl(url)}\n className=\"relative h-full w-full object-cover\"\n />\n )}\n {/* The <img> and its alt are gone once it failed; the link still needs a name. */}\n {failed && <span className=\"sr-only\">{name}</span>}\n </a>\n );\n}\n\n/** The time, refreshed once a minute while `active`, so \"2 minutes ago\" does not stay\n * \"just now\" on a page left open. Read in state rather than in render, which must be\n * pure. */\nfunction useMinuteClock(active: boolean): number {\n const [time, setTime] = useState(() => Date.now());\n useEffect(() => {\n if (!active) return;\n const id = setInterval(() => setTime(Date.now()), 60_000);\n return () => clearInterval(id);\n }, [active]);\n return time;\n}\n\n/** The local calendar day as one number (20260926), for \"same day?\" and keys. */\nfunction dayNumber(date: Date): number {\n return date.getFullYear() * 10_000 + (date.getMonth() + 1) * 100 + date.getDate();\n}\n\n/**\n * The day line of `daySeparators` (keksdose G4): \"Today\" / \"Yesterday\" from\n * `Intl.RelativeTimeFormat` (`numeric: \"auto\"`) — the locale's own words, capitalised\n * for a line that stands alone (\"heute\" → \"Heute\"; a script without case is left as\n * is) — else the weekday and date, with the year only when it is not this one.\n *\n * Counted in calendar days, not 24-hour spans: 23:50 yesterday is \"Yesterday\" at\n * 00:10 today.\n */\nfunction DaySeparator({ date, now, locale }: { date: Date; now: number; locale: string | undefined }) {\n const today = new Date(now);\n const days = Math.round(\n (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) -\n Date.UTC(today.getFullYear(), today.getMonth(), today.getDate())) /\n 86_400_000,\n );\n let label: string;\n if (days === 0 || days === -1) {\n const word = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" }).format(days + 0, \"day\");\n label = word.charAt(0).toLocaleUpperCase(locale) + word.slice(1);\n } else {\n label = formatDate(\n date,\n {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n ...(date.getFullYear() === today.getFullYear() ? null : { year: \"numeric\" }),\n },\n { locale },\n );\n }\n const y = String(date.getFullYear()).padStart(4, \"0\");\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return (\n <li data-day-separator=\"\" className=\"flex items-center gap-3 py-1 text-xs text-[var(--text-muted)]\">\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n <time dateTime={`${y}-${m}-${d}`} className=\"font-medium\">\n {label}\n </time>\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n </li>\n );\n}\n\nfunction toDate(value: Date | string | number): Date | null {\n const date = value instanceof Date ? value : new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/* ── Composer ─────────────────────────────────────────────────────────────── */\n\n/** What the composer's attach control takes — {@link FeedbackNoteAttachment} with the\n * labels optional, since the field reads `feedbackAttachment` from the provider, and\n * `onError` the field's own (0.23.0): it is handed the refused file and the limit too\n * (`FeedbackAttachmentErrorInfo`), and a `(kind) => …` handler still fits. */\nexport type FeedbackComposerAttachment = Omit<FeedbackNoteAttachment, \"labels\" | \"onError\"> & {\n labels?: Partial<FeedbackAttachmentLabels>;\n onError?: FeedbackAttachmentFieldSingleProps[\"onError\"];\n};\n\nexport interface FeedbackComposerProps {\n /**\n * Send the comment. Return the promise: the box clears when it RESOLVES, and only of\n * what was sent — text typed while it was in flight stays. A rejection keeps\n * everything for a retry (surface the error yourself; the composer stays quiet).\n *\n * `attachment` is the built-in field's one picture. Files the host uploaded ahead\n * (`attachmentSlot`) are the host's state, read by the host here — and `body` may be\n * `\"\"` when `canSend` let an attachments-only message go.\n */\n onSend: (body: string, attachment: File | null) => void | Promise<unknown>;\n /** The send is in flight: a spinner on the button and no second send. */\n pending?: boolean;\n /** Offer one picture with the comment (file, paste or `onCaptureScreenshot`).\n * `true` for the defaults. Left out, the composer is text only. */\n attachment?: boolean | FeedbackComposerAttachment;\n /**\n * The host's own attach control, in the row with Send where the built-in field sits\n * (after it, if both are on) — keksdose G5: its support chat uploads up to N files\n * AHEAD of the send and sends their refs, which one `File` in `onSend` cannot carry.\n * The slot is the host's picker plus the chips of what is uploaded; the upload, the\n * refs and clearing them once `onSend` resolves stay with the host. Pair it with\n * `canSend`.\n */\n attachmentSlot?: ReactNode;\n /**\n * Whether Send is enabled, over the composer's own rule (some text in the box) —\n * for state the composer cannot see, i.e. `attachmentSlot`'s (keksdose G5): `true`\n * with files ready makes an empty draft sendable (`onSend(\"\", null)`), `false` while\n * an upload is still running holds even a written reply back. Left out, the text\n * decides. `pending` blocks a send either way, as does a draft past `maxLength`.\n */\n canSend?: boolean;\n /**\n * Which key sends. `\"mod-enter\"` (default): Ctrl/⌘+Enter, the report dialog's and\n * note editor's shortcut, with plain Enter a new line — feedback is written in\n * paragraphs. `\"enter\"`: the chat way (keksdose G5) — Enter sends, Shift+Enter is a\n * new line, Ctrl/⌘+Enter still sends; an Enter that confirms an IME composition\n * (Japanese, Chinese input) is the IME's, never a send.\n */\n sendOn?: \"mod-enter\" | \"enter\";\n /** Rendered INSTEAD of the composer — the thread is closed, or read-only for this\n * reader. */\n disabledReason?: ReactNode;\n rows?: number;\n /**\n * The longest draft the box takes, in UTF-16 code units as the browser counts — the\n * server's limit, so a reply too long for it is cut off while it is typed rather than\n * refused by a 422 after the press (keksdose G6: its support replies are capped at\n * 4,000 on the server, and its other text fields already count against that with\n * Textarea's `maxLength` + `showCount` since 0.22; the reply box, a composer, could\n * not). The box's own `maxLength`, so typing and pasting stop at it.\n *\n * {@link FeedbackComposerHandle.insertText} is not stopped by it — the browser limits\n * typing, not a script — and a canned reply is not cut mid-sentence to fit. A draft\n * past the limit therefore holds Send back (whatever `canSend` says, as `pending`\n * does) until it is trimmed; with `showCount` the counter, red at the limit, says by\n * how much.\n */\n maxLength?: number;\n /**\n * A live \"12/4000\" under the box, with `maxLength` — Textarea's `showCount`, the same\n * counter (keksdose G6): the count is part of the box's description, read with it on\n * focus, and a polite live region speaks only on entering the last stretch and at the\n * limit, never per keystroke. Under `size=\"sm\"` the hidden send hint stays the box's\n * description too, before the count. Ignored without `maxLength`.\n */\n showCount?: boolean;\n /** The counter's words — the `characterCount` namespace, as on Textarea. */\n countLabels?: Partial<CharacterCountLabels>;\n /**\n * The box's hint, over the `placeholder` label — keksdose F9: an admin answering a\n * support ticket is asked something else (\"Reply to Anna…\") than a member adding to\n * their own report, and one provider-wide label cannot say both.\n */\n placeholder?: string;\n /**\n * The draft, controlled — for a host that keeps it itself (saves it per ticket,\n * prefills a template). Left out, the composer keeps its own. Either way a send\n * that resolves clears only what was sent: controlled, that is an\n * `onValueChange(\"\")` the host receives like any keystroke, and only if the draft\n * is still the one that went out.\n */\n value?: string;\n /** Every change to the draft — typing, {@link FeedbackComposerHandle.insertText}, the\n * clear after a send. Required to change a controlled `value`. */\n onValueChange?: (value: string) => void;\n /** {@link FeedbackComposerHandle}: put text into the draft from outside (canned-reply\n * chips) or focus the box. */\n ref?: Ref<FeedbackComposerHandle>;\n labels?: Partial<FeedbackComposerLabels>;\n className?: string;\n /**\n * `\"sm\"` for a narrow host — keksdose's assistant launcher, a small floating panel\n * (0.22): a small Send button, and the send hint (\"Enter to send, Shift + Enter for a\n * new line\") hidden from view but kept as the box's description, so a keyboard or\n * screen-reader user still learns the shortcut. Default `\"md\"`.\n */\n size?: \"md\" | \"sm\";\n /**\n * On the composer's root — the box, or the `disabledReason` line in its place —\n * with any `data-*` attribute beside it (keksdose K17). keksdose's assistant tour\n * points at the chat box with `[data-tour=\"assistant-ask\"]`, and a composer that\n * dropped every attribute it was not told about left the anchor nowhere: the\n * assistant kept its hand-built box rather than lose the tour step.\n */\n id?: string;\n /** `data-*` attributes for the root, as `id` — a tour anchor, a test id. */\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * What a {@link FeedbackComposer} `ref` holds.\n *\n * keksdose F9: the support admin answers the same five questions all day and wants\n * chips above the box (\"Thanks, fixed in the next release\") that drop their text in\n * where the caret is. A controlled `value` alone cannot do that well — the host sees\n * the string, not the caret, so it could only append — so the composer, which owns\n * the textarea, does the splice.\n */\nexport interface FeedbackComposerHandle {\n /**\n * Insert `text` at the caret, replacing any selection (the caret the box last had:\n * a click on a chip blurs it, and the selection survives the blur), then focus the\n * box with the caret after the inserted text so the reply can go on. Nothing is\n * added around it — put a space or a newline in `text` if the reply needs one. A\n * no-op while `disabledReason` replaces the box.\n */\n insertText: (text: string) => void;\n focus: () => void;\n}\n\nconst noSubscribe = () => () => {};\nconst isApple = () =>\n typeof navigator !== \"undefined\" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent);\n\n/**\n * The answer box under a {@link FeedbackThread}: a textarea, an optional picture,\n * and Send — Ctrl/⌘+Enter sends, the shortcut the report dialog and the note editor\n * use, so the habit carries across the feature. Plain Enter is a new line: feedback is\n * written in paragraphs, unlike a chat — which `sendOn=\"enter\"` is for (keksdose G5).\n */\nexport function FeedbackComposer({\n onSend,\n pending = false,\n attachment,\n attachmentSlot,\n canSend: canSendProp,\n sendOn = \"mod-enter\",\n disabledReason,\n rows = 3,\n maxLength,\n showCount,\n countLabels,\n placeholder,\n value,\n onValueChange,\n ref,\n labels: labelsProp,\n className,\n id,\n size = \"md\",\n ...rest\n}: FeedbackComposerProps) {\n const labels = useKitLabels(\"feedbackComposer\", DEFAULT_FEEDBACK_COMPOSER_LABELS, labelsProp);\n const rootAttributes = { id, ...dataAttributes(rest) };\n const hintId = useId();\n const [ownDraft, setOwnDraft] = useState(\"\");\n const controlled = value !== undefined;\n const draft = controlled ? value : ownDraft;\n const [file, setFile] = useState<File | null>(null);\n const root = useRef<HTMLDivElement>(null);\n const box = useRef<HTMLTextAreaElement>(null);\n // The draft as of the last commit. The send's `.then` and `insertText` run after\n // renders their closure did not see — text typed while the send was in flight, a\n // second chip clicked before the first one's render — and must not act on a stale\n // string (for a controlled draft there is no updater function to lean on).\n const latest = useRef(draft);\n useLayoutEffect(() => {\n latest.current = draft;\n });\n // Where the caret goes once an inserted text has rendered.\n const caret = useRef<number | null>(null);\n useLayoutEffect(() => {\n const el = box.current;\n if (caret.current === null || !el) return;\n el.focus();\n el.setSelectionRange(caret.current, caret.current);\n caret.current = null;\n });\n\n const setDraft = (next: string) => {\n latest.current = next;\n if (!controlled) setOwnDraft(next);\n onValueChange?.(next);\n };\n\n useImperativeHandle(ref, () => ({\n insertText: (text) => {\n const el = box.current;\n if (!el) return;\n const current = latest.current;\n // A second insert before the first has rendered goes after the first, not at the\n // textarea's not-yet-moved caret. Otherwise the textarea's selection, which may\n // be past the end of a controlled value the host has just shortened: clamp it.\n const pending = caret.current;\n const start = Math.min(pending ?? el.selectionStart ?? current.length, current.length);\n const end = pending ?? Math.max(start, Math.min(el.selectionEnd ?? start, current.length));\n caret.current = start + text.length;\n setDraft(current.slice(0, start) + text + current.slice(end));\n },\n focus: () => box.current?.focus(),\n }));\n // The server snapshot is \"Ctrl\"; the client corrects it after hydration.\n const modifier = useSyncExternalStore(\n noSubscribe,\n () => (isApple() ? \"⌘\" : \"Ctrl\"),\n () => \"Ctrl\",\n );\n\n if (disabledReason != null && disabledReason !== false) {\n return (\n <p {...rootAttributes} className={cn(\"text-xs text-[var(--text-muted)]\", className)}>\n {disabledReason}\n </p>\n );\n }\n\n // Longer than `maxLength` only through `insertText` or a controlled value (typing\n // stops at it): the server would refuse it, so it does not go.\n const tooLong = maxLength !== undefined && draft.length > maxLength;\n const canSend = (canSendProp ?? draft.trim().length > 0) && !pending && !tooLong;\n const send = () => {\n if (!canSend) return;\n const sentDraft = draft;\n const sentFile = file;\n Promise.resolve(onSend(draft.trim(), file))\n .then(() => {\n if (latest.current === sentDraft) setDraft(\"\");\n setFile((current) => (current === sentFile ? null : current));\n })\n .catch(() => {});\n };\n\n const config = attachment === true ? {} : attachment || null;\n\n return (\n <div {...rootAttributes} ref={root} className={cn(\"space-y-2\", className)}>\n <Textarea\n rows={rows}\n dir=\"auto\"\n aria-label={labels.field}\n // Textarea puts the counter's description after this one, so under \"sm\" the box\n // reads \"Enter to send… 12 of 4000 characters\".\n aria-describedby={size === \"sm\" ? hintId : undefined}\n maxLength={maxLength}\n // Passed only when given: Textarea keeps a wrapper for a `showCount` it was\n // handed at all, and a composer without one keeps the DOM it had.\n {...(showCount !== undefined ? { showCount } : null)}\n countLabels={countLabels}\n ref={box}\n placeholder={placeholder ?? labels.placeholder}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key !== \"Enter\") return;\n const mod = event.ctrlKey || event.metaKey;\n // Under \"enter\": plain Enter sends, Shift+Enter falls through to the\n // textarea's new line, and an Enter that ends an IME composition is the\n // IME's (keyCode 229 is how Safari reports it after the composition ended).\n const chat =\n sendOn === \"enter\" &&\n !event.shiftKey &&\n !event.altKey &&\n !event.nativeEvent.isComposing &&\n event.keyCode !== 229;\n if (mod || chat) {\n event.preventDefault();\n send();\n }\n }}\n />\n <div className=\"flex flex-wrap items-end justify-between gap-2\">\n {config || attachmentSlot != null ? (\n <div className=\"flex min-w-0 flex-wrap items-end gap-2\">\n {config && (\n <FeedbackAttachmentField\n value={file}\n onChange={setFile}\n labels={config.labels}\n accept={config.accept}\n maxBytes={config.maxBytes}\n onError={config.onError}\n onCaptureScreenshot={config.onCaptureScreenshot}\n // The box is this field's sibling; a paste in it bubbles to `root`.\n pasteFrom={root}\n />\n )}\n {attachmentSlot}\n </div>\n ) : (\n <span />\n )}\n <div className=\"ms-auto flex items-center gap-2\">\n <span\n id={hintId}\n className={size === \"sm\" ? \"sr-only\" : \"text-xs text-[var(--text-placeholder)]\"}\n >\n {sendOn === \"enter\" ? labels.sendHintEnter : labels.sendHint(modifier)}\n </span>\n <Button\n onClick={send}\n disabled={!canSend}\n aria-busy={pending || undefined}\n size={size === \"sm\" ? \"sm\" : undefined}\n >\n {pending ? (\n <Spinner label={null} className=\"size-4\" />\n ) : (\n <Send className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n )}\n {labels.send}\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/** The `data-*` entries of a rest-props object, and nothing else: whatever a caller\n * spread in that the composer does not know is not the root's to receive. */\nfunction dataAttributes(props: object): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) if (key.startsWith(\"data-\")) out[key] = value;\n return out;\n}\n\n/**\n * {@link FeedbackComposer} under a name that is not about feedback (keksdose K17).\n *\n * The component was never feedback-specific: a textarea, an optional picture or a\n * host's upload slot, Send, `sendOn=\"enter\"` for the chat way. keksdose's assistant\n * and support chat are chats, not reports, and an import of `FeedbackComposer` there\n * reads as a mistake to the next person. The same function, not a wrapper, so the\n * two names cannot drift.\n */\nexport const ChatComposer = FeedbackComposer;\n/** {@link FeedbackComposerProps}, for {@link ChatComposer}. */\nexport type ChatComposerProps = FeedbackComposerProps;\n/** {@link FeedbackComposerHandle}, for {@link ChatComposer}. */\nexport type ChatComposerHandle = FeedbackComposerHandle;\n/** {@link FeedbackComposerLabels}, for {@link ChatComposer} — still the `feedbackComposer`\n * namespace of the provider. */\nexport type ChatComposerLabels = FeedbackComposerLabels;\n"],"mappings":";AAgNW,SAsIP,UAtIO,KAqDC,YArDD;AAhNX,SAAS,WAAW,OAAO,qBAAqB,iBAAiB,QAAQ,UAAU,4BAA4B;AAE/G,SAAS,WAAW,UAAU,WAAW,YAAY;AACrD,SAAS,UAAU;AACnB,SAAS,YAAY,0BAA0B;AAC/C,SAAS,QAAQ,YAAY,SAAS,gBAAgB;AAEtD,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,kBAAkB,cAAc,oBAAoB;AAC7D,SAAS,+BAA+B;AAsDjC,MAAM,iCAAuD;AAAA,EAClE,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AACf;AAgBO,MAAM,mCAA2D;AAAA,EACtE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,aAAa,GAAG,QAAQ;AAAA,EACnC,eAAe;AACjB;AA8FO,SAAS,eAA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