@layers-app/shared 0.0.29 → 0.0.33

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.
Files changed (91) hide show
  1. package/dist/KanbanLayout-3P7jU91D.js +287 -0
  2. package/dist/TimeLine-DNEQAsfm.js +198 -0
  3. package/dist/api/giphy/slice.d.ts +1 -1
  4. package/dist/api/unsplash/slice.d.ts +1 -1
  5. package/dist/assets/jsons/emoji-categorized.json.d.ts +3 -0
  6. package/dist/assets/jsons/icons.min.json.d.ts +3 -0
  7. package/dist/components/AlertsBlock/index.d.ts +0 -1
  8. package/dist/components/AppContainer/AppContainer.d.ts +4 -10
  9. package/dist/components/AppContainer/components/AllAppsMenu.d.ts +2 -1
  10. package/dist/components/AppContainer/components/DesktopNavbar.d.ts +1 -1
  11. package/dist/components/AppContainer/components/MobileNavbar.d.ts +1 -1
  12. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  13. package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +1 -1
  14. package/dist/components/AppContainer/types.d.ts +4 -0
  15. package/dist/components/AttachmentsGalleryModal/ImageModal.d.ts +0 -1
  16. package/dist/components/BottomDrawerWithoutHeader/index.d.ts +16 -0
  17. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -3
  18. package/dist/components/CommentComposer/index.d.ts +52 -0
  19. package/dist/components/CommentsPanel/components/CommentActions.d.ts +16 -0
  20. package/dist/components/CommentsPanel/components/CommentFilterMenu.d.ts +6 -0
  21. package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +22 -0
  22. package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +3 -0
  23. package/dist/components/CommentsPanel/components/CommentsFilterHeader.d.ts +3 -0
  24. package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +6 -0
  25. package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +6 -0
  26. package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +19 -0
  27. package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +11 -0
  28. package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +5 -0
  29. package/dist/components/CommentsPanel/components/Icon.d.ts +8 -0
  30. package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +11 -0
  31. package/dist/components/CommentsPanel/index.d.ts +22 -0
  32. package/dist/components/CommentsPanel/store.d.ts +19 -0
  33. package/dist/components/CommentsPanel/types.d.ts +244 -0
  34. package/dist/components/CommentsPanel/utils.d.ts +8 -0
  35. package/dist/components/CommunitiesDialog/index.d.ts +4 -0
  36. package/dist/components/EmojiPicker/EmojiPanel.d.ts +2 -2
  37. package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -2
  38. package/dist/components/EmojiPicker/constants.d.ts +2 -0
  39. package/dist/components/EmojiPicker/types.d.ts +13 -0
  40. package/dist/components/ErrorPage/components/Error404.d.ts +2 -18
  41. package/dist/components/FilePicker/FilePickerUpload.d.ts +1 -1
  42. package/dist/components/InfoMenu/index.d.ts +1 -0
  43. package/dist/components/LanguagePicker/LanguagePicker.d.ts +6 -0
  44. package/dist/components/Logotype.d.ts +2 -1
  45. package/dist/components/NavbarResizer/NavbarResizer.d.ts +0 -1
  46. package/dist/components/NewColorPicker/index.d.ts +1 -1
  47. package/dist/components/NewColorPicker/types.d.ts +0 -1
  48. package/dist/components/NoData/NoData.d.ts +3 -0
  49. package/dist/components/NotPublicPanel/NotPublicPanel.d.ts +11 -0
  50. package/dist/components/OnBoarding/steps/DifferentLayouts/TimeLine.d.ts +1 -1
  51. package/dist/components/PaymentCancel/PaymentCancel.d.ts +1 -0
  52. package/dist/components/PaymentError/PaymentError.d.ts +1 -0
  53. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +1 -0
  54. package/dist/components/ProjectIcon/ProjectIcon.d.ts +6 -6
  55. package/dist/components/RichText/index.d.ts +4 -4
  56. package/dist/components/SearchFilters/components/SearchHelp.d.ts +0 -1
  57. package/dist/components/SortableList/SortableList.d.ts +4 -4
  58. package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts +3 -1
  59. package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +8 -0
  60. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +7 -0
  61. package/dist/components/StorageUsageEntityList/index.d.ts +2 -0
  62. package/dist/components/StorageUsageProgress/index.d.ts +15 -0
  63. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +1 -0
  64. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts +9 -1
  65. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +12 -3
  66. package/dist/emoji-categorized-DAOdcF53.js +4 -0
  67. package/dist/helpers/generateLink.d.ts +1 -1
  68. package/dist/helpers/getFileIcons.d.ts +1 -0
  69. package/dist/helpers/getFileType.d.ts +1 -0
  70. package/dist/helpers/pickRandomIcon.d.ts +1 -1
  71. package/dist/hooks/useDisableWindowScroll.d.ts +1 -0
  72. package/dist/hooks/useNumberQueryParam.d.ts +1 -1
  73. package/dist/hooks/useSwipeDetect.d.ts +1 -1
  74. package/dist/icons.min-Chyr-bjL.js +4 -0
  75. package/dist/index-nUzOFDJF.js +39587 -0
  76. package/dist/index.d.ts +18 -2
  77. package/dist/index.esm-BKxri7AJ.js +6814 -0
  78. package/dist/index.js +126 -46264
  79. package/dist/index.umd.cjs +86 -800
  80. package/dist/store/discordDialogStore.d.ts +8 -0
  81. package/dist/store/plansModal.d.ts +7 -0
  82. package/dist/store/timezoneStore.d.ts +1 -1
  83. package/dist/store/workspacesOrder.d.ts +1 -1
  84. package/dist/utils/formatStorage.d.ts +6 -0
  85. package/package.json +2 -2
  86. package/dist/components/EmojiPicker/icons.json.d.ts +0 -80399
  87. package/dist/components/ErrorAlert/ErrorAlert.story.d.ts +0 -8
  88. package/dist/components/LanguagePicker/index.d.ts +0 -11
  89. package/dist/components/NewColorPicker/NewColorPicker.story.d.ts +0 -6
  90. package/dist/icons-DayTtENI.js +0 -5658
  91. package/dist/store/pageUpdateCount.d.ts +0 -12
