@discuss-ds/ui 0.30.1 → 0.31.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.
package/dist/index.d.cts CHANGED
@@ -322,6 +322,13 @@ declare const FormMessage: React.ForwardRefExoticComponent<FormMessageProps & Re
322
322
  /** `September 23, 2026 - 11:30 AM` (or just the date when `showTime` is false). */
323
323
  declare function formatDateTime(date: Date, showTime?: boolean): string;
324
324
 
325
+ interface InlineEditMark {
326
+ start: number;
327
+ end: number;
328
+ /** Corrections offered in the mark's card, best first (at most three are shown). Used with `onMarkApply`: with one the card has an Apply button; with several each is a choice applied by a click on it and there is no Apply button. An empty string offers to remove the marked text (the button reads "Remove"). */
329
+ suggestions?: string[];
330
+ }
331
+
325
332
  interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
326
333
  /** Controlled value. Pair with `onValueChange`. */
327
334
  value?: string;
@@ -366,7 +373,7 @@ interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
366
373
  /**
367
374
  * `default` is a rounded field. A short single-line label shows the pencil and hugs its text; `multiline` (longer
368
375
  * text) hides the pencil and fills the width. `question` is for question text: it fills the width with no pencil,
369
- * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px accent border while `selected`. Enter saves; Shift+Enter adds a
376
+ * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px muted accent border while `selected` (light enough to stay distinct from the destructive underline of a marked word). Enter saves; Shift+Enter adds a
370
377
  * line break when `multiline`.
371
378
  */
372
379
  variant?: 'default' | 'question';
@@ -374,6 +381,19 @@ interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
374
381
  selected?: boolean;
375
382
  /** Classes for the displayed/edited text, e.g. a heading text style. The field itself keeps the same box. */
376
383
  textClassName?: string;
384
+ /**
385
+ * Ranges of the saved text to underline in the destructive colour, for example misspelled words found by a spell checker. `start` is the
386
+ * first character and `end` the one after the last. Read mode only: the text box shown while editing has no underline. Ranges that are
387
+ * out of bounds, empty or overlapping are ignored.
388
+ */
389
+ marks?: InlineEditMark[];
390
+ /**
391
+ * Makes each mark clickable: clicking an underlined word opens a small card with the marked text, its `suggestions` and a Dismiss action,
392
+ * instead of starting the edit. Called with the mark and the suggestion the reader chose; apply it to the value yourself.
393
+ */
394
+ onMarkApply?: (mark: InlineEditMark, replacement: string) => void;
395
+ /** Called when the reader dismisses a mark from its card. Remove the mark to make the underline go away. */
396
+ onMarkDismiss?: (mark: InlineEditMark) => void;
377
397
  }
378
398
  declare const InlineEdit: React.ForwardRefExoticComponent<InlineEditProps & React.RefAttributes<HTMLDivElement>>;
379
399
 
@@ -663,6 +683,12 @@ declare const OpenEndAnswer: React.ForwardRefExoticComponent<OpenEndAnswerProps
663
683
 
664
684
  declare const QuestionCard: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
665
685
 
686
+ type QuestionType = 'select-one' | 'select-multiple' | 'ranking' | 'upload' | 'rating' | 'open-end' | 'screen-recording';
687
+ interface QuestionTypeIconProps extends Omit<IconProps, 'weight'> {
688
+ type: QuestionType;
689
+ }
690
+ declare function QuestionTypeIcon({ type, size, className, ...props }: QuestionTypeIconProps): React.JSX.Element;
691
+
666
692
  interface QuestionEditorCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "onChange"> {
667
693
  /** Question number shown in the drag-handle tag. */
668
694
  number: number;
@@ -709,6 +735,14 @@ interface QuestionEditorCardProps extends Omit<React.HTMLAttributes<HTMLDivEleme
709
735
  dragHandleProps?: React.ComponentPropsWithRef<'span'>;
710
736
  /** Whether the grip icon shows in the "Question N" tag on hover. Defaults to true; set false when the card can't be moved. See `QuestionHeader`. */
711
737
  showDragHandle?: boolean;
738
+ /** The question's type, shown as an icon in the "Question N" tag in its default and selected states (the grip replaces it on hover). See `QuestionHeader`. */
739
+ questionType?: QuestionType;
740
+ /** Ranges of the saved question text to underline in the destructive colour, such as misspelled words. See `QuestionHeader`'s `titleMarks`. */
741
+ titleMarks?: InlineEditMark[];
742
+ /** Makes the underlined words clickable; called with the mark and the chosen correction. See `QuestionHeader`'s `onTitleMarkApply`. */
743
+ onTitleMarkApply?: (mark: InlineEditMark, replacement: string) => void;
744
+ /** Called when a mark is dismissed from its card. */
745
+ onTitleMarkDismiss?: (mark: InlineEditMark) => void;
712
746
  }
