@carbon/ai-chat-components 1.13.0 → 1.14.0-rc.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 (194) hide show
  1. package/custom-elements.json +1147 -462
  2. package/es/components/audio-player/src/audio-player.scss.js +1 -1
  3. package/es/components/audio-player/src/transcript.js +15 -0
  4. package/es/components/audio-player/src/transcript.js.map +1 -1
  5. package/es/components/card/src/card-footer.scss.js +1 -1
  6. package/es/components/card/src/card-steps.scss.js +1 -1
  7. package/es/components/card/src/card.scss.js +1 -1
  8. package/es/components/chat-button/src/chat-button.scss.js +1 -1
  9. package/es/components/chat-history/src/chat-history.scss.js +1 -1
  10. package/es/components/chat-shell/src/shell.scss.js +1 -1
  11. package/es/components/code-snippet/src/code-snippet.d.ts +3 -2
  12. package/es/components/code-snippet/src/code-snippet.js +4 -3
  13. package/es/components/code-snippet/src/code-snippet.js.map +1 -1
  14. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  15. package/es/components/feedback/src/feedback.js +17 -3
  16. package/es/components/feedback/src/feedback.js.map +1 -1
  17. package/es/components/file-uploads/src/file-upload-item.scss.js +1 -1
  18. package/es/components/file-uploads/src/file-uploads.scss.js +1 -1
  19. package/es/components/launcher/src/launcher.scss.js +1 -1
  20. package/es/components/markdown/__tests__/inline-selection-fixture.d.ts +13 -0
  21. package/es/components/markdown/index.d.ts +2 -0
  22. package/es/components/markdown/index.js +3 -0
  23. package/es/components/markdown/index.js.map +1 -1
  24. package/es/components/markdown/src/inline-markdown.d.ts +41 -0
  25. package/es/components/markdown/src/inline-markdown.js +92 -0
  26. package/es/components/markdown/src/inline-markdown.js.map +1 -0
  27. package/es/components/markdown/src/inline-markdown.scss.js +13 -0
  28. package/es/components/markdown/src/inline-markdown.scss.js.map +1 -0
  29. package/es/components/markdown/src/inline-run-projection.scss.js +13 -0
  30. package/es/components/markdown/src/inline-run-projection.scss.js.map +1 -0
  31. package/es/components/markdown/src/markdown-renderer.js +131 -25
  32. package/es/components/markdown/src/markdown-renderer.js.map +1 -1
  33. package/es/components/markdown/src/markdown.js +1 -0
  34. package/es/components/markdown/src/markdown.js.map +1 -1
  35. package/es/components/markdown/src/markdown.scss.js +1 -1
  36. package/es/components/markdown/src/utils/inline-run-projection.d.ts +15 -0
  37. package/es/components/markdown/src/utils/inline-run-projection.js +196 -0
  38. package/es/components/markdown/src/utils/inline-run-projection.js.map +1 -0
  39. package/es/components/markdown/src/utils/inline-validation.d.ts +13 -0
  40. package/es/components/markdown/src/utils/inline-validation.js +97 -0
  41. package/es/components/markdown/src/utils/inline-validation.js.map +1 -0
  42. package/es/components/markdown/src/utils/plugin-fallback.js +20 -13
  43. package/es/components/markdown/src/utils/plugin-fallback.js.map +1 -1
  44. package/es/components/markdown/src/utils/plugin-host-container.d.ts +5 -6
  45. package/es/components/markdown/src/utils/plugin-host-container.js.map +1 -1
  46. package/es/components/messages-shell/index.d.ts +11 -0
  47. package/es/components/messages-shell/index.js +9 -0
  48. package/es/components/messages-shell/index.js.map +1 -0
  49. package/es/components/messages-shell/src/messages-shell.d.ts +57 -0
  50. package/es/components/messages-shell/src/messages-shell.js +141 -0
  51. package/es/components/messages-shell/src/messages-shell.js.map +1 -0
  52. package/es/components/messages-shell/src/messages-shell.scss.js +13 -0
  53. package/es/components/messages-shell/src/messages-shell.scss.js.map +1 -0
  54. package/es/components/processing/src/processing.scss.js +1 -1
  55. package/es/components/prompt-line/autocomplete/src/autocomplete.d.ts +26 -9
  56. package/es/components/prompt-line/autocomplete/src/autocomplete.js +116 -107
  57. package/es/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -1
  58. package/es/components/prompt-line/autocomplete/src/autocomplete.scss.js +1 -1
  59. package/es/components/prompt-line/src/autocomplete-controller-element.js +13 -1
  60. package/es/components/prompt-line/src/autocomplete-controller-element.js.map +1 -1
  61. package/es/components/prompt-line/src/autocomplete-controller.js +9 -2
  62. package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -1
  63. package/es/components/prompt-line/src/prompt-line-controller.d.ts +7 -0
  64. package/es/components/prompt-line/src/prompt-line-rich-runtime.js +17 -0
  65. package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
  66. package/es/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
  67. package/es/components/prompt-line/src/prompt-line-textarea-runtime.d.ts +1 -0
  68. package/es/components/prompt-line/src/prompt-line-textarea-runtime.js +3 -0
  69. package/es/components/prompt-line/src/prompt-line-textarea-runtime.js.map +1 -1
  70. package/es/components/prompt-line/src/prompt-line.d.ts +7 -0
  71. package/es/components/prompt-line/src/prompt-line.js +9 -0
  72. package/es/components/prompt-line/src/prompt-line.js.map +1 -1
  73. package/es/components/prompt-line/src/send-control.scss.js +1 -1
  74. package/es/components/prompt-line/src/stop-streaming-button.scss.js +1 -1
  75. package/es/components/prompt-line/src/tiptap/carbon-mention.js +43 -21
  76. package/es/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -1
  77. package/es/components/prompt-line/src/tiptap/plain-text-paste.js +8 -3
  78. package/es/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -1
  79. package/es/components/prompt-line/src/tiptap/strip-presentation-fields.d.ts +3 -3
  80. package/es/components/prompt-line/src/tiptap/strip-presentation-fields.js.map +1 -1
  81. package/es/components/prompt-line/src/tiptap/types.d.ts +27 -11
  82. package/es/components/reasoning-steps/src/reasoning-step.d.ts +3 -3
  83. package/es/components/reasoning-steps/src/reasoning-step.js +4 -4
  84. package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
  85. package/es/components/reasoning-steps/src/reasoning-step.scss.js +1 -1
  86. package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
  87. package/es/components/reasoning-steps/src/reasoning-steps.d.ts +5 -4
  88. package/es/components/reasoning-steps/src/reasoning-steps.js +5 -4
  89. package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
  90. package/es/components/truncated-text/src/truncated-text.scss.js +1 -1
  91. package/es/components/video-player/src/video-player.scss.js +1 -1
  92. package/es/react/hooks/useChatAutocomplete.js +7 -1
  93. package/es/react/hooks/useChatAutocomplete.js.map +1 -1
  94. package/es/react/messages-shell.d.ts +3 -0
  95. package/es/react/messages-shell.js +32 -0
  96. package/es/react/messages-shell.js.map +1 -0
  97. package/es-custom/components/audio-player/src/audio-player.scss.js +1 -1
  98. package/es-custom/components/audio-player/src/transcript.js +15 -0
  99. package/es-custom/components/audio-player/src/transcript.js.map +1 -1
  100. package/es-custom/components/card/src/card-footer.scss.js +1 -1
  101. package/es-custom/components/card/src/card-steps.scss.js +1 -1
  102. package/es-custom/components/card/src/card.scss.js +1 -1
  103. package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
  104. package/es-custom/components/chat-history/src/chat-history.scss.js +1 -1
  105. package/es-custom/components/chat-shell/src/shell.scss.js +1 -1
  106. package/es-custom/components/code-snippet/src/code-snippet.d.ts +3 -2
  107. package/es-custom/components/code-snippet/src/code-snippet.js +4 -3
  108. package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
  109. package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
  110. package/es-custom/components/feedback/src/feedback.js +17 -3
  111. package/es-custom/components/feedback/src/feedback.js.map +1 -1
  112. package/es-custom/components/file-uploads/src/file-upload-item.scss.js +1 -1
  113. package/es-custom/components/file-uploads/src/file-uploads.scss.js +1 -1
  114. package/es-custom/components/launcher/src/launcher.scss.js +1 -1
  115. package/es-custom/components/markdown/__tests__/inline-selection-fixture.d.ts +13 -0
  116. package/es-custom/components/markdown/index.d.ts +2 -0
  117. package/es-custom/components/markdown/index.js +3 -0
  118. package/es-custom/components/markdown/index.js.map +1 -1
  119. package/es-custom/components/markdown/src/inline-markdown.d.ts +41 -0
  120. package/es-custom/components/markdown/src/inline-markdown.js +92 -0
  121. package/es-custom/components/markdown/src/inline-markdown.js.map +1 -0
  122. package/es-custom/components/markdown/src/inline-markdown.scss.js +13 -0
  123. package/es-custom/components/markdown/src/inline-markdown.scss.js.map +1 -0
  124. package/es-custom/components/markdown/src/inline-run-projection.scss.js +13 -0
  125. package/es-custom/components/markdown/src/inline-run-projection.scss.js.map +1 -0
  126. package/es-custom/components/markdown/src/markdown-renderer.js +131 -25
  127. package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
  128. package/es-custom/components/markdown/src/markdown.js +1 -0
  129. package/es-custom/components/markdown/src/markdown.js.map +1 -1
  130. package/es-custom/components/markdown/src/markdown.scss.js +1 -1
  131. package/es-custom/components/markdown/src/utils/inline-run-projection.d.ts +15 -0
  132. package/es-custom/components/markdown/src/utils/inline-run-projection.js +196 -0
  133. package/es-custom/components/markdown/src/utils/inline-run-projection.js.map +1 -0
  134. package/es-custom/components/markdown/src/utils/inline-validation.d.ts +13 -0
  135. package/es-custom/components/markdown/src/utils/inline-validation.js +97 -0
  136. package/es-custom/components/markdown/src/utils/inline-validation.js.map +1 -0
  137. package/es-custom/components/markdown/src/utils/plugin-fallback.js +20 -13
  138. package/es-custom/components/markdown/src/utils/plugin-fallback.js.map +1 -1
  139. package/es-custom/components/markdown/src/utils/plugin-host-container.d.ts +5 -6
  140. package/es-custom/components/markdown/src/utils/plugin-host-container.js.map +1 -1
  141. package/es-custom/components/messages-shell/index.d.ts +11 -0
  142. package/es-custom/components/messages-shell/index.js +9 -0
  143. package/es-custom/components/messages-shell/index.js.map +1 -0
  144. package/es-custom/components/messages-shell/src/messages-shell.d.ts +57 -0
  145. package/es-custom/components/messages-shell/src/messages-shell.js +141 -0
  146. package/es-custom/components/messages-shell/src/messages-shell.js.map +1 -0
  147. package/es-custom/components/messages-shell/src/messages-shell.scss.js +13 -0
  148. package/es-custom/components/messages-shell/src/messages-shell.scss.js.map +1 -0
  149. package/es-custom/components/processing/src/processing.scss.js +1 -1
  150. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.d.ts +26 -9
  151. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js +116 -107
  152. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -1
  153. package/es-custom/components/prompt-line/autocomplete/src/autocomplete.scss.js +1 -1
  154. package/es-custom/components/prompt-line/src/autocomplete-controller-element.js +13 -1
  155. package/es-custom/components/prompt-line/src/autocomplete-controller-element.js.map +1 -1
  156. package/es-custom/components/prompt-line/src/autocomplete-controller.js +9 -2
  157. package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -1
  158. package/es-custom/components/prompt-line/src/prompt-line-controller.d.ts +7 -0
  159. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js +17 -0
  160. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
  161. package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
  162. package/es-custom/components/prompt-line/src/prompt-line-textarea-runtime.d.ts +1 -0
  163. package/es-custom/components/prompt-line/src/prompt-line-textarea-runtime.js +3 -0
  164. package/es-custom/components/prompt-line/src/prompt-line-textarea-runtime.js.map +1 -1
  165. package/es-custom/components/prompt-line/src/prompt-line.d.ts +7 -0
  166. package/es-custom/components/prompt-line/src/prompt-line.js +9 -0
  167. package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -1
  168. package/es-custom/components/prompt-line/src/send-control.scss.js +1 -1
  169. package/es-custom/components/prompt-line/src/stop-streaming-button.scss.js +1 -1
  170. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +43 -21
  171. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -1
  172. package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js +8 -3
  173. package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -1
  174. package/es-custom/components/prompt-line/src/tiptap/strip-presentation-fields.d.ts +3 -3
  175. package/es-custom/components/prompt-line/src/tiptap/strip-presentation-fields.js.map +1 -1
  176. package/es-custom/components/prompt-line/src/tiptap/types.d.ts +27 -11
  177. package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +3 -3
  178. package/es-custom/components/reasoning-steps/src/reasoning-step.js +4 -4
  179. package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
  180. package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js +1 -1
  181. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
  182. package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +5 -4
  183. package/es-custom/components/reasoning-steps/src/reasoning-steps.js +5 -4
  184. package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
  185. package/es-custom/components/truncated-text/src/truncated-text.scss.js +1 -1
  186. package/es-custom/components/video-player/src/video-player.scss.js +1 -1
  187. package/es-custom/react/hooks/useChatAutocomplete.js +7 -1
  188. package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -1
  189. package/es-custom/react/messages-shell.d.ts +3 -0
  190. package/es-custom/react/messages-shell.js +32 -0
  191. package/es-custom/react/messages-shell.js.map +1 -0
  192. package/package.json +4 -4
  193. package/scss/_markdown-inline.scss +138 -0
  194. package/telemetry.yml +4 -0
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { css } from 'lit';
9
9
 
