@lax-wp/editor 0.2.0 → 0.2.1

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.
@@ -1,5 +1,7 @@
1
+ import type { TEditorMode } from "@/constants/Toolbar";
1
2
  interface EditorSidebarProps {
2
3
  position?: 'left' | 'right';
4
+ currentMode: TEditorMode;
3
5
  }
4
- export declare const EditorSidebar: ({ position }: EditorSidebarProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const EditorSidebar: ({ position, currentMode }: EditorSidebarProps) => import("react/jsx-runtime").JSX.Element;
5
7
  export {};
@@ -0,0 +1,8 @@
1
+ interface CropImageModalProps {
2
+ open: boolean;
3
+ imageUrl: string;
4
+ onApply: (croppedImage: string) => void;
5
+ onCancel: () => void;
6
+ }
7
+ export declare const CropImageModal: React.FC<CropImageModalProps>;
8
+ export default CropImageModal;
@@ -0,0 +1,16 @@
1
+ import { type FC } from 'react';
2
+ type FileUploadProps = {
3
+ getFile: (file: any, fileName?: string) => void;
4
+ description?: string;
5
+ errorMessage?: string;
6
+ disabled?: boolean;
7
+ defaultFile?: any;
8
+ acceptedFiles?: string;
9
+ isLoading?: boolean;
10
+ asBase64?: boolean;
11
+ multiple?: boolean;
12
+ onDelete?: () => void;
13
+ hideSelectedFile?: boolean;
14
+ };
15
+ export declare const FileUpload: FC<FileUploadProps>;
16
+ export default FileUpload;
@@ -3,6 +3,7 @@ export interface SidebarTool {
3
3
  icon: React.ReactNode;
4
4
  label: string;
5
5
  content?: React.ReactNode;
6
+ notVisible?: boolean;
6
7
  }
7
8
  export interface ExpandableSidebarProps {
8
9
  tools: SidebarTool[];
@@ -1,8 +1,4 @@
1
1
  export interface AddElementContentProps {
2
- onAddImage?: () => void;
3
- onAddTable?: () => void;
4
- onAddCodeBlock?: () => void;
5
- onAddDivider?: () => void;
6
2
  onClose?: () => void;
7
3
  }
8
- export declare const AddElementContent: ({ onAddImage, onAddTable, onAddCodeBlock, onAddDivider, onClose }: AddElementContentProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const AddElementContent: ({ onClose }: AddElementContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export interface ImageContentProps {
2
+ onInsert?: (imageData: ImageData) => void;
3
+ onBack?: () => void;
4
+ onClose?: () => void;
5
+ }
6
+ export interface ImageData {
7
+ url: string;
8
+ fileName: string;
9
+ fileSize: number;
10
+ alignment: 'left' | 'center' | 'right' | 'full';
11
+ borderWeight: number;
12
+ borderColor: string;
13
+ cornerRadius: number;
14
+ }
15
+ export declare const ImageContent: ({ onInsert, onBack, onClose }: ImageContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,8 @@
1
+ import type { TEditorMode } from "@/constants/Toolbar";
1
2
  export interface SearchContentProps {
2
3
  onSearch?: (query: string) => void;
3
4
  onReplace?: (searchTerm: string, replaceTerm: string) => void;
4
5
  onClose?: () => void;
6
+ currentMode: TEditorMode;
5
7
  }
6
- export declare const SearchContent: ({ onClose }: SearchContentProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const SearchContent: ({ onClose, currentMode }: SearchContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
1
  export { ExportContent, type ExportContentProps } from './ExportContent';
2
2
  export { SearchContent, type SearchContentProps } from './SearchContent';
3
3
  export { AddElementContent, type AddElementContentProps } from './AddElementContent';
4
+ export { ImageContent, type ImageContentProps, type ImageData } from './ImageContent';
@@ -10,6 +10,9 @@ export interface CustomImageExtensionAttributes {
10
10
  title?: string;
11
11
  width?: number;
12
12
  align?: AlignType;
13
+ borderWeight?: number;
14
+ borderColor?: string;
15
+ cornerRadius?: number;
13
16
  }
14
17
  export declare const CustomImageExtension: import("@tiptap/core").Node<CustomImageExtensionOptions, any>;
15
18
  export default CustomImageExtension;
@@ -0,0 +1,3 @@
1
+ import { Extension } from '@tiptap/core';
2
+ export declare const DragDropPlugin: Extension<any, any>;
3
+ export default DragDropPlugin;