@hex-core/components 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/_tsup-dts-rollup.d.ts +575 -18
  2. package/dist/accordion.js.map +1 -1
  3. package/dist/alert-dialog.js.map +1 -1
  4. package/dist/alert.js.map +1 -1
  5. package/dist/arc.js.map +1 -1
  6. package/dist/attachment.js.map +1 -1
  7. package/dist/audio-player.js.map +1 -1
  8. package/dist/audio-waveform.js.map +1 -1
  9. package/dist/auth-forgot-password.js.map +1 -1
  10. package/dist/auth-reset-password.js.map +1 -1
  11. package/dist/auth-sign-in-split.js.map +1 -1
  12. package/dist/auth-sign-up-card.js.map +1 -1
  13. package/dist/auth-verify-email.js.map +1 -1
  14. package/dist/auth-verify-otp.js.map +1 -1
  15. package/dist/avatar.js.map +1 -1
  16. package/dist/badge.js.map +1 -1
  17. package/dist/branch.d.ts +2 -0
  18. package/dist/branch.js +136 -0
  19. package/dist/branch.js.map +1 -0
  20. package/dist/breadcrumb.js.map +1 -1
  21. package/dist/button.js.map +1 -1
  22. package/dist/calendar.js.map +1 -1
  23. package/dist/canvas.js.map +1 -1
  24. package/dist/card.js.map +1 -1
  25. package/dist/chain-of-thought.d.ts +3 -0
  26. package/dist/chain-of-thought.js +119 -0
  27. package/dist/chain-of-thought.js.map +1 -0
  28. package/dist/checkbox.js.map +1 -1
  29. package/dist/chord.js.map +1 -1
  30. package/dist/citation.js.map +1 -1
  31. package/dist/cloze.js.map +1 -1
  32. package/dist/cluster.js.map +1 -1
  33. package/dist/code-block-copy.js.map +1 -1
  34. package/dist/code-block.js.map +1 -1
  35. package/dist/color-picker.js.map +1 -1
  36. package/dist/combobox.js.map +1 -1
  37. package/dist/command.js.map +1 -1
  38. package/dist/compare-table.js.map +1 -1
  39. package/dist/composer.js.map +1 -1
  40. package/dist/container.js.map +1 -1
  41. package/dist/context-menu.js.map +1 -1
  42. package/dist/conversation.d.ts +3 -0
  43. package/dist/conversation.js +358 -0
  44. package/dist/conversation.js.map +1 -0
  45. package/dist/data-table.js.map +1 -1
  46. package/dist/date-picker.js.map +1 -1
  47. package/dist/deck.js.map +1 -1
  48. package/dist/dendrogram.js.map +1 -1
  49. package/dist/diagram.js.map +1 -1
  50. package/dist/dialog.js.map +1 -1
  51. package/dist/drawer.js.map +1 -1
  52. package/dist/dropdown-menu.js.map +1 -1
  53. package/dist/dropzone.js.map +1 -1
  54. package/dist/empty.js.map +1 -1
  55. package/dist/error-state.js.map +1 -1
  56. package/dist/file-tree.js.map +1 -1
  57. package/dist/flashcard.js.map +1 -1
  58. package/dist/flowchart.js.map +1 -1
  59. package/dist/form.js.map +1 -1
  60. package/dist/funnel.js.map +1 -1
  61. package/dist/gantt.js.map +1 -1
  62. package/dist/grid.js.map +1 -1
  63. package/dist/hover-card.js.map +1 -1
  64. package/dist/image-occlusion.js.map +1 -1
  65. package/dist/index.d.ts +21 -0
  66. package/dist/index.js +1011 -13
  67. package/dist/index.js.map +1 -1
  68. package/dist/inline-citation.d.ts +2 -0
  69. package/dist/inline-citation.js +108 -0
  70. package/dist/inline-citation.js.map +1 -0
  71. package/dist/input-otp.js.map +1 -1
  72. package/dist/input.js.map +1 -1
  73. package/dist/label.js.map +1 -1
  74. package/dist/loading-indicator.js.map +1 -1
  75. package/dist/loading.js.map +1 -1
  76. package/dist/markdown.d.ts +1 -0
  77. package/dist/markdown.js +784 -4
  78. package/dist/markdown.js.map +1 -1
  79. package/dist/matrix.js.map +1 -1
  80. package/dist/menubar.js.map +1 -1
  81. package/dist/message-actions.js.map +1 -1
  82. package/dist/message-list.js.map +1 -1
  83. package/dist/message.js.map +1 -1
  84. package/dist/mind-map.js.map +1 -1
  85. package/dist/multi-combobox.js.map +1 -1
  86. package/dist/navigation-menu.js.map +1 -1
  87. package/dist/org-chart.js.map +1 -1
  88. package/dist/pagination.js.map +1 -1
  89. package/dist/plan.d.ts +3 -0
  90. package/dist/plan.js +183 -0
  91. package/dist/plan.js.map +1 -0
  92. package/dist/popover.js.map +1 -1
  93. package/dist/progress.js.map +1 -1
  94. package/dist/pyramid.js.map +1 -1
  95. package/dist/quiz.js.map +1 -1
  96. package/dist/radio-group.js.map +1 -1
  97. package/dist/reasoning.js.map +1 -1
  98. package/dist/resizable.js.map +1 -1
  99. package/dist/sankey.js.map +1 -1
  100. package/dist/schemas.d.ts +8 -0
  101. package/dist/schemas.js +774 -17
  102. package/dist/schemas.js.map +1 -1
  103. package/dist/scroll-area.js.map +1 -1
  104. package/dist/select.js.map +1 -1
  105. package/dist/separator.js.map +1 -1
  106. package/dist/sequence.js.map +1 -1
  107. package/dist/sheet.js.map +1 -1
  108. package/dist/shimmer.d.ts +2 -0
  109. package/dist/shimmer.js +39 -0
  110. package/dist/shimmer.js.map +1 -0
  111. package/dist/sidebar.js.map +1 -1
  112. package/dist/skeleton.js.map +1 -1
  113. package/dist/slider.js.map +1 -1
  114. package/dist/sources.d.ts +3 -0
  115. package/dist/sources.js +164 -0
  116. package/dist/sources.js.map +1 -0
  117. package/dist/spaced-repetition.js.map +1 -1
  118. package/dist/spacer.js.map +1 -1
  119. package/dist/speech-recognition.js.map +1 -1
  120. package/dist/stack.js.map +1 -1
  121. package/dist/stepper.js.map +1 -1
  122. package/dist/suggestion.js.map +1 -1
  123. package/dist/sunburst.js.map +1 -1
  124. package/dist/switch.js.map +1 -1
  125. package/dist/table.js.map +1 -1
  126. package/dist/tabs.js.map +1 -1
  127. package/dist/tag.js.map +1 -1
  128. package/dist/task.d.ts +3 -0
  129. package/dist/task.js +189 -0
  130. package/dist/task.js.map +1 -0
  131. package/dist/terminal.js +11 -0
  132. package/dist/terminal.js.map +1 -1
  133. package/dist/textarea.js.map +1 -1
  134. package/dist/time-axis.js.map +1 -1
  135. package/dist/time-picker.js.map +1 -1
  136. package/dist/timeline.js.map +1 -1
  137. package/dist/toggle-group.js.map +1 -1
  138. package/dist/toggle.js.map +1 -1
  139. package/dist/tool-call.js +5 -6
  140. package/dist/tool-call.js.map +1 -1
  141. package/dist/toolbar.js.map +1 -1
  142. package/dist/tooltip.js.map +1 -1
  143. package/dist/tree-map.js.map +1 -1
  144. package/dist/tree.js.map +1 -1
  145. package/dist/venn.js.map +1 -1
  146. package/package.json +8 -3