10
- var styles = css([":host{display:inline-block}.dots{block-size:32px;inline-size:32px}.dot{fill:none;r:0;stroke:var(--cds-interactive,#0f62fe);stroke-width:0;transform:translateY(0)}@media screen and (prefers-reduced-motion:reduce){.linear .dot--left{animation:none;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:25% 50%}}.linear .dot--left{animation:linear-load-size,linear-load-stroke,linear-loop-size,linear-loop-stroke;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:25% 50%}@media screen and (prefers-reduced-motion:reduce){.linear .dot--center{animation:none;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:50% 50%}}.linear .dot--center{animation:linear-load-size,linear-load-stroke,linear-loop-size,linear-loop-stroke;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:50% 50%}@media screen and (prefers-reduced-motion:reduce){.linear .dot--right{animation:none;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:75% 50%}}.linear .dot--right{animation:linear-load-size,linear-load-stroke,linear-loop-size,linear-loop-stroke;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:75% 50%}@media screen and (prefers-reduced-motion:reduce){.linear--no-loop .dot--left{animation:none;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:25% 50%}}.linear--no-loop .dot--left{animation:linear-load-size,linear-load-stroke,linear-unload-size,linear-unload-stroke;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:25% 50%}@media screen and (prefers-reduced-motion:reduce){.linear--no-loop .dot--center{animation:none;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:50% 50%}}.linear--no-loop .dot--center{animation:linear-load-size,linear-load-stroke,linear-unload-size,linear-unload-stroke;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:50% 50%}@media screen and (prefers-reduced-motion:reduce){.linear--no-loop .dot--right{animation:none;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:75% 50%}}.linear--no-loop .dot--right{animation:linear-load-size,linear-load-stroke,linear-unload-size,linear-unload-stroke;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:75% 50%}.quick-load .dot--left{animation-delay:0ms,0ms,1s,1s}.quick-load .dot--center{animation-delay:167ms,167ms,1167ms,1167ms}.quick-load .dot--right{animation-delay:334ms,334ms,1334ms,1334ms}[dir=rtl] .linear .dot--left{animation-delay:1334ms,1334ms,2334ms,2334ms,7334ms,7334ms}[dir=rtl] .linear .dot--center{animation-delay:1167ms,1167ms,2167ms,2167ms,7167ms,7167ms}[dir=rtl] .linear .dot--right{animation-delay:1s,1s,2s,2s,7s,7s}[dir=rtl] .linear--no-loop .dot--left{animation-delay:1334ms,1334ms,2334ms,2334ms}[dir=rtl] .linear--no-loop .dot--center{animation-delay:1167ms,1167ms,2167ms,2167ms}[dir=rtl] .linear--no-loop .dot--right{animation-delay:1s,1s,2s,2s}[dir=rtl] .quick-load .dot--left{animation-delay:334ms,334ms,1334ms,1334ms}[dir=rtl] .quick-load .dot--center{animation-delay:167ms,167ms,1167ms,1167ms}[dir=rtl] .quick-load .dot--right{animation-delay:0ms,0ms,1s,1s}@keyframes linear-load-size{0%{r:0;animation-timing-function:cubic-bezier(0,0,.3,1)}25%{r:2.5px;animation-timing-function:cubic-bezier(0,0,.3,1)}83.3%{r:.875px}to{r:.875px}}@keyframes linear-load-stroke{0%{stroke-width:0;animation-timing-function:cubic-bezier(0,0,.3,1)}8.33%{stroke-width:1.72}to{stroke-width:1.72}}@keyframes linear-loop-size{0%{r:.875px;animation-timing-function:cubic-bezier(0,0,.3,1)}25%{r:2.5px;animation-timing-function:cubic-bezier(0,0,.3,1)}91.66%{r:.875px}to{r:.875px}}@keyframes linear-loop-stroke{0%{stroke-width:1.72;animation-timing-function:cubic-bezier(.4,.14,1,1)}to{stroke-width:1.72}}@keyframes linear-unload-size{0%{r:.875px}8.33%{r:.875px}33.33%{r:2.5px;animation-timing-function:cubic-bezier(.4,.14,1,1)}58.33%{r:0}to{r:0}}@keyframes linear-unload-stroke{0%{stroke-width:1.72}50%{stroke-width:1.72}58.33%{stroke-width:0}to{stroke-width:0}}@media (prefers-reduced-motion:reduce){.dot--center,.dot--left,.dot--right{animation:none;transition:none}}"]);
10
+ var styles = css([":host{display:inline-block}.dots{block-size:32px;inline-size:32px}.dot{fill:none;r:0;stroke:var(--cds-interactive,#0f62fe);stroke-width:0;transform:translateY(0)}@media screen and (prefers-reduced-motion:reduce){.linear .dot--left{animation:none;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:25% 50%}}.linear .dot--left{animation:linear-load-size,linear-load-stroke,linear-loop-size,linear-loop-stroke;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:25% 50%}@media screen and (prefers-reduced-motion:reduce){.linear .dot--center{animation:none;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:50% 50%}}.linear .dot--center{animation:linear-load-size,linear-load-stroke,linear-loop-size,linear-loop-stroke;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:50% 50%}@media screen and (prefers-reduced-motion:reduce){.linear .dot--right{animation:none;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:75% 50%}}.linear .dot--right{animation:linear-load-size,linear-load-stroke,linear-loop-size,linear-loop-stroke;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1,1,infinite,infinite;transform-origin:75% 50%}@media screen and (prefers-reduced-motion:reduce){.linear--no-loop .dot--left{animation:none;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:25% 50%}}.linear--no-loop .dot--left{animation:linear-load-size,linear-load-stroke,linear-unload-size,linear-unload-stroke;animation-delay:1s,1s,2s,2s;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:25% 50%}@media screen and (prefers-reduced-motion:reduce){.linear--no-loop .dot--center{animation:none;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:50% 50%}}.linear--no-loop .dot--center{animation:linear-load-size,linear-load-stroke,linear-unload-size,linear-unload-stroke;animation-delay:1167ms,1167ms,2167ms,2167ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:50% 50%}@media screen and (prefers-reduced-motion:reduce){.linear--no-loop .dot--right{animation:none;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:75% 50%}}.linear--no-loop .dot--right{animation:linear-load-size,linear-load-stroke,linear-unload-size,linear-unload-stroke;animation-delay:1334ms,1334ms,2334ms,2334ms;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:1;transform-origin:75% 50%}.quick-load .dot--left{animation-delay:0s,0s,1s,1s}.quick-load .dot--center{animation-delay:167ms,167ms,1167ms,1167ms}.quick-load .dot--right{animation-delay:334ms,334ms,1334ms,1334ms}[dir=rtl] .linear .dot--left{animation-delay:1334ms,1334ms,2334ms,2334ms,7334ms,7334ms}[dir=rtl] .linear .dot--center{animation-delay:1167ms,1167ms,2167ms,2167ms,7167ms,7167ms}[dir=rtl] .linear .dot--right{animation-delay:1s,1s,2s,2s,7s,7s}[dir=rtl] .linear--no-loop .dot--left{animation-delay:1334ms,1334ms,2334ms,2334ms}[dir=rtl] .linear--no-loop .dot--center{animation-delay:1167ms,1167ms,2167ms,2167ms}[dir=rtl] .linear--no-loop .dot--right{animation-delay:1s,1s,2s,2s}[dir=rtl] .quick-load .dot--left{animation-delay:334ms,334ms,1334ms,1334ms}[dir=rtl] .quick-load .dot--center{animation-delay:167ms,167ms,1167ms,1167ms}[dir=rtl] .quick-load .dot--right{animation-delay:0s,0s,1s,1s}@keyframes linear-load-size{0%{animation-timing-function:cubic-bezier(0,0,.3,1);r:0}25%{animation-timing-function:cubic-bezier(0,0,.3,1);r:2.5px}83.3%{r:.875px}to{r:.875px}}@keyframes linear-load-stroke{0%{animation-timing-function:cubic-bezier(0,0,.3,1);stroke-width:0}8.33%{stroke-width:1.72}to{stroke-width:1.72}}@keyframes linear-loop-size{0%{animation-timing-function:cubic-bezier(0,0,.3,1);r:.875px}25%{animation-timing-function:cubic-bezier(0,0,.3,1);r:2.5px}91.66%{r:.875px}to{r:.875px}}@keyframes linear-loop-stroke{0%{animation-timing-function:cubic-bezier(.4,.14,1,1);stroke-width:1.72}to{stroke-width:1.72}}@keyframes linear-unload-size{0%{r:.875px}8.33%{r:.875px}33.33%{animation-timing-function:cubic-bezier(.4,.14,1,1);r:2.5px}58.33%{r:0}to{r:0}}@keyframes linear-unload-stroke{0%{stroke-width:1.72}50%{stroke-width:1.72}58.33%{stroke-width:0}to{stroke-width:0}}@media (prefers-reduced-motion:reduce){.dot--center,.dot--left,.dot--right{animation:none;transition:none}}"]);
11
11
 
12
12
  export { styles as default };
13
13
  //# sourceMappingURL=processing.scss.js.map
@@ -8,6 +8,16 @@
8
8
  */
9
9
  import { LitElement } from 'lit';
10
10
  import type { SuggestionItem, SuggestionItemGroup } from '../../src/tiptap/types.js';
11
+ /**
12
+ * One option in render order. `index` is its flat keyboard index;
13
+ * `groupIndex` is its position in `groups`, or `undefined` when ungrouped.
14
+ */
15
+ export interface FlatEntry {
16
+ item: SuggestionItem;
17
+ index: number;
18
+ groupIndex: number | undefined;
19
+ groupTitle: string | undefined;
20
+ }
11
21
  /**
12
22
  * Configuration for the autocomplete header
13
23
  */
@@ -137,26 +147,34 @@ declare class AutocompleteElement extends LitElement {
137
147
  * only the last pending label is spoken.
138
148
  */
139
149
  private _moveAnnouncePending;
150
+ /** Cached flat item list, rebuilt on every update via willUpdate. */
151
+ private _flatList;
140
152
  /** Whether the open announcement has already fired for this show. */
141
153
  private _openAnnounced;
154
+ /** Total item count from the last announcement, used to detect count changes. */
155
+ private _previousTotalItems;
156
+ /**
157
+ * Pending timer for filtered count announcement. Keystroke updates are debounced
158
+ * so rapid typing does not interrupt typing echo with an announcement on every key.
159
+ */
160
+ private _filterAnnouncePending;
142
161
  connectedCallback(): void;
143
162
  disconnectedCallback(): void;
144
163
  hasNavigated(): boolean;
145
164
  firstUpdated(): void;
165
+ willUpdate(changedProperties: Map<string, any>): void;
146
166
  updated(changedProperties: Map<string, any>): void;
147
167
  /**
148
- * Get the total count of all items (flat items + items in groups)
149
- */
150
- private _getTotalItemCount;
151
- /**
152
- * Get the item at a specific index (accounting for both flat items and groups)
168
+ * Build a flat list of all items in render order: ungrouped items first,
169
+ * then each group's items in group order. Called unconditionally from
170
+ * willUpdate so in-place mutations followed by requestUpdate() are reflected.
153
171
  */
154
- private _getItemAtIndex;
172
+ private _buildFlatList;
155
173
  /**
156
174
  * Move focus to the next enabled item in the given direction (+1 / -1),
157
175
  * skipping over any disabled items. Mirrors the Carbon Dropdown `_navigate`
158
- * pattern. Returns the resolved index, or the current index if no enabled
159
- * item exists in that direction.
176
+ * pattern. Returns the resolved index, or `from` if no enabled item exists
177
+ * in that direction.
160
178
  */
161
179
  private _navigateTo;
162
180
  private _handleKeydown;
@@ -174,7 +192,6 @@ declare class AutocompleteElement extends LitElement {
174
192
  private _dismiss;
175
193
  private _handleItemClick;
176
194
  private _getActiveOptionId;
177
- private _getGroupTitleAtIndex;
178
195
  private _getLabelParts;
179
196
  /**
180
197
  * Render the avatar if provided
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { __decorate } from 'tslib';
9
- import { unsafeCSS, css, LitElement, html } from 'lit';
9
+ import { unsafeCSS, css, LitElement, html, nothing } from 'lit';
10
10
  import { property, state } from 'lit/decorators.js';
11
11
  import { carbonElement } from '../../../../globals/decorators/carbon-element.js';
12
12
  import prefix from '../../../../globals/settings.js';
@@ -97,58 +97,56 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
97
97
  * only the last pending label is spoken.
98
98
  */
99
99
  this._moveAnnouncePending = null;
100
+ /** Cached flat item list, rebuilt on every update via willUpdate. */
101
+ this._flatList = [];
100
102
  /** Whether the open announcement has already fired for this show. */
101
103
  this._openAnnounced = false;
104
+ /** Total item count from the last announcement, used to detect count changes. */
105
+ this._previousTotalItems = 0;
106
+ /**
107
+ * Pending timer for filtered count announcement. Keystroke updates are debounced
108
+ * so rapid typing does not interrupt typing echo with an announcement on every key.
109
+ */
110
+ this._filterAnnouncePending = null;
102
111
  this._handleKeydown = (event) => {
103
- const totalItems = this._getTotalItemCount();
112
+ const list = this._flatList;
113
+ const totalItems = list.length;
104
114
  if (totalItems === 0) {
105
115
  return;
106
116
  }
107
117
  switch (event.key) {
108
118
  case 'ArrowDown':
109
119
  event.preventDefault();
110
- this._focusedIndex = this._navigateTo(this._focusedIndex, 1);
111
- this._setUserHasNavigated(true);
120
+ this._focusedIndex = this._navigateTo(list, this._focusedIndex, 1);
121
+ this._setUserHasNavigated(this._focusedIndex !== -1);
112
122
  this._scheduleMoveAnnouncement(this._focusedIndex, totalItems);
113
123
  this._scrollActiveItemIntoView();
114
124
  break;
115
125
  case 'ArrowUp':
116
126
  event.preventDefault();
117
- this._focusedIndex = this._navigateTo(this._focusedIndex, -1);
118
- this._setUserHasNavigated(true);
127
+ this._focusedIndex = this._navigateTo(list, this._focusedIndex, -1);
128
+ this._setUserHasNavigated(this._focusedIndex !== -1);
119
129
  this._scheduleMoveAnnouncement(this._focusedIndex, totalItems);
120
130
  this._scrollActiveItemIntoView();
121
131
  break;
122
- case 'Home': {
123
- event.preventDefault();
124
- // Find first enabled item from the top.
125
- let first = 0;
126
- while (first < totalItems && this._getItemAtIndex(first)?.disabled) {
127
- first++;
128
- }
129
- this._focusedIndex = first < totalItems ? first : this._focusedIndex;
130
- this._setUserHasNavigated(true);
131
- this._scheduleMoveAnnouncement(this._focusedIndex, totalItems);
132
- this._scrollActiveItemIntoView();
133
- break;
134
- }
132
+ case 'Home':
135
133
  case 'End': {
136
134
  event.preventDefault();
137
- // Find last enabled item from the bottom.
138
- let last = totalItems - 1;
139
- while (last >= 0 && this._getItemAtIndex(last)?.disabled) {
140
- last--;
135
+ // Scanning from -1 lands on the first enabled item going down and
136
+ // wraps to the last enabled item going up. Stay put if none exists.
137
+ const target = this._navigateTo(list, -1, event.key === 'Home' ? 1 : -1);
138
+ if (target !== -1) {
139
+ this._focusedIndex = target;
141
140
  }
142
- this._focusedIndex = last >= 0 ? last : this._focusedIndex;
143
- this._setUserHasNavigated(true);
141
+ this._setUserHasNavigated(this._focusedIndex !== -1);
144
142
  this._scheduleMoveAnnouncement(this._focusedIndex, totalItems);
145
143
  this._scrollActiveItemIntoView();
146
144
  break;
147
145
  }
148
146
  case 'Tab':
149
147
  event.preventDefault();
150
- this._focusedIndex = this._navigateTo(this._focusedIndex, 1);
151
- this._setUserHasNavigated(true);
148
+ this._focusedIndex = this._navigateTo(list, this._focusedIndex, 1);
149
+ this._setUserHasNavigated(this._focusedIndex !== -1);
152
150
  this._scheduleMoveAnnouncement(this._focusedIndex, totalItems);
153
151
  this._scrollActiveItemIntoView();
154
152
  break;
@@ -207,6 +205,10 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
207
205
  clearTimeout(this._moveAnnouncePending);
208
206
  this._moveAnnouncePending = null;
209
207
  }
208
+ if (this._filterAnnouncePending !== null) {
209
+ clearTimeout(this._filterAnnouncePending);
210
+ this._filterAnnouncePending = null;
211
+ }
210
212
  }
211
213
  hasNavigated() {
212
214
  return this._userHasNavigated;
@@ -217,61 +219,90 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
217
219
  this._listboxEl = this.renderRoot.querySelector(`.${blockClass}__items`);
218
220
  this._listboxEl?.addEventListener('mousedown', this._handleMousedown);
219
221
  }
222
+ willUpdate(changedProperties) {
223
+ super.willUpdate(changedProperties);
224
+ this._flatList = this._buildFlatList();
225
+ }
220
226
  updated(changedProperties) {
221
227
  super.updated(changedProperties);
222
228
  const itemsChanged = changedProperties.has('items') || changedProperties.has('groups');
223
229
  if (itemsChanged) {
224
- const totalItems = this._getTotalItemCount();
230
+ if (this._moveAnnouncePending !== null) {
231
+ clearTimeout(this._moveAnnouncePending);
232
+ this._moveAnnouncePending = null;
233
+ }
234
+ const totalItems = this._flatList.length;
225
235
  if (totalItems === 0) {
236
+ if (this._filterAnnouncePending !== null) {
237
+ clearTimeout(this._filterAnnouncePending);
238
+ this._filterAnnouncePending = null;
239
+ }
240
+ this._focusedIndex = -1;
241
+ this._setUserHasNavigated(false);
226
242
  this._announcer.announce(this.i18n.noSuggestions);
227
243
  this._openAnnounced = false;
244
+ this._previousTotalItems = 0;
228
245
  return;
229
246
  }
230
247
  this._focusedIndex = -1;
231
248
  this._setUserHasNavigated(false);
232
249
  if (!this._openAnnounced) {
233
250
  this._openAnnounced = true;
251
+ this._previousTotalItems = totalItems;
234
252
  this._announcer.announce(this.i18n.suggestionsAvailable(totalItems));
235
253
  }
254
+ else if (totalItems !== this._previousTotalItems) {
255
+ this._previousTotalItems = totalItems;
256
+ if (this._filterAnnouncePending !== null) {
257
+ clearTimeout(this._filterAnnouncePending);
258
+ }
259
+ this._filterAnnouncePending = window.setTimeout(() => {
260
+ this._filterAnnouncePending = null;
261
+ this._announcer.announce(this.i18n.suggestionsAvailable(totalItems));
262
+ }, 250);
263
+ }
236
264
  }
237
265
  }
238
266
  /**
239
- * Get the total count of all items (flat items + items in groups)
267
+ * Build a flat list of all items in render order: ungrouped items first,
268
+ * then each group's items in group order. Called unconditionally from
269
+ * willUpdate so in-place mutations followed by requestUpdate() are reflected.
240
270
  */
241
- _getTotalItemCount() {
242
- const flatCount = this.items.length;
243
- const groupedCount = this.groups.reduce((sum, group) => sum + group.items.length, 0);
244
- return flatCount + groupedCount;
245
- }
246
- /**
247
- * Get the item at a specific index (accounting for both flat items and groups)
248
- */
249
- _getItemAtIndex(index) {
250
- if (index < this.items.length) {
251
- return this.items[index];
271
+ _buildFlatList() {
272
+ const result = [];
273
+ const hasGroups = this.groups.length > 0;
274
+ for (const item of this.items) {
275
+ result.push({
276
+ item,
277
+ index: result.length,
278
+ groupIndex: undefined,
279
+ groupTitle: hasGroups ? this.i18n.nonGroupedItemsLabel : undefined,
280
+ });
252
281
  }
253
- let currentIndex = this.items.length;
254
- for (const group of this.groups) {
255
- if (index < currentIndex + group.items.length) {
256
- return group.items[index - currentIndex];
282
+ this.groups.forEach((group, groupIndex) => {
283
+ for (const item of group.items) {
284
+ result.push({
285
+ item,
286
+ index: result.length,
287
+ groupIndex,
288
+ groupTitle: group.title,
289
+ });
257
290
  }
258
- currentIndex += group.items.length;
259
- }
260
- return null;
291
+ });
292
+ return result;
261
293
  }
262
294
  /**
263
295
  * Move focus to the next enabled item in the given direction (+1 / -1),
264
296
  * skipping over any disabled items. Mirrors the Carbon Dropdown `_navigate`
265
- * pattern. Returns the resolved index, or the current index if no enabled
266
- * item exists in that direction.
297
+ * pattern. Returns the resolved index, or `from` if no enabled item exists
298
+ * in that direction.
267
299
  */
268
- _navigateTo(from, direction) {
269
- const totalItems = this._getTotalItemCount();
300
+ _navigateTo(list, from, direction) {
270
301
  // When no item is selected yet (-1), ArrowUp wraps to the last item.
271
- const start = from === -1 && direction === -1 ? totalItems : from;
302
+ const start = from === -1 && direction === -1 ? list.length : from;
272
303
  let next = start + direction;
273
- while (next >= 0 && next < totalItems) {
274
- if (!this._getItemAtIndex(next)?.disabled) {
304
+ while (next >= 0 && next < list.length) {
305
+ if (!list[next].item.disabled) {
275
306
  return next;
276
307
  }
277
308
  next += direction;
@@ -289,19 +320,15 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
289
320
  }
290
321
  this._moveAnnouncePending = window.setTimeout(() => {
291
322
  this._moveAnnouncePending = null;
292
- const item = this._getItemAtIndex(index);
293
- if (!item) {
323
+ const entry = this._flatList[index];
324
+ if (!entry) {
294
325
  return;
295
326
  }
296
327
  const position = `${index + 1} of ${total}`;
297
- this._announcer.announce(this.i18n.itemNavigation(item.label, item.description, this._getGroupTitleAtIndex(index), position));
328
+ this._announcer.announce(this.i18n.itemNavigation(entry.item.label, entry.item.description, entry.groupTitle, position));
298
329
  }, 50);
299
330
  }
300
- _handleSend(index) {
301
- const item = this._getItemAtIndex(index);
302
- if (!item) {
303
- return;
304
- }
331
+ _handleSend(index, item) {
305
332
  this._focusedIndex = index;
306
333
  this._announcer.announce(this.i18n.itemSent(item.label));
307
334
  this.dispatchEvent(new CustomEvent('cds-custom-aichat-autocomplete-send', {
@@ -311,7 +338,7 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
311
338
  }));
312
339
  }
313
340
  _handleItemMouseEnter(index) {
314
- if (this._getItemAtIndex(index)?.disabled) {
341
+ if (this._flatList[index]?.item.disabled) {
315
342
  return;
316
343
  }
317
344
  this._focusedIndex = index;
@@ -337,7 +364,12 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
337
364
  }));
338
365
  }
339
366
  _dismiss() {
367
+ if (this._filterAnnouncePending !== null) {
368
+ clearTimeout(this._filterAnnouncePending);
369
+ this._filterAnnouncePending = null;
370
+ }
340
371
  this._openAnnounced = false;
372
+ this._previousTotalItems = 0;
341
373
  this._setUserHasNavigated(false);
342
374
  this._announcer.announce(this.i18n.suggestionsClosed);
343
375
  this.dispatchEvent(new CustomEvent('cds-custom-aichat-autocomplete-dismiss', {
@@ -346,12 +378,12 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
346
378
  }));
347
379
  }
348
380
  _handleItemClick(index) {
349
- const item = this._getItemAtIndex(index);
381
+ const item = this._flatList[index]?.item;
350
382
  if (!item || item.disabled) {
351
383
  return;
352
384
  }
353
385
  if (!this.disableDirectSend) {
354
- this._handleSend(index);
386
+ this._handleSend(index, item);
355
387
  return;
356
388
  }
357
389
  this._focusedIndex = index;
@@ -361,24 +393,8 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
361
393
  if (!this._userHasNavigated) {
362
394
  return undefined;
363
395
  }
364
- const item = this._getItemAtIndex(this._focusedIndex);
365
- return item ? `${item.id}--option` : undefined;
366
- }
367
- _getGroupTitleAtIndex(index) {
368
- if (index < this.items.length) {
369
- return this.groups.length > 0
370
- ? this.i18n.nonGroupedItemsLabel
371
- : undefined;
372
- }
373
- let currentIndex = this.items.length;
374
- for (const group of this.groups) {
375
- const groupEndIndex = currentIndex + group.items.length;
376
- if (index < groupEndIndex) {
377
- return group.title;
378
- }
379
- currentIndex = groupEndIndex;
380
- }
381
- return undefined;
396
+ const entry = this._flatList[this._focusedIndex];
397
+ return entry ? `${entry.item.id}--option` : undefined;
382
398
  }
383
399
  _getLabelParts(item) {
384
400
  const label = item.label;
@@ -472,7 +488,7 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
472
488
  `;
473
489
  }
474
490
  render() {
475
- const totalItems = this._getTotalItemCount();
491
+ const flatList = this._flatList;
476
492
  // Always render the live regions so the last announcement is not lost
477
493
  // when the list empties (e.g. "No suggestions." or "Suggestions closed.").
478
494
  const liveRegions = html `
@@ -485,11 +501,12 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
485
501
  aria-live="polite"
486
502
  aria-atomic="false"></div>
487
503
  `;
488
- if (totalItems === 0) {
504
+ if (flatList.length === 0) {
489
505
  return liveRegions;
490
506
  }
491
- let currentIndex = 0;
492
507
  const hasGroups = this.groups.length > 0;
508
+ const activeOptionId = this._getActiveOptionId();
509
+ const ungrouped = flatList.filter((entry) => entry.groupIndex === undefined);
493
510
  return html `
494
511
  ${liveRegions}
495
512
  <div class="${blockClass}">
@@ -505,32 +522,28 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
505
522
  ${hasGroups
506
523
  ? html `
507
524
  <div
508
- aria-activedescendant="${this._getActiveOptionId()}"
525
+ aria-activedescendant="${activeOptionId ?? nothing}"
509
526
  aria-label="${this.i18n.listboxLabel}"
510
527
  class="${blockClass}__items"
511
528
  id="${blockClass}-listbox"
512
529
  role="listbox">
513
530
  <!-- Flat items wrapped in their own implicit group -->
514
- ${this.items.length > 0
531
+ ${ungrouped.length > 0
515
532
  ? html `
516
533
  <ul
517
534
  role="group"
518
535
  aria-label="${this.i18n.nonGroupedItemsLabel}"
519
536
  class="${groupClass}__items">
520
- ${this.items.map((item, index) => {
521
- const itemIndex = currentIndex++;
522
- return this._renderItem(item, itemIndex, {
523
- firstItem: !this.headerConfig?.showHeader && index === 0,
524
- });
525
- })}
537
+ ${ungrouped.map(({ item, index }) => this._renderItem(item, index, {
538
+ firstItem: !this.headerConfig?.showHeader && index === 0,
539
+ }))}
526
540
  </ul>
527
541
  `
528
542
  : ''}
529
543
 
530
544
  <!-- Grouped items -->
531
545
  ${this.groups.map((group, groupIndex) => {
532
- const groupStartIndex = currentIndex;
533
- currentIndex += group.items.length;
546
+ const entries = flatList.filter((entry) => entry.groupIndex === groupIndex);
534
547
  const isLastGroup = groupIndex === this.groups.length - 1;
535
548
  return html `
536
549
  <ul
@@ -543,9 +556,8 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
543
556
  class="${groupClass}__title">
544
557
  ${group.title}
545
558
  </li>
546
- ${group.items.map((item, itemIndex) => this._renderItem(item, groupStartIndex + itemIndex, {
547
- lastItem: isLastGroup &&
548
- itemIndex === group.items.length - 1,
559
+ ${entries.map(({ item, index }, position) => this._renderItem(item, index, {
560
+ lastItem: isLastGroup && position === entries.length - 1,
549
561
  }))}
550
562
  </ul>
551
563
  `;
@@ -555,18 +567,15 @@ let AutocompleteElement = class AutocompleteElement extends LitElement {
555
567
  : html `
556
568
  <!-- Flat items only -->
557
569
  <ul
558
- aria-activedescendant="${this._getActiveOptionId()}"
570
+ aria-activedescendant="${activeOptionId ?? nothing}"
559
571
  aria-label="${this.i18n.listboxLabel}"
560
572
  class="${blockClass}__items"
561
573
  id="${blockClass}-listbox"
562
574
  role="listbox">
563
- ${this.items.map((item, index) => {
564
- const itemIndex = currentIndex++;
565
- return this._renderItem(item, itemIndex, {
566
- firstItem: !this.headerConfig?.showHeader && index === 0,
567
- lastItem: index === this.items.length - 1,
568
- });
569
- })}
575
+ ${flatList.map(({ item, index }) => this._renderItem(item, index, {
576
+ firstItem: !this.headerConfig?.showHeader && index === 0,
577
+ lastItem: index === flatList.length - 1,
578
+ }))}
570
579
  </ul>
571
580
  `}
572
581
  </div>