@simoncomputing/mui-bueno-v2 0.33.3 → 0.34.1

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,33 @@ 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.1] - 2026-07-06
15
+
16
+ ### Added
17
+
18
+ - `CitationField`
19
+ - Comments can be added in read-only mode
20
+
21
+ ### Changed
22
+
23
+ - `CitationField`
24
+ - `canComment` will hide the comment button at all when false. Previously, the button was disabled but still visible.
25
+
26
+ ### Removed
27
+
28
+ - `CitationField`
29
+ - `notApplicableName` (prop)
30
+
31
+ ## [0.34.0] - 2026-07-06
32
+
33
+ ### Added
34
+
35
+ - `CitationField`
36
+ - `onComment?: (selectedText: string) => void` (prop) - if defined, shows "Comments" button in the menu bar. Clicking the button will trigger this callback
37
+ - `canComment?: boolean` (prop) - enables/disables Comment button (`onComment` must be defined)
38
+ - `commentCount?: number;` (prop) - shows count in badge on Comment button
39
+ - `commentResolved?: boolean;` (prop) - shows green checkmark in badge on Comment button
40
+
14
41
  ## [0.33.3] - 2026-07-06
15
42
 
16
43
  ### 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.
@@ -45,12 +46,6 @@ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps &
45
46
  * Placeholder text. Default "Start typing here..."
46
47
  */
47
48
  placeholder?: string;
48
- /**
49
- * [prototype] If defined, a "Not Applicable" checkbox is displayed.
50
- *
51
- * NOTE: This feature is a prototype and is not fully implemented.
52
- */
53
- notApplicableName?: string;
54
49
  /**
55
50
  * When provided and the function returns true,
56
51
  * users will be allowed to launch URLs
@@ -69,7 +64,7 @@ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps &
69
64
  * WARNING: Does not work perfectly, due to conflicts with debounced formik value.
70
65
  */
71
66
  redoUndo?: boolean;
72
- };
67
+ } & CommentProps;
73
68
  /**
74
69
  * Rich Text field -- uses MUI Tip Tap
75
70
  *
@@ -0,0 +1,25 @@
1
+ import { MenuButtonProps } from 'mui-tiptap';
2
+ import { Editor } from '@tiptap/core';
3
+ export type CommentProps = {
4
+ /**
5
+ * Enables/disables comment button (To be used with `onComment`)
6
+ */
7
+ canComment?: boolean;
8
+ /**
9
+ * If defined, shows "Comments" button in the menu bar. Clicking the button will trigger this callback.
10
+ * @param selectedText If the user has selected text within the field, the selected text will be passed here.
11
+ */
12
+ onComment?: (selectedText: string) => void;
13
+ /**
14
+ * Shows badge with count on comment button
15
+ */
16
+ commentCount?: number;
17
+ /**
18
+ * Shows green checkmark badge on comment button
19
+ */
20
+ commentResolved?: boolean;
21
+ };
22
+ export type MenuCommentProps = Partial<MenuButtonProps> & CommentProps & {
23
+ editor?: Editor | null;
24
+ };
25
+ export default function MenuComment({ editor, canComment, onComment, commentCount, commentResolved, ...menuButtonProps }: MenuCommentProps): import("react/jsx-runtime").JSX.Element | null;