@simoncomputing/mui-bueno-v2 0.33.3 → 0.34.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/CHANGELOG.md CHANGED
@@ -11,6 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
  - Minor increment --> singlular/minor changes. Minimal breaking changes.
12
12
  - Patch increment --> singlular/minor changes. Zero breaking changes.
13
13
 
14
+ ## [0.34.0] - 2026-07-06
15
+
16
+ ### Added
17
+
18
+ - `CitationField`
19
+ - `onComment?: (selectedText: string) => void` (prop) - if defined, shows "Comments" button in the menu bar. Clicking the button will trigger this callback
20
+ - `canComment?: boolean` (prop) - enables/disables Comment button (`onComment` must be defined)
21
+ - `commentCount?: number;` (prop) - shows count in badge on Comment button
22
+ - `commentResolved?: boolean;` (prop) - shows green checkmark in badge on Comment button
23
+
14
24
  ## [0.33.3] - 2026-07-06
15
25
 
16
26
  ### Changed
@@ -1,6 +1,7 @@
1
1
  import { Citation, PageResponse, PageState } from '../../../../@types';
2
2
  import { BaseInputProps } from '../BaseInputProps';
3
3
  import { BaseCitationManagerApiProps } from './CitationManager/BaseCitationManager';
4
+ import { CommentProps } from './MenuComment/MenuComment';
4
5
  export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps & {
5
6
  /**
6
7
  * API call for fetching SELECTED citations. Used instead of getCitationsPaginated when the component is readOnly.
@@ -69,7 +70,7 @@ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps &
69
70
  * WARNING: Does not work perfectly, due to conflicts with debounced formik value.
70
71
  */
71
72
  redoUndo?: boolean;
72
- };
73
+ } & CommentProps;
73
74
  /**
74
75
  * Rich Text field -- uses MUI Tip Tap
75
76
  *
@@ -0,0 +1,22 @@
1
+ import { MenuButtonProps } from 'mui-tiptap';
2
+ export type CommentProps = {
3
+ /**
4
+ * Enables/disables comment button (To be used with `onComment`)
5
+ */
6
+ canComment?: boolean;
7
+ /**
8
+ * If defined, shows "Comments" button in the menu bar. Clicking the button will trigger this callback.
9
+ * @param selectedText If the user has selected text within the field, the selected text will be passed here.
10
+ */
11
+ onComment?: (selectedText: string) => void;
12
+ /**
13
+ * Shows badge with count on comment button
14
+ */
15
+ commentCount?: number;
16
+ /**
17
+ * Shows green checkmark badge on comment button
18
+ */
19
+ commentResolved?: boolean;
20
+ };
21
+ export type MenuCommentProps = Partial<MenuButtonProps> & CommentProps;
22
+ export default function MenuComment({ canComment, onComment, commentCount, commentResolved, ...menuButtonProps }: MenuCommentProps): import("react/jsx-runtime").JSX.Element | null;