713
747
  declare const QuestionEditorCard: React.ForwardRefExoticComponent<QuestionEditorCardProps & React.RefAttributes<HTMLDivElement>>;
714
748
 
@@ -764,15 +798,20 @@ interface QuestionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
764
798
  * can't be moved (for example while a translation is being edited), so the tag doesn't suggest dragging.
765
799
  */
766
800
  showDragHandle?: boolean;
801
+ /**
802
+ * Editor mode: the question's type, shown as a 16px icon at the start of the "Question N" tag in its default and selected states.
803
+ * On hover or focus (when the tag can be dragged) the grip icon replaces it. Leave it out for a tag with the number only.
804
+ */
805
+ questionType?: QuestionType;
806
+ /** Editor mode: ranges of the saved title to underline in the destructive colour (misspelled words, for example). See `InlineEdit`'s `marks`. */
807
+ titleMarks?: InlineEditMark[];
808
+ /** Editor mode: makes the underlined words clickable; called with the mark and the chosen correction. See `InlineEdit`'s `onMarkApply`. */
809
+ onTitleMarkApply?: (mark: InlineEditMark, replacement: string) => void;
810
+ /** Editor mode: called when a mark is dismissed from its card. See `InlineEdit`'s `onMarkDismiss`. */
811
+ onTitleMarkDismiss?: (mark: InlineEditMark) => void;
767
812
  }
768
813
  declare const QuestionHeader: React.ForwardRefExoticComponent<QuestionHeaderProps & React.RefAttributes<HTMLDivElement>>;
769
814
 
770
- type QuestionType = 'select-one' | 'select-multiple' | 'ranking' | 'upload' | 'rating' | 'open-end' | 'screen-recording';
771
- interface QuestionTypeIconProps extends Omit<IconProps, 'weight'> {
772
- type: QuestionType;
773
- }
774
- declare function QuestionTypeIcon({ type, size, className, ...props }: QuestionTypeIconProps): React.JSX.Element;
775
-
776
815
  interface QuestionNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
777
816
  /** The question currently open in the editor. */
778
817
  selected?: boolean;
@@ -874,8 +913,17 @@ interface QuestionOptionEditorProps {
874
913
  * are shared with the original.
875
914
  */
876
915
  locked?: boolean;
916
+ /**
917
+ * Ranges of the label to underline in the destructive colour, for example misspelled words found by a spell checker. The underline shows
918
+ * while the label is not being edited. See `InlineEdit`'s `marks`.
919
+ */
920
+ marks?: InlineEditMark[];
921
+ /** Makes each mark clickable: clicking an underlined word opens a card with the corrections and a Dismiss action. See `InlineEdit`'s `onMarkApply`. */
922
+ onMarkApply?: (mark: InlineEditMark, replacement: string) => void;
923
+ /** Called when a mark is dismissed from its card. */
924
+ onMarkDismiss?: (mark: InlineEditMark) => void;
877
925
  }
878
- declare function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTone, minLength, maxLength, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked }: QuestionOptionEditorProps): React.JSX.Element;
926
+ declare function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTone, minLength, maxLength, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked, marks, onMarkApply, onMarkDismiss }: QuestionOptionEditorProps): React.JSX.Element;
879
927
 
880
928
  interface RankItemData {
881
929
  id: string;
@@ -1087,4 +1135,4 @@ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onCha
1087
1135
  }
1088
1136
  declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
1089
1137
 
