@simoncomputing/mui-bueno-v2 0.17.0 → 0.17.2

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,7 +11,26 @@ 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.17.0] - 2025-09-TBD
14
+ ## [0.17.2] - 2025-09-16
15
+
16
+ ### Added
17
+
18
+ - MUI Themes (common, light & dark) are now exported
19
+
20
+ ## [0.17.1] - 2025-09-16
21
+
22
+ ### Fixed
23
+
24
+ - `CitationField`:
25
+ - fixed "empty" node lingering after citation has been deleted
26
+ - fixed bubble menu getting cut off when going to different pages on the citation paginated table
27
+
28
+ ### Changed
29
+
30
+ - `CitationFieldProvider` - optimized to only fetch citation data from API on initial load to reduce excessive API calls. As a compromise, paginated fetches made by the citation table in the `CitationField` bubble menu will automatically update any outdated citations in the provider's local citation list.
31
+ - `CitationMenu` - renamed `onContentUpdate` prop to `onContentChange`
32
+
33
+ ## [0.17.0] - 2025-09-11
15
34
 
16
35
  ### Changed
17
36
 
@@ -78,9 +78,11 @@ export type CitationFieldProps = {
78
78
  /**
79
79
  * Rich Text field -- uses MUI Tip Tap
80
80
  *
81
- * Formik -- This field cannot be completely controlled, so keep in mind that the Formik value will not update until the field
82
- * __loses focus__. This is to prevent issues with converting from rich text to HTML as the user types as it could override
83
- * their changes unintentionally.
81
+ * IMPORTANT: As per Mui TipTap's documentation, it's not efficient to use it as a fully controlled component since the
82
+ * editor content has to be serialized to HTML (which is what is stored in Formik). Therefore, keep in mind that what is
83
+ * shown in the editor will not match the Formik value until the field __loses focus__.
84
+ *
85
+ * Recommended to use with `CitationFieldProvider` for cross-field synchronization.
84
86
  */
85
87
  export declare const CitationField: (props: CitationFieldProps) => import("react/jsx-runtime").JSX.Element;
86
88
  export default CitationField;
@@ -1,9 +1,10 @@
1
1
  import { Citation } from '../../../../../@types';
2
2
  interface SyncContextType {
3
3
  citations: Citation[];
4
- resync: () => void;
4
+ isLoaded: boolean;
5
5
  addUpdateCitation: (citation: Citation) => void;
6
6
  deleteCitation: (id: number) => void;
7
+ batchUpdate: (newCitations: Citation[]) => void;
7
8
  }
8
9
  export declare const SyncContext: import('react').Context<SyncContextType | undefined>;
9
10
  export declare const useCitationSync: () => SyncContextType;
@@ -4,5 +4,14 @@ type CitationFieldProviderProps = {
4
4
  children: React.ReactNode;
5
5
  getCitations: () => Promise<Citation[]>;
6
6
  };
7
+ /**
8
+ * CitationFieldProvider ensures `CitationField` stays in sync with other `CitationField` components. Always
9
+ * use when multiple `CitationField` components are on the same page.
10
+ *
11
+ * NOTE: The provider is optimized to reduce excessive API calls. Currently, it will only perform the inital full
12
+ * data fetch on initial load. Subsequent changes are updated locally based on what add/update/delete actions
13
+ * are made by the user, but any remote additions/updates/deletions will not be fetched. Keep this in mind when
14
+ * deciding what level to place the provider in your app so that you can control how often the provider is initialized.
15
+ */
7
16
  export declare const CitationFieldProvider: React.FC<CitationFieldProviderProps>;
8
17
  export {};
@@ -40,7 +40,7 @@ export interface CitationMenuProps {
40
40
  *
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
- onContentUpdate?: () => void;
43
+ onContentChange?: () => void;
44
44
  /**
45
45
  * Error callback.
46
46
  *
@@ -70,5 +70,5 @@ export declare enum CitationMenuState {
70
70
  *
71
71
  * Intended to be used within a bubble/pop-up/modal/dialog. For in-line citations, see CitationField instead.
72
72
  */
73
- export declare function CitationMenu({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onSelectCitations, onCancel, initialSelectedIds, onContentUpdate, onError, }: CitationMenuProps): import("react/jsx-runtime").JSX.Element;
73
+ export declare function CitationMenu({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, }: CitationMenuProps): import("react/jsx-runtime").JSX.Element;
74
74
  export default CitationMenu;
@@ -19,6 +19,7 @@ export type CitationTableProps = {
19
19
  */
20
20
  onError?: (err: string) => void;
21
21
  setError: React.Dispatch<React.SetStateAction<CitationMenuError | undefined>>;
22
+ setSuccess: React.Dispatch<React.SetStateAction<string | undefined>>;
22
23
  };
23
24
  declare const CitationTable: (props: CitationTableProps) => import("react/jsx-runtime").JSX.Element;
24
25
  export default CitationTable;