@lax-wp/editor 0.0.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.
- package/README.md +724 -0
- package/dist/components/Editor.d.ts +6 -0
- package/dist/components/EditorShell.d.ts +1 -0
- package/dist/components/PresentationControls.d.ts +6 -0
- package/dist/components/base/Button.d.ts +14 -0
- package/dist/components/base/Button1.d.ts +24 -0
- package/dist/components/base/ColorPicker.d.ts +14 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/common/ScrollbarWrapper.d.ts +5 -0
- package/dist/components/common/SkeletonLine.d.ts +6 -0
- package/dist/components/common/SvgIcon.d.ts +15 -0
- package/dist/components/footer/index.d.ts +5 -0
- package/dist/components/menubar/BubbleMenuContent.d.ts +6 -0
- package/dist/components/menubar/bubble-menu/DefaultBubbleMenuContent.d.ts +1 -0
- package/dist/components/menubar/bubble-menu/ImageMenuContent.d.ts +1 -0
- package/dist/components/menubar/bubble-menu/LinkActions.d.ts +4 -0
- package/dist/components/menubar/bubble-menu/LinkMenuContent.d.ts +1 -0
- package/dist/components/menubar/bubble-menu/index.d.ts +4 -0
- package/dist/components/node/ImageNode.d.ts +5 -0
- package/dist/components/shared/BasicFontStyleOptions.d.ts +1 -0
- package/dist/components/shared/ClearTextFormatButton.d.ts +1 -0
- package/dist/components/shared/FontSizeStepper.d.ts +1 -0
- package/dist/components/shared/InsertLinkButton.d.ts +4 -0
- package/dist/components/shared/ParagraphAlignmentOptions.d.ts +1 -0
- package/dist/components/toolbar/ClassicToolbar.d.ts +8 -0
- package/dist/components/toolbar/Divider.d.ts +1 -0
- package/dist/components/toolbar/FontStyleOptions.d.ts +4 -0
- package/dist/components/toolbar/HeadingOptions.d.ts +6 -0
- package/dist/components/toolbar/HomeOptions.d.ts +6 -0
- package/dist/components/toolbar/InsertOptions.d.ts +6 -0
- package/dist/components/toolbar/ItemGroup.d.ts +6 -0
- package/dist/components/toolbar/LinkActionsModal.d.ts +14 -0
- package/dist/components/toolbar/LinkModal.d.ts +16 -0
- package/dist/components/toolbar/OrderedListTypeDropdownContent.d.ts +7 -0
- package/dist/components/toolbar/ParagraphStyleOption.d.ts +6 -0
- package/dist/components/toolbar/ProfessionalToolbar.d.ts +8 -0
- package/dist/components/toolbar/RenderToolbarTabContent.d.ts +6 -0
- package/dist/components/toolbar/ScrollableContent.d.ts +14 -0
- package/dist/components/toolbar/Toolbar.d.ts +10 -0
- package/dist/components/toolbar/ToolbarButtonItem.d.ts +15 -0
- package/dist/components/toolbar/ToolbarDropdown.d.ts +5 -0
- package/dist/components/toolbar/UnorderedListTypeDropdownContent.d.ts +7 -0
- package/dist/components/toolbar/export/index.d.ts +1 -0
- package/dist/components/toolbar/home/FontStyleOptions.d.ts +1 -0
- package/dist/components/toolbar/home/HeadingOptions.d.ts +1 -0
- package/dist/components/toolbar/home/OrderedListTypeDropdownContent.d.ts +5 -0
- package/dist/components/toolbar/home/ParagraphStyleOption.d.ts +1 -0
- package/dist/components/toolbar/home/UnorderedListTypeDropdownContent.d.ts +5 -0
- package/dist/components/toolbar/home/index.d.ts +1 -0
- package/dist/components/toolbar/index.d.ts +11 -0
- package/dist/components/toolbar/insert/CodeBlockToolbar.d.ts +8 -0
- package/dist/components/toolbar/insert/DividerDropdownContent.d.ts +5 -0
- package/dist/components/toolbar/insert/ImageUploadForm.d.ts +6 -0
- package/dist/components/toolbar/insert/LinkForm.d.ts +10 -0
- package/dist/components/toolbar/insert/index.d.ts +1 -0
- package/dist/components/toolbar/page/PageBackgroundColorPicker.d.ts +8 -0
- package/dist/components/toolbar/page/PageMarginPicker.d.ts +8 -0
- package/dist/components/toolbar/page/PageOrientationSelector.d.ts +8 -0
- package/dist/components/toolbar/page/PageSizeSelector.d.ts +13 -0
- package/dist/components/toolbar/page/index.d.ts +1 -0
- package/dist/components/toolbar/table/TableSelector.d.ts +8 -0
- package/dist/components/toolbar/table/index.d.ts +1 -0
- package/dist/config/editorConfig.d.ts +43 -0
- package/dist/constants/AI.d.ts +2 -0
- package/dist/constants/CodeBlock.d.ts +8 -0
- package/dist/constants/Common.d.ts +8 -0
- package/dist/constants/DividerLineTypes.d.ts +4 -0
- package/dist/constants/Fonts.d.ts +8 -0
- package/dist/constants/Footer.d.ts +1 -0
- package/dist/constants/Heading.d.ts +42 -0
- package/dist/constants/Image.d.ts +15 -0
- package/dist/constants/LinkConstants.d.ts +4 -0
- package/dist/constants/PageBackground.d.ts +4 -0
- package/dist/constants/Paragraphs.d.ts +12 -0
- package/dist/constants/TinkConstants.d.ts +4 -0
- package/dist/constants/Toolbar.d.ts +25 -0
- package/dist/constants/base.d.ts +1 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/contexts/EditorShellContext.d.ts +15 -0
- package/dist/contexts/ToolbarContext.d.ts +25 -0
- package/dist/editor.css +1 -0
- package/dist/extensions/AIAutoCompletion.d.ts +38 -0
- package/dist/extensions/CodeBlockWithToolbar.d.ts +28 -0
- package/dist/extensions/CustomImageExtension.d.ts +15 -0
- package/dist/extensions/HorizontalRuleWithStyle.d.ts +10 -0
- package/dist/extensions/Indent.d.ts +15 -0
- package/dist/extensions/ListItemWithDepthLimit.d.ts +4 -0
- package/dist/extensions/OnBlurHighlight.d.ts +2 -0
- package/dist/extensions/OrderedListWithType.d.ts +9 -0
- package/dist/extensions/PageBackground.d.ts +20 -0
- package/dist/extensions/PageBreak.d.ts +16 -0
- package/dist/extensions/PageMargin.d.ts +79 -0
- package/dist/extensions/UnorderedListWithType.d.ts +9 -0
- package/dist/extensions/VariableTable.d.ts +4 -0
- package/dist/extensions/VariableText.d.ts +39 -0
- package/dist/extensions/index.d.ts +2 -0
- package/dist/hooks/useCodeEditor.d.ts +25 -0
- package/dist/hooks/useExport.d.ts +7 -0
- package/dist/hooks/useFontStyleMethods.d.ts +19 -0
- package/dist/hooks/useHeadingStyleMethods.d.ts +3 -0
- package/dist/hooks/useHomeOptionMethods.d.ts +13 -0
- package/dist/hooks/useHorizontalScroll.d.ts +13 -0
- package/dist/hooks/useImageAlignment.d.ts +12 -0
- package/dist/hooks/useImageResize.d.ts +17 -0
- package/dist/hooks/useImageUpload.d.ts +17 -0
- package/dist/hooks/useInsertOptionMethods.d.ts +4 -0
- package/dist/hooks/useLinks.d.ts +15 -0
- package/dist/hooks/usePageMethods.d.ts +56 -0
- package/dist/hooks/useParagraphStyleMethods.d.ts +16 -0
- package/dist/hooks/usePresentationMode.d.ts +7 -0
- package/dist/hooks/useTableMethods.d.ts +12 -0
- package/dist/hooks/useTiptapEditorState.d.ts +40 -0
- package/dist/hooks/useZoom.d.ts +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +64287 -0
- package/dist/index.umd.js +196 -0
- package/dist/lax-wp-editor.css +1 -0
- package/dist/utils/Common.d.ts +1 -0
- package/dist/utils/svgIconRegistry.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +117 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EditorShell: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface PresentationControlsProps {
|
|
2
|
+
onPresentationModeToggle: () => void;
|
|
3
|
+
onLaserToggle?: (isActive: boolean) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const PresentationControls: ({ onPresentationModeToggle, onLaserToggle }: PresentationControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
size?: 'extra-small' | 'small' | 'medium' | 'large';
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
buttonRef?: RefObject<HTMLButtonElement>;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: ({ id, children, className, title, size, disabled, active, buttonRef, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ItemType } from 'antd/es/menu/interface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IButtonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
primary?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
id: string;
|
|
11
|
+
status?: IButtonStatus;
|
|
12
|
+
appearance?: IButtonAppearance;
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
15
|
+
badge?: string | number;
|
|
16
|
+
type?: 'button' | 'submit' | 'reset';
|
|
17
|
+
options?: ItemType[];
|
|
18
|
+
tooltip?: string;
|
|
19
|
+
tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
20
|
+
}
|
|
21
|
+
export type IButtonStatus = 'secondary-neutral' | 'primary' | 'secondary' | 'error' | 'warning' | 'success' | 'error-secondary' | 'cancel' | 'no-background' | 'publish' | 'default';
|
|
22
|
+
export type IButtonAppearance = 'filled' | 'outline' | 'ghost' | 'dashed';
|
|
23
|
+
declare const Button: React.FC<IButtonProps>;
|
|
24
|
+
export default Button;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface HorizontalLayoutColorPickerProps {
|
|
3
|
+
id: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
showNone?: boolean;
|
|
8
|
+
presetColorsPanel?: ReactNode;
|
|
9
|
+
contentWidth?: number;
|
|
10
|
+
onColorSelect: (color: string) => void;
|
|
11
|
+
onResetColor?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const HorizontalLayoutColorPicker: ({ id, title, value, icon, showNone, presetColorsPanel, contentWidth, onColorSelect, onResetColor, }: HorizontalLayoutColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface SvgIconProps {
|
|
3
|
+
/** Icon name in format: [dir]-[name] (e.g., "bold", "italic") */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Icon size */
|
|
6
|
+
size?: number | string;
|
|
7
|
+
/** Additional CSS classes */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Stroke width */
|
|
10
|
+
strokeWidth?: number;
|
|
11
|
+
/** Click handler */
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare const SvgIcon: React.FC<SvgIconProps>;
|
|
15
|
+
export default SvgIcon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DefaultBubbleMenuContent: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImageMenuContent: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LinkMenuContent: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BasicFontStyleOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ClearTextFormatButton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FontSizeStepper: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ParagraphAlignmentOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TTabKey } from "@/constants/Toolbar";
|
|
2
|
+
interface ClassicToolbarProps {
|
|
3
|
+
onToolbarChange?: (toolbarType: string) => void;
|
|
4
|
+
activeTab: TTabKey;
|
|
5
|
+
setActiveTab: (tab: TTabKey) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ClassicToolbar: ({ onToolbarChange, activeTab, setActiveTab, }: ClassicToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Divider: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface LinkActionsModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
position: {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
};
|
|
7
|
+
linkUrl: string;
|
|
8
|
+
onEdit: () => void;
|
|
9
|
+
onRemove: () => void;
|
|
10
|
+
onCopy: () => void;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const LinkActionsModal: ({ isOpen, position, linkUrl, onEdit, onRemove, onCopy, onClose, }: LinkActionsModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface LinkModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
position: {
|
|
5
|
+
top: number;
|
|
6
|
+
left: number;
|
|
7
|
+
};
|
|
8
|
+
linkUrl: string;
|
|
9
|
+
isEditing?: boolean;
|
|
10
|
+
onUrlChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
12
|
+
onAdd: () => void;
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const LinkModal: ({ isOpen, position, linkUrl, isEditing, onUrlChange, onKeyDown, onAdd, onCancel, }: LinkModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/react";
|
|
2
|
+
type OrderedListTypeDropdownContentProps = {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const OrderedListTypeDropdownContent: ({ editor, onClose, }: OrderedListTypeDropdownContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TTabKey } from "@/constants/Toolbar";
|
|
2
|
+
interface ProfessionalToolbarProps {
|
|
3
|
+
onToolbarChange?: (toolbarType: string) => void;
|
|
4
|
+
activeTab: TTabKey;
|
|
5
|
+
setActiveTab: (tab: TTabKey) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ProfessionalToolbar: ({ onToolbarChange, activeTab, setActiveTab, }: ProfessionalToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TTabKey } from "@/constants/Toolbar";
|
|
2
|
+
interface RenderToolbarTabContentProps {
|
|
3
|
+
activeTab: TTabKey;
|
|
4
|
+
}
|
|
5
|
+
export declare const RenderToolbarTabContent: ({ activeTab, }: RenderToolbarTabContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface ScrollableContentProps {
|
|
3
|
+
contentScrollerRef: React.RefObject<HTMLDivElement>;
|
|
4
|
+
showScrollButtons: boolean;
|
|
5
|
+
canScrollLeft: boolean;
|
|
6
|
+
canScrollRight: boolean;
|
|
7
|
+
onScroll: () => void;
|
|
8
|
+
onScrollLeft: () => void;
|
|
9
|
+
onScrollRight: () => void;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ScrollableContent: ({ contentScrollerRef, showScrollButtons, canScrollLeft, canScrollRight, onScroll, onScrollLeft, onScrollRight, children, className, }: ScrollableContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PageConfig } from "@/components/toolbar/page/PageSizeSelector";
|
|
2
|
+
import type { EditorConfig } from "@/config/editorConfig";
|
|
3
|
+
interface ToolbarProps {
|
|
4
|
+
editorConfig: EditorConfig;
|
|
5
|
+
onPresentationModeToggle: () => void;
|
|
6
|
+
pageConfig: PageConfig;
|
|
7
|
+
setPageConfig: (config: PageConfig) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Toolbar: ({ editorConfig, onPresentationModeToggle, pageConfig, setPageConfig }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type TToolbarButtonItemProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
active: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
buttonRef?: React.RefObject<HTMLButtonElement>;
|
|
10
|
+
size?: 'small' | 'medium' | 'extra-small';
|
|
11
|
+
buttonTitle?: string;
|
|
12
|
+
showChildrenInline?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const ToolbarButtonItem: ({ children, tooltip, onClick, disabled, active, className, buttonRef, size, buttonTitle, showChildrenInline, }: TToolbarButtonItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/react";
|
|
2
|
+
type UnorderedListTypeDropdownContentProps = {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const UnorderedListTypeDropdownContent: ({ editor, onClose, }: UnorderedListTypeDropdownContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ExportOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FontStyleOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HeadingOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ParagraphStyleOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HomeOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./Toolbar";
|
|
2
|
+
export * from "./ProfessionalToolbar";
|
|
3
|
+
export * from "./ClassicToolbar";
|
|
4
|
+
export * from "./home";
|
|
5
|
+
export * from "./ItemGroup";
|
|
6
|
+
export * from "./ToolbarButtonItem";
|
|
7
|
+
export * from "./Divider";
|
|
8
|
+
export * from "./table";
|
|
9
|
+
export * from "./page";
|
|
10
|
+
export * from "./insert";
|
|
11
|
+
export * from "./home";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
+
interface NodeViewProps {
|
|
3
|
+
node: ProseMirrorNode;
|
|
4
|
+
updateAttributes: (attributes: Record<string, unknown>) => void;
|
|
5
|
+
deleteNode: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CodeBlockToolbar: ({ node, updateAttributes, deleteNode }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LINK_FORM_MODES } from "@/constants/LinkConstants";
|
|
2
|
+
interface LinkFormProps {
|
|
3
|
+
mode: (typeof LINK_FORM_MODES)[keyof typeof LINK_FORM_MODES];
|
|
4
|
+
initialUrl?: string;
|
|
5
|
+
initialText?: string;
|
|
6
|
+
onSubmit?: () => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const LinkForm: ({ mode, initialUrl, initialText, onSubmit, onCancel }: LinkFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InsertOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PageBackgroundColorPickerProps {
|
|
3
|
+
id: string;
|
|
4
|
+
selectedBGColor: string;
|
|
5
|
+
setSelectedBGColor: (color: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const PageBackgroundColorPicker: React.FC<PageBackgroundColorPickerProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PageMarginPickerProps {
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
pageOrientation: 'portrait' | 'landscape';
|
|
5
|
+
setPageOrientation: (orientation: 'portrait' | 'landscape') => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const PageMarginPicker: React.FC<PageMarginPickerProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PageOrientation } from './PageSizeSelector';
|
|
3
|
+
interface PageOrientationSelectorProps {
|
|
4
|
+
selectedOrientation: PageOrientation;
|
|
5
|
+
onOrientationChange: (orientation: PageOrientation) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const PageOrientationSelector: React.FC<PageOrientationSelectorProps>;
|
|
8
|
+
export default PageOrientationSelector;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type PageSize = 'A4' | 'A3' | 'Letter' | 'Legal' | 'Tabloid';
|
|
3
|
+
export type PageOrientation = 'portrait' | 'landscape';
|
|
4
|
+
export interface PageConfig {
|
|
5
|
+
size: PageSize;
|
|
6
|
+
orientation: PageOrientation;
|
|
7
|
+
}
|
|
8
|
+
interface PageSizeSelectorProps {
|
|
9
|
+
selectedSize: PageSize;
|
|
10
|
+
onSizeChange: (size: PageSize) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const PageSizeSelector: React.FC<PageSizeSelectorProps>;
|
|
13
|
+
export default PageSizeSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PageOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type TableSelectorProps = {
|
|
3
|
+
onSelect: (rows: number, cols: number) => void;
|
|
4
|
+
withHeaderRow?: boolean;
|
|
5
|
+
onHeaderRowChange?: (checked: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const TableSelector: React.FC<TableSelectorProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
export interface AIAutocompletionConfig {
|
|
3
|
+
/** Enable/disable AI autocompletion */
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
/** Minimum number of words required to trigger autocompletion */
|
|
6
|
+
minWordsToTriggerAutoCompletion?: number;
|
|
7
|
+
/** Debounce time in milliseconds */
|
|
8
|
+
debounceTime?: number;
|
|
9
|
+
/** Required: Custom fetch function for API calls. AI autocompletion only works when this is provided. */
|
|
10
|
+
fetchCompletion?: (text: string) => Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export interface EditorConfig {
|
|
13
|
+
/** Enable/disable the page size selector */
|
|
14
|
+
showPageSizeSelector?: boolean;
|
|
15
|
+
/** Initial content for the editor */
|
|
16
|
+
content?: string;
|
|
17
|
+
/** Enable/disable pagination */
|
|
18
|
+
enablePagination?: boolean;
|
|
19
|
+
/** Initial toolbar */
|
|
20
|
+
defaultToolbar?: string;
|
|
21
|
+
/** Calback debounce time for content change milliseconds */
|
|
22
|
+
debounceTimeForContentChange?: number;
|
|
23
|
+
/** AI Autocompletion configuration */
|
|
24
|
+
aiAutocompletion?: AIAutocompletionConfig;
|
|
25
|
+
/** Enable variable text feature */
|
|
26
|
+
enableVariableText?: boolean;
|
|
27
|
+
/** Variable values mapping (key: variable name, value: display text) */
|
|
28
|
+
variableValues?: Record<string, string>;
|
|
29
|
+
/** asViewer */
|
|
30
|
+
asViewer?: boolean;
|
|
31
|
+
/** editable */
|
|
32
|
+
editable?: boolean;
|
|
33
|
+
/** Callback when share is clicked */
|
|
34
|
+
onShare?: () => void;
|
|
35
|
+
/** Callback when content changes */
|
|
36
|
+
onContentChange?: (editor: Editor) => void;
|
|
37
|
+
/** Callback when editor is ready with helper methods */
|
|
38
|
+
onEditorReady?: (methods: {
|
|
39
|
+
insertVariable: (key: string, value?: string) => void;
|
|
40
|
+
updateVariableValues: (values: Record<string, string>) => void;
|
|
41
|
+
}) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare const defaultEditorConfig: EditorConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ALIGNMENT_OPTIONS: {
|
|
2
|
+
LEFT: string;
|
|
3
|
+
CENTER: string;
|
|
4
|
+
RIGHT: string;
|
|
5
|
+
};
|
|
6
|
+
export type AlignType = (typeof ALIGNMENT_OPTIONS)[keyof typeof ALIGNMENT_OPTIONS];
|
|
7
|
+
export declare const COLOR_PICKER_PALETTE: string[][];
|
|
8
|
+
export declare const COLOR_PICKER_STANDARD_COLORS: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FOOTER_HEIGHT = 28;
|