@@ -44,6 +44,7 @@ import * as ProgressPrimitive from '@radix-ui/react-progress';
44
44
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
45
45
  import * as React_2 from 'react';
46
46
  import { RefAttributes } from 'react';
47
+ import type { Root } from 'mdast';
47
48
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
48
49
  import * as SelectPrimitive from '@radix-ui/react-select';
49
50
  import { Separator as Separator_2 } from 'react-resizable-panels';
@@ -717,6 +718,52 @@ declare const badgeVariants: (props?: ({
717
718
  export { badgeVariants }
718
719
  export { badgeVariants as badgeVariants_alias_1 }
719
720
 
721
+ /**
722
+ * Render a single-active-branch navigator with prev/next controls.
723
+ * @param props - current/total + change handler + body
724
+ * @returns A nav landmark wrapping the active branch and a control chip
725
+ */
726
+ declare function Branch({ current, total, onCurrentChange, children, "aria-label": ariaLabel, className, }: BranchProps): JSX.Element | null;
727
+ export { Branch }
728
+ export { Branch as Branch_alias_1 }
729
+
730
+ /**
731
+ * Headless alternate-response navigator. Renders the active branch
732
+ * (`children`) with a prev/next control chip beneath it. Stateless —
733
+ * the consumer owns `current` (zero-indexed) and `total`.
734
+ *
735
+ * Keyboard: ArrowLeft / ArrowRight step through branches when focus
736
+ * lives anywhere inside the group (the wrapper itself is not focusable;
737
+ * the prev/next buttons or any focusable descendant carry the keys).
738
+ * Read-only when `onCurrentChange` is omitted.
739
+ *
740
+ * @example
741
+ * <Branch current={index} total={alternatives.length} onCurrentChange={setIndex}>
742
+ * <Message role="assistant">
743
+ * <Markdown>{alternatives[index]}</Markdown>
744
+ * </Message>
745
+ * </Branch>
746
+ */
747
+ declare interface BranchProps {
748
+ /** Zero-indexed active branch. */
749
+ current: number;
750
+ /** Total number of branches. */
751
+ total: number;
752
+ /** Optional change handler — when omitted, the controls render disabled. */
753
+ onCurrentChange?: (next: number) => void;
754
+ /** The active branch content (typically a `<Message>` or `<Markdown>`). */
755
+ children: React_2.ReactNode;
756
+ /** Override the accessible label for the navigator landmark. */
757
+ "aria-label"?: string;
758
+ className?: string;
759
+ }
760
+ export { BranchProps }
761
+ export { BranchProps as BranchProps_alias_1 }
762
+
763
+ declare const branchSchema: ComponentSchemaDefinition;
764
+ export { branchSchema }
765
+ export { branchSchema as branchSchema_alias_1 }
766
+
720
767
  /** Root nav landmark for breadcrumb navigation. */
721
768
  declare const Breadcrumb: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
722
769
  export { Breadcrumb }
@@ -906,6 +953,68 @@ declare const CardTitle: React_2.ForwardRefExoticComponent<React_2.HTMLAttribute
906
953
  export { CardTitle }
907
954
  export { CardTitle as CardTitle_alias_1 }
908
955
 
956
+ /**
957
+ * Render a structured reasoning trace + optional final answer.
958
+ * @param props - The ordered steps and optional final answer.
959
+ * @returns A Reasoning collapsible wrapping per-step rows, then the final answer.
960
+ */
961
+ declare function ChainOfThought({ steps, finalAnswer, label, defaultOpen, className, }: ChainOfThoughtProps): JSX.Element;
962
+ export { ChainOfThought }
963
+ export { ChainOfThought as ChainOfThought_alias_1 }
964
+
965
+ /**
966
+ * Structured reasoning trace following the canonical ReAct shape — each
967
+ * step has a `thought`, an optional `action`, and an optional
968
+ * `observation`. The final answer renders below the trace.
969
+ *
970
+ * Distinct from `<Reasoning>`: Reasoning is unstructured prose;
971
+ * `<ChainOfThought>` enforces the per-step structure agents emit when
972
+ * doing tool-augmented reasoning. Internally composes `<Reasoning>` for
973
+ * the collapsible shell so the visual rhythm matches.
974
+ *
975
+ * @example
976
+ * <ChainOfThought
977
+ * steps={[
978
+ * {
979
+ * thought: "Need to look up the auth module",
980
+ * action: "read auth.ts",
981
+ * observation: "200 lines, uses bcrypt + jwt",
982
+ * },
983
+ * { thought: "The bug is on line 42 — missing salt rounds." },
984
+ * ]}
985
+ * finalAnswer={<Markdown>{summary}</Markdown>}
986
+ * />
987
+ */
988
+ declare interface ChainOfThoughtProps {
989
+ /** Ordered ReAct steps. */
990
+ steps: ChainOfThoughtStep[];
991
+ /** Optional final answer rendered beneath the trace. */
992
+ finalAnswer?: React_2.ReactNode;
993
+ /** Header label for the collapsible. Defaults to "Chain of thought". */
994
+ label?: string;
995
+ /** Whether the trace is expanded by default. */
996
+ defaultOpen?: boolean;
997
+ className?: string;
998
+ }
999
+ export { ChainOfThoughtProps }
1000
+ export { ChainOfThoughtProps as ChainOfThoughtProps_alias_1 }
1001
+
1002
+ declare const chainOfThoughtSchema: ComponentSchemaDefinition;
1003
+ export { chainOfThoughtSchema }
1004
+ export { chainOfThoughtSchema as chainOfThoughtSchema_alias_1 }
1005
+
1006
+ /** A single ReAct step. */
1007
+ declare interface ChainOfThoughtStep {
1008
+ /** What the model is thinking right now. Required — every step has a thought. */
1009
+ thought: React_2.ReactNode;
1010
+ /** Optional action the model is about to take (e.g. "read auth.ts"). */
1011
+ action?: React_2.ReactNode;
1012
+ /** Optional observation returned by the action. */
1013
+ observation?: React_2.ReactNode;
1014
+ }
1015
+ export { ChainOfThoughtStep }
1016
+ export { ChainOfThoughtStep as ChainOfThoughtStep_alias_1 }
1017
+
909
1018
  /**
910
1019
  * Categorical chart palette for diagram primitives that encode categorical
911
1020
  * data (sunburst, treemap, sankey, chord, funnel, pyramid, venn, matrix).
@@ -1050,6 +1159,38 @@ declare const citationSchema: ComponentSchemaDefinition;
1050
1159
  export { citationSchema }
1051
1160
  export { citationSchema as citationSchema_alias_1 }
1052
1161
 
1162
+ /**
1163
+ * Streaming-safe markdown pre-processor. Detects unterminated tokens at
1164
+ * end-of-input and appends synthetic closers so `react-markdown`'s
1165
+ * parser doesn't render half-tokens as raw text or throw.
1166
+ *
1167
+ * Used by the `Markdown` component when consumers stream LLM output
1168
+ * one chunk at a time. Pure function — no I/O, no React, no plugins —
1169
+ * so it's trivially unit-testable as a truth table.
1170
+ *
1171
+ * Order matters. We close in this priority:
1172
+ * 1. Fenced code blocks (` ``` `) — most disruptive if open.
1173
+ * 2. HTML tags (`<tag` without `>`) — would consume rest of stream as attribute.
1174
+ * 3. Link parentheses (`[text](url`) — `react-markdown` falls back to text on these.
1175
+ * 4. Link brackets (`[text` no `]`) — consumes potentially huge bodies.
1176
+ * 5. Inline backticks (`` ` ``) — small but visible.
1177
+ * 6. Strikethrough (`~~`) — GFM extension.
1178
+ * 7. Bold (`**`) — must close before single `*` so we don't double-count.
1179
+ * 8. Italic (`*`, `_`) — last (most ambiguous).
1180
+ *
1181
+ * For tokens 5–8 we operate over a mask-view that replaces fenced
1182
+ * regions with whitespace of the same length, so an unclosed `**`
1183
+ * inside ` ``` ` doesn't trigger a closer.
1184
+ */
1185
+ /**
1186
+ * Pre-process raw markdown for the streaming-safe renderer.
1187
+ * @param input - Raw markdown string, possibly mid-stream.
1188
+ * @returns Input with synthetic closers appended for each open-at-EOF token.
1189
+ */
1190
+ declare function closeUnterminated(input: string): string;
1191
+ export { closeUnterminated }
1192
+ export { closeUnterminated as closeUnterminated_alias_1 }
1193
+
1053
1194
  declare function Cloze({ parts, revealMode, onReveal, className, ...rest }: ClozeProps): JSX.Element;
1054
1195
  export { Cloze }
1055
1196
  export { Cloze as Cloze_alias_1 }
@@ -1704,6 +1845,76 @@ declare const ContextMenuTrigger: React_2.ForwardRefExoticComponent<ContextMenuP
1704
1845
  export { ContextMenuTrigger }
1705
1846
  export { ContextMenuTrigger as ContextMenuTrigger_alias_1 }
1706
1847
 
1848
+ /**
1849
+ * Render a chat conversation shell.
1850
+ * @param props - messages + submit handler + optional streaming/sources state
1851
+ * @returns A flex column with a scrolling message list, optional sources/shimmer, and a composer row
1852
+ */
1853
+ declare function Conversation({ messages, onSubmit, placeholder, value: valueProp, onValueChange: onValueChangeProp, isStreaming, sources, disabled, composerActions, className, }: ConversationProps): JSX.Element;
1854
+ export { Conversation }
1855
+ export { Conversation as Conversation_alias_1 }
1856
+
1857
+ /** A single message in a `<Conversation>`. */
1858
+ declare interface ConversationMessage {
1859
+ /** Stable identifier — used for the React key. */
1860
+ id: string;
1861
+ /** Speaker. */
1862
+ role: Role_2;
1863
+ /** Message content. Pass a string for plain text or a node (e.g. `<Markdown>`) for formatted output. */
1864
+ content: React_2.ReactNode;
1865
+ }
1866
+ export { ConversationMessage }
1867
+ export { ConversationMessage as ConversationMessage_alias_1 }
1868
+
1869
+ /**
1870
+ * High-level chat shell. Composes `<MessageList>` over `messages`, an
1871
+ * optional `<Sources>` panel beneath the latest assistant turn, an
1872
+ * optional `<Shimmer>` placeholder for the in-flight assistant response,
1873
+ * and a `<Composer>` row at the bottom.
1874
+ *
1875
+ * Presentational: the consumer owns the `messages` array and the
1876
+ * `onSubmit` handler. The composer's text state is internal by default
1877
+ * so simple consumers don't thread input plumbing; pass `value` +
1878
+ * `onValueChange` together to take full control (suggested-prompt
1879
+ * injection, voice transcription, form-library integration).
1880
+ *
1881
+ * @example
1882
+ * <Conversation
1883
+ * messages={messages}
1884
+ * onSubmit={(text) => sendMessage(text)}
1885
+ * isStreaming={isWaitingForFirstToken}
1886
+ * sources={lastResponse.sources}
1887
+ * placeholder="Ask anything…"
1888
+ * />
1889
+ */
1890
+ declare interface ConversationProps {
1891
+ /** Ordered chat history. Each item renders as one `<Message>`. */
1892
+ messages: ConversationMessage[];
1893
+ /** Called with the trimmed text when the user submits the composer. */
1894
+ onSubmit: (text: string) => void;
1895
+ /** Composer placeholder. */
1896
+ placeholder?: string;
1897
+ /** Controlled composer text. Pass with `onValueChange` to take control of the input — useful for suggested prompts, voice transcripts, or form-library integration. */
1898
+ value?: string;
1899
+ /** Called whenever the composer text changes. Required when `value` is set. */
1900
+ onValueChange?: (value: string) => void;
1901
+ /** When true, render a `<Shimmer>` placeholder above the composer (use during the dead time before the first stream token). */
1902
+ isStreaming?: boolean;
1903
+ /** Optional citations rendered as a `<Sources>` panel beneath the message stream. */
1904
+ sources?: SourceRef[];
1905
+ /** Disable the composer (e.g. while waiting on a tool call). */
1906
+ disabled?: boolean;
1907
+ /** Trailing slot inside the composer — typically a Send button. */
1908
+ composerActions?: React_2.ReactNode;
1909
+ className?: string;
1910
+ }
1911
+ export { ConversationProps }
1912
+ export { ConversationProps as ConversationProps_alias_1 }
1913
+
1914
+ declare const conversationSchema: ComponentSchemaDefinition;
1915
+ export { conversationSchema }
1916
+ export { conversationSchema as conversationSchema_alias_1 }
1917
+
1707
1918
  /**
1708
1919
  * Render a data-driven table from TanStack column definitions.
1709
1920
  * @param props - Columns, data, and optional accessible labelling (`caption` or `aria-label`)
@@ -2742,7 +2953,7 @@ export { gridSchema as gridSchema_alias_1 }
2742
2953
  * the schema's `enumValues` serializes them as strings for JSON-shape parity.
2743
2954
  */
2744
2955
  declare const gridVariants: (props?: ({
2745
- cols?: 1 | 2 | 3 | 4 | 6 | "auto-fit" | null | undefined;
2956
+ cols?: 3 | 1 | 2 | 4 | 6 | "auto-fit" | null | undefined;
2746
2957
  gap?: "sm" | "lg" | "md" | "xl" | "xs" | null | undefined;
2747
2958
  align?: "center" | "start" | "end" | "stretch" | null | undefined;
2748
2959
  } & ClassProp) | undefined) => string;
@@ -2838,6 +3049,51 @@ declare const imageOcclusionSchema: ComponentSchemaDefinition;
2838
3049
  export { imageOcclusionSchema }
2839
3050
  export { imageOcclusionSchema as imageOcclusionSchema_alias_1 }
2840
3051
 
3052
+ /**
3053
+ * Render an inline citation reference with hover preview.
3054
+ * @param props - Index, title, optional url + excerpt.
3055
+ * @returns A `<sup>` with a Radix HoverCard popover.
3056
+ */
3057
+ declare function InlineCitation({ index, title, url: rawUrl, excerpt, openDelay, className, }: InlineCitationProps): JSX.Element;
3058
+ export { InlineCitation }
3059
+ export { InlineCitation as InlineCitation_alias_1 }
3060
+
3061
+ /**
3062
+ * Inline footnote-style reference with a hover-preview popover.
3063
+ *
3064
+ * Pairs with `<Sources>` for the bottom-of-card list. Block-level
3065
+ * `<Citation>` chips are too large to embed mid-sentence; this primitive
3066
+ * fills the inline-text gap with a `<sup>[N]</sup>` and an
3067
+ * Anthropic-style hover preview showing the source title + URL.
3068
+ *
3069
+ * The Markdown component routes `[N](url)` shapes through this slot —
3070
+ * authors don't write the JSX directly in the streaming path.
3071
+ *
3072
+ * @example
3073
+ * The frontier models all publish reasoning evals
3074
+ * <InlineCitation index={1} title="Anthropic — Claude Sonnet 4.5"
3075
+ * url="https://anthropic.com/claude" />.
3076
+ */
3077
+ declare interface InlineCitationProps {
3078
+ /** Footnote number (1-based). Renders inside the visible `<sup>`. */
3079
+ index: number;
3080
+ /** Source title shown in the hover preview. */
3081
+ title: string;
3082
+ /** Optional URL — when set, the trigger becomes a focusable anchor. */
3083
+ url?: string;
3084
+ /** Optional excerpt or context shown under the title in the preview. */
3085
+ excerpt?: string;
3086
+ /** Open delay in ms (matches Radix default ~700). */
3087
+ openDelay?: number;
3088
+ className?: string;
3089
+ }
3090
+ export { InlineCitationProps }
3091
+ export { InlineCitationProps as InlineCitationProps_alias_1 }
3092
+
3093
+ declare const inlineCitationSchema: ComponentSchemaDefinition;
3094
+ export { inlineCitationSchema }
3095
+ export { inlineCitationSchema as inlineCitationSchema_alias_1 }
3096
+
2841
3097
  declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
2842
3098
  export { Input }
2843
3099
  export { Input as Input_alias_1 }
@@ -2994,31 +3250,35 @@ export { loadingVariants }
2994
3250
  export { loadingVariants as loadingVariants_alias_1 }
2995
3251
 
2996
3252
  /**
2997
- * Renders streaming-safe markdown.
2998
- * @param props - children string + optional Streamdown overrides
2999
- * @returns A Streamdown root scoped with prose styles
3253
+ * Render streaming-safe markdown with AI-aware slot wiring.
3254
+ *
3255
+ * @param props - The markdown source string + optional className.
3256
+ * @returns A `<div>` wrapping the rendered markdown tree.
3000
3257
  */
3001
3258
  declare function Markdown({ children, className }: MarkdownProps): JSX.Element;
3002
3259
  export { Markdown }
3003
3260
  export { Markdown as Markdown_alias_1 }
3004
3261
 
3005
3262
  /**
3006
- * Streaming-safe markdown renderer. Wraps Vercel's `streamdown` so partial
3007
- * input mid-stream — unclosed code fences, half-typed tags, dangling
3008
- * brackets — renders gracefully instead of throwing or flashing raw text.
3263
+ * Streaming-safe markdown renderer with AI-aware element slots.
3009
3264
  *
3010
- * Public prop surface is intentionally minimal (`children` + `className`)
3011
- * so this primitive's DTS doesn't drag in `streamdown`'s full type graph.
3012
- * Doing so would transitively pull Shiki's 600-literal `BundledLanguage`
3013
- * union into the rollup-dts pass and exhaust heap. For per-element
3014
- * overrides (custom `pre`, `code`, `a`, `img`, mermaid, math, line
3015
- * numbers, plugins, etc.) drop down to `Streamdown` directly:
3265
+ * Native pipeline (no `streamdown`): `react-markdown` + `remark-gfm`
3266
+ * for tables/task lists, `rehype-raw` to preserve the custom
3267
+ * `<tool-call>` element, `rehype-sanitize` to whitelist our slot tags,
3268
+ * `closeUnterminated` for streaming recovery (closes mid-stream `**`,
3269
+ * fences, links, tags before the parser sees them).
3016
3270
  *
3017
- * ```tsx
3018
- * import { Streamdown } from "streamdown";
3019
- * import { CodeBlock } from "@hex-core/components";
3020
- * <Streamdown components={{ pre: (p) => <CodeBlock {...p} /> }}>{md}</Streamdown>
3021
- * ```
3271
+ * Slot wiring:
3272
+ * - **Fenced code** (` ```lang `) → `<pre><code class="language-*">` (client-safe; consumers post-highlight).
3273
+ * - **Footnote-style links** (`[1](url)`) `<InlineCitation>` (inline `<sup>` with hover preview).
3274
+ * - **`<sources data='[…]' />`** `<Sources>` (collapsible RAG-source list).
3275
+ * - **`<tool-call name=… state=… args=… result=…/>`** → `<ToolCall>`.
3276
+ * - **`> [!think]\n> body`** blockquotes → `<Reasoning>`.
3277
+ *
3278
+ * The fenced-code slot doesn't route to the in-house `<CodeBlock>`
3279
+ * because CodeBlock is an async Server Component and Markdown runs
3280
+ * client-side. Consumers in an RSC tree can compose `<CodeBlock>`
3281
+ * directly when they need server-side Shiki highlighting.
3022
3282
  *
3023
3283
  * @example
3024
3284
  * <Message role="assistant">
@@ -3622,6 +3882,74 @@ export { parseHslTriplet as parseHslTriplet_alias_1 }
3622
3882
  */
3623
3883
  export declare function pickChartHue(index: number): string;
3624
3884
 
3885
+ /**
3886
+ * Render a pre-execution multi-step plan with an optional approval gate.
3887
+ * @param props - The plan label, steps, and optional approve/cancel handlers.
3888
+ * @returns A card wrapping a numbered step list and (optionally) an action footer.
3889
+ */
3890
+ declare function Plan({ label, description, steps, onApprove, onCancel, approveLabel, cancelLabel, className, }: PlanProps): JSX.Element;
3891
+ export { Plan }
3892
+ export { Plan as Plan_alias_1 }
3893
+
3894
+ /**
3895
+ * Pre-execution plan card. Shown BEFORE the agent starts executing —
3896
+ * the body lists the proposed steps; an optional `onApprove` /
3897
+ * `onCancel` footer renders an approval gate.
3898
+ *
3899
+ * Distinct from `<Task>`: Task is during/post-execution status (steps
3900
+ * carry a lifecycle state); Plan is pre-execution intent (steps are
3901
+ * just labels). Once approved, consumers typically swap the rendered
3902
+ * `<Plan>` for a `<Task>` driven by the running agent.
3903
+ *
3904
+ * @example
3905
+ * <Plan
3906
+ * label="Refactor auth module"
3907
+ * description="Three-step refactor with tests."
3908
+ * steps={[
3909
+ * { id: "read", label: "Read existing auth" },
3910
+ * { id: "apply", label: "Apply changes" },
3911
+ * { id: "test", label: "Run tests" },
3912
+ * ]}
3913
+ * onApprove={() => execute()}
3914
+ * onCancel={() => discard()}
3915
+ * />
3916
+ */
3917
+ declare interface PlanProps {
3918
+ /** Optional title shown above the step list. */
3919
+ label?: string;
3920
+ /** Optional secondary description shown under the label. */
3921
+ description?: string;
3922
+ /** Ordered list of steps. Each carries an id, label, and optional detail. */
3923
+ steps: PlanStep[];
3924
+ /** When provided, an "Approve" button is rendered in the footer. */
3925
+ onApprove?: () => void;
3926
+ /** When provided, a "Cancel" button is rendered in the footer. */
3927
+ onCancel?: () => void;
3928
+ /** Override the approve button label. Defaults to "Approve". */
3929
+ approveLabel?: string;
3930
+ /** Override the cancel button label. Defaults to "Cancel". */
3931
+ cancelLabel?: string;
3932
+ className?: string;
3933
+ }
3934
+ export { PlanProps }
3935
+ export { PlanProps as PlanProps_alias_1 }
3936
+
3937
+ declare const planSchema: ComponentSchemaDefinition;
3938
+ export { planSchema }
3939
+ export { planSchema as planSchema_alias_1 }
3940
+
3941
+ /** A single proposed step in a Plan. */
3942
+ declare interface PlanStep {
3943
+ /** Stable identifier — used for the React key. */
3944
+ id: string;
3945
+ /** Human-readable step label. */
3946
+ label: string;
3947
+ /** Optional secondary detail shown beneath the label. */
3948
+ detail?: string;
3949
+ }
3950
+ export { PlanStep }
3951
+ export { PlanStep as PlanStep_alias_1 }
3952
+
3625
3953
  /** Root container for a popover. */
3626
3954
  declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
3627
3955
  export { Popover }
@@ -3824,6 +4152,25 @@ declare const reasoningSchema: ComponentSchemaDefinition;
3824
4152
  export { reasoningSchema }
3825
4153
  export { reasoningSchema as reasoningSchema_alias_1 }
3826
4154
 
4155
+ /**
4156
+ * Tag blockquotes that start with `[!think]` as admonitions of type
4157
+ * `think`. Strips the marker text from the rendered content and writes
4158
+ * the type onto `node.data.hProperties` so the rehype pass surfaces it
4159
+ * as a `data-admonition` attribute on the `<blockquote>` element. Slot
4160
+ * renderers in the React layer then route that attribute to
4161
+ * `<Reasoning>`.
4162
+ *
4163
+ * Pure transform; no I/O. Operates on the mdast tree before
4164
+ * `remark-rehype` produces hast.
4165
+ *
4166
+ * Only ships `[!think]` in Phase 2. Other admonitions
4167
+ * (`[!warn]`/`[!info]`/`[!error]`) can be added by extending the
4168
+ * `SUPPORTED` set without touching slot wiring.
4169
+ *
4170
+ * @returns A unified plugin transformer.
4171
+ */
4172
+ export declare function remarkAdmonitions(): (tree: Root) => void;
4173
+
3827
4174
  /**
3828
4175
  * Draggable separator between panels. Optionally renders a grab-grip dot.
3829
4176
  * @returns A slim, focusable resize handle.
@@ -3894,6 +4241,35 @@ export { Role }
3894
4241
  export { Role as Role_alias_1 }
3895
4242
  export { Role as Role_alias_2 }
3896
4243
 
4244
+ /**
4245
+ * Speaker of a message. Mirrors the canonical `Role` union from
4246
+ * `@hex-core/components` exactly — kept inline (rather than imported
4247
+ * from `../types.js`) so the registry CLI distribution path (`npx hex
4248
+ * add conversation`) ships a self-contained file. Same precedent as
4249
+ * `task.tsx`'s inlined `ToolCallState`. The build-registry script
4250
+ * doesn't bundle `types.ts`, so importing from it would leave consumer
4251
+ * TS strict-mode unable to resolve the type at the install location.
4252
+ */
4253
+ declare type Role_2 = "user" | "assistant" | "system" | "tool";
4254
+
4255
+ /**
4256
+ * Allowlist a URL for use as an `<a href>` against untrusted input.
4257
+ *
4258
+ * Returns the raw string when it's `http(s):` / `mailto:` / a relative
4259
+ * URL (no scheme); returns `undefined` otherwise. Defends against
4260
+ * `javascript:` / `data:` / `vbscript:` injection from streamed model
4261
+ * output or third-party JSON payloads that flow into citation chips.
4262
+ *
4263
+ * Inside a Markdown render path, `rehype-sanitize` already strips
4264
+ * `javascript:` from inline-link hrefs — but it does NOT introspect
4265
+ * JSON nested inside attribute values (e.g. `<sources data='[…]'/>`),
4266
+ * so the components that consume that data must guard themselves.
4267
+ *
4268
+ * @param raw - The candidate URL, or `undefined` when none was supplied.
4269
+ * @returns The URL when safe to render, otherwise `undefined`.
4270
+ */
4271
+ export declare function safeUrl(raw: string | undefined): string | undefined;
4272
+
3897
4273
  declare function Sankey({ nodes, links, width, height, nodeAlign, nodeWidth, nodePadding, onLinkHover, onNodeClick, className, ...rest }: SankeyProps): JSX.Element;
3898
4274
  export { Sankey }
3899
4275
  export { Sankey as Sankey_alias_1 }
@@ -4182,6 +4558,55 @@ declare const sheetVariants: (props?: ({
4182
4558
  side?: "top" | "right" | "bottom" | "left" | null | undefined;
4183
4559
  } & ClassProp) | undefined) => string;
4184
4560
 
4561
+ /**
4562
+ * Render a streaming placeholder bar.
4563
+ *
4564
+ * Uses Tailwind's `animate-pulse` for the loading effect — same
4565
+ * approach as `<Skeleton>` so consumers don't need extra global CSS or
4566
+ * keyframes. The `durationMs` prop scales the pulse cycle via a CSS
4567
+ * variable so the animation stays in pulse's vertical-opacity family
4568
+ * rather than introducing a custom sweep keyframe (which would
4569
+ * conflict with React 19's stricter style-tag handling).
4570
+ *
4571
+ * @param props - Optional sizing + duration + label overrides.
4572
+ * @returns A pulsing placeholder bar.
4573
+ */
4574
+ declare function Shimmer({ width, height, durationMs, label, className, }: ShimmerProps): JSX.Element;
4575
+ export { Shimmer }
4576
+ export { Shimmer as Shimmer_alias_1 }
4577
+
4578
+ /**
4579
+ * Single-line streaming placeholder. Used during the dead-time between
4580
+ * a user submitting a prompt and the first stream token arriving — a
4581
+ * gradient sweep across a flat bar that signals "the model is thinking
4582
+ * but hasn't started speaking yet."
4583
+ *
4584
+ * Wider than `<Loading>` (which is a multi-row skeleton) and narrower
4585
+ * than `<Skeleton>` (which is a sized placeholder block); use Shimmer
4586
+ * for the conversation pane, Loading for whole-screen states, Skeleton
4587
+ * for arbitrary placeholder shapes.
4588
+ *
4589
+ * @example
4590
+ * {isStreaming && <Shimmer width="80%" />}
4591
+ */
4592
+ declare interface ShimmerProps {
4593
+ /** CSS width — accepts any width value (e.g. `"60%"`, `"24rem"`). Defaults to full width. */
4594
+ width?: string;
4595
+ /** Override the default 1.5rem height for taller streaming bars. */
4596
+ height?: string;
4597
+ /** Sweep duration in ms. Defaults to 1500. */
4598
+ durationMs?: number;
4599
+ /** Accessible label announced to screen readers. */
4600
+ label?: string;
4601
+ className?: string;
4602
+ }
4603
+ export { ShimmerProps }
4604
+ export { ShimmerProps as ShimmerProps_alias_1 }
4605
+
4606
+ declare const shimmerSchema: ComponentSchemaDefinition;
4607
+ export { shimmerSchema }
4608
+ export { shimmerSchema as shimmerSchema_alias_1 }
4609
+
4185
4610
  /**
4186
4611
  * App-shell sidebar. Reads open state from SidebarProvider and animates width.
4187
4612
  * @returns An aside element that expands/collapses.
@@ -4317,6 +4742,61 @@ declare const sonnerSchema: ComponentSchemaDefinition;
4317
4742
  export { sonnerSchema }
4318
4743
  export { sonnerSchema as sonnerSchema_alias_1 }
4319
4744
 
4745
+ /** Per-source data passed to a Citation chip. */
4746
+ declare interface SourceRef {
4747
+ title: string;
4748
+ url?: string;
4749
+ page?: number;
4750
+ /** Optional 1-based index. Falls back to array position. Use to keep
4751
+ * the inline `<InlineCitation>` index aligned with the panel row when
4752
+ * the model emits non-1-based numbering. */
4753
+ index?: number;
4754
+ }
4755
+ export { SourceRef }
4756
+ export { SourceRef as SourceRef_alias_1 }
4757
+
4758
+ /**
4759
+ * Render a sources panel for an LLM response. Returns null when the
4760
+ * sources array is empty — consumers don't get a "0 sources" empty
4761
+ * card; they just don't render the panel at all.
4762
+ *
4763
+ * @param props - The list of sources + open-state default.
4764
+ * @returns A Collapsible wrapping a Citation cluster, or null if empty.
4765
+ */
4766
+ declare function Sources({ sources, defaultOpen, className }: SourcesProps): JSX.Element | null;
4767
+ export { Sources }
4768
+ export { Sources as Sources_alias_1 }
4769
+
4770
+ /**
4771
+ * Bordered card listing 1–N citation chips for a RAG response.
4772
+ *
4773
+ * Header reads "N sources" and is a clickable Radix Collapsible trigger;
4774
+ * body renders one `<Citation>` per source (re-using the in-house chip).
4775
+ * Defaults to open so consumers don't have to expand to see what was
4776
+ * cited.
4777
+ *
4778
+ * @example
4779
+ * <Sources
4780
+ * sources={[
4781
+ * { title: "Auth research", url: "https://example.com/auth", page: 3 },
4782
+ * { title: "OAuth 2.1 spec", url: "https://oauth.net/2.1" },
4783
+ * ]}
4784
+ * />
4785
+ */
4786
+ declare interface SourcesProps {
4787
+ /** Citation rows. Each becomes a `<Citation>` chip. */
4788
+ sources: SourceRef[];
4789
+ /** Whether the list is expanded by default. */
4790
+ defaultOpen?: boolean;
4791
+ className?: string;
4792
+ }
4793
+ export { SourcesProps }
4794
+ export { SourcesProps as SourcesProps_alias_1 }
4795
+
4796
+ declare const sourcesSchema: ComponentSchemaDefinition;
4797
+ export { sourcesSchema }
4798
+ export { sourcesSchema as sourcesSchema_alias_1 }
4799
+
4320
4800
  declare function SpacedRepetition({ cardId, onRate, labels, className, ...rest }: SpacedRepetitionProps): JSX.Element;
4321
4801
  export { SpacedRepetition }
4322
4802
  export { SpacedRepetition as SpacedRepetition_alias_1 }
@@ -4782,6 +5262,70 @@ declare const tagVariants: (props?: ({
4782
5262
  export { tagVariants }
4783
5263
  export { tagVariants as tagVariants_alias_1 }
4784
5264
 
5265
+ /**
5266
+ * Render a multi-step task progress card.
5267
+ * @param props - The task label, steps, and optional duration.
5268
+ * @returns A Collapsible wrapping a step list.
5269
+ */
5270
+ declare function Task({ label, steps, durationMs, defaultOpen, className }: TaskProps): JSX.Element;
5271
+ export { Task }
5272
+ export { Task as Task_alias_1 }
5273
+
5274
+ /**
5275
+ * Multi-step task progress for an AI workflow.
5276
+ *
5277
+ * Each step's `state` re-uses the canonical `ToolCallState` enum
5278
+ * (`pending` / `running` / `result` / `error`) so the vocabulary stays
5279
+ * consistent across the AI surface. The header tracks aggregate
5280
+ * progress ("3 of 5 steps", or "Done in X.Xs" once `durationMs` is
5281
+ * set).
5282
+ *
5283
+ * Composes well with `<Reasoning>` for in-step thinking traces and
5284
+ * `<ToolCall>` for individual tool invocations.
5285
+ *
5286
+ * @example
5287
+ * <Task
5288
+ * label="Refactoring auth"
5289
+ * steps={[
5290
+ * { id: "read", label: "Read existing auth", state: "result" },
5291
+ * { id: "write", label: "Apply changes", state: "running" },
5292
+ * { id: "test", label: "Run tests", state: "pending" },
5293
+ * ]}
5294
+ * durationMs={12_400}
5295
+ * />
5296
+ */
5297
+ declare interface TaskProps {
5298
+ /** Optional title shown above the step list. Skipped if absent. */
5299
+ label?: string;
5300
+ /** Ordered list of steps. Each carries an id, label, and state. */
5301
+ steps: TaskStep[];
5302
+ /** Time spent on the task in milliseconds. Renders "Done in X.Xs" when set. */
5303
+ durationMs?: number;
5304
+ /** Whether the step list is expanded by default. */
5305
+ defaultOpen?: boolean;
5306
+ className?: string;
5307
+ }
5308
+ export { TaskProps }
5309
+ export { TaskProps as TaskProps_alias_1 }
5310
+
5311
+ declare const taskSchema: ComponentSchemaDefinition;
5312
+ export { taskSchema }
5313
+ export { taskSchema as taskSchema_alias_1 }
5314
+
5315
+ /** A single row in a Task. */
5316
+ declare interface TaskStep {
5317
+ /** Stable identifier — used for the React key and any consumer tracking. */
5318
+ id: string;
5319
+ /** Human-readable step label. */
5320
+ label: string;
5321
+ /** Lifecycle status — same vocabulary as `<ToolCall>`'s `state`. */
5322
+ state: ToolCallState_2;
5323
+ /** Optional detail line shown beneath the label. */
5324
+ detail?: string;
5325
+ }
5326
+ export { TaskStep }
5327
+ export { TaskStep as TaskStep_alias_1 }
5328
+
4785
5329
  /**
4786
5330
  * Renders an xterm.js terminal display.
4787
5331
  * @param props - Terminal output + input handler + display options
@@ -5200,6 +5744,19 @@ export { ToolCallState }
5200
5744
  export { ToolCallState as ToolCallState_alias_1 }
5201
5745
  export { ToolCallState as ToolCallState_alias_2 }
5202
5746
 
5747
+ /**
5748
+ * Lifecycle of a Task step. Mirrors `@hex-core/components`'
5749
+ * `ToolCallState` exactly — kept inline (rather than imported from
5750
+ * `../types.js`) so the registry CLI distribution path (`npx hex add
5751
+ * task`) ships a self-contained file. ToolCall has the same enum
5752
+ * imported from `../types.js` for backwards-compat with its earlier
5753
+ * shape; new consumers should treat the two unions as one vocabulary.
5754
+ *
5755
+ * KEEP IN SYNC with `../types.js`'s `ToolCallState` enum. Drift is
5756
+ * locked down by an `expectTypeOf` assertion in `task.test.tsx`.
5757
+ */
5758
+ declare type ToolCallState_2 = "pending" | "running" | "result" | "error";
5759
+
5203
5760
  /** Root container for a single tooltip. */
5204
5761
  declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
5205
5762
  export { Tooltip }