@@ -1,19 +1,3 @@
1
- /// <reference types="react" />
2
- export declare const Error404: ({ title, description, buttons, closeAction, ...props }: {
3
- title?: import('react').ReactNode;
4
- titleProps?: import('@mantine/core').TitleProps | undefined;
5
- description?: import('react').ReactNode;
6
- descriptionProps?: import('@mantine/core').TextProps | undefined;
7
- buttons?: (import('@mantine/core').ButtonProps & {
8
- component?: "button" | undefined;
9
- } & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "component" | keyof import('@mantine/core').ButtonProps> & {
10
- ref?: ((instance: HTMLButtonElement | null) => void) | import('react').RefObject<HTMLButtonElement> | null | undefined;
11
- renderRoot?: ((props: any) => any) | undefined;
12
- })[] | undefined;
13
- illustration?: string | undefined;
14
- size?: number | undefined;
15
- width?: number | undefined;
16
- height?: number | undefined;
17
- } & import('@mantine/core').StackProps & {
18
- closeAction?: (() => void) | undefined;
1
+ export declare const Error404: ({ title, description, buttons, closeAction, ...props }: import('../../..').NoDataProps & {
2
+ closeAction?: () => void;
19
3
  }) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,6 @@ import { FilePickerLocales } from './types';
3
3
  export declare const FilePickerUpload: ({ locales, uploading, dropZoneProps, onUpload, }: {
4
4
  locales: FilePickerLocales;
5
5
  uploading: boolean;
6
- dropZoneProps?: Omit<DropzoneProps, 'onDrop'>;
6
+ dropZoneProps?: Omit<DropzoneProps, "onDrop">;
7
7
  onUpload: (files: FileWithPath[]) => void;
8
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const InfoMenu: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface LanguagePickerProps {
2
+ value: string;
3
+ onChange: (value: string) => void;
4
+ }
5
+ export declare const LanguagePicker: ({ value, onChange }: LanguagePickerProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,7 +1,8 @@
1
1
  import { FlexProps } from '@mantine/core';
2
2
  import { default as LayersLogoIcon } from '../assets/layers-logo-icon.svg?react';
3
- export declare const Logotype: ({ minified, isLink, ...props }: FlexProps & {
3
+ export declare const Logotype: ({ minified, isLink, to, ...props }: FlexProps & {
4
4
  minified?: boolean;
5
5
  isLink?: boolean;
6
+ to?: string;
6
7
  }) => import("react/jsx-runtime").JSX.Element;
7
8
  export { LayersLogoIcon };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const NavbarResizer: import('react').MemoExoticComponent<({ width, onChange, showResizer, }: {
3
2
  width?: number;
4
3
  onChange?: (v: number) => void;
@@ -14,5 +14,5 @@ interface IProps<T extends IColorDictionary, M extends readonly (keyof T)[]> {
14
14
  hint?: 'tooltip' | 'title';
15
15
  alpha?: number;
16
16
  }
17
- export declare const NewColorPicker: <T extends IColorDictionary, M extends readonly ("color" | "background" | keyof T)[]>(props: IProps<T, M>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const NewColorPicker: <T extends IColorDictionary, M extends readonly (keyof WithDefaults<T>)[]>(props: IProps<T, M>) => import("react/jsx-runtime").JSX.Element;
18
18
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface IColor {
3
2
  label: string;
4
3
  value: string;
@@ -16,6 +16,9 @@ export declare const illustrationMap: {
16
16
  noGroups: FC<import('react').SVGProps<SVGSVGElement>>;
17
17
  noNotifications: FC<import('react').SVGProps<SVGSVGElement>>;
18
18
  noWorkspaces: FC<import('react').SVGProps<SVGSVGElement>>;
19
+ paymentSuccess: FC<import('react').SVGProps<SVGSVGElement>>;
20
+ notSuccessMan: FC<import('react').SVGProps<SVGSVGElement>>;
21
+ alertMan: FC<import('react').SVGProps<SVGSVGElement>>;
19
22
  '404': FC<import('react').SVGProps<SVGSVGElement>>;
20
23
  '500': FC<import('react').SVGProps<SVGSVGElement>>;
21
24
  };
@@ -0,0 +1,11 @@
1
+ type Props = {
2
+ entityData: any;
3
+ handlePublish: () => void;
4
+ isPublishing?: boolean;
5
+ PreviewComponent?: React.FC<{
6
+ data: any;
7
+ }>;
8
+ zoom?: boolean;
9
+ };
10
+ export declare const NotPublicPanel: ({ entityData, handlePublish, isPublishing, PreviewComponent, zoom, }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -1,2 +1,2 @@
1
- declare const TimeLine: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TimeLine: () => import("react/jsx-runtime").JSX.Element | null;
2
2
  export default TimeLine;
@@ -0,0 +1 @@
1
+ export declare const PaymentCancel: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PaymentError: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PaymentSuccess: () => import("react/jsx-runtime").JSX.Element;
@@ -11,13 +11,13 @@ export declare namespace IconEntity {
11
11
  }
12
12
  /** Используется для отображения бокса с иконкой или первой буквы имени */
13
13
  export declare const ProjectIcon: import('react').ForwardRefExoticComponent<{
14
- icon?: string | null | undefined;
15
- name?: string | null | undefined;
14
+ icon?: string | null;
15
+ name?: string | null;
16
16
  fallback?: ReactNode;
17
- fallbackColorById?: string | undefined;
18
- initials?: boolean | undefined;
17
+ fallbackColorById?: string;
18
+ initials?: boolean;
19
19
  } & Omit<AvatarProps, "name" | "color"> & {
20
- size?: string | number | undefined;
21
- textSize?: number | undefined;
20
+ size?: number | string;
21
+ textSize?: number;
22
22
  } & import('react').RefAttributes<HTMLDivElement>>;
23
23
  export {};
@@ -7,7 +7,7 @@ interface IProps {
7
7
  onChange?: (v: string) => void;
8
8
  }
9
9
  export declare const RichText: import('react').ForwardRefExoticComponent<IProps & {
10
- children?: import('react').ReactNode;
10
+ children?: import('react').ReactNode | undefined;
11
11
  } & import('react').RefAttributes<HTMLDivElement>> & {
12
12
  Content: (props: RichTextEditorContentProps) => import("react/jsx-runtime").JSX.Element;
13
13
  Bold: () => import("react/jsx-runtime").JSX.Element;
@@ -24,11 +24,11 @@ export declare const RichText: import('react').ForwardRefExoticComponent<IProps
24
24
  CheckList: () => import("react/jsx-runtime").JSX.Element;
25
25
  FontSize: () => import("react/jsx-runtime").JSX.Element;
26
26
  ColorPicker: ({ staticBg, onChange, }: {
27
- staticBg?: boolean | undefined;
28
- onChange?: ((v: {
27
+ staticBg?: boolean;
28
+ onChange?: (v: {
29
29
  value: string;
30
30
  mode: string;
31
- }) => void) | undefined;
31
+ }) => void;
32
32
  }) => import("react/jsx-runtime").JSX.Element;
33
33
  };
34
34
  export interface IRichTextRef extends HTMLDivElement {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const openSearchHelpModal: () => void;
3
2
  export declare const closeSearchHelpModal: () => void;
4
3
  export declare const SearchHelpModal: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { UniqueIdentifier } from '@dnd-kit/core';
2
+ import { DragEndEvent, DragStartEvent, UniqueIdentifier } from '@dnd-kit/core';
3
3
  import { SortableItem } from './components';
4
4
  interface BaseItem {
5
5
  id: UniqueIdentifier;
@@ -7,9 +7,9 @@ interface BaseItem {
7
7
  interface Props<T extends BaseItem> {
8
8
  items: T[];
9
9
  onChange(items: T[]): void;
10
- renderItem(item: T, index: number): ReactNode;
11
- onDragStart?(): void;
12
- onDragEnd?(): void;
10
+ renderItem(item: T, index?: number): ReactNode;
11
+ onDragStart?: (event: DragStartEvent) => void;
12
+ onDragEnd?: (event: DragEndEvent) => void;
13
13
  gap?: number;
14
14
  }
15
15
  export declare function SortableList<T extends BaseItem>({ items, onChange, renderItem, onDragStart, onDragEnd, gap, }: Props<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,13 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { UniqueIdentifier } from '@dnd-kit/core';
3
+ import { ActionIconProps } from '@mantine/core';
3
4
  import { IconProps } from '@tabler/icons-react';
4
5
  interface Props {
5
6
  id: UniqueIdentifier;
6
7
  }
7
8
  export declare function SortableItem({ children, id }: PropsWithChildren<Props>): import("react/jsx-runtime").JSX.Element;
8
- export declare function DragHandle({ iconProps }: {
9
+ export declare function DragHandle({ iconProps, actionIconProps, }: {
9
10
  iconProps?: IconProps;
11
+ actionIconProps?: ActionIconProps;
10
12
  }): import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -0,0 +1,8 @@
1
+ import { StorageItem } from '../StorageUsageProgress';
2
+ interface StorageEntityItemProps extends StorageItem {
3
+ percentage: number;
4
+ }
5
+ export declare const StorageEntityItem: ({ category, }: {
6
+ category: StorageEntityItemProps;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { StorageItem } from '../StorageUsageProgress';
2
+ interface StorageEntityListProps {
3
+ storageByCategory: StorageItem[];
4
+ totalStorageKb: number;
5
+ }
6
+ export declare const StorageEntityList: ({ storageByCategory, totalStorageKb, }: StorageEntityListProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './StorageUsageEntityList';
2
+ export * from './StorageEntityItem';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ export type StorageCategory = 'archives' | 'documents' | 'audio' | 'images' | 'other' | 'code' | 'videos';
3
+ export interface StorageItem {
4
+ type: StorageCategory;
5
+ usedKb: number;
6
+ }
7
+ interface StorageUsageProgressProps {
8
+ simple?: boolean;
9
+ color?: string;
10
+ storageByCategory: StorageItem[];
11
+ totalStorageKb: number;
12
+ size?: number;
13
+ }
14
+ export declare const StorageUsageProgress: React.FC<StorageUsageProgressProps>;
15
+ export {};
@@ -5,6 +5,7 @@ interface UserAvatarProps extends AvatarProps, Omit<React.ComponentPropsWithoutR
5
5
  workspace?: MenuWorkspace | null;
6
6
  isActiveIndicator?: boolean;
7
7
  indicatorProps?: IndicatorProps;
8
+ useMultiple?: boolean;
8
9
  }
9
10
  export declare const WorkspaceAvatar: React.ForwardRefExoticComponent<UserAvatarProps & React.RefAttributes<HTMLDivElement>>;
10
11
  export {};
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+ import { DragHandle } from '../SortableList/components';
2
3
  import { MenuWorkspace, RightSectionProps } from './WorkspaceMenu';
3
4
  interface WorkspaceItemProps<W extends MenuWorkspace = MenuWorkspace> {
4
5
  RightSection?: FC<RightSectionProps>;
@@ -6,6 +7,13 @@ interface WorkspaceItemProps<W extends MenuWorkspace = MenuWorkspace> {
6
7
  workspace: W;
7
8
  active?: W | null;
8
9
  setOpenedWorkspacesList?: (o: boolean) => void;
10
+ DragHandle: typeof DragHandle;
11
+ plan?: JSX.Element;
12
+ handleDecline?: (workspace: MenuWorkspace) => void;
13
+ dragEvent?: {
14
+ isDragging: boolean;
15
+ dragId: string;
16
+ };
9
17
  }
10
- export declare const WorkspaceItem: ({ workspace, onClick, active, RightSection, setOpenedWorkspacesList, }: WorkspaceItemProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const WorkspaceItem: ({ workspace, onClick, active, RightSection, setOpenedWorkspacesList, DragHandle, plan, dragEvent, }: WorkspaceItemProps) => import("react/jsx-runtime").JSX.Element;
11
19
  export {};
@@ -1,10 +1,19 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- export type MenuWorkspace = {
2
+ export interface MenuWorkspace {
3
3
  workspaceId: string;
4
4
  workspaceName: string;
5
5
  workspaceIcon: string;
6
6
  invitation?: string | null;
7
- };
7
+ storageLimitKb?: number;
8
+ storageUsedKb?: number;
9
+ storageAvailableKb?: number;
10
+ storageByCategory?: Array<{
11
+ type: 'videos' | 'documents' | 'images' | 'other' | 'audio' | 'archives' | 'code';
12
+ usedKb: number;
13
+ }>;
14
+ plan?: string;
15
+ handleDeclineInvite?: (workspace: MenuWorkspace) => void;
16
+ }
8
17
  export type RightSectionProps = {
9
18
  isActive: boolean;
10
19
  workspace: MenuWorkspace;
@@ -25,4 +34,4 @@ export type WorkspaceMenuProps<W extends MenuWorkspace = MenuWorkspace> = PropsW
25
34
  publicMode?: boolean;
26
35
  RightSection?: FC<RightSectionProps>;
27
36
  }>;
28
- export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, settingsLink, membersLink, workspaceLink, canInvite, canEditWorkspace, RightSection, isAnonym, publicMode, }: WorkspaceMenuProps<W>) => import("react/jsx-runtime").JSX.Element;
37
+ export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, workspaceLink, settingsLink, RightSection, canEditWorkspace, isAnonym, publicMode, }: WorkspaceMenuProps<W>) => import("react/jsx-runtime").JSX.Element;