@hex-core/components 1.8.1 → 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 (158) hide show
  1. package/dist/_tsup-dts-rollup.d.ts +855 -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.d.ts +2 -0
  10. package/dist/auth-forgot-password.js +400 -0
  11. package/dist/auth-forgot-password.js.map +1 -0
  12. package/dist/auth-reset-password.d.ts +2 -0
  13. package/dist/auth-reset-password.js +323 -0
  14. package/dist/auth-reset-password.js.map +1 -0
  15. package/dist/auth-sign-in-split.d.ts +3 -0
  16. package/dist/auth-sign-in-split.js +443 -0
  17. package/dist/auth-sign-in-split.js.map +1 -0
  18. package/dist/auth-sign-up-card.d.ts +3 -0
  19. package/dist/auth-sign-up-card.js +590 -0
  20. package/dist/auth-sign-up-card.js.map +1 -0
  21. package/dist/auth-verify-email.d.ts +2 -0
  22. package/dist/auth-verify-email.js +339 -0
  23. package/dist/auth-verify-email.js.map +1 -0
  24. package/dist/auth-verify-otp.d.ts +2 -0
  25. package/dist/auth-verify-otp.js +349 -0
  26. package/dist/auth-verify-otp.js.map +1 -0
  27. package/dist/avatar.js.map +1 -1
  28. package/dist/badge.js.map +1 -1
  29. package/dist/branch.d.ts +2 -0
  30. package/dist/branch.js +136 -0
  31. package/dist/branch.js.map +1 -0
  32. package/dist/breadcrumb.js.map +1 -1
  33. package/dist/button.js.map +1 -1
  34. package/dist/calendar.js.map +1 -1
  35. package/dist/canvas.js.map +1 -1
  36. package/dist/card.js.map +1 -1
  37. package/dist/chain-of-thought.d.ts +3 -0
  38. package/dist/chain-of-thought.js +119 -0
  39. package/dist/chain-of-thought.js.map +1 -0
  40. package/dist/checkbox.js.map +1 -1
  41. package/dist/chord.js.map +1 -1
  42. package/dist/citation.js.map +1 -1
  43. package/dist/cloze.js.map +1 -1
  44. package/dist/cluster.js.map +1 -1
  45. package/dist/code-block-copy.js.map +1 -1
  46. package/dist/code-block.js.map +1 -1
  47. package/dist/color-picker.js.map +1 -1
  48. package/dist/combobox.js.map +1 -1
  49. package/dist/command.js.map +1 -1
  50. package/dist/compare-table.js.map +1 -1
  51. package/dist/composer.js.map +1 -1
  52. package/dist/container.js.map +1 -1
  53. package/dist/context-menu.js.map +1 -1
  54. package/dist/conversation.d.ts +3 -0
  55. package/dist/conversation.js +358 -0
  56. package/dist/conversation.js.map +1 -0
  57. package/dist/data-table.js.map +1 -1
  58. package/dist/date-picker.js.map +1 -1
  59. package/dist/deck.js.map +1 -1
  60. package/dist/dendrogram.js.map +1 -1
  61. package/dist/diagram.js.map +1 -1
  62. package/dist/dialog.js.map +1 -1
  63. package/dist/drawer.js.map +1 -1
  64. package/dist/dropdown-menu.js.map +1 -1
  65. package/dist/dropzone.js.map +1 -1
  66. package/dist/empty.js.map +1 -1
  67. package/dist/error-state.js.map +1 -1
  68. package/dist/file-tree.js.map +1 -1
  69. package/dist/flashcard.js.map +1 -1
  70. package/dist/flowchart.js.map +1 -1
  71. package/dist/form.js.map +1 -1
  72. package/dist/funnel.js.map +1 -1
  73. package/dist/gantt.js.map +1 -1
  74. package/dist/grid.js.map +1 -1
  75. package/dist/hover-card.js.map +1 -1
  76. package/dist/image-occlusion.js.map +1 -1
  77. package/dist/index.d.ts +40 -0
  78. package/dist/index.js +4839 -2813
  79. package/dist/index.js.map +1 -1
  80. package/dist/inline-citation.d.ts +2 -0
  81. package/dist/inline-citation.js +108 -0
  82. package/dist/inline-citation.js.map +1 -0
  83. package/dist/input-otp.js.map +1 -1
  84. package/dist/input.js.map +1 -1
  85. package/dist/label.js.map +1 -1
  86. package/dist/loading-indicator.js.map +1 -1
  87. package/dist/loading.js.map +1 -1
  88. package/dist/markdown.d.ts +1 -0
  89. package/dist/markdown.js +784 -4
  90. package/dist/markdown.js.map +1 -1
  91. package/dist/matrix.js.map +1 -1
  92. package/dist/menubar.js.map +1 -1
  93. package/dist/message-actions.js.map +1 -1
  94. package/dist/message-list.js.map +1 -1
  95. package/dist/message.js.map +1 -1
  96. package/dist/mind-map.js.map +1 -1
  97. package/dist/multi-combobox.js.map +1 -1
  98. package/dist/navigation-menu.js.map +1 -1
  99. package/dist/org-chart.js.map +1 -1
  100. package/dist/pagination.js.map +1 -1
  101. package/dist/plan.d.ts +3 -0
  102. package/dist/plan.js +183 -0
  103. package/dist/plan.js.map +1 -0
  104. package/dist/popover.js.map +1 -1
  105. package/dist/progress.js.map +1 -1
  106. package/dist/pyramid.js.map +1 -1
  107. package/dist/quiz.js.map +1 -1
  108. package/dist/radio-group.js.map +1 -1
  109. package/dist/reasoning.js.map +1 -1
  110. package/dist/resizable.js.map +1 -1
  111. package/dist/sankey.js.map +1 -1
  112. package/dist/schemas.d.ts +8 -0
  113. package/dist/schemas.js +774 -17
  114. package/dist/schemas.js.map +1 -1
  115. package/dist/scroll-area.js.map +1 -1
  116. package/dist/select.js.map +1 -1
  117. package/dist/separator.js.map +1 -1
  118. package/dist/sequence.js.map +1 -1
  119. package/dist/sheet.js.map +1 -1
  120. package/dist/shimmer.d.ts +2 -0
  121. package/dist/shimmer.js +39 -0
  122. package/dist/shimmer.js.map +1 -0
  123. package/dist/sidebar.js.map +1 -1
  124. package/dist/skeleton.js.map +1 -1
  125. package/dist/slider.js.map +1 -1
  126. package/dist/sources.d.ts +3 -0
  127. package/dist/sources.js +164 -0
  128. package/dist/sources.js.map +1 -0
  129. package/dist/spaced-repetition.js.map +1 -1
  130. package/dist/spacer.js.map +1 -1
  131. package/dist/speech-recognition.js.map +1 -1
  132. package/dist/stack.js.map +1 -1
  133. package/dist/stepper.js.map +1 -1
  134. package/dist/suggestion.js.map +1 -1
  135. package/dist/sunburst.js.map +1 -1
  136. package/dist/switch.js.map +1 -1
  137. package/dist/table.js.map +1 -1
  138. package/dist/tabs.js.map +1 -1
  139. package/dist/tag.js.map +1 -1
  140. package/dist/task.d.ts +3 -0
  141. package/dist/task.js +189 -0
  142. package/dist/task.js.map +1 -0
  143. package/dist/terminal.js +11 -0
  144. package/dist/terminal.js.map +1 -1
  145. package/dist/textarea.js.map +1 -1
  146. package/dist/time-axis.js.map +1 -1
  147. package/dist/time-picker.js.map +1 -1
  148. package/dist/timeline.js.map +1 -1
  149. package/dist/toggle-group.js.map +1 -1
  150. package/dist/toggle.js.map +1 -1
  151. package/dist/tool-call.js +5 -6
  152. package/dist/tool-call.js.map +1 -1
  153. package/dist/toolbar.js.map +1 -1
  154. package/dist/tooltip.js.map +1 -1
  155. package/dist/tree-map.js.map +1 -1
  156. package/dist/tree.js.map +1 -1
  157. package/dist/venn.js.map +1 -1
  158. package/package.json +9 -4