1090
- export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, StimulusCard, type StimulusCardProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastInlineVariant, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
1138
+ export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditMark, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, StimulusCard, type StimulusCardProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastInlineVariant, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
package/dist/index.d.ts CHANGED
@@ -322,6 +322,13 @@ declare const FormMessage: React.ForwardRefExoticComponent<FormMessageProps & Re
322
322
  /** `September 23, 2026 - 11:30 AM` (or just the date when `showTime` is false). */
323
323
  declare function formatDateTime(date: Date, showTime?: boolean): string;
324
324
 
325
+ interface InlineEditMark {
326
+ start: number;
327
+ end: number;
328
+ /** Corrections offered in the mark's card, best first (at most three are shown). Used with `onMarkApply`: with one the card has an Apply button; with several each is a choice applied by a click on it and there is no Apply button. An empty string offers to remove the marked text (the button reads "Remove"). */
329
+ suggestions?: string[];
330
+ }
331
+
325
332
  interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
326
333
  /** Controlled value. Pair with `onValueChange`. */
327
334
  value?: string;
@@ -366,7 +373,7 @@ interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
366
373
  /**
367
374
  * `default` is a rounded field. A short single-line label shows the pencil and hugs its text; `multiline` (longer
368
375
  * text) hides the pencil and fills the width. `question` is for question text: it fills the width with no pencil,
369
- * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px accent border while `selected`. Enter saves; Shift+Enter adds a
376
+ * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px muted accent border while `selected` (light enough to stay distinct from the destructive underline of a marked word). Enter saves; Shift+Enter adds a
370
377
  * line break when `multiline`.
371
378
  */
372
379
  variant?: 'default' | 'question';
@@ -374,6 +381,19 @@ interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
374
381
  selected?: boolean;
375
382
  /** Classes for the displayed/edited text, e.g. a heading text style. The field itself keeps the same box. */
376
383
  textClassName?: string;
384
+ /**
385
+ * Ranges of the saved text to underline in the destructive colour, for example misspelled words found by a spell checker. `start` is the
386
+ * first character and `end` the one after the last. Read mode only: the text box shown while editing has no underline. Ranges that are
387
+ * out of bounds, empty or overlapping are ignored.
388
+ */
389
+ marks?: InlineEditMark[];
390
+ /**
391
+ * Makes each mark clickable: clicking an underlined word opens a small card with the marked text, its `suggestions` and a Dismiss action,
392
+ * instead of starting the edit. Called with the mark and the suggestion the reader chose; apply it to the value yourself.
393
+ */
394
+ onMarkApply?: (mark: InlineEditMark, replacement: string) => void;
395
+ /** Called when the reader dismisses a mark from its card. Remove the mark to make the underline go away. */
396
+ onMarkDismiss?: (mark: InlineEditMark) => void;
377
397
  }
378
398
  declare const InlineEdit: React.ForwardRefExoticComponent<InlineEditProps & React.RefAttributes<HTMLDivElement>>;
379
399
 
@@ -663,6 +683,12 @@ declare const OpenEndAnswer: React.ForwardRefExoticComponent<OpenEndAnswerProps
663
683
 
664
684
  declare const QuestionCard: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
665
685
 
686
+ type QuestionType = 'select-one' | 'select-multiple' | 'ranking' | 'upload' | 'rating' | 'open-end' | 'screen-recording';
687
+ interface QuestionTypeIconProps extends Omit<IconProps, 'weight'> {
688
+ type: QuestionType;
689
+ }
690
+ declare function QuestionTypeIcon({ type, size, className, ...props }: QuestionTypeIconProps): React.JSX.Element;
691
+
666
692
  interface QuestionEditorCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "onChange"> {
667
693
  /** Question number shown in the drag-handle tag. */
668
694
  number: number;
@@ -709,6 +735,14 @@ interface QuestionEditorCardProps extends Omit<React.HTMLAttributes<HTMLDivEleme
709
735
  dragHandleProps?: React.ComponentPropsWithRef<'span'>;
710
736
  /** Whether the grip icon shows in the "Question N" tag on hover. Defaults to true; set false when the card can't be moved. See `QuestionHeader`. */
711
737
  showDragHandle?: boolean;
738
+ /** The question's type, shown as an icon in the "Question N" tag in its default and selected states (the grip replaces it on hover). See `QuestionHeader`. */
739
+ questionType?: QuestionType;
740
+ /** Ranges of the saved question text to underline in the destructive colour, such as misspelled words. See `QuestionHeader`'s `titleMarks`. */
741
+ titleMarks?: InlineEditMark[];
742
+ /** Makes the underlined words clickable; called with the mark and the chosen correction. See `QuestionHeader`'s `onTitleMarkApply`. */
743
+ onTitleMarkApply?: (mark: InlineEditMark, replacement: string) => void;
744
+ /** Called when a mark is dismissed from its card. */
745
+ onTitleMarkDismiss?: (mark: InlineEditMark) => void;
712
746
  }
