@adea-ai/ui 0.152.2 → 0.152.4

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 (237) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  2. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  3. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  4. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  5. package/dist/components/composites/action-button/action-button.js.map +1 -1
  6. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  7. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  9. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  10. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  11. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  12. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  13. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  14. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  15. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  16. package/dist/components/composites/chat/chat.js.map +1 -1
  17. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  18. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  19. package/dist/components/composites/context/context.js.map +1 -1
  20. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  21. package/dist/components/composites/help-center/help-center.js.map +1 -1
  22. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  23. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  24. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  25. package/dist/components/composites/list-row/list-row.js.map +1 -1
  26. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  27. package/dist/components/composites/model-selector/model-selector.js +3 -0
  28. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  29. package/dist/components/composites/plan/plan.js.map +1 -1
  30. package/dist/components/composites/queue/queue.js.map +1 -1
  31. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  32. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  33. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  34. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  35. package/dist/components/composites/settings/settings.js.map +1 -1
  36. package/dist/components/composites/sources/sources.js.map +1 -1
  37. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  38. package/dist/components/composites/stat/stat.js.map +1 -1
  39. package/dist/components/composites/subagent/subagent.js.map +1 -1
  40. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  41. package/dist/components/composites/task/task.js.map +1 -1
  42. package/dist/components/composites/terminal/terminal.js.map +1 -1
  43. package/dist/components/composites/test-results/test-results.js.map +1 -1
  44. package/dist/components/composites/tool/tool.js.map +1 -1
  45. package/dist/components/composites/tree/tree.js.map +1 -1
  46. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  47. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  48. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  49. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  50. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  51. package/dist/components/conversation/atomic/chat-composer.js.map +1 -1
  52. package/dist/components/conversation/busy-send-button.js.map +1 -1
  53. package/dist/components/conversation/chat-composer.js.map +1 -1
  54. package/dist/components/conversation/composer-menu.js.map +1 -1
  55. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  56. package/dist/components/conversation/conversation-pane.js.map +1 -1
  57. package/dist/components/conversation/conversation-surface.js.map +1 -1
  58. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  59. package/dist/components/conversation/message-composer.js.map +1 -1
  60. package/dist/components/conversation/message-row.js.map +1 -1
  61. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  62. package/dist/components/conversation/thread-panel.js.map +1 -1
  63. package/dist/components/conversation/transcript-composition.js.map +1 -1
  64. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  65. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  66. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  67. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
  68. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  69. package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
  70. package/dist/components/layout/page/page.js.map +1 -1
  71. package/dist/components/layout/panel/panel.js.map +1 -1
  72. package/dist/components/layout/pixel-pane/pixel-pane.js.map +1 -1
  73. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  74. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  75. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  76. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  77. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
  78. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  79. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  80. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  81. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  82. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  83. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  84. package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
  85. package/dist/components/motion/presence.js.map +1 -1
  86. package/dist/components/theme/appearance-panel.js.map +1 -1
  87. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  88. package/dist/components/theme/theme-picker.js.map +1 -1
  89. package/dist/components/theme/theme-provider.js.map +1 -1
  90. package/dist/components/theme/theme-toggle.js.map +1 -1
  91. package/dist/components/ui/accordion/accordion.js.map +1 -1
  92. package/dist/components/ui/alert/alert.js.map +1 -1
  93. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  94. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  95. package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
  96. package/dist/components/ui/attachment/attachment.js.map +1 -1
  97. package/dist/components/ui/avatar/avatar.js.map +1 -1
  98. package/dist/components/ui/badge/badge.js.map +1 -1
  99. package/dist/components/ui/board/board.js.map +1 -1
  100. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  101. package/dist/components/ui/bubble/bubble.js.map +1 -1
  102. package/dist/components/ui/button/button.js.map +1 -1
  103. package/dist/components/ui/button-group/button-group.js.map +1 -1
  104. package/dist/components/ui/calendar/calendar.js.map +1 -1
  105. package/dist/components/ui/callout/callout.js.map +1 -1
  106. package/dist/components/ui/card/card.js.map +1 -1
  107. package/dist/components/ui/carousel/carousel.js.map +1 -1
  108. package/dist/components/ui/chart/chart.js.map +1 -1
  109. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  110. package/dist/components/ui/code-block/code-block.js.map +1 -1
  111. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  112. package/dist/components/ui/combobox/combobox.js.map +1 -1
  113. package/dist/components/ui/combobox/value-combobox.js.map +1 -1
  114. package/dist/components/ui/command/command.js.map +1 -1
  115. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  116. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  117. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  118. package/dist/components/ui/dialog/dialog.js.map +1 -1
  119. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  120. package/dist/components/ui/drawer/drawer.js.map +1 -1
  121. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  122. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  123. package/dist/components/ui/empty/empty-state.js.map +1 -1
  124. package/dist/components/ui/empty/empty.js.map +1 -1
  125. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  126. package/dist/components/ui/field/field.js.map +1 -1
  127. package/dist/components/ui/field/number-field.js.map +1 -1
  128. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  129. package/dist/components/ui/input/input-control.js.map +1 -1
  130. package/dist/components/ui/input/input.js.map +1 -1
  131. package/dist/components/ui/input-group/input-group.js.map +1 -1
  132. package/dist/components/ui/input-group/secret-input-group.js.map +1 -1
  133. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  134. package/dist/components/ui/item/item.js.map +1 -1
  135. package/dist/components/ui/kbd/kbd.js.map +1 -1
  136. package/dist/components/ui/label/label.js.map +1 -1
  137. package/dist/components/ui/marker/marker.js.map +1 -1
  138. package/dist/components/ui/menubar/menubar.js.map +1 -1
  139. package/dist/components/ui/message/message.js.map +1 -1
  140. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  141. package/dist/components/ui/native-select/native-select.js.map +1 -1
  142. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  143. package/dist/components/ui/pagination/pagination.js.map +1 -1
  144. package/dist/components/ui/popover/popover.js.map +1 -1
  145. package/dist/components/ui/progress/progress.js.map +1 -1
  146. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  147. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  148. package/dist/components/ui/resizable/resizable.js.map +1 -1
  149. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  150. package/dist/components/ui/select/select.js.map +1 -1
  151. package/dist/components/ui/separator/separator.js.map +1 -1
  152. package/dist/components/ui/sheet/sheet.js.map +1 -1
  153. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  154. package/dist/components/ui/slider/slider.js.map +1 -1
  155. package/dist/components/ui/spinner/spinner.js.map +1 -1
  156. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  157. package/dist/components/ui/switch/switch.js.map +1 -1
  158. package/dist/components/ui/table/table.js.map +1 -1
  159. package/dist/components/ui/tabs/tabs.js.map +1 -1
  160. package/dist/components/ui/text-link/text-link.js.map +1 -1
  161. package/dist/components/ui/textarea/textarea.js.map +1 -1
  162. package/dist/components/ui/toast/toast.js.map +1 -1
  163. package/dist/components/ui/toggle/toggle.js.map +1 -1
  164. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  165. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  166. package/dist/components/ui/trace/trace.js.map +1 -1
  167. package/dist/components/ui/typography/typography.js.map +1 -1
  168. package/dist/r/about-dialog.json +1 -1
  169. package/dist/r/accordion.json +1 -1
  170. package/dist/r/account-menu.json +1 -1
  171. package/dist/r/alert.json +1 -1
  172. package/dist/r/appearance-editor.json +1 -1
  173. package/dist/r/attachment.json +1 -1
  174. package/dist/r/breadcrumb.json +1 -1
  175. package/dist/r/calendar.json +1 -1
  176. package/dist/r/carousel.json +1 -1
  177. package/dist/r/catalog-browser.json +1 -1
  178. package/dist/r/chain-of-thought.json +1 -1
  179. package/dist/r/chat.json +1 -1
  180. package/dist/r/checkbox.json +1 -1
  181. package/dist/r/checkpoint.json +1 -1
  182. package/dist/r/code-block.json +1 -1
  183. package/dist/r/combobox.json +1 -1
  184. package/dist/r/command.json +1 -1
  185. package/dist/r/confirmation.json +1 -1
  186. package/dist/r/context.json +1 -1
  187. package/dist/r/conversation.json +1 -1
  188. package/dist/r/detail-panel.json +1 -1
  189. package/dist/r/dialog.json +1 -1
  190. package/dist/r/dropdown-menu.json +1 -1
  191. package/dist/r/empty.json +1 -1
  192. package/dist/r/file-tree.json +1 -1
  193. package/dist/r/floating-preview.json +1 -1
  194. package/dist/r/help-center.json +1 -1
  195. package/dist/r/icon-picker.json +1 -1
  196. package/dist/r/inline-citation.json +1 -1
  197. package/dist/r/lib.json +1 -1
  198. package/dist/r/message-scroller.json +1 -1
  199. package/dist/r/model-selector.json +1 -1
  200. package/dist/r/native-select.json +1 -1
  201. package/dist/r/navigation-menu.json +1 -1
  202. package/dist/r/pagination.json +1 -1
  203. package/dist/r/pixel-resize-handle.json +1 -1
  204. package/dist/r/plan.json +1 -1
  205. package/dist/r/questionnaire.json +1 -1
  206. package/dist/r/queue.json +1 -1
  207. package/dist/r/radio-group.json +1 -1
  208. package/dist/r/reasoning.json +1 -1
  209. package/dist/r/registry.json +65 -65
  210. package/dist/r/resizable.json +1 -1
  211. package/dist/r/scene-controls.json +1 -1
  212. package/dist/r/select.json +1 -1
  213. package/dist/r/settings.json +1 -1
  214. package/dist/r/sheet.json +1 -1
  215. package/dist/r/shell-rail.json +1 -1
  216. package/dist/r/sidebar-nav.json +1 -1
  217. package/dist/r/sources.json +1 -1
  218. package/dist/r/spinner.json +1 -1
  219. package/dist/r/split-layout.json +1 -1
  220. package/dist/r/src/components/composites/model-selector/model-selector.tsx +4 -1
  221. package/dist/r/stack-trace.json +1 -1
  222. package/dist/r/stat.json +1 -1
  223. package/dist/r/subagent.json +1 -1
  224. package/dist/r/task.json +1 -1
  225. package/dist/r/terminal.json +1 -1
  226. package/dist/r/test-results.json +1 -1
  227. package/dist/r/theming.json +1 -1
  228. package/dist/r/toast.json +1 -1
  229. package/dist/r/tool.json +1 -1
  230. package/dist/r/top-bar.json +1 -1
  231. package/dist/r/trace.json +1 -1
  232. package/dist/r/tree.json +1 -1
  233. package/dist/r/update-dialog.json +1 -1
  234. package/dist/r/workspace-switcher.json +1 -1
  235. package/package.json +11 -11
  236. package/registry.json +65 -65
  237. package/src/components/composites/model-selector/model-selector.tsx +4 -1