@@ -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';
@@ -401,6 +402,275 @@ export { AudioWaveformProps as AudioWaveformProps_alias_1 }
401
402
 
402
403
  export declare const audioWaveformSchema: ComponentSchemaDefinition;
403
404
 
405
+ declare interface AuthAdapter {
406
+ signInWithPassword?(p: {
407
+ email: string;
408
+ password: string;
409
+ remember: boolean;
410
+ }): Promise<AuthAdapterResult>;
411
+ signUpWithPassword?(p: {
412
+ email: string;
413
+ password: string;
414
+ name?: string;
415
+ }): Promise<AuthAdapterResult>;
416
+ signInWithSocial?(p: {
417
+ provider: AuthSocialProvider;
418
+ }): Promise<AuthAdapterResult>;
419
+ sendMagicLink?(p: {
420
+ email: string;
421
+ }): Promise<AuthAdapterResult>;
422
+ verifyOtp?(p: {
423
+ code: string;
424
+ intent: AuthOtpIntent;
425
+ }): Promise<AuthAdapterResult>;
426
+ requestPasswordReset?(p: {
427
+ email: string;
428
+ }): Promise<AuthAdapterResult>;
429
+ resetPassword?(p: {
430
+ token: string;
431
+ password: string;
432
+ }): Promise<AuthAdapterResult>;
433
+ registerPasskey?(): Promise<AuthAdapterResult>;
434
+ signInWithPasskey?(): Promise<AuthAdapterResult>;
435
+ /**
436
+ * Re-send a magic link to the same address. Distinct from {@link sendMagicLink}
437
+ * so consumers can throttle resends and surface different analytics / error
438
+ * copy for the second-and-onward attempt. Used by the verify-email block.
439
+ */
440
+ resendMagicLink?(p: {
441
+ email: string;
442
+ }): Promise<AuthAdapterResult>;
443
+ /**
444
+ * Re-send a one-time code for the given intent. Distinct from the initial
445
+ * code dispatch so consumers can throttle and log resends separately. Used
446
+ * by the verify-otp block.
447
+ */
448
+ resendOtp?(p: {
449
+ intent: AuthOtpIntent;
450
+ }): Promise<AuthAdapterResult>;
451
+ }
452
+ export { AuthAdapter }
453
+ export { AuthAdapter as AuthAdapter_alias_1 }
454
+ export { AuthAdapter as AuthAdapter_alias_2 }
455
+
456
+ /**
457
+ * The contract every Hex Core auth block consumes via its `adapter` prop.
458
+ *
459
+ * Hex Core does not ship session management — auth blocks are presentation-
460
+ * only and delegate every credential, OTP, and OAuth handoff to whatever
461
+ * the consumer wires up (better-auth, Clerk, NextAuth, Supabase Auth, a
462
+ * custom server, …). The adapter is the single seam.
463
+ *
464
+ * Every method is **optional**. A block that needs `signInWithPassword` but
465
+ * not passkeys passes an adapter implementing only the methods it needs;
466
+ * the block surfaces a runtime error if the user hits a code path the
467
+ * adapter doesn't implement, rather than failing to render. This lets a
468
+ * consumer ship password-only on day one and add passkeys later without
469
+ * forking the block source.
470
+ *
471
+ * A reference {@link mockAuthAdapter} lives below — used by the docs
472
+ * showcase routes and unit tests; never ship it in production.
473
+ */
474
+ declare interface AuthAdapterResult {
475
+ ok: boolean;
476
+ error?: {
477
+ code: string;
478
+ message: string;
479
+ };
480
+ redirect?: string;
481
+ }
482
+ export { AuthAdapterResult }
483
+ export { AuthAdapterResult as AuthAdapterResult_alias_1 }
484
+ export { AuthAdapterResult as AuthAdapterResult_alias_2 }
485
+
486
+ /**
487
+ * "Forgot password" page. Single email field; on success swaps to a
488
+ * confirmation state composed from `Empty` ("we sent you a link") plus a
489
+ * "back to sign in" affordance. Routes the dispatch through
490
+ * `adapter.requestPasswordReset`.
491
+ */
492
+ declare function AuthForgotPassword({ adapter, signInHref, className, onSuccess, }: AuthForgotPasswordProps): JSX.Element;
493
+ export { AuthForgotPassword }
494
+ export { AuthForgotPassword as AuthForgotPassword_alias_1 }
495
+ export { AuthForgotPassword as AuthForgotPassword_alias_2 }
496
+
497
+ declare interface AuthForgotPasswordProps {
498
+ adapter: AuthAdapter;
499
+ signInHref?: string;
500
+ className?: string;
501
+ onSuccess?: () => void;
502
+ }
503
+ export { AuthForgotPasswordProps }
504
+ export { AuthForgotPasswordProps as AuthForgotPasswordProps_alias_1 }
505
+ export { AuthForgotPasswordProps as AuthForgotPasswordProps_alias_2 }
506
+
507
+ export declare const authForgotPasswordSchema: ComponentSchemaDefinition;
508
+
509
+ declare type AuthOtpIntent = "sign-in" | "verify-email" | "mfa";
510
+ export { AuthOtpIntent }
511
+ export { AuthOtpIntent as AuthOtpIntent_alias_1 }
512
+ export { AuthOtpIntent as AuthOtpIntent_alias_2 }
513
+
514
+ /**
515
+ * "Reset password" page. Two fields (new password + confirm) with manual
516
+ * confirm-match and minLength validation. The opaque `token` is forwarded
517
+ * verbatim to `adapter.resetPassword`. Routes the consumer-supplied adapter
518
+ * is responsible for binding the token to a user account on the backend.
519
+ */
520
+ declare function AuthResetPassword({ adapter, token, signInHref, passwordMinLength, className, onSuccess, }: AuthResetPasswordProps): JSX.Element;
521
+ export { AuthResetPassword }
522
+ export { AuthResetPassword as AuthResetPassword_alias_1 }
523
+ export { AuthResetPassword as AuthResetPassword_alias_2 }
524
+
525
+ declare interface AuthResetPasswordProps {
526
+ adapter: AuthAdapter;
527
+ /** Reset token, typically read from `?token=…` by the showcase / consumer route. */
528
+ token: string;
529
+ signInHref?: string;
530
+ passwordMinLength?: number;
531
+ className?: string;
532
+ onSuccess?: (redirect: string | undefined) => void;
533
+ }
534
+ export { AuthResetPasswordProps }
535
+ export { AuthResetPasswordProps as AuthResetPasswordProps_alias_1 }
536
+ export { AuthResetPasswordProps as AuthResetPasswordProps_alias_2 }
537
+
538
+ export declare const authResetPasswordSchema: ComponentSchemaDefinition;
539
+
540
+ declare interface AuthSignInSocialProvider {
541
+ provider: AuthSocialProvider;
542
+ label: string;
543
+ icon?: React_2.ReactNode;
544
+ }
545
+ export { AuthSignInSocialProvider }
546
+ export { AuthSignInSocialProvider as AuthSignInSocialProvider_alias_1 }
547
+ export { AuthSignInSocialProvider as AuthSignInSocialProvider_alias_2 }
548
+
549
+ /**
550
+ * Split-screen sign-in page. Marketing panel on the left (≥lg), credential
551
+ * form on the right. All submit paths route through the supplied
552
+ * `AuthAdapter` — Hex Core never touches credentials directly.
553
+ */
554
+ declare function AuthSignInSplit({ adapter, socialProviders, brand, marketing, signUpHref, forgotPasswordHref, className, onSuccess, }: AuthSignInSplitProps): JSX.Element;
555
+ export { AuthSignInSplit }
556
+ export { AuthSignInSplit as AuthSignInSplit_alias_1 }
557
+ export { AuthSignInSplit as AuthSignInSplit_alias_2 }
558
+
559
+ declare interface AuthSignInSplitProps {
560
+ /** Wires every credential / OAuth call to the consumer's auth library. */
561
+ adapter: AuthAdapter;
562
+ /** Optional list of social-login buttons rendered above the email field. */
563
+ socialProviders?: ReadonlyArray<AuthSignInSocialProvider>;
564
+ /** Brand block (logo + product name) shown at the top of the marketing panel. */
565
+ brand?: React_2.ReactNode;
566
+ /** Marketing copy / quote / illustration shown below the brand block. */
567
+ marketing?: React_2.ReactNode;
568
+ /** Href for the "Sign up" link rendered below the form. */
569
+ signUpHref?: string;
570
+ /** Href for the "Forgot?" link inline with the password label. */
571
+ forgotPasswordHref?: string;
572
+ /** Additional classes applied to the root grid wrapper. */
573
+ className?: string;
574
+ /** Called after a successful sign-in (any flow) with the adapter's redirect target. */
575
+ onSuccess?: (redirect: string | undefined) => void;
576
+ }
577
+ export { AuthSignInSplitProps }
578
+ export { AuthSignInSplitProps as AuthSignInSplitProps_alias_1 }
579
+ export { AuthSignInSplitProps as AuthSignInSplitProps_alias_2 }
580
+
581
+ export declare const authSignInSplitSchema: ComponentSchemaDefinition;
582
+
583
+ /** Centered-card sign-up page. Composes Card + form fields + optional social. */
584
+ declare function AuthSignUpCard({ adapter, socialProviders, signInHref, termsHref, privacyHref, passwordMinLength, className, onSuccess, }: AuthSignUpCardProps): JSX.Element;
585
+ export { AuthSignUpCard }
586
+ export { AuthSignUpCard as AuthSignUpCard_alias_1 }
587
+ export { AuthSignUpCard as AuthSignUpCard_alias_2 }
588
+
589
+ declare interface AuthSignUpCardProps {
590
+ adapter: AuthAdapter;
591
+ socialProviders?: ReadonlyArray<AuthSignUpCardSocialProvider>;
592
+ signInHref?: string;
593
+ termsHref?: string;
594
+ privacyHref?: string;
595
+ passwordMinLength?: number;
596
+ className?: string;
597
+ onSuccess?: (redirect: string | undefined) => void;
598
+ }
599
+ export { AuthSignUpCardProps }
600
+ export { AuthSignUpCardProps as AuthSignUpCardProps_alias_1 }
601
+ export { AuthSignUpCardProps as AuthSignUpCardProps_alias_2 }
602
+
603
+ export declare const authSignUpCardSchema: ComponentSchemaDefinition;
604
+
605
+ declare interface AuthSignUpCardSocialProvider {
606
+ provider: AuthSocialProvider;
607
+ label: string;
608
+ icon?: React_2.ReactNode;
609
+ }
610
+ export { AuthSignUpCardSocialProvider }
611
+ export { AuthSignUpCardSocialProvider as AuthSignUpCardSocialProvider_alias_1 }
612
+ export { AuthSignUpCardSocialProvider as AuthSignUpCardSocialProvider_alias_2 }
613
+
614
+ declare type AuthSocialProvider = "github" | "google" | "microsoft" | (string & {});
615
+ export { AuthSocialProvider }
616
+ export { AuthSocialProvider as AuthSocialProvider_alias_1 }
617
+ export { AuthSocialProvider as AuthSocialProvider_alias_2 }
618
+
619
+ /**
620
+ * Transactional "verify your email" page. Mostly visual — composes the
621
+ * `Empty` primitive with a mail icon plus an optional resend button. The
622
+ * resend button is hidden when `adapter.resendMagicLink` is absent. Rate-
623
+ * limit pressure handled client-side via a cooldown timer.
624
+ */
625
+ declare function AuthVerifyEmail({ adapter, email, resendCooldownSeconds, signInHref, className, }: AuthVerifyEmailProps): JSX.Element;
626
+ export { AuthVerifyEmail }
627
+ export { AuthVerifyEmail as AuthVerifyEmail_alias_1 }
628
+ export { AuthVerifyEmail as AuthVerifyEmail_alias_2 }
629
+
630
+ declare interface AuthVerifyEmailProps {
631
+ adapter: AuthAdapter;
632
+ /** Optional address shown in the description ("we sent a link to <email>"). */
633
+ email?: string;
634
+ /** Seconds to disable the resend button after each successful resend. */
635
+ resendCooldownSeconds?: number;
636
+ /** Href for the "Back to sign in" affordance. */
637
+ signInHref?: string;
638
+ className?: string;
639
+ }
640
+ export { AuthVerifyEmailProps }
641
+ export { AuthVerifyEmailProps as AuthVerifyEmailProps_alias_1 }
642
+ export { AuthVerifyEmailProps as AuthVerifyEmailProps_alias_2 }
643
+
644
+ export declare const authVerifyEmailSchema: ComponentSchemaDefinition;
645
+
646
+ /**
647
+ * One-time-code verification page. Renders an `InputOTP` of `length` slots
648
+ * and submits automatically when the code is full. Routes verification
649
+ * through `adapter.verifyOtp({ code, intent })`. Optional resend button
650
+ * calls `adapter.resendOtp({ intent })` when implemented.
651
+ */
652
+ declare function AuthVerifyOtp({ adapter, intent, length, resendCooldownSeconds, className, onSuccess, }: AuthVerifyOtpProps): JSX.Element;
653
+ export { AuthVerifyOtp }
654
+ export { AuthVerifyOtp as AuthVerifyOtp_alias_1 }
655
+ export { AuthVerifyOtp as AuthVerifyOtp_alias_2 }
656
+
657
+ declare interface AuthVerifyOtpProps {
658
+ adapter: AuthAdapter;
659
+ /** Forwarded verbatim to adapter.verifyOtp({ code, intent }). */
660
+ intent: AuthOtpIntent;
661
+ /** Total number of digits in the code. Defaults to 6. */
662
+ length?: number;
663
+ /** Seconds the resend button stays disabled after each successful resend. */
664
+ resendCooldownSeconds?: number;
665
+ className?: string;
666
+ onSuccess?: (redirect: string | undefined) => void;
667
+ }
668
+ export { AuthVerifyOtpProps }
669
+ export { AuthVerifyOtpProps as AuthVerifyOtpProps_alias_1 }
670
+ export { AuthVerifyOtpProps as AuthVerifyOtpProps_alias_2 }
671
+
672
+ export declare const authVerifyOtpSchema: ComponentSchemaDefinition;
673
+
404
674
  /** Root container for an avatar (image + fallback). */
