@simoncomputing/mui-bueno-v2 0.14.7 → 0.14.9

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,32 @@ 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.14.9] - 2025-07-03
15
+
16
+ ### Added
17
+
18
+ - `CitationField`: Added `citationMaxLength` prop to set the max length of citation superscript labels. Note: this affects _individual_ citations, so comma-delimited citations (multiple selected) will be longer than `citationMaxLength`.
19
+
20
+ ### Changed
21
+
22
+ - `CitationField`: Inline citations now have tooltips which will show details about the citation(s) when hovered, without having to open the pop-up menu.
23
+ - `CitationField`/`CitationMenu`: Updated `Accessed At` field to include a date picker.
24
+ - `CitationFieldProvider`: Will track ALL changes to a citation. Previously, it ignored updates to citations unless the title of a citation was changed. With the addition of the tooltips, all changes will be tracked in order for the data in the tooltips to be accurate.
25
+
26
+ ### Removed
27
+
28
+ - `CitationField`/`CitationMenu`: renamed Classification options
29
+
30
+ ### Fixed
31
+
32
+ - `CitationField`: Fixed auto-truncation of citation superscript labels which was removed by accident during one of the previous refactors.
33
+
34
+ ## [0.14.8] - 2025-07-02
35
+
36
+ ### Removed
37
+
38
+ - `CitationField`: removed `getCitationsByIds` prop since it was no longer being used
39
+
14
40
  ## [0.14.7] - 2025-07-01
15
41
 
16
42
  **Important: Starting v0.14.7, this library will be published under the `simoncomputing` org in NPM, so please update your `mui-bueno-v2` import in `package.json` to `@simoncomputing/mui-bueno-v2`.**
@@ -28,6 +28,15 @@ export type CitationFieldProps = {
28
28
  * Margin for the FormControl
29
29
  */
30
30
  margin?: 'dense' | 'none' | 'normal';
31
+ /**
32
+ * Max length of the citation label(s) in the editor before they are truncated. This applies to individual citation(s)
33
+ * so comma-delimited citations will be longer than `citationMaxLength`.
34
+ *
35
+ * Note: Uses lodash truncate, so the omission (...) is included in the max length count.
36
+ *
37
+ * @default 24
38
+ */
39
+ citationMaxLength?: number;
31
40
  /**
32
41
  * API call for fetching paginated citations. These will populate the "Insert Citation/Attachment(s)" table.
33
42
  *
@@ -63,13 +72,6 @@ export type CitationFieldProps = {
63
72
  * Mui Bueno can handle updating state.
64
73
  */
65
74
  onStoreAttachment: (citation: UnsavedAttachment) => Promise<Citation>;
66
- /**
67
- * API call for retrieving an array citations by an array ids
68
- *
69
- * If an error occurs during the API call, notify the user then throw the error so that
70
- * Mui Bueno can handle updating state.
71
- */
72
- getCitationsByIds: (ids: number[]) => Promise<Citation[]>;
73
75
  /**
74
76
  * Error callback.
75
77
  *
@@ -2,7 +2,7 @@ import { Citation, UnsavedAttachment } from '../../../../../@types';
2
2
  import { CitationMenuError } from './CitationMenu';
3
3
  export type NewAttachmentFormProps = {
4
4
  id?: number;
5
- onSave: (citation: UnsavedAttachment, isTitleChanged: boolean) => Promise<void>;
5
+ onSave: (citation: UnsavedAttachment) => Promise<void>;
6
6
  onCancel: () => void;
7
7
  getCitationById: (id: number) => Promise<Citation>;
8
8
  disableFileUpload?: boolean;
@@ -24,4 +24,4 @@ export type CitationBubbleMenuProps = Partial<Except<ControlledBubbleMenuProps,
24
24
  * update, which will happen if it's a child of the component using
25
25
  * `useEditor`).
26
26
  */
27
- export default function CitationBubbleMenuTipTap({ fetchExistingCitations, onCreateCitation, onUpdateCitation, getCitationById, onStoreAttachment, onTitleChanged, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export default function CitationBubbleMenuTipTap({ fetchExistingCitations, onCreateCitation, onUpdateCitation, getCitationById, onStoreAttachment, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,11 +1,11 @@
1
1
  import { Citation, UnsavedCitation } from '../../../../../@types';
2
2
  import { CitationMenuError } from './CitationMenu';
3
- export type NewCitationFormProps = {
3
+ export type CitationFormProps = {
4
4
  id?: number;
5
- onSave: (citation: UnsavedCitation, isTitleChanged: boolean) => Promise<void>;
5
+ onSave: (citation: UnsavedCitation) => Promise<void>;
6
6
  onCancel: () => void;
7
7
  getCitationById: (id: number) => Promise<Citation>;
8
8
  setError: React.Dispatch<React.SetStateAction<CitationMenuError | undefined>>;
9
9
  };
10
- declare const NewCitationForm: (props: NewCitationFormProps) => import("react/jsx-runtime").JSX.Element;
11
- export default NewCitationForm;
10
+ declare const CitationForm: (props: CitationFormProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default CitationForm;
@@ -41,10 +41,6 @@ export interface CitationMenuProps {
41
41
  * Currently, this will be called when the data in the citations table changes, and when the content itself changes (ex. clicks on "Add Citation")
42
42
  */
43
43
  onContentUpdate?: () => void;
44
- /**
45
- * Optional callback, used to notify parent that the user has changed their Citation's title.
46
- */
47
- onTitleChanged?: (citation: Citation) => void;
48
44
  /**
49
45
  * Error callback.
50
46
  *
@@ -74,5 +70,5 @@ export declare enum CitationMenuState {
74
70
  *
75
71
  * Intended to be used within a bubble/pop-up/modal/dialog. For in-line citations, see CitationField instead.
76
72
  */
77
- export declare function CitationMenu({ fetchExistingCitations, onCreateCitation, onUpdateCitation, getCitationById, onStoreAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentUpdate, onTitleChanged, onError, }: CitationMenuProps): import("react/jsx-runtime").JSX.Element;
73
+ export declare function CitationMenu({ fetchExistingCitations, onCreateCitation, onUpdateCitation, getCitationById, onStoreAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentUpdate, onError, }: CitationMenuProps): import("react/jsx-runtime").JSX.Element;
78
74
  export default CitationMenu;