@@ -1 +1 @@
1
- {"version":3,"file":"marker.js","names":["Show","splitProps","ComponentProps","JSX","cn","cva","VariantProps","markerVariants","variants","tone","neutral","info","success","warning","danger","variant","rule","note","defaultVariants","MarkerProps","Omit","label","Element","icon","description","action","live","Marker","props","local","rest","_el$","_tmpl$4","_el$3","firstChild","_el$5","_$spread","_$mergeProps","role","_$memo","undefined","class","_$insert","_$createComponent","when","children","_tmpl$","_el$4","_tmpl$2","_el$6","_tmpl$3","_$mergeProps","_$memo","_$createComponent"],"sources":["../../../../src/components/ui/marker/marker.tsx"],"sourcesContent":["import { Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { cva, type VariantProps } from '#lib/variants'\n\n/**\n * Marker.\n *\n * A note or divider *between* turns: a day change, a reconnect, a cancelled run,\n * an event the transcript does not recognise. It is deliberately the quietest\n * element in the column — a hairline with a label — because the transcript has\n * dozens of these and any one that shouts teaches the reader to stop looking.\n *\n * `variant=\"rule\"` draws the hairline either side (a boundary: \"Today\",\n * \"Reconnected\"); `variant=\"note\"` is a bare line of text with its mark (an\n * observation that sits inside the flow). `tone` colours the mark and label and\n * is never the only signal — the `label` always says it in words.\n *\n * A marker is static by default. Pass `live` for one that reports a change the\n * reader must not miss (connection lost): it becomes a status region (`polite`)\n * or an alert (`assertive`). A divider is not an ARIA separator, because\n * `separator` is defined to carry no content.\n */\nexport const markerVariants = cva('flex min-w-0 items-center gap-3 text-xs', {\n variants: {\n tone: {\n neutral: 'text-muted-foreground',\n info: 'text-info',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-destructive',\n },\n variant: {\n rule: 'w-full',\n note: 'w-full justify-start',\n },\n },\n defaultVariants: { tone: 'neutral', variant: 'rule' },\n})\n\nexport type MarkerProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof markerVariants> & {\n label: JSX.Element\n icon?: JSX.Element\n /** Secondary text after the label: a time, a count. */\n description?: JSX.Element\n /** A control that belongs to the note: Retry, Reconnect. */\n action?: JSX.Element\n live?: 'polite' | 'assertive'\n }\n\nexport function Marker(props: MarkerProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'tone',\n 'variant',\n 'label',\n 'icon',\n 'description',\n 'action',\n 'live',\n ])\n const rule = () => (local.variant ?? 'rule') === 'rule'\n return (\n <div\n data-slot=\"marker\"\n role={local.live === 'assertive' ? 'alert' : local.live === 'polite' ? 'status' : undefined}\n class={cn(markerVariants({ tone: local.tone, variant: local.variant }), local.class)}\n {...rest}\n >\n <Show when={rule()}>\n <span aria-hidden=\"true\" class=\"h-px min-w-4 flex-1 bg-border\" />\n </Show>\n <span class=\"flex min-w-0 items-center gap-1.5\">\n <Show when={local.icon}>\n <span aria-hidden=\"true\" class=\"grid shrink-0 place-items-center [&_svg]:size-3.5\">\n {local.icon}\n </span>\n </Show>\n <span class=\"font-medium [overflow-wrap:anywhere]\">{local.label}</span>\n <Show when={local.description}>\n <span class=\"text-muted-foreground [overflow-wrap:anywhere]\">{local.description}</span>\n </Show>\n <Show when={local.action}>{local.action}</Show>\n </span>\n <Show when={rule()}>\n <span aria-hidden=\"true\" class=\"h-px min-w-4 flex-1 bg-border\" />\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAaO,iBAAiBF,IAAI,2CAA2C;CAC3EG,UAAU;EACRC,MAAM;GACJC,SAAS;GACTC,MAAM;GACNC,SAAS;GACTC,SAAS;GACTC,QAAQ;EACV;EACAC,SAAS;GACPC,MAAM;GACNC,MAAM;EACR;CACF;CACAC,iBAAiB;EAAET,MAAM;EAAWM,SAAS;CAAO;AACtD,CAAC;AAaD,SAAgBY,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQ7B,WAAW2B,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAM,CACP;CACD,MAAMZ,cAAca,MAAMd,WAAW,YAAY;CACjD,cAAA;EAAA,IAAAgB,OAAAC,QAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC;EAAAE,OAAAL,MAAAM,WAAA;GAAA,IAGIC,OAAI;IAAA,OAAEC,WAAAV,MAAMH,SAAS,WAAW,CAAA,CAAA,IAAG,UAAUG,MAAMH,SAAS,WAAW,WAAWc,KAAAA;GAAS;GAAA,KAAA,WAAA;IAAA,OACpFpC,GAAGG,eAAe;KAAEE,MAAMoB,MAAMpB;KAAMM,SAASc,MAAMd;IAAQ,CAAC,GAAGc,MAAMY,KAAK;GAAC;EAAA,GAChFX,IAAI,GAAA,OAAA,IAAA;EAAAY,OAAAX,MAAAY,gBAEP3C,MAAI;GAAA,IAAC4C,OAAI;IAAA,OAAE5B,KAAK;GAAC;GAAA,IAAA6B,WAAA;IAAA,OAAAC,OAAA;GAAA;EAAA,CAAA,GAAAb,KAAA;EAAAS,OAAAT,OAAAU,gBAIf3C,MAAI;GAAA,IAAC4C,OAAI;IAAA,OAAEf,MAAMN;GAAI;GAAA,IAAAsB,WAAA;IAAA,IAAAE,QAAAC,QAAA;IAAAN,OAAAK,aAEjBlB,MAAMN,IAAI;IAAA,OAAAwB;GAAA;EAAA,CAAA,GAAAZ,KAAA;EAAAO,OAAAP,aAGqCN,MAAMR,KAAK;EAAAqB,OAAAT,OAAAU,gBAC9D3C,MAAI;GAAA,IAAC4C,OAAI;IAAA,OAAEf,MAAML;GAAW;GAAA,IAAAqB,WAAA;IAAA,IAAAI,QAAAC,QAAA;IAAAR,OAAAO,aACmCpB,MAAML,WAAW;IAAA,OAAAyB;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAP,OAAAT,OAAAU,gBAEhF3C,MAAI;GAAA,IAAC4C,OAAI;IAAA,OAAEf,MAAMJ;GAAM;GAAA,IAAAoB,WAAA;IAAA,OAAGhB,MAAMJ;GAAM;EAAA,CAAA,GAAA,IAAA;EAAAiB,OAAAX,MAAAY,gBAExC3C,MAAI;GAAA,IAAC4C,OAAI;IAAA,OAAE5B,KAAK;GAAC;GAAA,IAAA6B,WAAA;IAAA,OAAAC,OAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAf;CAAA,EAAA,CAAA;AAKxB"}
1
+ {"version":3,"file":"marker.js","names":["Show","splitProps","cn","cva","markerVariants","variants","tone","neutral","info","success","warning","danger","variant","rule","note","defaultVariants","label","icon","description","action","live","Marker","props","local","rest","_el$","_tmpl$4","_el$3","firstChild","_el$5","_$spread","_$mergeProps","role","_$memo","undefined","class","_$insert","_$createComponent","when","children","_tmpl$","_el$4","_tmpl$2","_el$6","_tmpl$3"],"sources":["../../../../src/components/ui/marker/marker.tsx"],"sourcesContent":["import { Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { cva, type VariantProps } from '#lib/variants'\n\n/**\n * Marker.\n *\n * A note or divider *between* turns: a day change, a reconnect, a cancelled run,\n * an event the transcript does not recognise. It is deliberately the quietest\n * element in the column — a hairline with a label — because the transcript has\n * dozens of these and any one that shouts teaches the reader to stop looking.\n *\n * `variant=\"rule\"` draws the hairline either side (a boundary: \"Today\",\n * \"Reconnected\"); `variant=\"note\"` is a bare line of text with its mark (an\n * observation that sits inside the flow). `tone` colours the mark and label and\n * is never the only signal — the `label` always says it in words.\n *\n * A marker is static by default. Pass `live` for one that reports a change the\n * reader must not miss (connection lost): it becomes a status region (`polite`)\n * or an alert (`assertive`). A divider is not an ARIA separator, because\n * `separator` is defined to carry no content.\n */\nexport const markerVariants = cva('flex min-w-0 items-center gap-3 text-xs', {\n variants: {\n tone: {\n neutral: 'text-muted-foreground',\n info: 'text-info',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-destructive',\n },\n variant: {\n rule: 'w-full',\n note: 'w-full justify-start',\n },\n },\n defaultVariants: { tone: 'neutral', variant: 'rule' },\n})\n\nexport type MarkerProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof markerVariants> & {\n label: JSX.Element\n icon?: JSX.Element\n /** Secondary text after the label: a time, a count. */\n description?: JSX.Element\n /** A control that belongs to the note: Retry, Reconnect. */\n action?: JSX.Element\n live?: 'polite' | 'assertive'\n }\n\nexport function Marker(props: MarkerProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'tone',\n 'variant',\n 'label',\n 'icon',\n 'description',\n 'action',\n 'live',\n ])\n const rule = () => (local.variant ?? 'rule') === 'rule'\n return (\n <div\n data-slot=\"marker\"\n role={local.live === 'assertive' ? 'alert' : local.live === 'polite' ? 'status' : undefined}\n class={cn(markerVariants({ tone: local.tone, variant: local.variant }), local.class)}\n {...rest}\n >\n <Show when={rule()}>\n <span aria-hidden=\"true\" class=\"h-px min-w-4 flex-1 bg-border\" />\n </Show>\n <span class=\"flex min-w-0 items-center gap-1.5\">\n <Show when={local.icon}>\n <span aria-hidden=\"true\" class=\"grid shrink-0 place-items-center [&_svg]:size-3.5\">\n {local.icon}\n </span>\n </Show>\n <span class=\"font-medium [overflow-wrap:anywhere]\">{local.label}</span>\n <Show when={local.description}>\n <span class=\"text-muted-foreground [overflow-wrap:anywhere]\">{local.description}</span>\n </Show>\n <Show when={local.action}>{local.action}</Show>\n </span>\n <Show when={rule()}>\n <span aria-hidden=\"true\" class=\"h-px min-w-4 flex-1 bg-border\" />\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAaI,iBAAiBD,IAAI,2CAA2C;CAC3EE,UAAU;EACRC,MAAM;GACJC,SAAS;GACTC,MAAM;GACNC,SAAS;GACTC,SAAS;GACTC,QAAQ;EACV;EACAC,SAAS;GACPC,MAAM;GACNC,MAAM;EACR;CACF;CACAC,iBAAiB;EAAET,MAAM;EAAWM,SAAS;CAAO;AACtD,CAAC;AAaD,SAAgBS,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQvB,WAAWqB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAM,CACP;CACD,MAAMT,cAAcU,MAAMX,WAAW,YAAY;CACjD,cAAA;EAAA,IAAAa,OAAAC,QAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC;EAAAE,OAAAL,MAAAM,WAAA;GAAA,IAGIC,OAAI;IAAA,OAAEC,WAAAV,MAAMH,SAAS,WAAW,CAAA,CAAA,IAAG,UAAUG,MAAMH,SAAS,WAAW,WAAWc,KAAAA;GAAS;GAAA,KAAA,WAAA;IAAA,OACpFhC,GAAGE,eAAe;KAAEE,MAAMiB,MAAMjB;KAAMM,SAASW,MAAMX;IAAQ,CAAC,GAAGW,MAAMY,KAAK;GAAC;EAAA,GAChFX,IAAI,GAAA,OAAA,IAAA;EAAAY,OAAAX,MAAAY,gBAEPrC,MAAI;GAAA,IAACsC,OAAI;IAAA,OAAEzB,KAAK;GAAC;GAAA,IAAA0B,WAAA;IAAA,OAAAC,OAAA;GAAA;EAAA,CAAA,GAAAb,KAAA;EAAAS,OAAAT,OAAAU,gBAIfrC,MAAI;GAAA,IAACsC,OAAI;IAAA,OAAEf,MAAMN;GAAI;GAAA,IAAAsB,WAAA;IAAA,IAAAE,QAAAC,QAAA;IAAAN,OAAAK,aAEjBlB,MAAMN,IAAI;IAAA,OAAAwB;GAAA;EAAA,CAAA,GAAAZ,KAAA;EAAAO,OAAAP,aAGqCN,MAAMP,KAAK;EAAAoB,OAAAT,OAAAU,gBAC9DrC,MAAI;GAAA,IAACsC,OAAI;IAAA,OAAEf,MAAML;GAAW;GAAA,IAAAqB,WAAA;IAAA,IAAAI,QAAAC,QAAA;IAAAR,OAAAO,aACmCpB,MAAML,WAAW;IAAA,OAAAyB;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAP,OAAAT,OAAAU,gBAEhFrC,MAAI;GAAA,IAACsC,OAAI;IAAA,OAAEf,MAAMJ;GAAM;GAAA,IAAAoB,WAAA;IAAA,OAAGhB,MAAMJ;GAAM;EAAA,CAAA,GAAA,IAAA;EAAAiB,OAAAX,MAAAY,gBAExCrC,MAAI;GAAA,IAACsC,OAAI;IAAA,OAAEzB,KAAK;GAAC;GAAA,IAAA0B,WAAA;IAAA,OAAAC,OAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAf;CAAA,EAAA,CAAA;AAKxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.js","names":["Menubar","KobalteMenubar","ComponentProps","splitProps","popoverArrow","topLayerProps","cn","createMenuParts","menuPanel","props","local","rest","_$createComponent","_$mergeProps","class","MenubarTrigger","Trigger","MenubarContentProps","Content","hideArrow","MenubarContent","Portal","children","_$memo","Arrow","parts","MenubarItem","Item","MenubarCheckboxItem","CheckboxItem","MenubarRadioItem","RadioItem","MenubarLabel","Label","MenubarSeparator","Separator","MenubarSubTrigger","SubTrigger","MenubarSubContent","SubContent","Menu","MenubarMenu","Group","MenubarGroup","RadioGroup","MenubarRadioGroup","Sub","MenubarSub","Menubar","_$createComponent","KobalteMenubar","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/menubar/menubar.tsx"],"sourcesContent":["import { Menubar as KobalteMenubar } from '@kobalte/core/menubar'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { popoverArrow, topLayerProps } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { createMenuParts, menuPanel } from '../dropdown-menu/menu-parts'\n\n/**\n * Menubar.\n *\n * A persistent row of menus at the top of a surface — the desktop application\n * pattern. Each trigger opens its own menu, and the arrow keys move *between*\n * menus once one is open, which is what makes a menubar a single control rather\n * than five menus that happen to be adjacent.\n *\n * This is for a window-level command surface. For actions on one thing, use\n * DropdownMenu; a menubar on a row would be a menu pretending to be chrome.\n */\nexport function Menubar(props: ComponentProps<typeof KobalteMenubar>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar\n class={cn(\n 'flex items-center gap-0.5 rounded-md border border-border bg-card p-0.5',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function MenubarTrigger(props: ComponentProps<typeof KobalteMenubar.Trigger>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar.Trigger\n class={cn(\n 'flex items-center rounded-sm px-2 py-1 text-sm font-medium select-none',\n 'transition-colors ease-out outline-none',\n 'data-[expanded]:bg-surface-active',\n 'data-[highlighted]:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type MenubarContentProps = ComponentProps<typeof KobalteMenubar.Content> & {\n /**\n * The arrow is hidden by default, as on DropdownMenu: Kobalte reserves half\n * of the arrow's box as popper gutter, so a menu with one floated 15px off\n * its trigger. Pass `false` to draw it.\n */\n hideArrow?: boolean\n}\n\nexport function MenubarContent(props: MenubarContentProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'hideArrow'])\n return (\n <KobalteMenubar.Portal>\n <KobalteMenubar.Content\n {...topLayerProps}\n class={cn(menuPanel, 'min-w-[10rem]', local.class)}\n {...rest}\n >\n {local.hideArrow === false && (\n <KobalteMenubar.Arrow aria-hidden=\"true\" class={popoverArrow} />\n )}\n {local.children}\n </KobalteMenubar.Content>\n </KobalteMenubar.Portal>\n )\n}\n\nconst parts = createMenuParts(KobalteMenubar, 'menubar')\n\nexport const MenubarItem = parts.Item\nexport const MenubarCheckboxItem = parts.CheckboxItem\nexport const MenubarRadioItem = parts.RadioItem\nexport const MenubarLabel = parts.Label\nexport const MenubarSeparator = parts.Separator\nexport const MenubarSubTrigger = parts.SubTrigger\nexport const MenubarSubContent = parts.SubContent\nexport {\n /**\n * One top-level menu: a trigger and the panel it opens. Required — the\n * menubar's arrow keys move *between* menus, which only works when each\n * trigger belongs to a menu the bar knows about. `value` names it.\n */\n Menu as MenubarMenu,\n Group as MenubarGroup,\n RadioGroup as MenubarRadioGroup,\n Sub as MenubarSub,\n} from '@kobalte/core/menubar'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgBA,UAAQS,OAA8C;CACpE,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGX,SAAcY,WAAA,EAAA,KAAA,WAAA;EAAA,OACNP,GACL,2EACAI,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAEA,SAAgBI,eAAeN,OAAsD;CACnF,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGX,QAAee,SAAOH,WAAA,EAAA,KAAA,WAAA;EAAA,OACdP,GACL,0EACA,2CACA,qCACA,uCACA,oFACAI,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAWA,SAAgBS,eAAeX,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EAAC;EAAS;EAAY;CAAW,CAAC;CAC1E,OAAAG,gBACGX,QAAeoB,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAV,gBACnBX,QAAeiB,SAAOL,WACjBR,eAAa,EAAA,KAAA,WAAA;GAAA,OACVC,GAAGE,WAAW,iBAAiBE,MAAMI,KAAK;EAAC,EAAA,GAC9CH,MAAI,EAAA,IAAAW,WAAA;GAAA,OAAA,CAAAC,WAEPA,WAAAb,MAAMS,cAAc,KAAK,CAAA,CAAA,KAAAP,gBACvBX,QAAeuB,OAAK;IAAA,eAAA;IAAA,SAAA;GAAuC,CAAA,CAC7D,GAAAD,WACAb,MAAMY,QAAQ,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAIvB;AAEA,IAAMG,QAAQlB,gBAAgBN,SAAgB,SAAS;AAEvD,IAAayB,cAAcD,MAAME;AACjC,IAAaC,sBAAsBH,MAAMI;AACzC,IAAaC,mBAAmBL,MAAMM;AACtC,IAAaC,eAAeP,MAAMQ;AAClC,IAAaC,mBAAmBT,MAAMU;AACtC,IAAaC,oBAAoBX,MAAMY;AACvC,IAAaC,oBAAoBb,MAAMc"}
1
+ {"version":3,"file":"menubar.js","names":["Menubar","KobalteMenubar","splitProps","topLayerProps","cn","createMenuParts","menuPanel","props","local","rest","_$createComponent","_$mergeProps","class","MenubarTrigger","Trigger","Content","hideArrow","MenubarContent","Portal","children","_$memo","Arrow","parts","MenubarItem","Item","MenubarCheckboxItem","CheckboxItem","MenubarRadioItem","RadioItem","MenubarLabel","Label","MenubarSeparator","Separator","MenubarSubTrigger","SubTrigger","MenubarSubContent","SubContent"],"sources":["../../../../src/components/ui/menubar/menubar.tsx"],"sourcesContent":["import { Menubar as KobalteMenubar } from '@kobalte/core/menubar'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { popoverArrow, topLayerProps } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { createMenuParts, menuPanel } from '../dropdown-menu/menu-parts'\n\n/**\n * Menubar.\n *\n * A persistent row of menus at the top of a surface — the desktop application\n * pattern. Each trigger opens its own menu, and the arrow keys move *between*\n * menus once one is open, which is what makes a menubar a single control rather\n * than five menus that happen to be adjacent.\n *\n * This is for a window-level command surface. For actions on one thing, use\n * DropdownMenu; a menubar on a row would be a menu pretending to be chrome.\n */\nexport function Menubar(props: ComponentProps<typeof KobalteMenubar>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar\n class={cn(\n 'flex items-center gap-0.5 rounded-md border border-border bg-card p-0.5',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function MenubarTrigger(props: ComponentProps<typeof KobalteMenubar.Trigger>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar.Trigger\n class={cn(\n 'flex items-center rounded-sm px-2 py-1 text-sm font-medium select-none',\n 'transition-colors ease-out outline-none',\n 'data-[expanded]:bg-surface-active',\n 'data-[highlighted]:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type MenubarContentProps = ComponentProps<typeof KobalteMenubar.Content> & {\n /**\n * The arrow is hidden by default, as on DropdownMenu: Kobalte reserves half\n * of the arrow's box as popper gutter, so a menu with one floated 15px off\n * its trigger. Pass `false` to draw it.\n */\n hideArrow?: boolean\n}\n\nexport function MenubarContent(props: MenubarContentProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'hideArrow'])\n return (\n <KobalteMenubar.Portal>\n <KobalteMenubar.Content\n {...topLayerProps}\n class={cn(menuPanel, 'min-w-[10rem]', local.class)}\n {...rest}\n >\n {local.hideArrow === false && (\n <KobalteMenubar.Arrow aria-hidden=\"true\" class={popoverArrow} />\n )}\n {local.children}\n </KobalteMenubar.Content>\n </KobalteMenubar.Portal>\n )\n}\n\nconst parts = createMenuParts(KobalteMenubar, 'menubar')\n\nexport const MenubarItem = parts.Item\nexport const MenubarCheckboxItem = parts.CheckboxItem\nexport const MenubarRadioItem = parts.RadioItem\nexport const MenubarLabel = parts.Label\nexport const MenubarSeparator = parts.Separator\nexport const MenubarSubTrigger = parts.SubTrigger\nexport const MenubarSubContent = parts.SubContent\nexport {\n /**\n * One top-level menu: a trigger and the panel it opens. Required — the\n * menubar's arrow keys move *between* menus, which only works when each\n * trigger belongs to a menu the bar knows about. `value` names it.\n */\n Menu as MenubarMenu,\n Group as MenubarGroup,\n RadioGroup as MenubarRadioGroup,\n Sub as MenubarSub,\n} from '@kobalte/core/menubar'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgBA,UAAQO,OAA8C;CACpE,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGT,SAAcU,WAAA,EAAA,KAAA,WAAA;EAAA,OACNP,GACL,2EACAI,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAEA,SAAgBI,eAAeN,OAAsD;CACnF,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGT,QAAea,SAAOH,WAAA,EAAA,KAAA,WAAA;EAAA,OACdP,GACL,0EACA,2CACA,qCACA,uCACA,oFACAI,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAWA,SAAgBQ,eAAeV,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO;EAAC;EAAS;EAAY;CAAW,CAAC;CAC1E,OAAAG,gBACGT,QAAeiB,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAT,gBACnBT,QAAec,SAAOJ,WACjBR,eAAa,EAAA,KAAA,WAAA;GAAA,OACVC,GAAGE,WAAW,iBAAiBE,MAAMI,KAAK;EAAC,EAAA,GAC9CH,MAAI,EAAA,IAAAU,WAAA;GAAA,OAAA,CAAAC,WAEPA,WAAAZ,MAAMQ,cAAc,KAAK,CAAA,CAAA,KAAAN,gBACvBT,QAAeoB,OAAK;IAAA,eAAA;IAAA,SAAA;GAAuC,CAAA,CAC7D,GAAAD,WACAZ,MAAMW,QAAQ,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAIvB;AAEA,IAAMG,QAAQjB,gBAAgBJ,SAAgB,SAAS;AAEvD,IAAasB,cAAcD,MAAME;AACjC,IAAaC,sBAAsBH,MAAMI;AACzC,IAAaC,mBAAmBL,MAAMM;AACtC,IAAaC,eAAeP,MAAMQ;AAClC,IAAaC,mBAAmBT,MAAMU;AACtC,IAAaC,oBAAoBX,MAAMY;AACvC,IAAaC,oBAAoBb,MAAMc"}
@@ -1 +1 @@
1
- {"version":3,"file":"message.js","names":["createMemo","For","Index","Match","Show","splitProps","Switch","ComponentProps","JSX","cn","CodeBlock","InlineCode","CodeBlockProps","parseMessageText","MessageBlock","MessageInline","MessageRole","MessageProps","Omit","role","label","streaming","anchorId","Message","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","data-role","data-anchor-id","aria-label","aria-busy","undefined","class","_$insert","children","MessageHeader","avatar","Element","time","_el$2","_tmpl$3","_el$3","firstChild","_$createComponent","when","_el$4","_tmpl$2","MessageContent","_el$5","_tmpl$4","MessageActions","_el$6","_tmpl$5","MessageFooter","_el$7","_tmpl$6","MessageCodeBlockProps","Pick","MessageCodeBlockInfo","Readonly","index","language","code","complete","MessageCitations","count","render","numbers","MessageTextProps","text","codeBlockProps","block","citations","sameBlock","a","b","kind","raw","MessageText","previous","previousCount","citationCount","blocks","next","merged","map","codeIndexes","lastIsProse","last","at","_el$8","_tmpl$8","each","BlockView","codeProps","codeIndex","_$memo","_tmpl$7","Extract","chosen","choice","heading","_el$0","_tmpl$9","Inline","nodes","inline","_$effect","_$setAttribute","level","list","ordered","fallback","_el$10","_tmpl$1","items","item","_el$11","_tmpl$10","_el$1","_tmpl$0","_el$12","start","quote","_el$13","_tmpl$11","paragraph","_el$14","_tmpl$12","node","strong","_el$15","_tmpl$13","em","_el$16","_tmpl$14","link","_el$17","_tmpl$15","href","cite","marker","_$mergeProps","_$createComponent","_$memo","_$setAttribute"],"sources":["../../../../src/components/ui/message/message.tsx"],"sourcesContent":["import {\n createMemo,\n For,\n Index,\n Match,\n Show,\n splitProps,\n Switch,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { CodeBlock, InlineCode, type CodeBlockProps } from '../code-block'\nimport { parseMessageText, type MessageBlock, type MessageInline } from './parse-message-text'\n\n/**\n * Message.\n *\n * One turn. The two speakers are laid out differently on purpose, and that is\n * the whole design:\n *\n * - **The person's turn is a bubble on the trailing edge** — short, bounded, and\n * easy to find when scrolling back through a long session.\n * - **The assistant's turn is the page.** It has no surface, spans the reading\n * column, and holds everything the agent did *for that request* — activity\n * (a `Trace`), prose, code, a pending decision — in one place, so a turn\n * reads as an answer with its working underneath it rather than as a chain of\n * unrelated cards.\n *\n * `label` is the turn's accessible name (\"You\", \"Assistant\"): the avatar and\n * name are not drawn for every turn, because a transcript that repeats a speaker\n * on every line is one nobody reads, but the name must still be announced.\n * `streaming` sets `aria-busy`, which tells assistive technology to wait for the\n * turn to settle before reading it instead of announcing every token.\n *\n * `anchorId` is the stable identity `MessageScroller` uses to keep the reader's\n * place when older turns are inserted above it.\n */\nexport type MessageRole = 'user' | 'assistant' | 'system'\n\nexport type MessageProps = Omit<ComponentProps<'article'>, 'role'> & {\n role: MessageRole\n label: string\n streaming?: boolean\n anchorId?: string\n}\n\nexport function Message(props: MessageProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'role',\n 'label',\n 'streaming',\n 'anchorId',\n 'children',\n ])\n return (\n <article\n data-slot=\"message\"\n data-role={local.role}\n data-anchor-id={local.anchorId}\n aria-label={local.label}\n aria-busy={local.streaming || undefined}\n class={cn(\n 'group/message mx-auto flex w-full max-w-3xl min-w-0 flex-col gap-2 py-2',\n // The engine may skip layout for turns far off screen; the intrinsic size\n // keeps the scrollbar honest while it does.\n '[content-visibility:auto] [contain-intrinsic-size:auto_6rem]',\n {\n 'items-end ps-[clamp(0rem,12%,4rem)]': local.role === 'user',\n 'items-stretch': local.role !== 'user',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </article>\n )\n}\n\n/** The speaker's mark and name, for the turns that draw one. */\nexport function MessageHeader(\n props: ComponentProps<'header'> & { avatar?: JSX.Element; time?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'avatar', 'time', 'children'])\n return (\n <header\n data-slot=\"message-header\"\n class={cn('flex items-center gap-2 text-xs text-muted-foreground', local.class)}\n {...rest}\n >\n <Show when={local.avatar}>{local.avatar}</Show>\n <span class=\"font-medium text-foreground\">{local.children}</span>\n <Show when={local.time}>\n <span class=\"tabular-nums\">{local.time}</span>\n </Show>\n </header>\n )\n}\n\n/** The turn's parts, stacked. Gap is the rhythm between prose, activity and code. */\nexport function MessageContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <div\n data-slot=\"message-content\"\n class={cn(\n 'flex w-full max-w-3xl min-w-0 flex-col gap-3 font-content text-content',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\n/**\n * Actions that belong to the turn (copy, retry). Hidden until the turn is hovered\n * or focused so the column is not a wall of buttons, but never `display: none`:\n * a control that only exists under the pointer cannot be reached by keyboard,\n * and on a touch screen there is no hover, so coarse pointers always see them.\n */\nexport function MessageActions(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <div\n data-slot=\"message-actions\"\n class={cn(\n 'flex items-center gap-1 opacity-0 transition-opacity ease-out group-focus-within/message:opacity-100 group-hover/message:opacity-100 [@media(hover:none)]:opacity-100',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\nexport function MessageFooter(props: ComponentProps<'footer'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <footer\n data-slot=\"message-footer\"\n class={cn('flex min-w-0 items-center gap-2 text-xs text-muted-foreground', local.class)}\n {...rest}\n >\n {local.children}\n </footer>\n )\n}\n\n/** The props of a fenced block the host may set. */\nexport type MessageCodeBlockProps = Pick<\n CodeBlockProps,\n 'loadHighlight' | 'maxHeight' | 'wrap' | 'showLineNumbers' | 'lineMarks' | 'lineLimit'\n>\n\n/** What the host is told about a fenced block when it chooses that block's props. */\nexport type MessageCodeBlockInfo = Readonly<{\n /** Position among the text's fenced blocks, from 0. */\n index: number\n language: string | undefined\n code: string\n complete: boolean\n}>\n\n/**\n * How `MessageText` draws citation markers. `count` is how many sources the host\n * has; a `[^n]` marker is a citation only when every `n` is within it. `render`\n * receives the 1-based source numbers and draws the marker, so the host decides\n * what a number means (`messageCitations` in the inline-citation composite does\n * this for a `Source` list).\n */\nexport type MessageCitations = Readonly<{\n count: number\n render: (numbers: readonly number[]) => JSX.Element\n}>\n\nexport type MessageTextProps = Omit<ComponentProps<'div'>, 'children'> & {\n text: string\n /** True while text may still arrive: a trailing open fence renders as partial code. */\n streaming?: boolean\n /**\n * Forwarded to each fenced block, e.g. to supply a lazy highlighter. A function\n * chooses per block, which is how line marks reach a block: marks belong to the\n * host's knowledge of the code (a diff, a failing line), never to the text.\n */\n codeBlockProps?: MessageCodeBlockProps | ((block: MessageCodeBlockInfo) => MessageCodeBlockProps)\n /** Without it, `[^1]` stays the literal text it was written as. */\n citations?: MessageCitations\n}\n\nfunction sameBlock(a: MessageBlock | undefined, b: MessageBlock): boolean {\n return (\n a !== undefined &&\n a.kind === b.kind &&\n a.raw === b.raw &&\n (a.kind !== 'code' || (b.kind === 'code' && a.complete === b.complete))\n )\n}\n\n/**\n * Text, read safely.\n *\n * Renders `parseMessageText`'s blocks as elements: nothing is interpreted as\n * HTML and a link only becomes an anchor when its scheme is http, https or\n * mailto. Blocks are kept by *position* and reuse their previous parsed object\n * when unchanged, so a streaming turn updates the block that is growing and\n * leaves every earlier paragraph and code block — and any selection or focus\n * inside them — untouched.\n */\nexport function MessageText(props: MessageTextProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'text',\n 'streaming',\n 'codeBlockProps',\n 'citations',\n ])\n let previous: readonly MessageBlock[] = []\n let previousCount = 0\n // Only the number of sources reaches the parser, so a new `render` function\n // does not reparse the text, and a changed count does.\n const citationCount = () => local.citations?.count ?? 0\n const blocks = createMemo(() => {\n const count = citationCount()\n if (count !== previousCount) previous = []\n previousCount = count\n const next = parseMessageText(local.text, {\n streaming: local.streaming,\n citations: count || undefined,\n })\n const merged = next.map((block, index) =>\n sameBlock(previous[index], block) ? previous[index]! : block\n )\n previous = merged\n return merged\n })\n // The nth fenced block, so a host can address it. Blocks keep their positions\n // while text streams in after them, so an index stays attached to its block.\n const codeIndexes = createMemo(() => {\n let next = 0\n return blocks().map((block) => (block.kind === 'code' ? next++ : -1))\n })\n const lastIsProse = () => {\n const last = blocks().at(-1)\n return last !== undefined && last.kind !== 'code'\n }\n return (\n <div data-slot=\"message-text\" class={cn('flex min-w-0 flex-col gap-3', local.class)} {...rest}>\n <Index each={blocks()}>\n {(block, index) => (\n <BlockView\n block={block()}\n codeProps={local.codeBlockProps}\n codeIndex={() => codeIndexes()[index] ?? 0}\n citations={local.citations}\n />\n )}\n </Index>\n <Show when={local.streaming && lastIsProse()}>\n <span class=\"streaming-caret\" aria-hidden=\"true\" />\n </Show>\n </div>\n )\n}\n\nfunction BlockView(props: {\n block: MessageBlock\n codeProps?: MessageTextProps['codeBlockProps']\n codeIndex: () => number\n citations?: MessageCitations\n}) {\n return (\n <Switch>\n <Match when={props.block.kind === 'code' && props.block}>\n {(block) => {\n const code = () => block() as Extract<MessageBlock, { kind: 'code' }>\n const chosen = () => {\n const choice = props.codeProps\n return typeof choice === 'function'\n ? choice({\n index: props.codeIndex(),\n language: code().language,\n code: code().code,\n complete: code().complete,\n })\n : choice\n }\n return (\n <CodeBlock\n code={code().code}\n language={code().language}\n complete={code().complete}\n {...chosen()}\n />\n )\n }}\n </Match>\n <Match when={props.block.kind === 'heading' && props.block}>\n {(block) => {\n const heading = () => block() as Extract<MessageBlock, { kind: 'heading' }>\n return (\n <p\n role=\"heading\"\n aria-level={heading().level + 2}\n class=\"font-semibold text-foreground [overflow-wrap:anywhere]\"\n >\n <Inline nodes={heading().inline} citations={props.citations} />\n </p>\n )\n }}\n </Match>\n <Match when={props.block.kind === 'list' && props.block}>\n {(block) => {\n const list = () => block() as Extract<MessageBlock, { kind: 'list' }>\n return (\n <Show\n when={list().ordered}\n fallback={\n <ul class=\"m-0 ms-5 flex list-disc flex-col gap-1 p-0 marker:text-muted-foreground\">\n <For each={list().items}>\n {(item) => (\n <li class=\"[overflow-wrap:anywhere]\">\n <Inline nodes={item} citations={props.citations} />\n </li>\n )}\n </For>\n </ul>\n }\n >\n <ol\n start={list().start}\n class=\"m-0 ms-5 flex list-decimal flex-col gap-1 p-0 marker:text-muted-foreground\"\n >\n <For each={list().items}>\n {(item) => (\n <li class=\"[overflow-wrap:anywhere]\">\n <Inline nodes={item} citations={props.citations} />\n </li>\n )}\n </For>\n </ol>\n </Show>\n )\n }}\n </Match>\n <Match when={props.block.kind === 'quote' && props.block}>\n {(block) => {\n const quote = () => block() as Extract<MessageBlock, { kind: 'quote' }>\n return (\n <blockquote class=\"m-0 border-s-2 border-border ps-3 whitespace-pre-wrap text-muted-foreground [overflow-wrap:anywhere]\">\n <Inline nodes={quote().inline} citations={props.citations} />\n </blockquote>\n )\n }}\n </Match>\n <Match when={props.block.kind === 'paragraph' && props.block}>\n {(block) => {\n const paragraph = () => block() as Extract<MessageBlock, { kind: 'paragraph' }>\n return (\n <p class=\"m-0 whitespace-pre-wrap [overflow-wrap:anywhere]\">\n <Inline nodes={paragraph().inline} citations={props.citations} />\n </p>\n )\n }}\n </Match>\n </Switch>\n )\n}\n\nfunction Inline(props: { nodes: readonly MessageInline[]; citations?: MessageCitations }) {\n return (\n <For each={props.nodes}>\n {(node) => (\n <Switch>\n <Match when={node.kind === 'text' && node}>\n {(text) => (text() as { text: string }).text}\n </Match>\n <Match when={node.kind === 'code' && node}>\n {(code) => <InlineCode>{(code() as { text: string }).text}</InlineCode>}\n </Match>\n <Match when={node.kind === 'strong' && node}>\n {(strong) => (\n <strong class=\"font-semibold\">\n <Inline\n nodes={(strong() as { children: readonly MessageInline[] }).children}\n citations={props.citations}\n />\n </strong>\n )}\n </Match>\n <Match when={node.kind === 'em' && node}>\n {(em) => (\n <em>\n <Inline\n nodes={(em() as { children: readonly MessageInline[] }).children}\n citations={props.citations}\n />\n </em>\n )}\n </Match>\n <Match when={node.kind === 'link' && node}>\n {(link) => (\n <a\n href={(link() as { href: string }).href}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n class=\"text-primary underline underline-offset-2 hover:no-underline\"\n >\n <Inline nodes={(link() as { children: readonly MessageInline[] }).children} />\n </a>\n )}\n </Match>\n <Match when={node.kind === 'cite' && node}>\n {(cite) => {\n const marker = () => cite() as { numbers: readonly number[]; raw: string }\n // The parser read this as a citation only while the host had sources;\n // if they have gone since, the marker is the text it was written as.\n // Match invokes this callback untracked; JSX keeps renderer and\n // same-count source replacements reactive without replacing the block.\n return (\n <>{props.citations ? props.citations.render(marker().numbers) : marker().raw}</>\n )\n }}\n </Match>\n </Switch>\n )}\n </For>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAgBuB,QAAQC,OAAqB;CAC3C,MAAM,CAACC,OAAOC,QAAQrB,WAAWmB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CACD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,eAAA;IAAA,OAGeL,MAAMN;GAAI;GAAA,KAAA,oBAAA;IAAA,OACLM,MAAMH;GAAQ;GAAA,KAAA,gBAAA;IAAA,OAClBG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AAKrD,SAAS,UAAUqD;KAAI;KAAA/F,WACrCsG,gBAAI;MAAA,IAAAC,SAAAC,SAAA;MAAAzG,OAAAwG,QAAA9F,gBAOD6D,QAAM,EAAA,IAACC,QAAK;OAAA,OAAG+B,KAAK,CAAC,CAA4CtG;MAAQ,EAAA,CAAA,CAAA;MAAAyE,aAAAC,aAAA6B,QAAA,QALnED,KAAK,CAAC,CAAsBG,IAAI,CAAA;MAAA,OAAAF;KAAA,EAAA,CAAA;IAO1C,CAAA;IAAA9F,gBAEF5C,OAAK;KAAA,IAAC6C,OAAI;MAAA,OAAEqF,KAAKrD,SAAS,UAAUqD;KAAI;KAAA/F,WACrC0G,SAAS;MACT,MAAMC,eAAeD,KAAK;MAK1B,OAAA5C,WACKA,WAAA,CAAA,CAAA5E,MAAMoD,SAAS,CAAA,CAAA,IAAGpD,MAAMoD,UAAUN,OAAO2E,OAAO,CAAC,CAAC1E,OAAO,IAAI0E,OAAO,CAAC,CAAChE,GAAG;KAEhF;IAAC,CAAA;GAAA;EAAA,EAAA,CAAA;CAGN,CAAA;AAGP"}
1
+ {"version":3,"file":"message.js","names":["createMemo","For","Index","Match","Show","splitProps","Switch","cn","CodeBlock","InlineCode","parseMessageText","role","label","streaming","anchorId","Message","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","undefined","class","_$insert","children","MessageHeader","avatar","time","_el$2","_tmpl$3","_el$3","firstChild","_$createComponent","when","_el$4","_tmpl$2","MessageContent","_el$5","_tmpl$4","MessageActions","_el$6","_tmpl$5","MessageFooter","_el$7","_tmpl$6","index","language","code","complete","count","render","numbers","text","codeBlockProps","block","citations","sameBlock","a","b","kind","raw","MessageText","previous","previousCount","citationCount","blocks","next","merged","map","codeIndexes","lastIsProse","last","at","_el$8","_tmpl$8","each","BlockView","codeProps","codeIndex","_$memo","_tmpl$7","chosen","choice","heading","_el$0","_tmpl$9","Inline","nodes","inline","_$effect","_$setAttribute","level","list","ordered","fallback","_el$10","_tmpl$1","items","item","_el$11","_tmpl$10","_el$1","_tmpl$0","_el$12","start","quote","_el$13","_tmpl$11","paragraph","_el$14","_tmpl$12","node","strong","_el$15","_tmpl$13","em","_el$16","_tmpl$14","link","_el$17","_tmpl$15","href","cite","marker"],"sources":["../../../../src/components/ui/message/message.tsx"],"sourcesContent":["import {\n createMemo,\n For,\n Index,\n Match,\n Show,\n splitProps,\n Switch,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { CodeBlock, InlineCode, type CodeBlockProps } from '../code-block'\nimport { parseMessageText, type MessageBlock, type MessageInline } from './parse-message-text'\n\n/**\n * Message.\n *\n * One turn. The two speakers are laid out differently on purpose, and that is\n * the whole design:\n *\n * - **The person's turn is a bubble on the trailing edge** — short, bounded, and\n * easy to find when scrolling back through a long session.\n * - **The assistant's turn is the page.** It has no surface, spans the reading\n * column, and holds everything the agent did *for that request* — activity\n * (a `Trace`), prose, code, a pending decision — in one place, so a turn\n * reads as an answer with its working underneath it rather than as a chain of\n * unrelated cards.\n *\n * `label` is the turn's accessible name (\"You\", \"Assistant\"): the avatar and\n * name are not drawn for every turn, because a transcript that repeats a speaker\n * on every line is one nobody reads, but the name must still be announced.\n * `streaming` sets `aria-busy`, which tells assistive technology to wait for the\n * turn to settle before reading it instead of announcing every token.\n *\n * `anchorId` is the stable identity `MessageScroller` uses to keep the reader's\n * place when older turns are inserted above it.\n */\nexport type MessageRole = 'user' | 'assistant' | 'system'\n\nexport type MessageProps = Omit<ComponentProps<'article'>, 'role'> & {\n role: MessageRole\n label: string\n streaming?: boolean\n anchorId?: string\n}\n\nexport function Message(props: MessageProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'role',\n 'label',\n 'streaming',\n 'anchorId',\n 'children',\n ])\n return (\n <article\n data-slot=\"message\"\n data-role={local.role}\n data-anchor-id={local.anchorId}\n aria-label={local.label}\n aria-busy={local.streaming || undefined}\n class={cn(\n 'group/message mx-auto flex w-full max-w-3xl min-w-0 flex-col gap-2 py-2',\n // The engine may skip layout for turns far off screen; the intrinsic size\n // keeps the scrollbar honest while it does.\n '[content-visibility:auto] [contain-intrinsic-size:auto_6rem]',\n {\n 'items-end ps-[clamp(0rem,12%,4rem)]': local.role === 'user',\n 'items-stretch': local.role !== 'user',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </article>\n )\n}\n\n/** The speaker's mark and name, for the turns that draw one. */\nexport function MessageHeader(\n props: ComponentProps<'header'> & { avatar?: JSX.Element; time?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'avatar', 'time', 'children'])\n return (\n <header\n data-slot=\"message-header\"\n class={cn('flex items-center gap-2 text-xs text-muted-foreground', local.class)}\n {...rest}\n >\n <Show when={local.avatar}>{local.avatar}</Show>\n <span class=\"font-medium text-foreground\">{local.children}</span>\n <Show when={local.time}>\n <span class=\"tabular-nums\">{local.time}</span>\n </Show>\n </header>\n )\n}\n\n/** The turn's parts, stacked. Gap is the rhythm between prose, activity and code. */\nexport function MessageContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <div\n data-slot=\"message-content\"\n class={cn(\n 'flex w-full max-w-3xl min-w-0 flex-col gap-3 font-content text-content',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\n/**\n * Actions that belong to the turn (copy, retry). Hidden until the turn is hovered\n * or focused so the column is not a wall of buttons, but never `display: none`:\n * a control that only exists under the pointer cannot be reached by keyboard,\n * and on a touch screen there is no hover, so coarse pointers always see them.\n */\nexport function MessageActions(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <div\n data-slot=\"message-actions\"\n class={cn(\n 'flex items-center gap-1 opacity-0 transition-opacity ease-out group-focus-within/message:opacity-100 group-hover/message:opacity-100 [@media(hover:none)]:opacity-100',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\nexport function MessageFooter(props: ComponentProps<'footer'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <footer\n data-slot=\"message-footer\"\n class={cn('flex min-w-0 items-center gap-2 text-xs text-muted-foreground', local.class)}\n {...rest}\n >\n {local.children}\n </footer>\n )\n}\n\n/** The props of a fenced block the host may set. */\nexport type MessageCodeBlockProps = Pick<\n CodeBlockProps,\n 'loadHighlight' | 'maxHeight' | 'wrap' | 'showLineNumbers' | 'lineMarks' | 'lineLimit'\n>\n\n/** What the host is told about a fenced block when it chooses that block's props. */\nexport type MessageCodeBlockInfo = Readonly<{\n /** Position among the text's fenced blocks, from 0. */\n index: number\n language: string | undefined\n code: string\n complete: boolean\n}>\n\n/**\n * How `MessageText` draws citation markers. `count` is how many sources the host\n * has; a `[^n]` marker is a citation only when every `n` is within it. `render`\n * receives the 1-based source numbers and draws the marker, so the host decides\n * what a number means (`messageCitations` in the inline-citation composite does\n * this for a `Source` list).\n */\nexport type MessageCitations = Readonly<{\n count: number\n render: (numbers: readonly number[]) => JSX.Element\n}>\n\nexport type MessageTextProps = Omit<ComponentProps<'div'>, 'children'> & {\n text: string\n /** True while text may still arrive: a trailing open fence renders as partial code. */\n streaming?: boolean\n /**\n * Forwarded to each fenced block, e.g. to supply a lazy highlighter. A function\n * chooses per block, which is how line marks reach a block: marks belong to the\n * host's knowledge of the code (a diff, a failing line), never to the text.\n */\n codeBlockProps?: MessageCodeBlockProps | ((block: MessageCodeBlockInfo) => MessageCodeBlockProps)\n /** Without it, `[^1]` stays the literal text it was written as. */\n citations?: MessageCitations\n}\n\nfunction sameBlock(a: MessageBlock | undefined, b: MessageBlock): boolean {\n return (\n a !== undefined &&\n a.kind === b.kind &&\n a.raw === b.raw &&\n (a.kind !== 'code' || (b.kind === 'code' && a.complete === b.complete))\n )\n}\n\n/**\n * Text, read safely.\n *\n * Renders `parseMessageText`'s blocks as elements: nothing is interpreted as\n * HTML and a link only becomes an anchor when its scheme is http, https or\n * mailto. Blocks are kept by *position* and reuse their previous parsed object\n * when unchanged, so a streaming turn updates the block that is growing and\n * leaves every earlier paragraph and code block — and any selection or focus\n * inside them — untouched.\n */\nexport function MessageText(props: MessageTextProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'text',\n 'streaming',\n 'codeBlockProps',\n 'citations',\n ])\n let previous: readonly MessageBlock[] = []\n let previousCount = 0\n // Only the number of sources reaches the parser, so a new `render` function\n // does not reparse the text, and a changed count does.\n const citationCount = () => local.citations?.count ?? 0\n const blocks = createMemo(() => {\n const count = citationCount()\n if (count !== previousCount) previous = []\n previousCount = count\n const next = parseMessageText(local.text, {\n streaming: local.streaming,\n citations: count || undefined,\n })\n const merged = next.map((block, index) =>\n sameBlock(previous[index], block) ? previous[index]! : block\n )\n previous = merged\n return merged\n })\n // The nth fenced block, so a host can address it. Blocks keep their positions\n // while text streams in after them, so an index stays attached to its block.\n const codeIndexes = createMemo(() => {\n let next = 0\n return blocks().map((block) => (block.kind === 'code' ? next++ : -1))\n })\n const lastIsProse = () => {\n const last = blocks().at(-1)\n return last !== undefined && last.kind !== 'code'\n }\n return (\n <div data-slot=\"message-text\" class={cn('flex min-w-0 flex-col gap-3', local.class)} {...rest}>\n <Index each={blocks()}>\n {(block, index) => (\n <BlockView\n block={block()}\n codeProps={local.codeBlockProps}\n codeIndex={() => codeIndexes()[index] ?? 0}\n citations={local.citations}\n />\n )}\n </Index>\n <Show when={local.streaming && lastIsProse()}>\n <span class=\"streaming-caret\" aria-hidden=\"true\" />\n </Show>\n </div>\n )\n}\n\nfunction BlockView(props: {\n block: MessageBlock\n codeProps?: MessageTextProps['codeBlockProps']\n codeIndex: () => number\n citations?: MessageCitations\n}) {\n return (\n <Switch>\n <Match when={props.block.kind === 'code' && props.block}>\n {(block) => {\n const code = () => block() as Extract<MessageBlock, { kind: 'code' }>\n const chosen = () => {\n const choice = props.codeProps\n return typeof choice === 'function'\n ? choice({\n index: props.codeIndex(),\n language: code().language,\n code: code().code,\n complete: code().complete,\n })\n : choice\n }\n return (\n <CodeBlock\n code={code().code}\n language={code().language}\n complete={code().complete}\n {...chosen()}\n />\n )\n }}\n </Match>\n <Match when={props.block.kind === 'heading' && props.block}>\n {(block) => {\n const heading = () => block() as Extract<MessageBlock, { kind: 'heading' }>\n return (\n <p\n role=\"heading\"\n aria-level={heading().level + 2}\n class=\"font-semibold text-foreground [overflow-wrap:anywhere]\"\n >\n <Inline nodes={heading().inline} citations={props.citations} />\n </p>\n )\n }}\n </Match>\n <Match when={props.block.kind === 'list' && props.block}>\n {(block) => {\n const list = () => block() as Extract<MessageBlock, { kind: 'list' }>\n return (\n <Show\n when={list().ordered}\n fallback={\n <ul class=\"m-0 ms-5 flex list-disc flex-col gap-1 p-0 marker:text-muted-foreground\">\n <For each={list().items}>\n {(item) => (\n <li class=\"[overflow-wrap:anywhere]\">\n <Inline nodes={item} citations={props.citations} />\n </li>\n )}\n </For>\n </ul>\n }\n >\n <ol\n start={list().start}\n class=\"m-0 ms-5 flex list-decimal flex-col gap-1 p-0 marker:text-muted-foreground\"\n >\n <For each={list().items}>\n {(item) => (\n <li class=\"[overflow-wrap:anywhere]\">\n <Inline nodes={item} citations={props.citations} />\n </li>\n )}\n </For>\n </ol>\n </Show>\n )\n }}\n </Match>\n <Match when={props.block.kind === 'quote' && props.block}>\n {(block) => {\n const quote = () => block() as Extract<MessageBlock, { kind: 'quote' }>\n return (\n <blockquote class=\"m-0 border-s-2 border-border ps-3 whitespace-pre-wrap text-muted-foreground [overflow-wrap:anywhere]\">\n <Inline nodes={quote().inline} citations={props.citations} />\n </blockquote>\n )\n }}\n </Match>\n <Match when={props.block.kind === 'paragraph' && props.block}>\n {(block) => {\n const paragraph = () => block() as Extract<MessageBlock, { kind: 'paragraph' }>\n return (\n <p class=\"m-0 whitespace-pre-wrap [overflow-wrap:anywhere]\">\n <Inline nodes={paragraph().inline} citations={props.citations} />\n </p>\n )\n }}\n </Match>\n </Switch>\n )\n}\n\nfunction Inline(props: { nodes: readonly MessageInline[]; citations?: MessageCitations }) {\n return (\n <For each={props.nodes}>\n {(node) => (\n <Switch>\n <Match when={node.kind === 'text' && node}>\n {(text) => (text() as { text: string }).text}\n </Match>\n <Match when={node.kind === 'code' && node}>\n {(code) => <InlineCode>{(code() as { text: string }).text}</InlineCode>}\n </Match>\n <Match when={node.kind === 'strong' && node}>\n {(strong) => (\n <strong class=\"font-semibold\">\n <Inline\n nodes={(strong() as { children: readonly MessageInline[] }).children}\n citations={props.citations}\n />\n </strong>\n )}\n </Match>\n <Match when={node.kind === 'em' && node}>\n {(em) => (\n <em>\n <Inline\n nodes={(em() as { children: readonly MessageInline[] }).children}\n citations={props.citations}\n />\n </em>\n )}\n </Match>\n <Match when={node.kind === 'link' && node}>\n {(link) => (\n <a\n href={(link() as { href: string }).href}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n class=\"text-primary underline underline-offset-2 hover:no-underline\"\n >\n <Inline nodes={(link() as { children: readonly MessageInline[] }).children} />\n </a>\n )}\n </Match>\n <Match when={node.kind === 'cite' && node}>\n {(cite) => {\n const marker = () => cite() as { numbers: readonly number[]; raw: string }\n // The parser read this as a citation only while the host had sources;\n // if they have gone since, the marker is the text it was written as.\n // Match invokes this callback untracked; JSX keeps renderer and\n // same-count source replacements reactive without replacing the block.\n return (\n <>{props.citations ? props.citations.render(marker().numbers) : marker().raw}</>\n )\n }}\n </Match>\n </Switch>\n )}\n </For>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAgBe,QAAQC,OAAqB;CAC3C,MAAM,CAACC,OAAOC,QAAQb,WAAWW,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CACD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,eAAA;IAAA,OAGeL,MAAMN;GAAI;GAAA,KAAA,oBAAA;IAAA,OACLM,MAAMH;GAAQ;GAAA,KAAA,gBAAA;IAAA,OAClBG,MAAML;GAAK;GAAA,KAAA,eAAA;IAAA,OACZK,MAAMJ,aAAaU,KAAAA;GAAS;GA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ACC,QAAK;OAAA,OAAG+B,KAAK,CAAC,CAA4C9F;MAAQ,EAAA,CAAA,CAAA;MAAAiE,aAAAC,aAAA6B,QAAA,QALnED,KAAK,CAAC,CAAsBG,IAAI,CAAA;MAAA,OAAAF;KAAA,EAAA,CAAA;IAO1C,CAAA;IAAAvF,gBAEF/B,OAAK;KAAA,IAACgC,OAAI;MAAA,OAAE8E,KAAKpD,SAAS,UAAUoD;KAAI;KAAAvF,WACrCkG,SAAS;MACT,MAAMC,eAAeD,KAAK;MAK1B,OAAA3C,WACKA,WAAA,CAAA,CAAAjE,MAAMyC,SAAS,CAAA,CAAA,IAAGzC,MAAMyC,UAAUL,OAAOyE,OAAO,CAAC,CAACxE,OAAO,IAAIwE,OAAO,CAAC,CAAC/D,GAAG;KAEhF;IAAC,CAAA;GAAA;EAAA,EAAA,CAAA;CAGN,CAAA;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"file":"modal-dialog.js","names":["ComponentProps","JSX","Show","createEffect","createSignal","onCleanup","splitProps","lateLayerAttribute","cn","Dialog","DialogContent","DialogDescription","DialogHeader","DialogTitle","ModalDialogProps","Omit","size","footer","Element","open","onClose","title","modal","description","headerLeading","children","ModalDialog","props","local","rest","content","setContent","HTMLElement","element","background","document","body","filter","child","contains","wasInert","map","node","hasAttribute","setAttribute","forEach","index","removeAttribute","portal","parentElement","_$createComponent","when","onOpenChange","next","_$mergeProps","ref","positioner","class","aria-label","aria-labelledby","undefined","band","_$memo","fallback","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/modal-dialog/modal-dialog.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Show, createEffect, createSignal, onCleanup, splitProps } from 'solid-js'\nimport { lateLayerAttribute } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../dialog'\n\n/**\n * ModalDialog.\n *\n * A dialog that owns four things `Dialog` leaves to its caller, each of which is a\n * real defect when it is missed:\n *\n * 1. **It unmounts while closed.** An always-mounted dialog that closes as a side\n * effect of an async action can leave Kobalte's `aria-hidden` bookkeeping behind,\n * which hides the rest of the application from assistive technology. Unmounting\n * the whole owner makes cleanup the only way the layer can end.\n * 2. **It marks the background `inert`.** `inert` keeps the background out of the\n * tab order and the accessibility tree without depending on that bookkeeping, and\n * it restores exactly the elements that did not already have it — so a nested\n * dialog does not un-inert its parent.\n * 3. **It sets an explicit accessible name.** The content receives `aria-label`\n * from `title`, so its name does not depend on the title id registration effect.\n * Pass `aria-label` to use a different name while keeping the visible title;\n * pass `aria-labelledby` when another visible label should take precedence.\n * 4. **It returns focus to the opener**, as every `DialogContent` does. For a\n * controlled dialog whose opener cannot be inferred from the focused element,\n * pass `restoreFocusRef`.\n * 5. **It keeps its own portal out of an enclosing layer's `aria-hidden`\n * bookkeeping.** A non-modal dialog opened while a modal `Sheet` is alive would\n * otherwise be aria-hidden one frame after it mounts — the enclosing layer's\n * hide-outside observer walks late-arriving body children as background. The\n * portal carries the marker that observer exempts; a modal layer opened above\n * still hides it, because that path matches a different attribute.\n *\n * Use `Dialog` directly when you need its composition; use this when you want a\n * dialog that is correct by default. `size=\"settings\"` supplies a wide, bounded\n * shell for a shared settings layout, titled by a banded header like a sheet's;\n * ordinary dialogs keep their compact default. Every centred dialog stays inside\n * the window: past the window's height it scrolls rather than running off its\n * edges. `size=\"fit\"` is for a dialog whose body can grow (a scan result, a long\n * plan) and whose actions must stay in view: the title and `footer` stay put and\n * the children scroll between them.\n */\nexport type ModalDialogProps = Omit<\n ComponentProps<typeof DialogContent>,\n 'children' | 'aria-label' | 'aria-labelledby' | 'positioner'\n> & {\n /**\n * `settings` selects the bounded, scrollable shell used for grouped workspace\n * settings. `fit` keeps the compact default width but lets the dialog's content\n * decide its height up to the window: the title band stays put, the children\n * scroll, and `footer` stays in view beneath them.\n */\n size?: 'default' | 'settings' | 'fit'\n /**\n * Actions that must stay reachable however long the content is (Cancel and a\n * primary button). Rendered under the scrolling children, outside the scroll\n * area, and only by the `fit` size.\n */\n footer?: JSX.Element\n open: boolean\n onClose: () => void\n title: string\n /**\n * Controls Kobalte's focus, scroll and accessibility modality. Defaults to `true`;\n * background body children remain inert in either mode.\n */\n modal?: boolean\n description?: string\n /** A mark or icon drawn before the title. */\n headerLeading?: JSX.Element\n /** Replaces `title` as the accessible name while keeping the visible title. */\n 'aria-label'?: string\n /** Names the dialog from a visible element; ARIA gives it precedence over `aria-label`. */\n 'aria-labelledby'?: string\n children?: JSX.Element\n}\n\nexport function ModalDialog(props: ModalDialogProps) {\n const [local, rest] = splitProps(props, [\n 'open',\n 'onClose',\n 'title',\n 'modal',\n 'size',\n 'footer',\n 'description',\n 'headerLeading',\n 'class',\n 'children',\n 'aria-label',\n 'aria-labelledby',\n ])\n\n const [content, setContent] = createSignal<HTMLElement>()\n\n createEffect(() => {\n if (!local.open) return\n const element = content()\n if (!element) return\n\n const background = [...document.body.children].filter(\n (child): child is HTMLElement => child instanceof HTMLElement && !child.contains(element)\n )\n const wasInert = background.map((node) => node.hasAttribute('inert'))\n for (const node of background) node.setAttribute('inert', '')\n\n onCleanup(() => {\n background.forEach((node, index) => {\n // Only the elements that were not already inert are restored, so a nested\n // dialog closing does not undo its parent's containment.\n if (!wasInert[index]) node.removeAttribute('inert')\n })\n })\n\n // Kobalte's Portal owns the body child, so the marker goes on after mount.\n let portal = element\n while (portal.parentElement !== null && portal.parentElement !== document.body) {\n portal = portal.parentElement\n }\n portal.setAttribute(lateLayerAttribute, 'true')\n onCleanup(() => portal.removeAttribute(lateLayerAttribute))\n })\n\n return (\n <Show when={local.open}>\n <Dialog open modal={local.modal ?? true} onOpenChange={(next) => !next && local.onClose()}>\n <DialogContent\n ref={setContent}\n positioner={local.size === 'settings' ? 'inset' : 'default'}\n class={cn(\n 'gap-4',\n local.size === 'settings' &&\n 'flex h-208 max-h-full min-h-0 max-w-6xl flex-col gap-0 overflow-hidden p-0',\n local.size === 'fit' && 'flex flex-col overflow-hidden',\n local.class\n )}\n aria-label={local['aria-label'] ?? local.title}\n aria-labelledby={\n local['aria-labelledby'] ?? (local['aria-label'] !== undefined ? '' : undefined)\n }\n {...rest}\n >\n <DialogHeader\n band={local.size === 'settings'}\n class={\n local.size === 'settings'\n ? 'shrink-0 gap-1 border-b border-border px-5 pt-4 pb-3 pe-14'\n : undefined\n }\n >\n <DialogTitle class=\"flex items-center gap-2\">\n <Show when={local.headerLeading}>{local.headerLeading}</Show>\n {local.title}\n </DialogTitle>\n <Show when={local.description}>\n <DialogDescription>{local.description}</DialogDescription>\n </Show>\n </DialogHeader>\n <Show when={local.size === 'fit'} fallback={local.children}>\n {/* The scrollport takes the room the title band and footer leave. The\n padding and matching negative margin keep a focused control's ring\n from being clipped at the scrollport's edge. */}\n <div class=\"-mx-1 flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-1\">\n {local.children}\n </div>\n <Show when={local.footer}>\n <div class=\"flex shrink-0 flex-wrap justify-end gap-2 border-t border-border pt-3\">\n {local.footer}\n </div>\n </Show>\n </Show>\n </DialogContent>\n </Dialog>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AA8EA,SAAgB0B,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQvB,WAAWqB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAiB,CAClB;CAED,MAAM,CAACG,SAASC,cAAc3B,aAA0B;CAExDD,mBAAmB;EACjB,IAAI,CAACyB,MAAMT,MAAM;EACjB,MAAMc,UAAUH,QAAQ;EACxB,IAAI,CAACG,SAAS;EAEd,MAAMC,aAAa,CAAC,GAAGC,SAASC,KAAKX,QAAQ,CAAC,CAACY,QAC5CC,UAAgCA,iBAAiBN,eAAe,CAACM,MAAMC,SAASN,OAAO,CAC1F;EACA,MAAMO,WAAWN,WAAWO,KAAKC,SAASA,KAAKC,aAAa,OAAO,CAAC;EACpE,KA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AA;OAAS;OAAA,IAAAnC,WAAA;QAAA,OAAA,CAAAyB,gBAGdrC,aAAW;SAAA,SAAA;SAAA,IAAAY,WAAA;UAAA,OAAA,CAAAyB,gBACThD,MAAI;WAAA,IAACiD,OAAI;YAAA,OAAEvB,MAAMJ;WAAa;WAAA,IAAAC,WAAA;YAAA,OAAGG,MAAMJ;WAAa;UAAA,CAAA,GAAAsC,WACpDlC,MAAMP,KAAK,CAAA;SAAA;QAAA,CAAA,GAAA6B,gBAEbhD,MAAI;SAAA,IAACiD,OAAI;UAAA,OAAEvB,MAAML;SAAW;SAAA,IAAAE,WAAA;UAAA,OAAAyB,gBAC1BvC,mBAAiB,EAAA,IAAAc,WAAA;WAAA,OAAEG,MAAML;UAAW,EAAA,CAAA;SAAA;QAAA,CAAA,CAAA;OAAA;MAAA,CAAA,GAAA2B,gBAGxChD,MAAI;OAAA,IAACiD,OAAI;QAAA,OAAEvB,MAAMZ,SAAS;OAAK;OAAA,IAAE+C,WAAQ;QAAA,OAAEnC,MAAMH;OAAQ;OAAA,IAAAA,WAAA;QAAA,OAAA,QAAA;SAAA,IAAAuC,OAAAC,OAAA;SAAAC,OAAAF,YAKrDpC,MAAMH,QAAQ;SAAA,OAAAuC;QAAA,EAAA,CAAA,GAAAd,gBAEhBhD,MAAI;SAAA,IAACiD,OAAI;UAAA,OAAEvB,MAAMX;SAAM;SAAA,IAAAQ,WAAA;UAAA,IAAA0C,QAAAC,QAAA;UAAAF,OAAAC,aAEnBvC,MAAMX,MAAM;UAAA,OAAAkD;SAAA;QAAA,CAAA,CAAA;OAAA;MAAA,CAAA,CAAA;KAAA,EAAA,CAAA,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAQ7B"}
1
+ {"version":3,"file":"modal-dialog.js","names":["Show","createEffect","createSignal","onCleanup","splitProps","lateLayerAttribute","cn","Dialog","DialogContent","DialogDescription","DialogHeader","DialogTitle","size","footer","open","onClose","title","modal","description","headerLeading","children","ModalDialog","props","local","rest","content","setContent","HTMLElement","element","background","document","body","filter","child","contains","wasInert","map","node","hasAttribute","setAttribute","forEach","index","removeAttribute","portal","parentElement","_$createComponent","when","onOpenChange","next","_$mergeProps","ref","positioner","class","undefined","band","_$memo","fallback","_el$","_tmpl$","_$insert","_el$2","_tmpl$2"],"sources":["../../../../src/components/ui/modal-dialog/modal-dialog.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Show, createEffect, createSignal, onCleanup, splitProps } from 'solid-js'\nimport { lateLayerAttribute } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../dialog'\n\n/**\n * ModalDialog.\n *\n * A dialog that owns four things `Dialog` leaves to its caller, each of which is a\n * real defect when it is missed:\n *\n * 1. **It unmounts while closed.** An always-mounted dialog that closes as a side\n * effect of an async action can leave Kobalte's `aria-hidden` bookkeeping behind,\n * which hides the rest of the application from assistive technology. Unmounting\n * the whole owner makes cleanup the only way the layer can end.\n * 2. **It marks the background `inert`.** `inert` keeps the background out of the\n * tab order and the accessibility tree without depending on that bookkeeping, and\n * it restores exactly the elements that did not already have it — so a nested\n * dialog does not un-inert its parent.\n * 3. **It sets an explicit accessible name.** The content receives `aria-label`\n * from `title`, so its name does not depend on the title id registration effect.\n * Pass `aria-label` to use a different name while keeping the visible title;\n * pass `aria-labelledby` when another visible label should take precedence.\n * 4. **It returns focus to the opener**, as every `DialogContent` does. For a\n * controlled dialog whose opener cannot be inferred from the focused element,\n * pass `restoreFocusRef`.\n * 5. **It keeps its own portal out of an enclosing layer's `aria-hidden`\n * bookkeeping.** A non-modal dialog opened while a modal `Sheet` is alive would\n * otherwise be aria-hidden one frame after it mounts — the enclosing layer's\n * hide-outside observer walks late-arriving body children as background. The\n * portal carries the marker that observer exempts; a modal layer opened above\n * still hides it, because that path matches a different attribute.\n *\n * Use `Dialog` directly when you need its composition; use this when you want a\n * dialog that is correct by default. `size=\"settings\"` supplies a wide, bounded\n * shell for a shared settings layout, titled by a banded header like a sheet's;\n * ordinary dialogs keep their compact default. Every centred dialog stays inside\n * the window: past the window's height it scrolls rather than running off its\n * edges. `size=\"fit\"` is for a dialog whose body can grow (a scan result, a long\n * plan) and whose actions must stay in view: the title and `footer` stay put and\n * the children scroll between them.\n */\nexport type ModalDialogProps = Omit<\n ComponentProps<typeof DialogContent>,\n 'children' | 'aria-label' | 'aria-labelledby' | 'positioner'\n> & {\n /**\n * `settings` selects the bounded, scrollable shell used for grouped workspace\n * settings. `fit` keeps the compact default width but lets the dialog's content\n * decide its height up to the window: the title band stays put, the children\n * scroll, and `footer` stays in view beneath them.\n */\n size?: 'default' | 'settings' | 'fit'\n /**\n * Actions that must stay reachable however long the content is (Cancel and a\n * primary button). Rendered under the scrolling children, outside the scroll\n * area, and only by the `fit` size.\n */\n footer?: JSX.Element\n open: boolean\n onClose: () => void\n title: string\n /**\n * Controls Kobalte's focus, scroll and accessibility modality. Defaults to `true`;\n * background body children remain inert in either mode.\n */\n modal?: boolean\n description?: string\n /** A mark or icon drawn before the title. */\n headerLeading?: JSX.Element\n /** Replaces `title` as the accessible name while keeping the visible title. */\n 'aria-label'?: string\n /** Names the dialog from a visible element; ARIA gives it precedence over `aria-label`. */\n 'aria-labelledby'?: string\n children?: JSX.Element\n}\n\nexport function ModalDialog(props: ModalDialogProps) {\n const [local, rest] = splitProps(props, [\n 'open',\n 'onClose',\n 'title',\n 'modal',\n 'size',\n 'footer',\n 'description',\n 'headerLeading',\n 'class',\n 'children',\n 'aria-label',\n 'aria-labelledby',\n ])\n\n const [content, setContent] = createSignal<HTMLElement>()\n\n createEffect(() => {\n if (!local.open) return\n const element = content()\n if (!element) return\n\n const background = [...document.body.children].filter(\n (child): child is HTMLElement => child instanceof HTMLElement && !child.contains(element)\n )\n const wasInert = background.map((node) => node.hasAttribute('inert'))\n for (const node of background) node.setAttribute('inert', '')\n\n onCleanup(() => {\n background.forEach((node, index) => {\n // Only the elements that were not already inert are restored, so a nested\n // dialog closing does not undo its parent's containment.\n if (!wasInert[index]) node.removeAttribute('inert')\n })\n })\n\n // Kobalte's Portal owns the body child, so the marker goes on after mount.\n let portal = element\n while (portal.parentElement !== null && portal.parentElement !== document.body) {\n portal = portal.parentElement\n }\n portal.setAttribute(lateLayerAttribute, 'true')\n onCleanup(() => portal.removeAttribute(lateLayerAttribute))\n })\n\n return (\n <Show when={local.open}>\n <Dialog open modal={local.modal ?? true} onOpenChange={(next) => !next && local.onClose()}>\n <DialogContent\n ref={setContent}\n positioner={local.size === 'settings' ? 'inset' : 'default'}\n class={cn(\n 'gap-4',\n local.size === 'settings' &&\n 'flex h-208 max-h-full min-h-0 max-w-6xl flex-col gap-0 overflow-hidden p-0',\n local.size === 'fit' && 'flex flex-col overflow-hidden',\n local.class\n )}\n aria-label={local['aria-label'] ?? local.title}\n aria-labelledby={\n local['aria-labelledby'] ?? (local['aria-label'] !== undefined ? '' : undefined)\n }\n {...rest}\n >\n <DialogHeader\n band={local.size === 'settings'}\n class={\n local.size === 'settings'\n ? 'shrink-0 gap-1 border-b border-border px-5 pt-4 pb-3 pe-14'\n : undefined\n }\n >\n <DialogTitle class=\"flex items-center gap-2\">\n <Show when={local.headerLeading}>{local.headerLeading}</Show>\n {local.title}\n </DialogTitle>\n <Show when={local.description}>\n <DialogDescription>{local.description}</DialogDescription>\n </Show>\n </DialogHeader>\n <Show when={local.size === 'fit'} fallback={local.children}>\n {/* The scrollport takes the room the title band and footer leave. The\n padding and matching negative margin keep a focused control's ring\n from being clipped at the scrollport's edge. */}\n <div class=\"-mx-1 flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-1\">\n {local.children}\n </div>\n <Show when={local.footer}>\n <div class=\"flex shrink-0 flex-wrap justify-end gap-2 border-t border-border pt-3\">\n {local.footer}\n </div>\n </Show>\n </Show>\n </DialogContent>\n </Dialog>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AA8EA,SAAgBqB,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAO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7C,MAAI;SAAA,IAAC8C,OAAI;UAAA,OAAEvB,MAAMV;SAAM;SAAA,IAAAO,WAAA;UAAA,IAAAwC,QAAAC,QAAA;UAAAF,OAAAC,aAEnBrC,MAAMV,MAAM;UAAA,OAAA+C;SAAA;QAAA,CAAA,CAAA;OAAA;MAAA,CAAA,CAAA;KAAA,EAAA,CAAA,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAQ7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.js","names":["ChevronDownIcon","ComponentProps","createEffect","For","onMount","Show","splitProps","useFormFieldControl","cn","NativeSelectProps","Omit","size","wrapperClass","options","NativeSelectOption","defaultValue","setSelectedValue","select","HTMLSelectElement","value","multiple","undefined","Array","isArray","selected","Set","map","String","option","has","isControlledOptionSelected","some","item","initializeDefaultSelection","defaultValues","defaultSelected","Readonly","label","disabled","NativeSelect","props","local","rest","field","id","Boolean","_el$","_tmpl$","_el$2","firstChild","_$use","element","_$spread","_$mergeProps","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","class","_$insert","_$createComponent","when","fallback","children","each","_el$3","_tmpl$2","_$effect","_p$","_v$","_v$2","e","t","_$className","_$mergeProps","_$createComponent","_$className"],"sources":["../../../../src/components/ui/native-select/native-select.tsx"],"sourcesContent":["import { ChevronDownIcon } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, For, onMount, Show, splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\nexport type NativeSelectProps = Omit<ComponentProps<'select'>, 'size'> & {\n /**\n * The control rung, matching `Input` and `SelectTrigger`: `sm` for a dense\n * toolbar or pane filter, `md` (the default) everywhere else. This replaces the\n * native `size` attribute, which turns a select into a list box — a different\n * control that this styled single-line select is not.\n */\n size?: 'sm' | 'md' | 'lg'\n /**\n * Layout classes for the element that wraps the select and its chevron: a\n * width or `max-w-*`, `flex-1`, `col-span-*`, a margin. `class` reaches the\n * `<select>` itself, which is the wrong box for any of those, because the\n * wrapper is what a flex or grid parent lays out. The select fills the\n * wrapper, so the chevron stays at the control's edge at any width.\n */\n wrapperClass?: string\n /** Render the choices from data instead of raw option children. */\n options?: readonly NativeSelectOption[]\n /** Initialize an uncontrolled selection after its native options mount. */\n defaultValue?: ComponentProps<'select'>['value']\n}\n\nfunction setSelectedValue(\n select: HTMLSelectElement,\n value: ComponentProps<'select'>['value'],\n multiple: boolean\n) {\n if (value === undefined) return\n\n if (multiple && Array.isArray(value)) {\n const selected = new Set(value.map(String))\n for (const option of select.options) option.selected = selected.has(option.value)\n return\n }\n\n select.value = String(Array.isArray(value) ? (value[0] ?? '') : value)\n}\n\nfunction isControlledOptionSelected(\n value: ComponentProps<'select'>['value'],\n option: string,\n multiple: boolean\n): boolean | undefined {\n if (value === undefined) return undefined\n if (multiple && Array.isArray(value)) return value.some((item) => String(item) === option)\n return String(Array.isArray(value) ? (value[0] ?? '') : value) === option\n}\n\nfunction initializeDefaultSelection(\n select: HTMLSelectElement,\n value: ComponentProps<'select'>['value'],\n multiple: boolean\n) {\n if (value === undefined) return\n\n const defaultValues =\n multiple && Array.isArray(value)\n ? new Set(value.map(String))\n : new Set([String(Array.isArray(value) ? (value[0] ?? '') : value)])\n\n for (const option of select.options) option.defaultSelected = defaultValues.has(option.value)\n setSelectedValue(select, value, multiple)\n}\n\n/**\n * NativeSelect.\n *\n * A styled native `<select>` for compact, finite choices. Use `Select` when the\n * list needs a custom popover, typed options, or runtime filtering; this keeps\n * the browser's built-in keyboard, form, option, and label behavior.\n *\n * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and\n * the Adea token system; see the root NOTICE for source and attribution.\n */\nexport type NativeSelectOption = Readonly<{\n value: string\n label: string\n disabled?: boolean\n}>\n\nexport function NativeSelect(props: NativeSelectProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'wrapperClass',\n 'size',\n 'children',\n 'defaultValue',\n 'options',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n let select: HTMLSelectElement | undefined\n\n // Set selection after native options exist; setting select.value before its\n // children are mounted makes browsers fall back to the first option.\n createEffect(() => {\n // Replacing option objects rebuilds native options even when value is unchanged.\n // Reapply the controlled value after that render rather than accepting the\n // browser's first enabled option as an implicit selection.\n void local.options\n if (!select) return\n setSelectedValue(select, rest.value, Boolean(rest.multiple))\n })\n onMount(() => {\n if (select && rest.value === undefined) {\n initializeDefaultSelection(select, local.defaultValue, Boolean(rest.multiple))\n }\n })\n\n return (\n <span\n data-slot=\"native-select-wrapper\"\n class={cn('relative inline-flex min-w-0', local.wrapperClass)}\n >\n <select\n ref={(element) => {\n select = element\n }}\n data-slot=\"native-select\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'w-full min-w-0 appearance-none rounded-md border border-input bg-transparent',\n {\n 'h-control-sm px-control-sm pr-8 text-xs': local.size === 'sm',\n 'h-control-md px-control-md pr-9 text-sm':\n local.size === 'md' || local.size === undefined,\n 'h-control-lg px-control-lg pr-9 text-sm': local.size === 'lg',\n },\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',\n local.class\n )}\n {...rest}\n >\n <Show when={local.options} fallback={local.children}>\n {(options) => (\n <For each={options()}>\n {(option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={isControlledOptionSelected(\n rest.value,\n option.value,\n Boolean(rest.multiple)\n )}\n >\n {option.label}\n </option>\n )}\n </For>\n )}\n </Show>\n </select>\n <ChevronDownIcon\n data-slot=\"native-select-icon\"\n aria-hidden=\"true\"\n class={cn(\n 'pointer-events-none absolute end-2 top-1/2 -translate-y-1/2 text-muted-foreground',\n local.size === 'sm' ? 'size-3.5' : 'size-4'\n )}\n />\n </span>\n )\n}\n"],"mappings":";;;;;;;;AA4BA,SAASgB,iBACPC,QACAE,OACAC,UACA;CACA,IAAID,UAAUE,KAAAA,GAAW;CAEzB,IAAID,YAAYE,MAAMC,QAAQJ,KAAK,GAAG;EACpC,MAAMK,WAAW,IAAIC,IAAIN,MAAMO,IAAIC,MAAM,CAAC;EAC1C,KAAK,MAAMC,UAAUX,OAAOJ,SAASe,OAAOJ,WAAWA,SAASK,IAAID,OAAOT,KAAK;EAChF;CACF;CAEAF,OAAOE,QAAQQ,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK;AACvE;AAEA,SAASW,2BACPX,OACAS,QACAR,UACqB;CACrB,IAAID,UAAUE,KAAAA,GAAW,OAAOA,KAAAA;CAChC,IAAID,YAAYE,MAAMC,QAAQJ,KAAK,GAAG,OAAOA,MAAMY,MAAMC,SAASL,OAAOK,IAAI,MAAMJ,MAAM;CACzF,OAAOD,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK,MAAMS;AACrE;AAEA,SAASK,2BACPhB,QACAE,OACAC,UACA;CACA,IAAID,UAAUE,KAAAA,GAAW;CAEzB,MAAMa,gBACJd,YAAYE,MAAMC,QAAQJ,KAAK,IAC3B,IAAIM,IAAIN,MAAMO,IAAIC,MAAM,CAAC,oBACzB,IAAIF,IAAI,CAACE,OA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OAAO,aAAa,QACrC;GAAC;EAAA,CAAA,GAAA,IAAA;EAAAyD,aAAAM,UAAA5B,MAvDItC,GAAG,gCAAgCiC,MAAM7B,YAAY,CAAC,CAAA;EAAA,OAAAkC;CAAA,EAAA,CAAA;AA2DnE"}
1
+ {"version":3,"file":"native-select.js","names":["ChevronDownIcon","createEffect","For","onMount","Show","splitProps","useFormFieldControl","cn","size","wrapperClass","options","defaultValue","setSelectedValue","select","value","multiple","undefined","Array","isArray","selected","Set","map","String","option","has","isControlledOptionSelected","some","item","initializeDefaultSelection","defaultValues","defaultSelected","label","disabled","NativeSelect","props","local","rest","field","id","Boolean","_el$","_tmpl$","_el$2","firstChild","_$use","element","_$spread","_$mergeProps","class","_$insert","_$createComponent","when","fallback","children","each","_el$3","_tmpl$2","_$effect","_p$","_v$","_v$2","e","t","_$className"],"sources":["../../../../src/components/ui/native-select/native-select.tsx"],"sourcesContent":["import { ChevronDownIcon } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, For, onMount, Show, splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\nexport type NativeSelectProps = Omit<ComponentProps<'select'>, 'size'> & {\n /**\n * The control rung, matching `Input` and `SelectTrigger`: `sm` for a dense\n * toolbar or pane filter, `md` (the default) everywhere else. This replaces the\n * native `size` attribute, which turns a select into a list box — a different\n * control that this styled single-line select is not.\n */\n size?: 'sm' | 'md' | 'lg'\n /**\n * Layout classes for the element that wraps the select and its chevron: a\n * width or `max-w-*`, `flex-1`, `col-span-*`, a margin. `class` reaches the\n * `<select>` itself, which is the wrong box for any of those, because the\n * wrapper is what a flex or grid parent lays out. The select fills the\n * wrapper, so the chevron stays at the control's edge at any width.\n */\n wrapperClass?: string\n /** Render the choices from data instead of raw option children. */\n options?: readonly NativeSelectOption[]\n /** Initialize an uncontrolled selection after its native options mount. */\n defaultValue?: ComponentProps<'select'>['value']\n}\n\nfunction setSelectedValue(\n select: HTMLSelectElement,\n value: ComponentProps<'select'>['value'],\n multiple: boolean\n) {\n if (value === undefined) return\n\n if (multiple && Array.isArray(value)) {\n const selected = new Set(value.map(String))\n for (const option of select.options) option.selected = selected.has(option.value)\n return\n }\n\n select.value = String(Array.isArray(value) ? (value[0] ?? '') : value)\n}\n\nfunction isControlledOptionSelected(\n value: ComponentProps<'select'>['value'],\n option: string,\n multiple: boolean\n): boolean | undefined {\n if (value === undefined) return undefined\n if (multiple && Array.isArray(value)) return value.some((item) => String(item) === option)\n return String(Array.isArray(value) ? (value[0] ?? '') : value) === option\n}\n\nfunction initializeDefaultSelection(\n select: HTMLSelectElement,\n value: ComponentProps<'select'>['value'],\n multiple: boolean\n) {\n if (value === undefined) return\n\n const defaultValues =\n multiple && Array.isArray(value)\n ? new Set(value.map(String))\n : new Set([String(Array.isArray(value) ? (value[0] ?? '') : value)])\n\n for (const option of select.options) option.defaultSelected = defaultValues.has(option.value)\n setSelectedValue(select, value, multiple)\n}\n\n/**\n * NativeSelect.\n *\n * A styled native `<select>` for compact, finite choices. Use `Select` when the\n * list needs a custom popover, typed options, or runtime filtering; this keeps\n * the browser's built-in keyboard, form, option, and label behavior.\n *\n * Translated from shadcn/ui's MIT-licensed NativeSelect wrapper to SolidJS and\n * the Adea token system; see the root NOTICE for source and attribution.\n */\nexport type NativeSelectOption = Readonly<{\n value: string\n label: string\n disabled?: boolean\n}>\n\nexport function NativeSelect(props: NativeSelectProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'wrapperClass',\n 'size',\n 'children',\n 'defaultValue',\n 'options',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n let select: HTMLSelectElement | undefined\n\n // Set selection after native options exist; setting select.value before its\n // children are mounted makes browsers fall back to the first option.\n createEffect(() => {\n // Replacing option objects rebuilds native options even when value is unchanged.\n // Reapply the controlled value after that render rather than accepting the\n // browser's first enabled option as an implicit selection.\n void local.options\n if (!select) return\n setSelectedValue(select, rest.value, Boolean(rest.multiple))\n })\n onMount(() => {\n if (select && rest.value === undefined) {\n initializeDefaultSelection(select, local.defaultValue, Boolean(rest.multiple))\n }\n })\n\n return (\n <span\n data-slot=\"native-select-wrapper\"\n class={cn('relative inline-flex min-w-0', local.wrapperClass)}\n >\n <select\n ref={(element) => {\n select = element\n }}\n data-slot=\"native-select\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'w-full min-w-0 appearance-none rounded-md border border-input bg-transparent',\n {\n 'h-control-sm px-control-sm pr-8 text-xs': local.size === 'sm',\n 'h-control-md px-control-md pr-9 text-sm':\n local.size === 'md' || local.size === undefined,\n 'h-control-lg px-control-lg pr-9 text-sm': local.size === 'lg',\n },\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',\n local.class\n )}\n {...rest}\n >\n <Show when={local.options} fallback={local.children}>\n {(options) => (\n <For each={options()}>\n {(option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={isControlledOptionSelected(\n rest.value,\n option.value,\n Boolean(rest.multiple)\n )}\n >\n {option.label}\n </option>\n )}\n </For>\n )}\n </Show>\n </select>\n <ChevronDownIcon\n data-slot=\"native-select-icon\"\n aria-hidden=\"true\"\n class={cn(\n 'pointer-events-none absolute end-2 top-1/2 -translate-y-1/2 text-muted-foreground',\n local.size === 'sm' ? 'size-3.5' : 'size-4'\n )}\n />\n </span>\n )\n}\n"],"mappings":";;;;;;;;AA4BA,SAASY,iBACPC,QACAC,OACAC,UACA;CACA,IAAID,UAAUE,KAAAA,GAAW;CAEzB,IAAID,YAAYE,MAAMC,QAAQJ,KAAK,GAAG;EACpC,MAAMK,WAAW,IAAIC,IAAIN,MAAMO,IAAIC,MAAM,CAAC;EAC1C,KAAK,MAAMC,UAAUV,OAAOH,SAASa,OAAOJ,WAAWA,SAASK,IAAID,OAAOT,KAAK;EAChF;CACF;CAEAD,OAAOC,QAAQQ,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK;AACvE;AAEA,SAASW,2BACPX,OACAS,QACAR,UACqB;CACrB,IAAID,UAAUE,KAAAA,GAAW,OAAOA,KAAAA;CAChC,IAAID,YAAYE,MAAMC,QAAQJ,KAAK,GAAG,OAAOA,MAAMY,MAAMC,SAASL,OAAOK,IAAI,MAAMJ,MAAM;CACzF,OAAOD,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK,MAAMS;AACrE;AAEA,SAASK,2BACPf,QACAC,OACAC,UACA;CACA,IAAID,UAAUE,KAAAA,GAAW;CAEzB,MAAMa,gBACJd,YAAYE,MAAMC,QAAQJ,KAAK,IAC3B,IAAIM,IAAIN,MAAMO,IAAIC,MAAM,CAAC,oBACzB,IAAIF,IAAI,CAACE,OAAOL,MAAMC,QAAQJ,KAAK,IAAKA,MAAM,MAAM,KAAMA,KAAK,CAAC,CAAC;CAEvE,KAAK,MAAMS,UAAUV,OAAOH,SAASa,OAAOO,kBAAkBD,cAAcL,IAAID,OAAOT,KAAK;CAC5FF,iBAAiBC,QAAQC,OAAOC,QAAQ;AAC1C;AAkBA,SAAgBkB,aAAaC,OAA0B;CACrD,MAA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ationMenu","ChevronDown","cn","menuContentPadding","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","NavigationMenuProps","Root","label","NavigationMenu","props","local","rest","_$createComponent","_$mergeProps","class","aria-label","children","_$memo","NavigationMenuViewport","NavigationMenuMenu","Menu","NavigationMenuTrigger","Trigger","NavigationMenuContent","Content","Portal","Viewport","NavigationMenuItemProps","Item","description","icon","Element","NavigationMenuItem","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","_$effect","_$className","NavigationMenuSeparator","Separator","NavigationMenuGroupLabel","GroupLabel","NavigationMenuGroup","Group","_$createComponent","_$mergeProps","_$memo","_$className"],"sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport * as KobalteNavigationMenu from '@kobalte/core/navigation-menu'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport {\n menuContentPadding,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n} from '#lib/overlay'\n\n/**\n * NavigationMenu.\n *\n * A site-style menu bar: top-level triggers that open panels of links. It is the\n * header pattern — a documentation site, a marketing page, an application with\n * several top-level destinations — and it is deliberately *not* a `Menubar`.\n * `Menubar` is a row of application menus (File, Edit, View) whose items are\n * commands; this is a row of destinations whose panels are links. The two have\n * different roles, different keyboard models, and different semantics.\n *\n * ## Composition\n *\n * Kobalte's primitive has an unusual shape, and getting it wrong is why this took\n * three attempts to port. The structure is:\n *\n * ```tsx\n * <NavigationMenu>\n * <NavigationMenuMenu>\n * <NavigationMenuTrigger>Destinations</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <NavigationMenuItem href=\"/x\">X</NavigationMenuItem>\n * </NavigationMenuContent>\n * </NavigationMenuMenu>\n * <NavigationMenuViewport />\n * </NavigationMenu>\n * ```\n *\n * Three facts that are not obvious from the prop types:\n *\n * - `Menu` renders **nothing**. It is a context provider — one per top-level\n * entry, naming it so the bar's arrow keys can move between entries. A menu\n * without one cannot be reached by keyboard.\n * - `Trigger` renders `<li role=\"presentation\"><button>`. It is already the list\n * item, so wrapping it in your own `<li>` produces a `<ul>` inside a `<ul>`.\n * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling\n * of the menus** — not inside them. All the panels share one viewport, which is\n * what lets the bar animate between them instead of each panel popping in place.\n * - The viewport is an empty surface. Each `Content` reaches it through Kobalte's\n * `Portal`, which mounts the panel inside the viewport while keeping it in its\n * own `Menu`'s context. A `Content` rendered anywhere else — the viewport's own\n * children included — has no `Menu` above it, and Kobalte throws\n * `useMenuRootContext must be used within a MenuRoot` the moment a panel opens.\n *\n * The wrapper enforces the last two by rendering the `Viewport` itself and by\n * portalling every `NavigationMenuContent`, so a caller cannot forget either and\n * get a menu whose panels never appear.\n */\n\nexport type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {\n /** The accessible name for the navigation landmark. */\n label?: string\n}\n\nexport function NavigationMenu(props: NavigationMenuProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <KobalteNavigationMenu.Root\n class={cn(\n 'relative flex max-w-max flex-1 items-center justify-center',\n '[&>nav>ul]:flex [&>nav>ul]:items-center [&>nav>ul]:gap-1',\n local.class\n )}\n aria-label={local.label ?? 'Main'}\n {...rest}\n >\n {local.children}\n {/*\n The shared panel surface. Rendered here rather than left to the caller:\n every panel animates through this one element, and a menu bar without it\n opens panels that never paint.\n */}\n <NavigationMenuViewport />\n </KobalteNavigationMenu.Root>\n )\n}\n\n/**\n * One top-level entry. Renders nothing itself — see the note above — and exists\n * so a caller cannot build a bar whose entries the keyboard cannot reach.\n */\nexport function NavigationMenuMenu(props: ComponentProps<typeof KobalteNavigationMenu.Menu>) {\n return <KobalteNavigationMenu.Menu {...props} />\n}\n\nexport function NavigationMenuTrigger(props: ComponentProps<typeof KobalteNavigationMenu.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Trigger\n class={cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-muted hover:text-foreground',\n 'data-[expanded]:bg-muted data-[expanded]:text-foreground',\n 'data-[highlighted]:bg-muted data-[highlighted]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <ChevronDown\n aria-hidden=\"true\"\n class=\"size-3.5 transition-transform duration-200 ease-out [[data-expanded]_&]:rotate-180\"\n />\n </KobalteNavigationMenu.Trigger>\n )\n}\n\nexport function NavigationMenuContent(props: ComponentProps<typeof KobalteNavigationMenu.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Portal>\n <KobalteNavigationMenu.Content\n class={cn(\n // Absolute so the viewport sizes to the active panel's measured box and\n // animates between panels, rather than stacking them.\n 'absolute top-0 left-0 grid w-max gap-1 outline-none',\n // The viewport is the surface and carries no padding of its own (its\n // measured size is the panel's), so the panel supplies the inset every\n // menu surface shares — the one the separator's bleed is cut for.\n menuContentPadding,\n // The motion is the panel's, not the viewport's. Kobalte keeps an\n // outgoing panel mounted until the viewport's own animation ends; a\n // viewport that carries an entrance animation never fires that again\n // after it opens, so the previous panel would stay painted under the\n // next one.\n overlayMotion,\n // A two-column panel is the shape most menu bars want, and it is opt-in\n // through this hook rather than a prop because the column count is a\n // layout decision the caller's content makes.\n 'data-[wide]:grid-cols-2',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobalteNavigationMenu.Content>\n </KobalteNavigationMenu.Portal>\n )\n}\n\n/**\n * The shared panel surface. One per menu bar, and the wrapper supplies it — but\n * exported so a caller with an unusual layout can place it themselves.\n *\n * It renders no children: the panels arrive through each `NavigationMenuContent`'s\n * portal. Kobalte positions it under the bar and publishes the active panel's size\n * as `--kb-navigation-menu-viewport-*`, which the surface animates between.\n * `box-content` keeps the border outside that measured size so a panel is never\n * clipped by its own frame.\n */\nexport function NavigationMenuViewport(\n props: ComponentProps<typeof KobalteNavigationMenu.Viewport>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteNavigationMenu.Viewport\n data-slot=\"navigation-menu-viewport\"\n class={cn(\n overlaySurface,\n 'isolate z-(--z-menu) mt-1.5 box-content list-none overflow-hidden',\n 'h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)',\n 'origin-(--kb-menu-content-transform-origin) transition-[width,height] duration-200 ease-out',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A link inside a panel. `href` is the point of the component, so it is a link\n * rather than a button — and the accessible name comes from its text, which is\n * why there is no `aria-label` here.\n */\nexport type NavigationMenuItemProps = ComponentProps<typeof KobalteNavigationMenu.Item> & {\n /** A one-line description, shown under the label. */\n description?: string\n icon?: JSX.Element\n}\n\nexport function NavigationMenuItem(props: NavigationMenuItemProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'description', 'icon'])\n\n return (\n <KobalteNavigationMenu.Item\n class={cn(\n menuItem,\n // The description sits under the label, in the label's column. Without\n // an icon there is no leading column, and a two-column grid would set\n // the description beside the label instead of beneath it.\n local.icon ? 'grid grid-cols-[auto_1fr]' : 'grid grid-cols-1',\n 'items-center gap-x-2 gap-y-0.5',\n local.description && 'grid-rows-[auto_auto] py-2',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"font-medium\">{local.children}</span>\n {local.description && (\n <span\n class={cn('text-xs text-muted-foreground', {\n 'col-start-2': !!local.icon,\n })}\n >\n {local.description}\n </span>\n )}\n </KobalteNavigationMenu.Item>\n )\n}\n\nexport function NavigationMenuSeparator(\n props: ComponentProps<typeof KobalteNavigationMenu.Separator>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\n/** A non-interactive caption above a group of items. */\nexport function NavigationMenuGroupLabel(\n props: ComponentProps<typeof KobalteNavigationMenu.GroupLabel>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function NavigationMenuGroup(props: ComponentProps<typeof KobalteNavigationMenu.Group>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Group class={cn('grid gap-0.5', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;AAkEA,SAAgBe,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,OAAAG,gBACGhB,sBAAsBU,MAAIO,WAAA;EAAA,KAAA,WAAA;GAAA,OAClBf,GACL,8DACA,4DACAY,MAAMI,KACR;EAAC;EAAA,KAAA,gBAAA;GAAA,OACWJ,MAAMH,SAAS;EAAM;CAAA,GAC7BI,MAAI,EAAA,IAAAK,WAAA;EAAA,OAAA,CAAAC,WAEPP,MAAMM,QAAQ,GAAAJ,gBAMdM,wBAAsB,CAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAG7B;;;;;AAMA,SAAgBC,mBAAmBV,OAA0D;CAC3F,OAAAG,gBAAQhB,sBAAsBwB,MAASX,KAAK;AAC9C;AAEA,SAAgBY,sBAAsBZ,OAA6D;CACjG,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGhB,sBAAsB0B,SAAOT,WAAA,EAAA,KAAA,WAAA;EAAA,OACrBf,GACL,mGACA,uDACA,wCACA,4DACA,kEACA,2EACAY,MAAMI,KACR;CAAC,EAAA,GACGH,MAAI,EAAA,IAAAK,WAAA;EAAA,OAAA,CAAAC,WAEPP,MAAMM,QAAQ,GAAAJ,gBACdf,aAAW;GAAA,eAAA;GAAA,SAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAMlB;AAEA,SAAgB0B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AF,OAAAC,aAMb1B,MAAMmB,WAAW;IAAAS,aAAAC,UAAAH,OAJXtC,GAAG,iCAAiC,EACzC,eAAe,CAAC,CAACY,MAAMoB,KACzB,CAAC,CAAC,CAAA;IAAA,OAAAM;GAAA,EAAA,CAAA,CAIL;EAAA;CAAA,EAAA,CAAA,CAAA;AAGP;AAEA,SAAgBI,wBACd/B,OACA;CACA,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQhB,sBAAsB6C,WAAS5B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQf,GAAGI,eAAeQ,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACzF;;AAGA,SAAgB+B,yBACdjC,OACA;CACA,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQhB,sBAAsB+C,YAAU9B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQf,GAAGG,WAAWS,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF;AAEA,SAAgBiC,oBAAoBnC,OAA2D;CAC7F,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQhB,sBAAsBiD,OAAKhC,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQf,GAAG,gBAAgBY,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF"}
1
+ {"version":3,"file":"navigation-menu.js","names":["splitProps","KobalteNavigationMenu","ChevronDown","cn","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","Root","label","NavigationMenu","props","local","rest","_$createComponent","_$mergeProps","class","children","_$memo","NavigationMenuViewport","NavigationMenuMenu","Menu","NavigationMenuTrigger","Trigger","NavigationMenuContent","Content","Portal","Viewport","Item","description","icon","NavigationMenuItem","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","_$effect","_$className","NavigationMenuSeparator","Separator","NavigationMenuGroupLabel","GroupLabel","NavigationMenuGroup","Group"],"sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport * as KobalteNavigationMenu from '@kobalte/core/navigation-menu'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport {\n menuContentPadding,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n} from '#lib/overlay'\n\n/**\n * NavigationMenu.\n *\n * A site-style menu bar: top-level triggers that open panels of links. It is the\n * header pattern — a documentation site, a marketing page, an application with\n * several top-level destinations — and it is deliberately *not* a `Menubar`.\n * `Menubar` is a row of application menus (File, Edit, View) whose items are\n * commands; this is a row of destinations whose panels are links. The two have\n * different roles, different keyboard models, and different semantics.\n *\n * ## Composition\n *\n * Kobalte's primitive has an unusual shape, and getting it wrong is why this took\n * three attempts to port. The structure is:\n *\n * ```tsx\n * <NavigationMenu>\n * <NavigationMenuMenu>\n * <NavigationMenuTrigger>Destinations</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <NavigationMenuItem href=\"/x\">X</NavigationMenuItem>\n * </NavigationMenuContent>\n * </NavigationMenuMenu>\n * <NavigationMenuViewport />\n * </NavigationMenu>\n * ```\n *\n * Three facts that are not obvious from the prop types:\n *\n * - `Menu` renders **nothing**. It is a context provider — one per top-level\n * entry, naming it so the bar's arrow keys can move between entries. A menu\n * without one cannot be reached by keyboard.\n * - `Trigger` renders `<li role=\"presentation\"><button>`. It is already the list\n * item, so wrapping it in your own `<li>` produces a `<ul>` inside a `<ul>`.\n * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling\n * of the menus** — not inside them. All the panels share one viewport, which is\n * what lets the bar animate between them instead of each panel popping in place.\n * - The viewport is an empty surface. Each `Content` reaches it through Kobalte's\n * `Portal`, which mounts the panel inside the viewport while keeping it in its\n * own `Menu`'s context. A `Content` rendered anywhere else — the viewport's own\n * children included — has no `Menu` above it, and Kobalte throws\n * `useMenuRootContext must be used within a MenuRoot` the moment a panel opens.\n *\n * The wrapper enforces the last two by rendering the `Viewport` itself and by\n * portalling every `NavigationMenuContent`, so a caller cannot forget either and\n * get a menu whose panels never appear.\n */\n\nexport type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {\n /** The accessible name for the navigation landmark. */\n label?: string\n}\n\nexport function NavigationMenu(props: NavigationMenuProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <KobalteNavigationMenu.Root\n class={cn(\n 'relative flex max-w-max flex-1 items-center justify-center',\n '[&>nav>ul]:flex [&>nav>ul]:items-center [&>nav>ul]:gap-1',\n local.class\n )}\n aria-label={local.label ?? 'Main'}\n {...rest}\n >\n {local.children}\n {/*\n The shared panel surface. Rendered here rather than left to the caller:\n every panel animates through this one element, and a menu bar without it\n opens panels that never paint.\n */}\n <NavigationMenuViewport />\n </KobalteNavigationMenu.Root>\n )\n}\n\n/**\n * One top-level entry. Renders nothing itself — see the note above — and exists\n * so a caller cannot build a bar whose entries the keyboard cannot reach.\n */\nexport function NavigationMenuMenu(props: ComponentProps<typeof KobalteNavigationMenu.Menu>) {\n return <KobalteNavigationMenu.Menu {...props} />\n}\n\nexport function NavigationMenuTrigger(props: ComponentProps<typeof KobalteNavigationMenu.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Trigger\n class={cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-muted hover:text-foreground',\n 'data-[expanded]:bg-muted data-[expanded]:text-foreground',\n 'data-[highlighted]:bg-muted data-[highlighted]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <ChevronDown\n aria-hidden=\"true\"\n class=\"size-3.5 transition-transform duration-200 ease-out [[data-expanded]_&]:rotate-180\"\n />\n </KobalteNavigationMenu.Trigger>\n )\n}\n\nexport function NavigationMenuContent(props: ComponentProps<typeof KobalteNavigationMenu.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Portal>\n <KobalteNavigationMenu.Content\n class={cn(\n // Absolute so the viewport sizes to the active panel's measured box and\n // animates between panels, rather than stacking them.\n 'absolute top-0 left-0 grid w-max gap-1 outline-none',\n // The viewport is the surface and carries no padding of its own (its\n // measured size is the panel's), so the panel supplies the inset every\n // menu surface shares — the one the separator's bleed is cut for.\n menuContentPadding,\n // The motion is the panel's, not the viewport's. Kobalte keeps an\n // outgoing panel mounted until the viewport's own animation ends; a\n // viewport that carries an entrance animation never fires that again\n // after it opens, so the previous panel would stay painted under the\n // next one.\n overlayMotion,\n // A two-column panel is the shape most menu bars want, and it is opt-in\n // through this hook rather than a prop because the column count is a\n // layout decision the caller's content makes.\n 'data-[wide]:grid-cols-2',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobalteNavigationMenu.Content>\n </KobalteNavigationMenu.Portal>\n )\n}\n\n/**\n * The shared panel surface. One per menu bar, and the wrapper supplies it — but\n * exported so a caller with an unusual layout can place it themselves.\n *\n * It renders no children: the panels arrive through each `NavigationMenuContent`'s\n * portal. Kobalte positions it under the bar and publishes the active panel's size\n * as `--kb-navigation-menu-viewport-*`, which the surface animates between.\n * `box-content` keeps the border outside that measured size so a panel is never\n * clipped by its own frame.\n */\nexport function NavigationMenuViewport(\n props: ComponentProps<typeof KobalteNavigationMenu.Viewport>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteNavigationMenu.Viewport\n data-slot=\"navigation-menu-viewport\"\n class={cn(\n overlaySurface,\n 'isolate z-(--z-menu) mt-1.5 box-content list-none overflow-hidden',\n 'h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)',\n 'origin-(--kb-menu-content-transform-origin) transition-[width,height] duration-200 ease-out',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A link inside a panel. `href` is the point of the component, so it is a link\n * rather than a button — and the accessible name comes from its text, which is\n * why there is no `aria-label` here.\n */\nexport type NavigationMenuItemProps = ComponentProps<typeof KobalteNavigationMenu.Item> & {\n /** A one-line description, shown under the label. */\n description?: string\n icon?: JSX.Element\n}\n\nexport function NavigationMenuItem(props: NavigationMenuItemProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'description', 'icon'])\n\n return (\n <KobalteNavigationMenu.Item\n class={cn(\n menuItem,\n // The description sits under the label, in the label's column. Without\n // an icon there is no leading column, and a two-column grid would set\n // the description beside the label instead of beneath it.\n local.icon ? 'grid grid-cols-[auto_1fr]' : 'grid grid-cols-1',\n 'items-center gap-x-2 gap-y-0.5',\n local.description && 'grid-rows-[auto_auto] py-2',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"font-medium\">{local.children}</span>\n {local.description && (\n <span\n class={cn('text-xs text-muted-foreground', {\n 'col-start-2': !!local.icon,\n })}\n >\n {local.description}\n </span>\n )}\n </KobalteNavigationMenu.Item>\n )\n}\n\nexport function NavigationMenuSeparator(\n props: ComponentProps<typeof KobalteNavigationMenu.Separator>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\n/** A non-interactive caption above a group of items. */\nexport function NavigationMenuGroupLabel(\n props: ComponentProps<typeof KobalteNavigationMenu.GroupLabel>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function NavigationMenuGroup(props: ComponentProps<typeof KobalteNavigationMenu.Group>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Group class={cn('grid gap-0.5', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;AAkEA,SAAgBW,eAAeC,OAA4B;CACzD,MAAM,C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,KAAA,WAAA;EAAA,OAAQb,GAAGG,eAAeO,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACzF;;AAGA,SAAgB4B,yBACd9B,OACA;CACA,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsB0C,YAAU3B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAGE,WAAWQ,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF;AAEA,SAAgB8B,oBAAoBhC,OAA2D;CAC7F,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsB4C,OAAK7B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAG,gBAAgBU,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","names":["Pagination","KobaltePagination","PaginationRootOptions","ChevronLeft","ChevronRight","MoreHorizontal","ComponentProps","JSX","Show","splitProps","cn","PaginationProps","Omit","itemComponent","ellipsisComponent","class","children","Element","paginationControl","props","local","rest","_$createComponent","_$mergeProps","itemProps","PaginationItem","page","PaginationEllipsis","when","fallback","DefaultPaginationControls","PaginationPrevious","Items","PaginationNext","Previous","_tmpl$","Next","_tmpl$2","Item","Ellipsis","_tmpl$3","Pagination","_$createComponent","KobaltePagination","_$mergeProps"],"sources":["../../../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["import {\n Pagination as KobaltePagination,\n type PaginationRootOptions,\n} from '@kobalte/core/pagination'\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Pagination.\n *\n * Page navigation for a list the server pages, not for a list the client already\n * holds — slicing an array you have is a filter, and it should not spend a round\n * trip.\n *\n * Kobalte computes the visible page window and the ellipsis positions and emits\n * `aria-current=\"page\"`, so the control announces which page is active instead of\n * leaving it to colour alone.\n *\n * The item and ellipsis renderers are *supplied here*, not required of the caller.\n * Kobalte's root makes them mandatory because it has no opinion about how a page\n * number should look; a design system does, so the only thing a caller has to pass\n * is `count` — while still being able to override either renderer when a view\n * needs to.\n */\nexport type PaginationProps = Omit<PaginationRootOptions, 'itemComponent' | 'ellipsisComponent'> & {\n itemComponent?: PaginationRootOptions['itemComponent']\n ellipsisComponent?: PaginationRootOptions['ellipsisComponent']\n class?: string\n children?: JSX.Element\n}\n\nconst paginationControl = cn(\n 'inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4'\n)\n\nexport function Pagination(props: PaginationProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'itemComponent',\n 'ellipsisComponent',\n 'children',\n ])\n\n return (\n <KobaltePagination\n itemComponent={\n local.itemComponent ??\n ((itemProps) => <PaginationItem page={itemProps.page}>{itemProps.page}</PaginationItem>)\n }\n ellipsisComponent={local.ellipsisComponent ?? (() => <PaginationEllipsis />)}\n // Kobalte renders the root as a `<nav>` wrapping a `<ul>`, and every control —\n // previous, the page run, next — is an `<li>` inside that list. The row has to be\n // declared on the list: on the `<nav>` alone it lays out one child and the\n // controls stack vertically.\n class={cn(\n 'flex w-full items-center justify-center [&>ul]:m-0 [&>ul]:flex [&>ul]:list-none [&>ul]:items-center [&>ul]:gap-1 [&>ul]:p-0',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children} fallback={<DefaultPaginationControls />}>\n {local.children}\n </Show>\n </KobaltePagination>\n )\n}\n\n/** Previous, the numbered run, next: the arrangement every list view wants. */\nfunction DefaultPaginationControls() {\n return (\n <>\n <PaginationPrevious />\n <KobaltePagination.Items />\n <PaginationNext />\n </>\n )\n}\n\nexport function PaginationPrevious(props: ComponentProps<typeof KobaltePagination.Previous>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Previous class={cn(paginationControl, 'ps-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <ChevronLeft class=\"size-4\" />\n <span class=\"hidden sm:inline\">Previous</span>\n </>\n )}\n </KobaltePagination.Previous>\n )\n}\n\nexport function PaginationNext(props: ComponentProps<typeof KobaltePagination.Next>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Next class={cn(paginationControl, 'pe-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <span class=\"hidden sm:inline\">Next</span>\n <ChevronRight class=\"size-4\" />\n </>\n )}\n </KobaltePagination.Next>\n )\n}\n\nexport function PaginationItem(props: ComponentProps<typeof KobaltePagination.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Item\n class={cn(\n paginationControl,\n 'data-[current]:border-border data-[current]:bg-surface-active data-[current]:font-medium',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobaltePagination.Item>\n )\n}\n\nexport function PaginationEllipsis(\n props: ComponentProps<typeof KobaltePagination.Ellipsis> & { children?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Ellipsis\n class={cn('flex size-control-md items-center justify-center', local.class)}\n {...rest}\n >\n {local.children ?? (\n <>\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More pages</span>\n </>\n )}\n </KobaltePagination.Ellipsis>\n )\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAMkB,oBAAoBR,GACxB,yJACA,uDACA,0BACA,oFACA,oDACA,4CACF;AAEA,SAAgBV,aAAWmB,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQZ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;AAGP;AAEA,SAAgBF,eAAed,OAAsD;CACnF,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGrB,WAAkBmC,MAAIb,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAGQ,mBAAmB,UAAUE,MAAML,KAAK;CAAC,EAAA,GAAMM,MAAI,EAAA,IAAAL,WAAA;EAAA,OAClFI,MAAMJ,YAAQ,CAAAqB,QAAA,GAAAf,gBAGVlB,cAAY,EAAA,SAAA,SAAA,CAAA,CAAA;CAEhB,EAAA,CAAA,CAAA;AAGP;AAEA,SAAgBqB,eAAeN,OAAsD;CACnF,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGrB,WAAkBqC,MAAIf,WAAA,EAAA,KAAA,WAAA;EAAA,OACdb,GACLQ,mBACA,4FACAE,MAAML,KACR;CAAC,EAAA,GACGM,MAAI,EAAA,IAAAL,WAAA;EAAA,OAEPI,MAAMJ;CAAQ,EAAA,CAAA,CAAA;AAGrB;AAEA,SAAgBW,mBACdR,OACA;CACA,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGrB,WAAkBsC,UAAQhB,WAAA,EAAA,KAAA,WAAA;EAAA,OAClBb,GAAG,oDAAoDU,MAAML,KAAK;CAAC,EAAA,GACtEM,MAAI,EAAA,IAAAL,WAAA;EAAA,OAEPI,MAAMJ,YAAQ,CAAAM,gBAEVjB,gBAAc,EAAA,SAAA,SAAA,CAAA,GAAAmC,QAAA,CAAA;CAGlB,EAAA,CAAA,CAAA;AAGP"}
1
+ {"version":3,"file":"pagination.js","names":["Pagination","KobaltePagination","ChevronLeft","ChevronRight","MoreHorizontal","Show","splitProps","cn","itemComponent","ellipsisComponent","class","children","paginationControl","props","local","rest","_$createComponent","_$mergeProps","itemProps","PaginationItem","page","PaginationEllipsis","when","fallback","DefaultPaginationControls","PaginationPrevious","Items","PaginationNext","Previous","_tmpl$","Next","_tmpl$2","Item","Ellipsis","_tmpl$3"],"sources":["../../../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["import {\n Pagination as KobaltePagination,\n type PaginationRootOptions,\n} from '@kobalte/core/pagination'\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Pagination.\n *\n * Page navigation for a list the server pages, not for a list the client already\n * holds — slicing an array you have is a filter, and it should not spend a round\n * trip.\n *\n * Kobalte computes the visible page window and the ellipsis positions and emits\n * `aria-current=\"page\"`, so the control announces which page is active instead of\n * leaving it to colour alone.\n *\n * The item and ellipsis renderers are *supplied here*, not required of the caller.\n * Kobalte's root makes them mandatory because it has no opinion about how a page\n * number should look; a design system does, so the only thing a caller has to pass\n * is `count` — while still being able to override either renderer when a view\n * needs to.\n */\nexport type PaginationProps = Omit<PaginationRootOptions, 'itemComponent' | 'ellipsisComponent'> & {\n itemComponent?: PaginationRootOptions['itemComponent']\n ellipsisComponent?: PaginationRootOptions['ellipsisComponent']\n class?: string\n children?: JSX.Element\n}\n\nconst paginationControl = cn(\n 'inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4'\n)\n\nexport function Pagination(props: PaginationProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'itemComponent',\n 'ellipsisComponent',\n 'children',\n ])\n\n return (\n <KobaltePagination\n itemComponent={\n local.itemComponent ??\n ((itemProps) => <PaginationItem page={itemProps.page}>{itemProps.page}</PaginationItem>)\n }\n ellipsisComponent={local.ellipsisComponent ?? (() => <PaginationEllipsis />)}\n // Kobalte renders the root as a `<nav>` wrapping a `<ul>`, and every control —\n // previous, the page run, next — is an `<li>` inside that list. The row has to be\n // declared on the list: on the `<nav>` alone it lays out one child and the\n // controls stack vertically.\n class={cn(\n 'flex w-full items-center justify-center [&>ul]:m-0 [&>ul]:flex [&>ul]:list-none [&>ul]:items-center [&>ul]:gap-1 [&>ul]:p-0',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children} fallback={<DefaultPaginationControls />}>\n {local.children}\n </Show>\n </KobaltePagination>\n )\n}\n\n/** Previous, the numbered run, next: the arrangement every list view wants. */\nfunction DefaultPaginationControls() {\n return (\n <>\n <PaginationPrevious />\n <KobaltePagination.Items />\n <PaginationNext />\n </>\n )\n}\n\nexport function PaginationPrevious(props: ComponentProps<typeof KobaltePagination.Previous>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Previous class={cn(paginationControl, 'ps-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <ChevronLeft class=\"size-4\" />\n <span class=\"hidden sm:inline\">Previous</span>\n </>\n )}\n </KobaltePagination.Previous>\n )\n}\n\nexport function PaginationNext(props: ComponentProps<typeof KobaltePagination.Next>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Next class={cn(paginationControl, 'pe-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <span class=\"hidden sm:inline\">Next</span>\n <ChevronRight class=\"size-4\" />\n </>\n )}\n </KobaltePagination.Next>\n )\n}\n\nexport function PaginationItem(props: ComponentProps<typeof KobaltePagination.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Item\n class={cn(\n paginationControl,\n 'data-[current]:border-border data-[current]:bg-surface-active data-[current]:font-medium',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobaltePagination.Item>\n )\n}\n\nexport function PaginationEllipsis(\n props: ComponentProps<typeof KobaltePagination.Ellipsis> & { children?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Ellipsis\n class={cn('flex size-control-md items-center justify-center', local.class)}\n {...rest}\n >\n {local.children ?? (\n <>\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More pages</span>\n </>\n )}\n </KobaltePagination.Ellipsis>\n )\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAMY,oBAAoBL,GACxB,yJACA,uDACA,0BACA,oFACA,oDACA,4CACF;AAEA,SAAgBP,aAAWa,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO;EACtC;EACA;EACA;EACA;CAAU,CACX;CAED,OAAAG,gBACGf,YAAiBgB,WAAA;EAAA,IAChBT,gBAAa;GAAA,OACXM,MAAMN,mBACJU,cAASF,gBAAMG,gBAAc;IAAA,IAACC,OAAI;KAAA,OAAEF,UAAUE;IAAI;IAAA,IAAAT,WAAA;KAAA,OAAGO,UAAUE;IAAI;GAAA,CAAA;EAAmB;EAAA,IAE1FX,oBAAiB;GAAA,OAAEK,MAAML,4BAAsBO,gBAAOK,oBAAkB,CAAA,CAAA;EAAI;EAAA,KAAA,WAAA;GAAA,OAKrEd,GACL,+HACAO,MAAMJ,KACR;EAAC;CAAA,GACGK,MAAI,EAAA,IAAAJ,WAAA;EAAA,OAAAK,gBAEPX,MAAI;GAAA,IAACiB,OAAI;IAAA,OAAER,MAAMH;GAAQ;GAAA,IAAEY,WAAQ;IAAA,OAAAP,gBAAGQ,2BAAyB,CAAA,CAAA;GAAA;GAAA,IAAAb,WAAA;IAAA,OAC7DG,MAAMH;GAAQ;EAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAIvB;;AAGA,SAASa,4BAA4B;CACnC,OAAA;EAAAR,gBAEKS,oBAAkB,CAAA,CAAA;EAAAT,gBAClBf,WAAkByB,OAAK,CAAA,CAAA;EAAAV,gBACvBW,gBAAc,CAAA,C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AAA,KAAA,WAAA;EAAA,OAClBV,GAAG,oDAAoDO,MAAMJ,KAAK;CAAC,EAAA,GACtEK,MAAI,EAAA,IAAAJ,WAAA;EAAA,OAEPG,MAAMH,YAAQ,CAAAK,gBAEVZ,gBAAc,EAAA,SAAA,SAAA,CAAA,GAAA8B,QAAA,CAAA;CAGlB,EAAA,CAAA,CAAA;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":["Popover","KobaltePopover","ComponentProps","splitProps","menuContentPadding","popoverArrow","popoverMotion","overlaySurface","topLayerProps","cn","Root","Trigger","PopoverTrigger","Anchor","PopoverAnchor","PopoverContentProps","Content","hideArrow","PopoverContent","props","local","rest","_$createComponent","Portal","children","_$mergeProps","class","_$memo","Arrow","PopoverTitle","Title","PopoverDescription","Description","PopoverCloseButton","CloseButton","_$createComponent","KobaltePopover","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/popover/popover.tsx"],"sourcesContent":["import { Popover as KobaltePopover } from '@kobalte/core/popover'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n popoverArrow,\n popoverMotion,\n overlaySurface,\n topLayerProps,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * Popover.\n *\n * A floating surface with arbitrary content, anchored to a control. Use it for\n * something interactive that would not fit in a menu: a small form, a colour\n * picker, a filter panel. For a list of *actions* use DropdownMenu, which\n * carries the menu keyboard contract; for a sentence of explanation use\n * Tooltip, which is not focusable and cannot hold a control.\n *\n * Kobalte handles the anchoring, collision flipping, the focus trap for modal\n * popovers, and dismissal on outside click and Escape.\n */\nexport {\n Root as Popover,\n Trigger as PopoverTrigger,\n Anchor as PopoverAnchor,\n} from '@kobalte/core/popover'\n\nexport type PopoverContentProps = ComponentProps<typeof KobaltePopover.Content> & {\n /** Hide the caret pointing at the trigger. */\n hideArrow?: boolean\n}\n\nexport function PopoverContent(props: PopoverContentProps) {\n const [local, rest] = splitProps(props, ['class', 'hideArrow', 'children'])\n\n return (\n <KobaltePopover.Portal>\n <KobaltePopover.Content\n {...topLayerProps}\n class={cn(\n overlaySurface,\n popoverMotion,\n 'z-(--z-menu) w-72 origin-(--kb-popover-content-transform-origin)',\n menuContentPadding,\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobaltePopover.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobaltePopover.Content>\n </KobaltePopover.Portal>\n )\n}\n\nexport function PopoverTitle(props: ComponentProps<typeof KobaltePopover.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobaltePopover.Title\n class={cn('px-2 pt-1 pb-1.5 text-sm font-medium', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PopoverDescription(props: ComponentProps<typeof KobaltePopover.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobaltePopover.Description\n class={cn('text-muted-foreground px-2 pb-1.5 text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PopoverCloseButton(props: ComponentProps<typeof KobaltePopover.CloseButton>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobaltePopover.CloseButton class={cn(local.class)} {...rest} />\n}\n"],"mappings":";;;;;;AAmCA,SAAgBkB,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO;EAAC;EAAS;EAAa;CAAU,CAAC;CAE1E,OAAAG,gBACGrB,QAAesB,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAF,gBACnBrB,QAAee,SAAOS,WACjBjB,eAAa,EAAA,KAAA,WAAA;GAAA,OACVC,GACLF,gBACAD,eACA,oEAAA,OAEAc,MAAMM,KACR;EAAC,EAAA,GACGL,MAAI,EAAA,IAAAG,WAAA;GAAA,OAAA,CAAAG,WAEPP,MAAMI,QAAQ,GAAAF,gBACdrB,QAAe2B,OAAK;IAAA,eAAA;IAAA,SAA2BvB;GAAY,CAAA,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAIpE;AAEA,SAAgBwB,aAAaV,OAAoD;CAC/E,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGrB,QAAe6B,OAAKL,WAAA,EAAA,KAAA,WAAA;EAAA,OACZhB,GAAG,wCAAwCW,MAAMM,KAAK;CAAC,EAAA,GAC1DL,IAAI,CAAA;AAGd;AAEA,SAAgBU,mBAAmBZ,OAA0D;CAC3F,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGrB,QAAe+B,aAAWP,WAAA,EAAA,KAAA,WAAA;EAAA,OAClBhB,GAAG,6CAA6CW,MAAMM,KAAK;CAAC,EAAA,GAC/DL,IAAI,CAAA;AAGd;AAEA,SAAgBY,mBAAmBd,OAA0D;CAC3F,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQrB,QAAeiC,aAAWT,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQhB,GAAGW,MAAMM,KAAK;CAAC,EAAA,GAAML,IAAI,CAAA;AACrE"}
1
+ {"version":3,"file":"popover.js","names":["KobaltePopover","splitProps","popoverArrow","popoverMotion","overlaySurface","topLayerProps","cn","Content","PopoverContent","props","local","rest","_$createComponent","Portal","children","_$mergeProps","class","_$memo","Arrow","PopoverTitle","Title","PopoverDescription","Description","PopoverCloseButton","CloseButton"],"sources":["../../../../src/components/ui/popover/popover.tsx"],"sourcesContent":["import { Popover as KobaltePopover } from '@kobalte/core/popover'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n popoverArrow,\n popoverMotion,\n overlaySurface,\n topLayerProps,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * Popover.\n *\n * A floating surface with arbitrary content, anchored to a control. Use it for\n * something interactive that would not fit in a menu: a small form, a colour\n * picker, a filter panel. For a list of *actions* use DropdownMenu, which\n * carries the menu keyboard contract; for a sentence of explanation use\n * Tooltip, which is not focusable and cannot hold a control.\n *\n * Kobalte handles the anchoring, collision flipping, the focus trap for modal\n * popovers, and dismissal on outside click and Escape.\n */\nexport {\n Root as Popover,\n Trigger as PopoverTrigger,\n Anchor as PopoverAnchor,\n} from '@kobalte/core/popover'\n\nexport type PopoverContentProps = ComponentProps<typeof KobaltePopover.Content> & {\n /** Hide the caret pointing at the trigger. */\n hideArrow?: boolean\n}\n\nexport function PopoverContent(props: PopoverContentProps) {\n const [local, rest] = splitProps(props, ['class', 'hideArrow', 'children'])\n\n return (\n <KobaltePopover.Portal>\n <KobaltePopover.Content\n {...topLayerProps}\n class={cn(\n overlaySurface,\n popoverMotion,\n 'z-(--z-menu) w-72 origin-(--kb-popover-content-transform-origin)',\n menuContentPadding,\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobaltePopover.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobaltePopover.Content>\n </KobaltePopover.Portal>\n )\n}\n\nexport function PopoverTitle(props: ComponentProps<typeof KobaltePopover.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobaltePopover.Title\n class={cn('px-2 pt-1 pb-1.5 text-sm font-medium', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PopoverDescription(props: ComponentProps<typeof KobaltePopover.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobaltePopover.Description\n class={cn('text-muted-foreground px-2 pb-1.5 text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PopoverCloseButton(props: ComponentProps<typeof KobaltePopover.CloseButton>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobaltePopover.CloseButton class={cn(local.class)} {...rest} />\n}\n"],"mappings":";;;;;;AAmCA,SAAgBQ,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO;EAAC;EAAS;EAAa;CAAU,CAAC;CAE1E,OAAAG,gBACGZ,QAAea,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAF,gBACnBZ,QAAeO,SAAOQ,WACjBV,eAAa,EAAA,KAAA,WAAA;GAAA,OACVC,GACLF,gBACAD,eACA,oEAAA,OAEAO,MAAMM,KACR;EAAC,EAAA,GACGL,MAAI,EAAA,IAAAG,WAAA;GAAA,OAAA,CAAAG,WAEPP,MAAMI,QAAQ,GAAAF,gBACdZ,QAAekB,OAAK;IAAA,eAAA;IAAA,SAA2BhB;GAAY,CAAA,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAIpE;AAEA,SAAgBiB,aAAaV,OAAoD;CAC/E,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGZ,QAAeoB,OAAKL,WAAA,EAAA,KAAA,WAAA;EAAA,OACZT,GAAG,wCAAwCI,MAAMM,KAAK;CAAC,EAAA,GAC1DL,IAAI,CAAA;AAGd;AAEA,SAAgBU,mBAAmBZ,OAA0D;CAC3F,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGZ,QAAesB,aAAWP,WAAA,EAAA,KAAA,WAAA;EAAA,OAClBT,GAAG,6CAA6CI,MAAMM,KAAK;CAAC,EAAA,GAC/DL,IAAI,CAAA;AAGd;AAEA,SAAgBY,mBAAmBd,OAA0D;CAC3F,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQZ,QAAewB,aAAWT,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQT,GAAGI,MAAMM,KAAK;CAAC,EAAA,GAAML,IAAI,CAAA;AACrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","names":["Progress","KobalteProgress","ComponentProps","Show","splitProps","cn","ProgressProps","label","trackClass","indicatorClass","hideValue","props","local","rest","_$createComponent","_$mergeProps","class","children","when","_el$","_tmpl$","_$insert","Label","ValueLabel","Track","Fill","indeterminate","Progress","_$createComponent","KobalteProgress","_$mergeProps"],"sources":["../../../../src/components/ui/progress/progress.tsx"],"sourcesContent":["import { Progress as KobalteProgress } from '@kobalte/core/progress'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Progress.\n *\n * A determinate bar. Kobalte publishes the value as `aria-valuenow`, so a\n * screen reader reports the percentage instead of just \"progress bar\" — which\n * is why a caller must pass a real `value`, or use Spinner when there is none.\n *\n * `indeterminate` renders the sweeping bar for an operation that reports no\n * progress at all. It is a visibly different treatment so the two states are\n * never confused by someone glancing at the screen.\n */\nexport type ProgressProps = ComponentProps<typeof KobalteProgress> & {\n /**\n * The visible label, which is also the bar's accessible name.\n *\n * Pass this, or `aria-label` when the label is drawn elsewhere. A progressbar\n * with neither announces \"progress bar, 64%\" and no subject — the reader\n * cannot tell whether it is a build, an upload or a download.\n */\n label?: string\n trackClass?: string\n indicatorClass?: string\n /** Hide the numeric readout that otherwise sits beside the track. */\n hideValue?: boolean\n}\n\nexport function Progress(props: ProgressProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'trackClass',\n 'indicatorClass',\n 'hideValue',\n 'label',\n ])\n\n return (\n <KobalteProgress\n data-slot=\"progress\"\n class={cn('flex w-full flex-col gap-1.5', local.class)}\n {...rest}\n >\n <Show when={local.label || !local.hideValue}>\n <div class=\"flex items-center justify-between gap-3\">\n <Show when={local.label}>\n <KobalteProgress.Label class=\"text-muted-foreground text-sm\">\n {local.label}\n </KobalteProgress.Label>\n </Show>\n <Show when={!local.hideValue}>\n <KobalteProgress.ValueLabel class=\"text-muted-foreground text-sm tabular-nums\" />\n </Show>\n </div>\n </Show>\n <KobalteProgress.Track\n class={cn('bg-input relative h-1.5 w-full overflow-hidden rounded-full', local.trackClass)}\n >\n <KobalteProgress.Fill\n class={cn(\n 'bg-primary h-full rounded-full',\n {\n 'animate-indeterminate w-1/4': props.indeterminate,\n 'w-(--kb-progress-fill-width)': !props.indeterminate,\n },\n local.indicatorClass\n )}\n />\n </KobalteProgress.Track>\n </KobalteProgress>\n )\n}\n"],"mappings":";;;;;;AA+BA,SAAgBA,WAASW,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO;EACtC;EACA;EACA;EACA;EACA;CAAO,CACR;CAED,OAAAG,gBACGb,UAAec,WAAA;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEPV,GAAG,gCAAgCO,MAAMI,KAAK;EAAC;CAAA,GAClDH,MAAI,EAAA,IAAAI,WAAA;EAAA,OAAA,CAAAH,gBAEPX,MAAI;GAAA,IAACe,OAAI;IAAA,OAAEN,MAAML,SAAS,CAACK,MAAMF;GAAS;GAAA,IAAAO,WAAA;IAAA,IAAAE,OAAAC,OAAA;IAAAC,OAAAF,MAAAL,gBAEtCX,MAAI;KAAA,IAACe,OAAI;MAAA,OAAEN,MAAML;KAAK;KAAA,IAAAU,WAAA;MAAA,OAAAH,gBACpBb,SAAgBqB,OAAK;OAAA,SAAA;OAAA,IAAAL,WAAA;QAAA,OACnBL,MAAML;OAAK;MAAA,CAAA;KAAA;IAAA,CAAA,GAAA,IAAA;IAAAc,OAAAF,MAAAL,gBAGfX,MAAI;KAAA,IAACe,OAAI;MAAA,OAAE,CAACN,MAAMF;KAAS;KAAA,IAAAO,WAAA;MAAA,OAAAH,gBACzBb,SAAgBsB,YAAU,EAAA,SAAA,6CAAA,CAAA;KAAA;IAAA,CAAA,GAAA,IAAA;IAAA,OAAAJ;GAAA;EAAA,CAAA,GAAAL,gBAIhCb,SAAgBuB,OAAK;GAAA,KAAA,WAAA;IAAA,OACbnB,GAAG,+DAA+DO,MAAMJ,UAAU;GAAC;GAAA,IAAAS,WAAA;IAAA,OAAAH,gBAEzFb,SAAgBwB,MAAI,EAAA,KAAA,WAAA;KAAA,OACZpB,GACL,kCACA;MACE,+BAA+BM,MAAMe;MACrC,gCAAgC,CAACf,MAAMe;KACzC,GACAd,MAAMH,cACR;IAAC,EAAA,CAAA;GAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAKX"}
1
+ {"version":3,"file":"progress.js","names":["Progress","KobalteProgress","Show","splitProps","cn","label","trackClass","indicatorClass","hideValue","props","local","rest","_$createComponent","_$mergeProps","class","children","when","_el$","_tmpl$","_$insert","Label","ValueLabel","Track","Fill","indeterminate"],"sources":["../../../../src/components/ui/progress/progress.tsx"],"sourcesContent":["import { Progress as KobalteProgress } from '@kobalte/core/progress'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Progress.\n *\n * A determinate bar. Kobalte publishes the value as `aria-valuenow`, so a\n * screen reader reports the percentage instead of just \"progress bar\" — which\n * is why a caller must pass a real `value`, or use Spinner when there is none.\n *\n * `indeterminate` renders the sweeping bar for an operation that reports no\n * progress at all. It is a visibly different treatment so the two states are\n * never confused by someone glancing at the screen.\n */\nexport type ProgressProps = ComponentProps<typeof KobalteProgress> & {\n /**\n * The visible label, which is also the bar's accessible name.\n *\n * Pass this, or `aria-label` when the label is drawn elsewhere. A progressbar\n * with neither announces \"progress bar, 64%\" and no subject — the reader\n * cannot tell whether it is a build, an upload or a download.\n */\n label?: string\n trackClass?: string\n indicatorClass?: string\n /** Hide the numeric readout that otherwise sits beside the track. */\n hideValue?: boolean\n}\n\nexport function Progress(props: ProgressProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'trackClass',\n 'indicatorClass',\n 'hideValue',\n 'label',\n ])\n\n return (\n <KobalteProgress\n data-slot=\"progress\"\n class={cn('flex w-full flex-col gap-1.5', local.class)}\n {...rest}\n >\n <Show when={local.label || !local.hideValue}>\n <div class=\"flex items-center justify-between gap-3\">\n <Show when={local.label}>\n <KobalteProgress.Label class=\"text-muted-foreground text-sm\">\n {local.label}\n </KobalteProgress.Label>\n </Show>\n <Show when={!local.hideValue}>\n <KobalteProgress.ValueLabel class=\"text-muted-foreground text-sm tabular-nums\" />\n </Show>\n </div>\n </Show>\n <KobalteProgress.Track\n class={cn('bg-input relative h-1.5 w-full overflow-hidden rounded-full', local.trackClass)}\n >\n <KobalteProgress.Fill\n class={cn(\n 'bg-primary h-full rounded-full',\n {\n 'animate-indeterminate w-1/4': props.indeterminate,\n 'w-(--kb-progress-fill-width)': !props.indeterminate,\n },\n local.indicatorClass\n )}\n />\n </KobalteProgress.Track>\n </KobalteProgress>\n )\n}\n"],"mappings":";;;;;;AA+BA,SAAgBA,WAASS,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EACtC;EACA;EACA;EACA;EACA;CAAO,CACR;CAED,OAAAG,gBACGX,UAAeY,WAAA;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEPT,GAAG,gCAAgCM,MAAMI,KAAK;EAAC;CAAA,GAClDH,MAAI,EAAA,IAAAI,WAAA;EAAA,OAAA,CAAAH,gBAEPV,MAAI;GAAA,IAACc,OAAI;IAAA,OAAEN,MAAML,SAAS,CAACK,MAAMF;GAAS;GAAA,IAAAO,WAAA;IAAA,IAAAE,OAAAC,OAAA;IAAAC,OAAAF,MAAAL,gBAEtCV,MAAI;KAAA,IAACc,OAAI;MAAA,OAAEN,MAAML;KAAK;KAAA,IAAAU,WAAA;MAAA,OAAAH,gBACpBX,SAAgBmB,OAAK;OAAA,SAAA;OAAA,IAAAL,WAAA;QAAA,OACnBL,MAAML;OAAK;MAAA,CAAA;KAAA;IAAA,CAAA,GAAA,IAAA;IAAAc,OAAAF,MAAAL,gBAGfV,MAAI;KAAA,IAACc,OAAI;MAAA,OAAE,CAACN,MAAMF;KAAS;KAAA,IAAAO,WAAA;MAAA,OAAAH,gBACzBX,SAAgBoB,YAAU,EAAA,SAAA,6CAAA,CAAA;KAAA;IAAA,CAAA,GAAA,IAAA;IAAA,OAAAJ;GAAA;EAAA,CAAA,GAAAL,gBAIhCX,SAAgBqB,OAAK;GAAA,KAAA,WAAA;IAAA,O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