405
675
  declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
406
676
  export { Avatar }
@@ -448,6 +718,52 @@ declare const badgeVariants: (props?: ({
448
718
  export { badgeVariants }
449
719
  export { badgeVariants as badgeVariants_alias_1 }
450
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
+
451
767
  /** Root nav landmark for breadcrumb navigation. */
452
768
  declare const Breadcrumb: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
453
769
  export { Breadcrumb }
@@ -637,6 +953,68 @@ declare const CardTitle: React_2.ForwardRefExoticComponent<React_2.HTMLAttribute
637
953
  export { CardTitle }
638
954
  export { CardTitle as CardTitle_alias_1 }
639
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
+
640
1018
  /**
641
1019
  * Categorical chart palette for diagram primitives that encode categorical
642
1020
  * data (sunburst, treemap, sankey, chord, funnel, pyramid, venn, matrix).
@@ -781,6 +1159,38 @@ declare const citationSchema: ComponentSchemaDefinition;
781
1159
  export { citationSchema }
782
1160
  export { citationSchema as citationSchema_alias_1 }
783
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
+
784
1194
  declare function Cloze({ parts, revealMode, onReveal, className, ...rest }: ClozeProps): JSX.Element;
785
1195
  export { Cloze }
786
1196
  export { Cloze as Cloze_alias_1 }
@@ -1435,6 +1845,76 @@ declare const ContextMenuTrigger: React_2.ForwardRefExoticComponent<ContextMenuP
1435
1845
  export { ContextMenuTrigger }
1436
1846
  export { ContextMenuTrigger as ContextMenuTrigger_alias_1 }
1437
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
+
1438
1918
  /**
1439
1919
  * Render a data-driven table from TanStack column definitions.
1440
1920
  * @param props - Columns, data, and optional accessible labelling (`caption` or `aria-label`)
@@ -2473,7 +2953,7 @@ export { gridSchema as gridSchema_alias_1 }
2473
2953
  * the schema's `enumValues` serializes them as strings for JSON-shape parity.
2474
2954
  */
2475
2955
  declare const gridVariants: (props?: ({
2476
- cols?: 1 | 2 | 3 | 4 | 6 | "auto-fit" | null | undefined;
2956
+ cols?: 3 | 1 | 2 | 4 | 6 | "auto-fit" | null | undefined;
2477
2957
  gap?: "sm" | "lg" | "md" | "xl" | "xs" | null | undefined;
2478
2958
  align?: "center" | "start" | "end" | "stretch" | null | undefined;
2479
2959
  } & ClassProp) | undefined) => string;
@@ -2569,6 +3049,51 @@ declare const imageOcclusionSchema: ComponentSchemaDefinition;
2569
3049
  export { imageOcclusionSchema }
2570
3050
  export { imageOcclusionSchema as imageOcclusionSchema_alias_1 }
2571
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
+
2572
3097
  declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
2573
3098
  export { Input }
2574
3099
  export { Input as Input_alias_1 }
@@ -2725,31 +3250,35 @@ export { loadingVariants }
2725
3250
  export { loadingVariants as loadingVariants_alias_1 }
2726
3251
 
2727
3252
  /**
2728
- * Renders streaming-safe markdown.
2729
- * @param props - children string + optional Streamdown overrides
2730
- * @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.
2731
3257
  */
2732
3258
  declare function Markdown({ children, className }: MarkdownProps): JSX.Element;
2733
3259
  export { Markdown }
2734
3260
  export { Markdown as Markdown_alias_1 }
2735
3261
 
2736
3262
  /**
2737
- * Streaming-safe markdown renderer. Wraps Vercel's `streamdown` so partial
2738
- * input mid-stream — unclosed code fences, half-typed tags, dangling
2739
- * brackets — renders gracefully instead of throwing or flashing raw text.
3263
+ * Streaming-safe markdown renderer with AI-aware element slots.
2740
3264
  *
2741
- * Public prop surface is intentionally minimal (`children` + `className`)
2742
- * so this primitive's DTS doesn't drag in `streamdown`'s full type graph.
2743
- * Doing so would transitively pull Shiki's 600-literal `BundledLanguage`
2744
- * union into the rollup-dts pass and exhaust heap. For per-element
2745
- * overrides (custom `pre`, `code`, `a`, `img`, mermaid, math, line
2746
- * 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).
2747
3270
  *
2748
- * ```tsx
2749
- * import { Streamdown } from "streamdown";
2750
- * import { CodeBlock } from "@hex-core/components";
2751
- * <Streamdown components={{ pre: (p) => <CodeBlock {...p} /> }}>{md}</Streamdown>
2752
- * ```
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.
2753
3282
  *
2754
3283
  * @example
2755
3284
  * <Message role="assistant">
@@ -3059,6 +3588,17 @@ declare const mindMapSchema: ComponentSchemaDefinition;
3059
3588
  export { mindMapSchema }
3060
3589
  export { mindMapSchema as mindMapSchema_alias_1 }
3061
3590
 
3591
+ /**
3592
+ * In-memory mock adapter for docs showcase + tests. Every method delays
3593
+ * 400ms to simulate a network round-trip and resolves `{ ok: true }`. Do
3594
+ * not use in production — there is no validation, no persistence, and no
3595
+ * security.
3596
+ */
3597
+ declare const mockAuthAdapter: Required<AuthAdapter>;
3598
+ export { mockAuthAdapter }
3599
+ export { mockAuthAdapter as mockAuthAdapter_alias_1 }
3600
+ export { mockAuthAdapter as mockAuthAdapter_alias_2 }
3601
+
3062
3602
  /**
3063
3603
  * Searchable multi-select input built on Command + Popover.
3064
3604
  *
@@ -3342,6 +3882,74 @@ export { parseHslTriplet as parseHslTriplet_alias_1 }
3342
3882
  */
3343
3883
  export declare function pickChartHue(index: number): string;
3344
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
+
3345
3953
  /** Root container for a popover. */
3346
3954
  declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
3347
3955
  export { Popover }
@@ -3544,6 +4152,25 @@ declare const reasoningSchema: ComponentSchemaDefinition;
3544
4152
  export { reasoningSchema }
3545
4153
  export { reasoningSchema as reasoningSchema_alias_1 }
3546
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
+
3547
4174
  /**
3548
4175
  * Draggable separator between panels. Optionally renders a grab-grip dot.
3549
4176
  * @returns A slim, focusable resize handle.
@@ -3614,6 +4241,35 @@ export { Role }
3614
4241
  export { Role as Role_alias_1 }
3615
4242
  export { Role as Role_alias_2 }
3616
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
+
3617
4273
  declare function Sankey({ nodes, links, width, height, nodeAlign, nodeWidth, nodePadding, onLinkHover, onNodeClick, className, ...rest }: SankeyProps): JSX.Element;
3618
4274
  export { Sankey }
3619
4275
  export { Sankey as Sankey_alias_1 }
@@ -3902,6 +4558,55 @@ declare const sheetVariants: (props?: ({
3902
4558
  side?: "top" | "right" | "bottom" | "left" | null | undefined;
3903
4559
  } & ClassProp) | undefined) => string;
3904
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
+
3905
4610
  /**
3906
4611
  * App-shell sidebar. Reads open state from SidebarProvider and animates width.
3907
4612
  * @returns An aside element that expands/collapses.
@@ -4037,6 +4742,61 @@ declare const sonnerSchema: ComponentSchemaDefinition;
4037
4742
  export { sonnerSchema }
4038
4743
  export { sonnerSchema as sonnerSchema_alias_1 }
4039
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
+
4040
4800
  declare function SpacedRepetition({ cardId, onRate, labels, className, ...rest }: SpacedRepetitionProps): JSX.Element;
4041
4801
  export { SpacedRepetition }
4042
4802
  export { SpacedRepetition as SpacedRepetition_alias_1 }
@@ -4502,6 +5262,70 @@ declare const tagVariants: (props?: ({
4502
5262
  export { tagVariants }
4503
5263
  export { tagVariants as tagVariants_alias_1 }
4504
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
+
4505
5329
  /**
4506
5330
  * Renders an xterm.js terminal display.
4507
5331
  * @param props - Terminal output + input handler + display options
@@ -4920,6 +5744,19 @@ export { ToolCallState }
4920
5744
  export { ToolCallState as ToolCallState_alias_1 }
4921
5745
  export { ToolCallState as ToolCallState_alias_2 }
4922
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
+
4923
5760
  /** Root container for a single tooltip. */
4924
5761
  declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
4925
5762
  export { Tooltip }