@layers-app/shared 0.0.41 → 0.0.42

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.
@@ -11,7 +11,7 @@ import "@mantine/form";
11
11
  import "@mantine/dropzone";
12
12
  import "@mantine/notifications";
13
13
  import "lodash-es";
14
- import { u as useOnboardingState, S as StatusBadge } from "./index-Bo9kCsKS.js";
14
+ import { u as useOnboardingState, S as StatusBadge } from "./index-BMtIEojG.js";
15
15
  import "react-dom";
16
16
  import "draggable-ui";
17
17
  import "@mantine/modals";
@@ -1,5 +1,15 @@
1
- type Props = {
2
- attachmentId: string;
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ type BaseProps = {
3
+ stylesContainer?: CSSProperties;
4
+ autoPlay?: boolean;
5
+ loader?: ReactNode;
3
6
  };
4
- export declare const ShakaVideoPlayer: ({ attachmentId }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ type Props = (BaseProps & {
8
+ attachmentId: string;
9
+ src?: never;
10
+ }) | (BaseProps & {
11
+ src: string;
12
+ attachmentId?: never;
13
+ });
14
+ export declare const ShakaVideoPlayer: ({ attachmentId, stylesContainer, src, autoPlay, loader, }: Props) => import("react/jsx-runtime").JSX.Element;
5
15
  export {};
@@ -1,5 +1,5 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { RangeSelection } from '@layers-app/editor';
2
+ import { RangeSelection, EditorType } from '@layers-app/editor';
3
3
  import { Comment, CommentsNs, GeneralComment, ICommentFile, ICommentOptions, IUser, Thread } from '../CommentsPanel/types.ts';
4
4
  import * as React from 'react';
5
5
  interface CommentValue {
@@ -14,6 +14,7 @@ interface CommentComposerProps {
14
14
  setCommentValue: React.Dispatch<React.SetStateAction<CommentValue>>;
15
15
  commentValue: CommentValue;
16
16
  registerClearEditor?: (fn: () => void) => void;
17
+ editorRef?: React.MutableRefObject<EditorType | null>;
17
18
  }) => React.ReactNode;
18
19
  getSelectionText?: (selection: RangeSelection) => string;
19
20
  removeCommentImage?: (index: string) => void;
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'> {
6
6
  comments: Comments;
7
7
  activeIDs: string[];
8
+ restoreComment?: (commentId: string, threadId?: string) => void;
8
9
  storeOptions: StoreOptions;
9
10
  updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
10
11
  deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
@@ -22,5 +23,5 @@ interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'>
22
23
  setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
23
24
  isLoading: boolean;
24
25
  }
25
- export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, locales, getEditor, setCommentsFilter, commentsFilter, clipPath, isLoading, isSidebar, }: CommentsPanelProps): ReactElement;
26
+ export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, restoreComment, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, locales, getEditor, setCommentsFilter, commentsFilter, clipPath, isLoading, isSidebar, }: CommentsPanelProps): ReactElement;
26
27
  export {};
@@ -7,6 +7,8 @@ export type EmojiPickerProps = {
7
7
  position?: FloatingPosition;
8
8
  popoverProps?: PopoverProps;
9
9
  locales?: EmojiPickerLocales;
10
+ showRemoveButton?: boolean;
11
+ withinPortal?: boolean;
10
12
  showIcons?: boolean;
11
13
  showColors?: boolean;
12
14
  showEmojis?: boolean;
@@ -28,4 +30,4 @@ export type EmojiPickerLocales = {
28
30
  icons?: string;
29
31
  emojiCategory?: Record<string, string>;
30
32
  };
31
- export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, locales: _locales, openWhen, triggerRegex, typingSeq, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, withinPortal, locales: _locales, openWhen, triggerRegex, typingSeq, showRemoveButton, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { AvatarProps } from '@mantine/core';
3
3
  import { MenuUser } from '../AppContainer/components/MenuUserDropdown';
4
- export type ProfilePictureType = {
5
- url: string;
6
- };
7
4
  export interface UserAvatarProps extends AvatarProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof AvatarProps> {
8
5
  user?: MenuUser | null;
9
6
  }
@@ -0,0 +1,4 @@
1
+ export declare function useOutsideClick<T extends HTMLElement = HTMLElement>(handler: (event: MouseEvent | PointerEvent) => void, options?: {
2
+ events?: string[];
3
+ enabled?: boolean;
4
+ }): import('react').MutableRefObject<T | null>;