713
747
  declare const QuestionEditorCard: React.ForwardRefExoticComponent<QuestionEditorCardProps & React.RefAttributes<HTMLDivElement>>;
714
748
 
@@ -764,15 +798,20 @@ interface QuestionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
764
798
  * can't be moved (for example while a translation is being edited), so the tag doesn't suggest dragging.
765
799
  */
766
800
  showDragHandle?: boolean;
801
+ /**
802
+ * Editor mode: the question's type, shown as a 16px icon at the start of the "Question N" tag in its default and selected states.
803
+ * On hover or focus (when the tag can be dragged) the grip icon replaces it. Leave it out for a tag with the number only.
804
+ */
805
+ questionType?: QuestionType;
806
+ /** Editor mode: ranges of the saved title to underline in the destructive colour (misspelled words, for example). See `InlineEdit`'s `marks`. */
807
+ titleMarks?: InlineEditMark[];
808
+ /** Editor mode: makes the underlined words clickable; called with the mark and the chosen correction. See `InlineEdit`'s `onMarkApply`. */
809
+ onTitleMarkApply?: (mark: InlineEditMark, replacement: string) => void;
810
+ /** Editor mode: called when a mark is dismissed from its card. See `InlineEdit`'s `onMarkDismiss`. */
811
+ onTitleMarkDismiss?: (mark: InlineEditMark) => void;
767
812
  }
768
813
  declare const QuestionHeader: React.ForwardRefExoticComponent<QuestionHeaderProps & React.RefAttributes<HTMLDivElement>>;
769
814
 
770
- type QuestionType = 'select-one' | 'select-multiple' | 'ranking' | 'upload' | 'rating' | 'open-end' | 'screen-recording';
771
- interface QuestionTypeIconProps extends Omit<IconProps, 'weight'> {
772
- type: QuestionType;
773
- }
774
- declare function QuestionTypeIcon({ type, size, className, ...props }: QuestionTypeIconProps): React.JSX.Element;
775
-
776
815
  interface QuestionNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
777
816
  /** The question currently open in the editor. */
778
817
  selected?: boolean;
@@ -874,8 +913,17 @@ interface QuestionOptionEditorProps {
874
913
  * are shared with the original.
875
914
  */
876
915
  locked?: boolean;
916
+ /**
917
+ * Ranges of the label to underline in the destructive colour, for example misspelled words found by a spell checker. The underline shows
918
+ * while the label is not being edited. See `InlineEdit`'s `marks`.
919
+ */
920
+ marks?: InlineEditMark[];
921
+ /** Makes each mark clickable: clicking an underlined word opens a card with the corrections and a Dismiss action. See `InlineEdit`'s `onMarkApply`. */
922
+ onMarkApply?: (mark: InlineEditMark, replacement: string) => void;
923
+ /** Called when a mark is dismissed from its card. */
924
+ onMarkDismiss?: (mark: InlineEditMark) => void;
877
925
  }
878
- declare function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTone, minLength, maxLength, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked }: QuestionOptionEditorProps): React.JSX.Element;
926
+ declare function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTone, minLength, maxLength, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked, marks, onMarkApply, onMarkDismiss }: QuestionOptionEditorProps): React.JSX.Element;
879
927
 
880
928
  interface RankItemData {
881
929
  id: string;
@@ -1087,4 +1135,4 @@ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onCha
1087
1135
  }
1088
1136
  declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
1089
1137
 
1090
- export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, StimulusCard, type StimulusCardProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastInlineVariant, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
1138
+ export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditMark, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, StimulusCard, type StimulusCardProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastInlineVariant, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };