jamespot-react-components 1.3.132 → 1.3.133

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.
@@ -31,6 +31,8 @@ type JRCCommentProps = {
31
31
  socialActionsSlot?: ReactNode;
32
32
  /** Lets the container defer work that only writing needs. */
33
33
  onEditorOpen?: () => void;
34
+ /** Caps a long comment behind a "see more" button. Streams only — elsewhere comments show whole. */
35
+ collapseLongComments?: boolean;
34
36
  };
35
- export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, onError, highlightFields, userModel, userAccountStatus, isWidgetActive, onGetHashError, deleteFile, existingWidgetsWrapperComponent, activeDrives, socialQuestion, articleId, socialActionsSlot, onEditorOpen, }: JRCCommentProps) => import("react").JSX.Element;
37
+ export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, onError, highlightFields, userModel, userAccountStatus, isWidgetActive, onGetHashError, deleteFile, existingWidgetsWrapperComponent, activeDrives, socialQuestion, articleId, socialActionsSlot, onEditorOpen, collapseLongComments, }: JRCCommentProps) => import("react").JSX.Element;
36
38
  export {};
@@ -44,7 +44,11 @@ export type JRCCommentsBlocProps = {
44
44
  onDisplayMore?: () => void;
45
45
  /** Opens the new-comment editor on mount instead of showing the placeholder first. */
46
46
  newCommentDefaultExpanded?: boolean;
47
+ /** Focus the editor opened by `newCommentDefaultExpanded`. Off by default — it scrolls the page. */
48
+ newCommentAutofocusOnMount?: boolean;
47
49
  /** Lets the container defer work that only writing needs. */
48
50
  onEditorOpen?: () => void;
51
+ /** Caps a long comment behind a "see more" button. Streams only — elsewhere comments show whole. */
52
+ collapseLongComments?: boolean;
49
53
  };
50
- export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, onGetHashError, activeDrives, variant, canComment, socialQuestion, articleId, additionalExtensions, renderSocialActions, commentsCount, onDisplayMore, newCommentDefaultExpanded, onEditorOpen, }: JRCCommentsBlocProps) => import("react").JSX.Element;
54
+ export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, onGetHashError, activeDrives, variant, canComment, socialQuestion, articleId, additionalExtensions, renderSocialActions, commentsCount, onDisplayMore, newCommentDefaultExpanded, newCommentAutofocusOnMount, onEditorOpen, collapseLongComments, }: JRCCommentsBlocProps) => import("react").JSX.Element;
@@ -20,9 +20,12 @@ export type JRCNewCommentProps = {
20
20
  additionalExtensions: Array<TinyMCEExtension>;
21
21
  /** Open the TinyMCE editor on mount instead of waiting for a click on the placeholder. */
22
22
  defaultExpanded?: boolean;
23
+ /** Focus the editor when `defaultExpanded` opened it. Off by default: stealing focus without a
24
+ * click scrolls the page to whichever entry mounted last. */
25
+ autofocusOnMount?: boolean;
23
26
  /** When false, the publish button is enabled even with empty content. Default true. */
24
27
  requireContent?: boolean;
25
28
  /** Lets the container defer work that only writing needs. */
26
29
  onEditorOpen?: () => void;
27
30
  };
28
- export declare const JRCNewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, activeDrives, canCreateWidget, socialQuestion, deleteFile, additionalExtensions, defaultExpanded, requireContent, onEditorOpen, }: JRCNewCommentProps) => import("react").JSX.Element;
31
+ export declare const JRCNewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, activeDrives, canCreateWidget, socialQuestion, deleteFile, additionalExtensions, defaultExpanded, autofocusOnMount, requireContent, onEditorOpen, }: JRCNewCommentProps) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.3.132",
3
+ "version": "1.3.133",
4
4
  "description": "",
5
5
  "main": "dist/jamespot-react-components.cjs",
6
6
  "module": "dist/jamespot-react-components.js",
@@ -60,8 +60,8 @@
60
60
  "eslint-plugin-storybook": "10.3.6",
61
61
  "globals": "^16.5.0",
62
62
  "html2canvas": "^1.4.1",
63
- "jamespot-front-business": "^1.3.132",
64
- "jamespot-user-api": "^1.3.132",
63
+ "jamespot-front-business": "^1.3.133",
64
+ "jamespot-user-api": "^1.3.133",
65
65
  "jsdom": "^26.1.0",
66
66
  "knip": "^5.88.1",
67
67
  "lint-staged": "^16.4.0",