rj-editor 0.1.1 → 1.0.0
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 +313 -22
- package/dist/assets/icons/AttachmentIcon01.d.ts +2 -0
- package/dist/assets/icons/BorderRadiusIcon.d.ts +2 -0
- package/dist/assets/icons/ChevronSelectorHorizontalIcon.d.ts +2 -0
- package/dist/assets/icons/ChevronSelectorVerticalIcon.d.ts +2 -0
- package/dist/assets/icons/ImageIcon03.d.ts +2 -0
- package/dist/assets/icons/ImageIdentLeftIcon.d.ts +2 -0
- package/dist/assets/icons/ImageWrapTopBottomIcon.d.ts +2 -0
- package/dist/assets/icons/LayoutGridIcon01.d.ts +2 -0
- package/dist/assets/icons/LeftIndentIcon01.d.ts +2 -0
- package/dist/assets/icons/LineHeightIcon.d.ts +2 -0
- package/dist/assets/icons/MaximizeIcon02.d.ts +2 -0
- package/dist/assets/icons/MinimizeIcon02.d.ts +2 -0
- package/dist/assets/icons/PaintPourIcon.d.ts +2 -0
- package/dist/assets/icons/PaletteIcon.d.ts +2 -0
- package/dist/assets/icons/ParagraphSpacingIco.d.ts +2 -0
- package/dist/assets/icons/RefreshCcwIcon01.d.ts +2 -0
- package/dist/assets/icons/RefreshCcwIcon05.d.ts +2 -0
- package/dist/assets/icons/RefreshCwIcon01.d.ts +2 -0
- package/dist/assets/icons/RightIndentIcon01.d.ts +2 -0
- package/dist/assets/icons/SubscriptIcon.d.ts +2 -0
- package/dist/assets/icons/SupscriptIcon.d.ts +2 -0
- package/dist/assets/icons/TrashIcon03.d.ts +2 -0
- package/dist/assets/icons/VerticalAlignBottomIcon.d.ts +2 -0
- package/dist/assets/icons/VerticalAlignMiddleIcon.d.ts +2 -0
- package/dist/assets/icons/VerticalAlignTopIcon.d.ts +2 -0
- package/dist/assets/icons/YoutubeIcon.d.ts +2 -0
- package/dist/components/RJTextEditor.d.ts +3 -9
- package/dist/components/equation/EquationComponent.d.ts +10 -0
- package/dist/components/global/input-number/InputNumber.d.ts +14 -0
- package/dist/components/global/input-number/index.d.ts +2 -0
- package/dist/components/global/modal/Modal.d.ts +12 -0
- package/dist/components/global/modal/index.d.ts +2 -0
- package/dist/components/image/ImageComponent.d.ts +21 -0
- package/dist/components/rj-text-editor/HtmlValuePlugin.d.ts +7 -0
- package/dist/components/rj-text-editor/RJTextEditor.types.d.ts +18 -0
- package/dist/components/rj-text-editor/RJTextEditorContent.d.ts +17 -0
- package/dist/components/rj-text-editor/createInitialConfig.d.ts +47 -0
- package/dist/components/rj-text-editor/editorTheme.d.ts +26 -0
- package/dist/components/rj-text-editor/handleEditorChange.d.ts +3 -0
- package/dist/components/toolbar/Toolbar.d.ts +6 -1
- package/dist/components/toolbar/equation/EquationToolbar.d.ts +1 -0
- package/dist/components/toolbar/equation/utils.d.ts +13 -0
- package/dist/components/toolbar/home/HomeToolbar.d.ts +6 -0
- package/dist/components/toolbar/home/indent/IndentControls.d.ts +1 -0
- package/dist/components/toolbar/home/spacing/SpacingControls.d.ts +1 -0
- package/dist/components/toolbar/image/ImageToolbar.d.ts +2 -0
- package/dist/components/toolbar/image/divider/ToolbarDivider.d.ts +1 -0
- package/dist/components/toolbar/image/utils.d.ts +26 -0
- package/dist/components/toolbar/insert/InsertToolbar.d.ts +5 -0
- package/dist/components/toolbar/insert/divider/ToolbarDivider.d.ts +1 -0
- package/dist/components/toolbar/insert/equation/EquationControl.d.ts +2 -0
- package/dist/components/toolbar/insert/equation/EquationExamples.d.ts +6 -0
- package/dist/components/toolbar/insert/equation/EquationModal.d.ts +11 -0
- package/dist/components/toolbar/insert/equation/EquationPreview.d.ts +8 -0
- package/dist/components/toolbar/insert/horizontal-rule/HorizontalRuleControl.d.ts +1 -0
- package/dist/components/toolbar/insert/image/ImageControl.d.ts +1 -0
- package/dist/components/toolbar/insert/link/LinkControl.d.ts +7 -0
- package/dist/components/toolbar/insert/table/TableControl.d.ts +5 -0
- package/dist/components/toolbar/insert/youtube/YouTubeControl.d.ts +2 -0
- package/dist/components/toolbar/layout/LayoutToolbar.d.ts +1 -0
- package/dist/components/toolbar/table/TableToolbar.d.ts +1 -0
- package/dist/components/toolbar/table/cell/CellControls.d.ts +1 -0
- package/dist/components/toolbar/table/columns/ColumnControls.d.ts +1 -0
- package/dist/components/toolbar/table/delete/DeleteTableControls.d.ts +1 -0
- package/dist/components/toolbar/table/divider/ToolbarDivider.d.ts +1 -0
- package/dist/components/toolbar/table/header-cell/HeaderCellControls.d.ts +1 -0
- package/dist/components/toolbar/table/merge/MergeControls.d.ts +1 -0
- package/dist/components/toolbar/table/rows/RowControls.d.ts +1 -0
- package/dist/components/toolbar/table/utils.d.ts +23 -0
- package/dist/components/youtube/YouTubeComponent.d.ts +9 -0
- package/dist/constants/equationEditorEventName.d.ts +1 -0
- package/dist/constants/equationExamples.d.ts +16 -0
- package/dist/constants/equationStructures.d.ts +33 -0
- package/dist/constants/equationSymbols.d.ts +1 -0
- package/dist/constants/index.d.ts +10 -0
- package/dist/constants/insertEquationCommand.d.ts +2 -0
- package/dist/constants/insertImageCommand.d.ts +2 -0
- package/dist/constants/insertYouTubeCommand.d.ts +2 -0
- package/dist/constants/lineHeightOptions.d.ts +1 -0
- package/dist/constants/maxImageFileSize.d.ts +1 -0
- package/dist/constants/openLinkModalEventName.d.ts +1 -0
- package/dist/i18n/I18nContext.d.ts +9 -0
- package/dist/i18n/RJEditorI18nContext.d.ts +3 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/locales/en.d.ts +2 -0
- package/dist/i18n/locales/ru.d.ts +2 -0
- package/dist/i18n/locales/uz.d.ts +2 -0
- package/dist/i18n/mergeTranslations.d.ts +2 -0
- package/dist/i18n/useRJEditorI18n.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/nodes/EquationNode.d.ts +26 -0
- package/dist/nodes/ExtendedTextNode.d.ts +12 -0
- package/dist/nodes/ImageNode.d.ts +62 -0
- package/dist/nodes/YouTubeNode.d.ts +25 -0
- package/dist/nodes/index.d.ts +4 -0
- package/dist/plugins/EquationPlugin.d.ts +1 -0
- package/dist/plugins/ImagePlugin.d.ts +1 -0
- package/dist/plugins/KeyboardShortcutsPlugin.d.ts +1 -0
- package/dist/plugins/TableBoundaryPlugin.d.ts +1 -0
- package/dist/plugins/YouTubePlugin.d.ts +1 -0
- package/dist/rj-editor.css +1 -1
- package/dist/rj-editor.js +32116 -555
- package/dist/rj-editor.umd.cjs +259 -1
- package/dist/slice/index.d.ts +1 -1
- package/dist/slice/toolbarSlice.d.ts +1 -1
- package/dist/types/DeepPartial.d.ts +3 -0
- package/dist/types/EquationDisplayMode.d.ts +1 -0
- package/dist/types/ImageAlignment.d.ts +1 -0
- package/dist/types/ImageObjectFit.d.ts +1 -0
- package/dist/types/ImageTextWrap.d.ts +1 -0
- package/dist/types/InsertEquationPayload.d.ts +5 -0
- package/dist/types/InsertImagePayload.d.ts +19 -0
- package/dist/types/InsertYouTubePayload.d.ts +4 -0
- package/dist/types/RJEditorLocaleCode.d.ts +1 -0
- package/dist/types/RJEditorTranslations.d.ts +173 -0
- package/dist/types/SerializedEquationNode.d.ts +6 -0
- package/dist/types/SerializedImageNode.d.ts +20 -0
- package/dist/types/SerializedYouTubeNode.d.ts +5 -0
- package/dist/types/ToolbarState.d.ts +35 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/utils/helpers/clampValue.d.ts +1 -0
- package/dist/utils/helpers/formatNumberText.d.ts +1 -0
- package/dist/utils/helpers/formatShortcutTitle.d.ts +1 -0
- package/dist/utils/helpers/getYouTubeVideoId.d.ts +1 -0
- package/dist/utils/helpers/index.d.ts +12 -0
- package/dist/utils/helpers/isApplePlatform.d.ts +1 -0
- package/dist/utils/helpers/normalizeNumberText.d.ts +1 -0
- package/dist/utils/helpers/normalizeRJEditorHtml.d.ts +2 -0
- package/dist/utils/helpers/numberToInputText.d.ts +1 -0
- package/dist/utils/helpers/openFilePicker.d.ts +1 -0
- package/dist/utils/helpers/readFileAsDataUrl.d.ts +1 -0
- package/dist/utils/helpers/renderEquationToHtml.d.ts +3 -0
- package/dist/utils/helpers/setEditorHtml.d.ts +2 -0
- package/package.json +33 -1
- /package/dist/components/toolbar/{alignment → home/alignment}/AlignmentControls.d.ts +0 -0
- /package/dist/components/toolbar/{divider → home/divider}/ToolbarDivider.d.ts +0 -0
- /package/dist/components/toolbar/{history → home/history}/HistoryControls.d.ts +0 -0
- /package/dist/components/toolbar/{list → home/list}/ListControls.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/StyleControls.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/background-color/BackgroundColorControl.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/clear-formatting/ClearFormattingControl.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/font-family/FontFamilyControl.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/font-size/FontSizeControl.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/text-color/TextColorControl.d.ts +0 -0
- /package/dist/components/toolbar/{style-controls → home/style-controls}/utils.d.ts +0 -0
- /package/dist/components/toolbar/{text-format → home/text-format}/TextFormatControls.d.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const editorTheme: {
|
|
2
|
+
paragraph: string;
|
|
3
|
+
text: {
|
|
4
|
+
bold: string;
|
|
5
|
+
italic: string;
|
|
6
|
+
strikethrough: string;
|
|
7
|
+
subscript: string;
|
|
8
|
+
superscript: string;
|
|
9
|
+
underline: string;
|
|
10
|
+
};
|
|
11
|
+
list: {
|
|
12
|
+
ol: string;
|
|
13
|
+
ul: string;
|
|
14
|
+
listitem: string;
|
|
15
|
+
};
|
|
16
|
+
equation: string;
|
|
17
|
+
image: string;
|
|
18
|
+
youtube: string;
|
|
19
|
+
table: string;
|
|
20
|
+
tableCell: string;
|
|
21
|
+
tableCellHeader: string;
|
|
22
|
+
tableCellSelected: string;
|
|
23
|
+
tableRow: string;
|
|
24
|
+
tableScrollableWrapper: string;
|
|
25
|
+
tableSelection: string;
|
|
26
|
+
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import './Toolbar.scss';
|
|
2
|
-
|
|
2
|
+
type ToolbarProps = {
|
|
3
|
+
isFullscreen: boolean;
|
|
4
|
+
onToggleFullscreen: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function Toolbar({ isFullscreen, onToggleFullscreen, }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function EquationToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type LexicalEditor } from 'lexical';
|
|
2
|
+
import type { EquationDisplayMode } from '@/types';
|
|
3
|
+
export declare function getSelectedEquationNode(): import("@/nodes").EquationNode | null;
|
|
4
|
+
export declare function getEquationSelectionState(): {
|
|
5
|
+
isEquationSelected: boolean;
|
|
6
|
+
selectedEquation: string | undefined;
|
|
7
|
+
selectedEquationDisplayMode: EquationDisplayMode | undefined;
|
|
8
|
+
selectedEquationKey: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function updateSelectedEquation(editor: LexicalEditor, update: (node: NonNullable<ReturnType<typeof getSelectedEquationNode>>) => void): void;
|
|
11
|
+
export declare function updateEquationByKey(editor: LexicalEditor, key: string, update: (node: NonNullable<ReturnType<typeof getSelectedEquationNode>>) => void): void;
|
|
12
|
+
export declare function setSelectedEquationDisplayMode(editor: LexicalEditor, displayMode: EquationDisplayMode): void;
|
|
13
|
+
export declare function deleteSelectedEquation(editor: LexicalEditor): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IndentControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SpacingControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToolbarDivider(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type LexicalEditor } from 'lexical';
|
|
2
|
+
import type { ImageAlignment, ImageTextWrap } from '@/types';
|
|
3
|
+
export declare function getSelectedImageNode(): import("@/nodes").ImageNode | null;
|
|
4
|
+
export declare function getImageSelectionState(): {
|
|
5
|
+
isImageSelected: boolean;
|
|
6
|
+
selectedImageAlignment: ImageAlignment | undefined;
|
|
7
|
+
selectedImageAltText: string | undefined;
|
|
8
|
+
selectedImageAspectRatioLocked: boolean | undefined;
|
|
9
|
+
selectedImageBorderEnabled: boolean | undefined;
|
|
10
|
+
selectedImageBorderRadius: number | undefined;
|
|
11
|
+
selectedImageCaption: string | undefined;
|
|
12
|
+
selectedImageHeight: number | undefined;
|
|
13
|
+
selectedImageKey: string | undefined;
|
|
14
|
+
selectedImageLinkUrl: string | undefined;
|
|
15
|
+
selectedImageObjectFit: import("@/types").ImageObjectFit | undefined;
|
|
16
|
+
selectedImageRotation: number | undefined;
|
|
17
|
+
selectedImageShadowEnabled: boolean | undefined;
|
|
18
|
+
selectedImageTextWrap: ImageTextWrap | undefined;
|
|
19
|
+
selectedImageWidth: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
export declare function updateSelectedImage(editor: LexicalEditor, update: (node: NonNullable<ReturnType<typeof getSelectedImageNode>>) => void): void;
|
|
22
|
+
export declare function updateImageByKey(editor: LexicalEditor, key: string, update: (node: NonNullable<ReturnType<typeof getSelectedImageNode>>) => void): void;
|
|
23
|
+
export declare function setSelectedImageAlignment(editor: LexicalEditor, alignment: ImageAlignment): void;
|
|
24
|
+
export declare function setSelectedImageWidth(editor: LexicalEditor, width: number): void;
|
|
25
|
+
export declare function setSelectedImageTextWrap(editor: LexicalEditor, textWrap: ImageTextWrap): void;
|
|
26
|
+
export declare function deleteSelectedImage(editor: LexicalEditor): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToolbarDivider(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EquationDisplayMode } from '@/types';
|
|
2
|
+
type EquationModalProps = {
|
|
3
|
+
initialDisplayMode?: EquationDisplayMode;
|
|
4
|
+
initialEquation?: string;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
onSubmit: (equation: string, displayMode: EquationDisplayMode) => void;
|
|
7
|
+
open: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function EquationModal({ initialDisplayMode, initialEquation, onCancel, onSubmit, open, title, }: EquationModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EquationDisplayMode } from '@/types';
|
|
3
|
+
type EquationPreviewProps = {
|
|
4
|
+
displayMode: EquationDisplayMode;
|
|
5
|
+
equation: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const EquationPreview: React.MemoExoticComponent<({ displayMode, equation, }: EquationPreviewProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HorizontalRuleControl(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ImageControl(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './LinkControl.scss';
|
|
2
|
+
type LinkControlProps = {
|
|
3
|
+
enableShortcutListener?: boolean;
|
|
4
|
+
showButton?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function LinkControl({ enableShortcutListener, showButton, }: LinkControlProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LayoutToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TableToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CellControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ColumnControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function DeleteTableControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToolbarDivider(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HeaderCellControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MergeControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RowControls(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TableCellNode, TableNode } from '@lexical/table';
|
|
2
|
+
import { type LexicalEditor } from 'lexical';
|
|
3
|
+
export declare function getSelectedTableCells(): TableCellNode[];
|
|
4
|
+
export declare function getCurrentTableNode(): TableNode | null;
|
|
5
|
+
export declare function getTableSelectionState(): {
|
|
6
|
+
isInTable: boolean;
|
|
7
|
+
selectedTableCellsCount: number;
|
|
8
|
+
tableCellBackgroundColor: string;
|
|
9
|
+
tableCellVerticalAlign: string | undefined;
|
|
10
|
+
tableHasMergedCell: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function runTableUpdate(editor: LexicalEditor, update: () => void): void;
|
|
13
|
+
export declare function insertTableRow(editor: LexicalEditor, after: boolean): void;
|
|
14
|
+
export declare function insertTableColumn(editor: LexicalEditor, after: boolean): void;
|
|
15
|
+
export declare function deleteTableRow(editor: LexicalEditor): void;
|
|
16
|
+
export declare function deleteTableColumn(editor: LexicalEditor): void;
|
|
17
|
+
export declare function deleteCurrentTable(editor: LexicalEditor): void;
|
|
18
|
+
export declare function mergeSelectedTableCells(editor: LexicalEditor): void;
|
|
19
|
+
export declare function unmergeSelectedTableCell(editor: LexicalEditor): void;
|
|
20
|
+
export declare function setSelectedTableCellsBackground(editor: LexicalEditor, color: null | string): void;
|
|
21
|
+
export declare function setSelectedTableCellsVerticalAlign(editor: LexicalEditor, verticalAlign: null | string): void;
|
|
22
|
+
export declare function toggleCurrentTableRowHeader(editor: LexicalEditor): void;
|
|
23
|
+
export declare function toggleCurrentTableColumnHeader(editor: LexicalEditor): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type NodeKey } from 'lexical';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type YouTubeComponentProps = {
|
|
4
|
+
nodeKey: NodeKey;
|
|
5
|
+
title: string;
|
|
6
|
+
videoId: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const YouTubeComponent: React.MemoExoticComponent<({ nodeKey, title, videoId, }: YouTubeComponentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EQUATION_EDITOR_INSERT_EVENT = "rj-editor-equation-insert";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const EQUATION_EXAMPLES: readonly [{
|
|
2
|
+
readonly label: "Integral";
|
|
3
|
+
readonly value: string;
|
|
4
|
+
}, {
|
|
5
|
+
readonly label: "Fraction";
|
|
6
|
+
readonly value: string;
|
|
7
|
+
}, {
|
|
8
|
+
readonly label: "Matrix";
|
|
9
|
+
readonly value: string;
|
|
10
|
+
}, {
|
|
11
|
+
readonly label: "Physics";
|
|
12
|
+
readonly value: string;
|
|
13
|
+
}, {
|
|
14
|
+
readonly label: "Chemistry";
|
|
15
|
+
readonly value: string;
|
|
16
|
+
}];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const EQUATION_STRUCTURES: readonly [{
|
|
2
|
+
readonly label: "Fraction";
|
|
3
|
+
readonly snippet: "rj-equation:fraction";
|
|
4
|
+
readonly value: string;
|
|
5
|
+
}, {
|
|
6
|
+
readonly label: "Script";
|
|
7
|
+
readonly snippet: string;
|
|
8
|
+
readonly value: string;
|
|
9
|
+
}, {
|
|
10
|
+
readonly label: "Radical";
|
|
11
|
+
readonly snippet: string;
|
|
12
|
+
readonly value: string;
|
|
13
|
+
}, {
|
|
14
|
+
readonly label: "Integral";
|
|
15
|
+
readonly snippet: string;
|
|
16
|
+
readonly value: string;
|
|
17
|
+
}, {
|
|
18
|
+
readonly label: "Large operator";
|
|
19
|
+
readonly snippet: string;
|
|
20
|
+
readonly value: string;
|
|
21
|
+
}, {
|
|
22
|
+
readonly label: "Bracket";
|
|
23
|
+
readonly snippet: string;
|
|
24
|
+
readonly value: string;
|
|
25
|
+
}, {
|
|
26
|
+
readonly label: "Matrix";
|
|
27
|
+
readonly snippet: string;
|
|
28
|
+
readonly value: string;
|
|
29
|
+
}, {
|
|
30
|
+
readonly label: "Chemistry";
|
|
31
|
+
readonly snippet: string;
|
|
32
|
+
readonly value: string;
|
|
33
|
+
}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EQUATION_SYMBOLS: readonly ["±", "∞", "=", "≠", "~", "×", "÷", "!", "∝", "<", "≤", "≥", "≈", "≡", "∀", "∂", "√", "∛", "∜", "∪", "∩", "∅", "%", "°"];
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export { BACKGROUND_COLOR_OPTIONS } from './backgroundColorOptions';
|
|
2
|
+
export { EQUATION_EDITOR_INSERT_EVENT } from './equationEditorEventName';
|
|
3
|
+
export { EQUATION_EXAMPLES } from './equationExamples';
|
|
4
|
+
export { EQUATION_STRUCTURES } from './equationStructures';
|
|
5
|
+
export { EQUATION_SYMBOLS } from './equationSymbols';
|
|
2
6
|
export { FONT_FAMILY_OPTIONS } from './fontFamilyOptions';
|
|
3
7
|
export { FONT_SIZE_OPTIONS } from './fontSizeOptions';
|
|
4
8
|
export { INITIAL_TOOLBAR_STATE } from './initialToolbarState';
|
|
9
|
+
export { INSERT_EQUATION_COMMAND } from './insertEquationCommand';
|
|
10
|
+
export { INSERT_IMAGE_COMMAND } from './insertImageCommand';
|
|
11
|
+
export { INSERT_YOUTUBE_COMMAND } from './insertYouTubeCommand';
|
|
12
|
+
export { LINE_HEIGHT_OPTIONS } from './lineHeightOptions';
|
|
13
|
+
export { MAX_IMAGE_FILE_SIZE } from './maxImageFileSize';
|
|
14
|
+
export { OPEN_LINK_MODAL_EVENT } from './openLinkModalEventName';
|
|
5
15
|
export { TEXT_COLOR_OPTIONS } from './textColorOptions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LINE_HEIGHT_OPTIONS: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAX_IMAGE_FILE_SIZE: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OPEN_LINK_MODAL_EVENT = "rj-editor:open-link-modal";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DeepPartial, RJEditorLocaleCode, RJEditorTranslations } from '@/types';
|
|
3
|
+
export type RJEditorI18nProviderProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
locale?: RJEditorLocaleCode;
|
|
6
|
+
locales?: Record<string, DeepPartial<RJEditorTranslations>>;
|
|
7
|
+
translations?: DeepPartial<RJEditorTranslations>;
|
|
8
|
+
};
|
|
9
|
+
export declare function RJEditorI18nProvider({ children, locale, locales, translations, }: RJEditorI18nProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { enTranslations } from './locales/en';
|
|
2
|
+
export { RJEditorI18nProvider } from './I18nContext';
|
|
3
|
+
export { mergeTranslations } from './mergeTranslations';
|
|
4
|
+
export { ruTranslations } from './locales/ru';
|
|
5
|
+
export { useRJEditorI18n } from './useRJEditorI18n';
|
|
6
|
+
export { uzTranslations } from './locales/uz';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useRJEditorI18n(): import("..").RJEditorTranslations;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { RJTextEditor } from '@/components/RJTextEditor';
|
|
2
|
+
export { enTranslations, mergeTranslations, RJEditorI18nProvider, ruTranslations, useRJEditorI18n, uzTranslations, } from '@/i18n';
|
|
2
3
|
export type { RJTextEditorProps } from '@/components/RJTextEditor';
|
|
3
|
-
export type { RJTextEditorValue } from '@/types';
|
|
4
|
+
export type { DeepPartial, RJEditorLocaleCode, RJEditorTranslations, RJTextEditorValue, } from '@/types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey } from 'lexical';
|
|
2
|
+
import { DecoratorNode } from 'lexical';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import type { EquationDisplayMode, InsertEquationPayload, SerializedEquationNode } from '@/types';
|
|
5
|
+
export declare class EquationNode extends DecoratorNode<ReactNode> {
|
|
6
|
+
__displayMode: EquationDisplayMode;
|
|
7
|
+
__equation: string;
|
|
8
|
+
static clone(node: EquationNode): EquationNode;
|
|
9
|
+
static getType(): string;
|
|
10
|
+
static importDOM(): DOMConversionMap | null;
|
|
11
|
+
static importJSON(serializedNode: SerializedEquationNode): EquationNode;
|
|
12
|
+
constructor(equation: string, displayMode?: EquationDisplayMode, key?: NodeKey);
|
|
13
|
+
createDOM(config: EditorConfig): HTMLElement;
|
|
14
|
+
decorate(): ReactNode;
|
|
15
|
+
exportDOM(): DOMExportOutput;
|
|
16
|
+
exportJSON(): SerializedEquationNode;
|
|
17
|
+
getDisplayMode(): EquationDisplayMode;
|
|
18
|
+
getEquation(): string;
|
|
19
|
+
getTextContent(): string;
|
|
20
|
+
isInline(): boolean;
|
|
21
|
+
setDisplayMode(displayMode: EquationDisplayMode): this;
|
|
22
|
+
setEquation(equation: string): this;
|
|
23
|
+
updateDOM(): false;
|
|
24
|
+
}
|
|
25
|
+
export declare function $createEquationNode({ displayMode, equation, }: InsertEquationPayload): EquationNode;
|
|
26
|
+
export declare function $isEquationNode(node: LexicalNode | null | undefined): node is EquationNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TextNode, type DOMConversionMap, type LexicalNode, type NodeKey, type SerializedTextNode } from 'lexical';
|
|
2
|
+
export declare class ExtendedTextNode extends TextNode {
|
|
3
|
+
static clone(node: ExtendedTextNode): ExtendedTextNode;
|
|
4
|
+
static getType(): string;
|
|
5
|
+
static importDOM(): DOMConversionMap | null;
|
|
6
|
+
static importJSON(serializedNode: SerializedTextNode): ExtendedTextNode;
|
|
7
|
+
constructor(text?: string, key?: NodeKey);
|
|
8
|
+
exportJSON(): SerializedTextNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function $createExtendedTextNode(text?: string): ExtendedTextNode;
|
|
11
|
+
export declare function $isExtendedTextNode(node: LexicalNode | null | undefined): node is ExtendedTextNode;
|
|
12
|
+
export declare function replaceTextNodeWithExtendedTextNode(node: TextNode): ExtendedTextNode;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey } from 'lexical';
|
|
2
|
+
import { DecoratorNode } from 'lexical';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import type { ImageAlignment, ImageObjectFit, ImageTextWrap, InsertImagePayload, SerializedImageNode } from '@/types';
|
|
5
|
+
export declare class ImageNode extends DecoratorNode<ReactNode> {
|
|
6
|
+
__alignment: ImageAlignment;
|
|
7
|
+
__aspectRatioLocked: boolean;
|
|
8
|
+
__altText: string;
|
|
9
|
+
__borderEnabled: boolean;
|
|
10
|
+
__borderRadius: number;
|
|
11
|
+
__caption: string;
|
|
12
|
+
__height?: number;
|
|
13
|
+
__linkUrl: string;
|
|
14
|
+
__objectFit: ImageObjectFit;
|
|
15
|
+
__rotation: number;
|
|
16
|
+
__shadowEnabled: boolean;
|
|
17
|
+
__src: string;
|
|
18
|
+
__textWrap: ImageTextWrap;
|
|
19
|
+
__width: number;
|
|
20
|
+
static clone(node: ImageNode): ImageNode;
|
|
21
|
+
static getType(): string;
|
|
22
|
+
static importDOM(): DOMConversionMap | null;
|
|
23
|
+
static importJSON(serializedNode: SerializedImageNode): ImageNode;
|
|
24
|
+
constructor(src: string, altText?: string, width?: number, alignment?: ImageAlignment, caption?: string, height?: number, linkUrl?: string, objectFit?: ImageObjectFit, textWrap?: ImageTextWrap, borderRadius?: number, borderEnabled?: boolean, shadowEnabled?: boolean, rotation?: number, aspectRatioLocked?: boolean, key?: NodeKey);
|
|
25
|
+
createDOM(config: EditorConfig): HTMLElement;
|
|
26
|
+
decorate(): ReactNode;
|
|
27
|
+
exportDOM(): DOMExportOutput;
|
|
28
|
+
exportJSON(): SerializedImageNode;
|
|
29
|
+
getAlignment(): ImageAlignment;
|
|
30
|
+
getAltText(): string;
|
|
31
|
+
getAspectRatioLocked(): boolean;
|
|
32
|
+
getBorderEnabled(): boolean;
|
|
33
|
+
getBorderRadius(): number;
|
|
34
|
+
getCaption(): string;
|
|
35
|
+
getLinkUrl(): string;
|
|
36
|
+
getHeight(): number | undefined;
|
|
37
|
+
getObjectFit(): ImageObjectFit;
|
|
38
|
+
getRotation(): number;
|
|
39
|
+
getShadowEnabled(): boolean;
|
|
40
|
+
getSrc(): string;
|
|
41
|
+
getTextWrap(): ImageTextWrap;
|
|
42
|
+
getWidth(): number;
|
|
43
|
+
setAlignment(alignment: ImageAlignment): this;
|
|
44
|
+
setAltText(altText: string): this;
|
|
45
|
+
setAspectRatioLocked(aspectRatioLocked: boolean): this;
|
|
46
|
+
setBorderEnabled(borderEnabled: boolean): this;
|
|
47
|
+
setBorderRadius(borderRadius: number): this;
|
|
48
|
+
setCaption(caption: string): this;
|
|
49
|
+
setLinkUrl(linkUrl: string): this;
|
|
50
|
+
setHeight(height?: number): this;
|
|
51
|
+
setObjectFit(objectFit: ImageObjectFit): this;
|
|
52
|
+
setRotation(rotation: number): this;
|
|
53
|
+
setShadowEnabled(shadowEnabled: boolean): this;
|
|
54
|
+
setSrc(src: string): this;
|
|
55
|
+
setTextWrap(textWrap: ImageTextWrap): this;
|
|
56
|
+
setWidth(width: number): this;
|
|
57
|
+
getTextContent(): string;
|
|
58
|
+
isInline(): boolean;
|
|
59
|
+
updateDOM(): false;
|
|
60
|
+
}
|
|
61
|
+
export declare function $createImageNode({ alignment, aspectRatioLocked, altText, borderEnabled, borderRadius, caption, height, linkUrl, objectFit, rotation, shadowEnabled, src, textWrap, width, }: InsertImagePayload): ImageNode;
|
|
62
|
+
export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey } from 'lexical';
|
|
2
|
+
import { DecoratorNode } from 'lexical';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import type { InsertYouTubePayload, SerializedYouTubeNode } from '@/types';
|
|
5
|
+
export declare class YouTubeNode extends DecoratorNode<ReactNode> {
|
|
6
|
+
__title: string;
|
|
7
|
+
__videoId: string;
|
|
8
|
+
static clone(node: YouTubeNode): YouTubeNode;
|
|
9
|
+
static getType(): string;
|
|
10
|
+
static importDOM(): DOMConversionMap | null;
|
|
11
|
+
static importJSON(serializedNode: SerializedYouTubeNode): YouTubeNode;
|
|
12
|
+
constructor(videoId: string, title?: string, key?: NodeKey);
|
|
13
|
+
createDOM(config: EditorConfig): HTMLElement;
|
|
14
|
+
decorate(): ReactNode;
|
|
15
|
+
exportDOM(): DOMExportOutput;
|
|
16
|
+
exportJSON(): SerializedYouTubeNode;
|
|
17
|
+
getTextContent(): string;
|
|
18
|
+
getTitle(): string;
|
|
19
|
+
getVideoId(): string;
|
|
20
|
+
isInline(): false;
|
|
21
|
+
setTitle(title: string): this;
|
|
22
|
+
updateDOM(): false;
|
|
23
|
+
}
|
|
24
|
+
export declare function $createYouTubeNode({ title, videoId, }: InsertYouTubePayload): YouTubeNode;
|
|
25
|
+
export declare function $isYouTubeNode(node: LexicalNode | null | undefined): node is YouTubeNode;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { $createEquationNode, $isEquationNode, EquationNode, } from './EquationNode';
|
|
2
|
+
export { $createExtendedTextNode, $isExtendedTextNode, ExtendedTextNode, replaceTextNodeWithExtendedTextNode, } from './ExtendedTextNode';
|
|
3
|
+
export { $createImageNode, $isImageNode, ImageNode } from './ImageNode';
|
|
4
|
+
export { $createYouTubeNode, $isYouTubeNode, YouTubeNode } from './YouTubeNode';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function EquationPlugin(): null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ImagePlugin(): null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function KeyboardShortcutsPlugin(): null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TableBoundaryPlugin(): null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function YouTubePlugin(): null;
|
package/dist/rj-editor.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.rj-editor-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border-bottom:1px solid var(--rj-editor-border,#d9dde5);flex-wrap:wrap;align-items:center;gap:6px;padding:8px;display:flex}.rj-editor-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;min-width:34px;height:34px;padding:0 10px;font:600 14px/1 system-ui,sans-serif;display:inline-flex}.rj-editor-toolbar--clear-btn{color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar--clear-btn svg path{stroke:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar button:hover:not(:disabled),.rj-editor-toolbar button.is-active,.rj-editor-toolbar select:hover,.rj-editor-toolbar input[type=color]:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-toolbar .rj-editor-toolbar--clear-btn:hover:not(:disabled){background:var(--rj-editor-danger-bg,#fee2e2);border-color:var(--rj-editor-danger-border,#fca5a5);color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar input[type=color]{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:8px;height:34px}.rj-editor-toolbar-select{border-radius:8px;min-width:92px;height:33px}.rj-editor-toolbar-select-font{min-width:148px}.rj-editor-toolbar input[type=color]{cursor:pointer;width:38px;padding:3px}.rj-editor-toolbar button:disabled{cursor:not-allowed;opacity:.45}.rj-editor-color-button{min-width:42px}.rj-editor-text-color-mark{flex-direction:column;align-items:center;gap:2px;font-weight:700;line-height:1;display:inline-flex}.rj-editor-text-color-line{border-radius:999px;width:18px;height:3px;display:block}.rj-editor-background-color-mark{border:1px solid var(--rj-editor-border,#d9dde5);border-radius:4px;justify-content:center;align-items:center;min-width:28px;height:22px;padding:0 4px;font-size:12px;font-weight:700;display:inline-flex}.rj-editor-background-color-mark.is-none{background:linear-gradient(135deg, transparent 45%, var(--rj-editor-focus-border,#7aa7f7) 47%, var(--rj-editor-focus-border,#7aa7f7) 53%, transparent 55%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-color-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:8px;width:100%;min-width:120px;padding:2px 0;display:flex}.rj-editor-color-menu-input{cursor:pointer;width:28px;height:22px;margin-left:auto;padding:0}.rj-editor-color-swatch,.rj-editor-color-none{border:1px solid var(--rj-editor-border,#d9dde5);border-radius:4px;width:18px;height:18px;display:inline-flex}.rj-editor-color-none{background:linear-gradient(135deg, transparent 43%, #ef4444 46%, #ef4444 54%, transparent 57%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-toolbar button svg{width:18px;height:18px}.rj-editor-toolbar-divider{background:var(--rj-editor-border,#d9dde5);width:1px;height:22px;margin:0 2px}.rj-editor{border:1px solid var(--rj-editor-border,#d9dde5);background:var(--rj-editor-bg,#fff);color:var(--rj-editor-text,#111827);text-align:left;border-radius:8px;overflow:hidden}.rj-editor-body{position:relative}.rj-editor-input{outline:none;min-height:220px;padding:18px}.rj-editor-placeholder{color:var(--rj-editor-placeholder,#8a94a6);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;top:18px;left:18px}.rj-editor-paragraph{margin:0 0 12px}.rj-editor-paragraph:last-child{margin-bottom:0}.rj-editor-text-bold{font-weight:700}.rj-editor-text-italic{font-style:italic}.rj-editor-text-strikethrough{text-decoration:line-through}.rj-editor-text-underline{text-decoration:underline}.rj-editor-list-ol,.rj-editor-list-ul{margin:0 0 12px 24px;padding:0}.rj-editor-list-item{margin:4px 0}
|
|
1
|
+
._wrapper_qwfas_1{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:6px;align-items:center;gap:2px;width:100%;height:34px;padding:0 8px;font:600 14px/1 system-ui,sans-serif;display:inline-flex}._wrapper_qwfas_1:focus-within{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 2px #7aa7f72e}._wrapper_qwfas_1._disabled_qwfas_20{cursor:not-allowed;opacity:.55}._affix_qwfas_25{color:var(--rj-editor-muted-text,#526070);cursor:text;font:inherit;-webkit-user-select:none;user-select:none;flex:none}._affix_qwfas_25 svg{width:1rem!important;height:1rem!important}._affix_qwfas_25 svg path{stroke:var(--rj-editor-muted-text,#526070)}._input_qwfas_40{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:6px;outline:none;width:100%;height:34px;padding:0 8px;font:600 14px/1 system-ui,sans-serif}._inputAffix_qwfas_52{box-shadow:none;background:0 0;border:0;border-radius:0;flex:auto;width:100%;min-width:0;height:100%;padding:0}._input_qwfas_40:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 2px #7aa7f72e}._inputAffix_qwfas_52:focus{box-shadow:none;border-color:#0000}._input_qwfas_40:disabled{cursor:not-allowed;opacity:.55}._overlay_n2wo9_1{background:var(--rj-editor-modal-overlay,#0f172a6b);z-index:1200;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}._modal_n2wo9_12{background:var(--rj-editor-bg,#fff);box-shadow:var(--rj-editor-modal-shadow,0 24px 64px #0f172a38);color:var(--rj-editor-text,#111827);min-width:min(420px,100vw - 48px);max-width:calc(100vw - 48px);max-height:min(720px,100vh - 48px);width:var(--rj-modal-width,420px);border-radius:8px;overflow:hidden}._header_n2wo9_24{border-bottom:1px solid var(--rj-editor-border,#d9dde5);cursor:move;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:14px 18px;display:flex}._title_n2wo9_34{margin:0;font:700 16px/1.3 system-ui,sans-serif}._closeButton_n2wo9_39{color:var(--rj-editor-muted-text,#526070);cursor:pointer;cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:30px;height:30px;padding:0;display:inline-flex}._closeButton_n2wo9_39:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);color:var(--rj-editor-text,#111827)}._body_n2wo9_62{max-height:calc(100vh - 182px);padding:18px;overflow:auto}._footer_n2wo9_68{border-top:1px solid var(--rj-editor-border,#d9dde5);justify-content:flex-end;align-items:center;gap:8px;padding:12px 18px;display:flex}._button_n2wo9_77{border:1px solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;min-width:76px;height:34px;padding:0 14px;font:600 14px/1 system-ui,sans-serif;display:inline-flex}._cancelButton_n2wo9_90{background:var(--rj-editor-toolbar-button-bg,#fff);color:var(--rj-editor-text,#111827)}._cancelButton_n2wo9_90:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}._okButton_n2wo9_100{background:var(--rj-color-brand,#3167c8);border-color:var(--rj-color-brand,#3167c8);color:var(--rj-color-white,#fff)}._okButton_n2wo9_100:hover{background:var(--rj-color-brand-strong,#1f4f9a);border-color:var(--rj-color-brand-strong,#1f4f9a)}._button_n2wo9_77:disabled{cursor:not-allowed;opacity:.5}.rj-editor-image-border-radius-input{width:70px}.rj-editor-image-edit-form{gap:8px;display:grid}.rj-editor-image-edit-form label{color:var(--rj-editor-text,#111827);font:600 13px/1.25 system-ui,sans-serif}.rj-editor-image-edit-form input,.rj-editor-image-edit-form textarea{background:var(--rj-editor-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:8px;outline:none;width:100%;padding:9px 10px;font:500 14px/1.35 system-ui,sans-serif}.rj-editor-image-edit-form input{height:38px}.rj-editor-image-edit-form textarea{resize:vertical;min-height:96px}.rj-editor-image-edit-form input:focus,.rj-editor-image-edit-form textarea:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 3px var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-form{gap:12px;display:grid}.rj-editor-link-field{gap:6px;display:grid}.rj-editor-link-field label,.rj-editor-link-checkbox{color:var(--rj-editor-text,#111827);font:600 13px/1.25 system-ui,sans-serif}.rj-editor-link-field input{background:var(--rj-editor-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:8px;outline:none;height:36px;padding:0 10px;font:500 14px/1.35 system-ui,sans-serif}.rj-editor-link-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 3px var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-checkbox{align-items:center;gap:8px;width:fit-content;display:inline-flex}.rj-editor-link-checkbox input{accent-color:var(--rj-color-brand,#3167c8);width:16px;height:16px}.rj-editor-youtube-form{gap:12px;display:grid}.rj-editor-youtube-field{gap:6px;display:grid}.rj-editor-youtube-field label{color:var(--rj-editor-text,#111827);font:600 13px/1.25 system-ui,sans-serif}.rj-editor-youtube-field input{background:var(--rj-editor-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:8px;outline:none;width:100%;height:38px;padding:9px 10px;font:500 14px/1.35 system-ui,sans-serif}.rj-editor-youtube-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 3px var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-youtube-error{color:var(--rj-editor-danger,#dc2626);margin:0;font:600 13px/1.35 system-ui,sans-serif}.rj-editor-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border-bottom:1px solid var(--rj-editor-border,#d9dde5);flex-direction:column;display:flex}.rj-editor-toolbar-tabs{border-bottom:1px solid var(--rj-editor-border,#d9dde5);justify-content:space-between;align-items:center;gap:4px;padding:6px 8px;display:flex}.rj-editor-toolbar-tabs-list{flex-wrap:wrap;align-items:center;gap:4px;display:flex}.rj-editor-toolbar-tabs-list button{background:0 0;border:1px solid #0000;border-bottom:0;border-radius:8px 8px 0 0;min-width:auto;height:32px;padding:0 14px}.rj-editor-toolbar-tabs-list button:hover,.rj-editor-toolbar-tabs-list button.is-active{background:var(--rj-editor-toolbar-button-bg,#fff);border-color:var(--rj-editor-border,#d9dde5)}.rj-editor-toolbar-fullscreen{flex:none}.rj-editor-toolbar-panel{flex-wrap:wrap;align-items:center;gap:6px;min-height:50px;padding:8px;display:flex}.rj-editor-toolbar-panel--home,.rj-editor-toolbar-panel--image{flex-flow:column;align-items:stretch;gap:8px}.rj-editor-toolbar-row{flex-wrap:wrap;flex:none;align-items:center;gap:6px;padding-bottom:1px;display:flex}.rj-editor-equation-toolbar{flex-flow:column;align-items:stretch}.rj-editor-equation-symbols{flex-wrap:wrap}.rj-editor-equation-symbols button{border-radius:4px;min-width:30px;padding:0 8px}.rj-editor-equation-structure{flex-direction:column;gap:2px;min-width:78px!important;height:52px!important;padding:4px 10px!important}.rj-editor-equation-structure span{font:500 14px/1.1 Georgia,Times New Roman,serif}.rj-editor-equation-structure small{color:var(--rj-editor-muted-text,#526070);font:500 10px/1 system-ui,sans-serif}.rj-editor-toolbar-group{white-space:nowrap;flex-wrap:nowrap;flex:none;align-items:center;gap:6px;display:inline-flex}.rj-editor-toolbar-group button svg{min-width:16px;min-height:16px}.rj-editor-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;min-width:34px;height:34px;padding:0 10px;font:500 14px/1 system-ui,sans-serif;display:inline-flex}.rj-editor-toolbar--clear-btn{color:var(--rj-editor-danger,#dc2626)!important}.rj-editor-toolbar--clear-btn svg path{stroke:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar button:hover:not(:disabled),.rj-editor-toolbar button.is-active,.rj-editor-toolbar select:hover,.rj-editor-toolbar input[type=color]:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-toolbar .rj-editor-toolbar--clear-btn:hover:not(:disabled){background:var(--rj-editor-danger-bg,#fee2e2);border-color:var(--rj-editor-danger-border,#fca5a5);color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar input[type=color]{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:8px;height:34px}.rj-editor-toolbar-select{border-radius:8px;min-width:92px;height:34px;font:500 14px/1 system-ui,sans-serif}.rj-editor-toolbar-select .ant-select-selector{font:inherit;align-items:center;min-height:34px;display:flex;border-radius:8px!important}.rj-editor-toolbar-select .ant-select-selection-item,.rj-editor-toolbar-select .ant-select-selection-placeholder{font:inherit}.rj-editor-toolbar-select .ant-select-arrow{align-items:center;display:inline-flex;border:1px solid red!important}.rj-editor-toolbar-select .ant-select-suffix{align-items:center;width:20px;height:20px;display:inline-flex}.rj-editor-toolbar-select-font{min-width:148px}.rj-editor-toolbar-select-crop{min-width:116px}.rj-editor-image-width-input{width:84px}.rj-editor-toolbar input[type=color]{cursor:pointer;width:38px;padding:3px}.rj-editor-toolbar button:disabled{cursor:not-allowed;opacity:.45}.rj-editor-color-button{min-width:42px}.rj-editor-color-button svg{filter:drop-shadow(0 0 1px #fff)!important}.rj-editor-text-color-mark{flex-direction:column;align-items:center;gap:2px;font-weight:700;line-height:1;display:inline-flex}.rj-editor-text-color-line{border-radius:999px;width:18px;height:3px;display:block}.rj-editor-background-color-mark{border:1px solid var(--rj-editor-border,#d9dde5);border-radius:4px;justify-content:center;align-items:center;min-width:28px;height:22px;padding:0 4px;font-size:12px;font-weight:700;display:inline-flex}.rj-editor-background-color-mark.is-none{background:linear-gradient(135deg, transparent 45%, var(--rj-editor-focus-border,#7aa7f7) 47%, var(--rj-editor-focus-border,#7aa7f7) 53%, transparent 55%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-color-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:8px;width:100%;min-width:120px;padding:2px 0;display:flex}.rj-editor-spacing-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;width:100%;min-width:96px;padding:2px 0}.rj-editor-color-menu-input{cursor:pointer;width:28px;height:22px;margin-left:auto;padding:0}.rj-editor-color-swatch,.rj-editor-color-none{border:1px solid var(--rj-editor-border,#d9dde5);border-radius:4px;width:18px;height:18px;display:inline-flex}.rj-editor-color-none{background:linear-gradient(135deg, transparent 43%, #ef4444 46%, #ef4444 54%, transparent 57%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-toolbar button svg{width:18px;height:18px}.rj-editor-toolbar-divider{background:var(--rj-editor-border,#d9dde5);width:1px;height:22px;margin:0 2px}.rj-editor-table-icon span{border:1.5px solid;border-radius:2px}.rj-editor-table-menu{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);border-radius:8px;gap:10px;min-width:260px;padding:12px;display:grid;box-shadow:0 12px 28px #0f172a24}.rj-editor-table-menu-title{color:var(--rj-editor-text,#111827);font:700 14px/1.2 system-ui,sans-serif}.rj-editor-table-grid{grid-template-columns:repeat(10,18px);gap:5px;display:grid}.rj-editor-table-grid button{background:var(--rj-editor-toolbar-bg,#f8fafc);border:1px solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:2px;width:18px;min-width:18px;height:18px;padding:0}.rj-editor-table-grid button:hover,.rj-editor-table-grid button.is-selected{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-table-menu-divider{background:var(--rj-editor-border,#d9dde5);height:1px;margin:2px -12px}.rj-editor-table-menu-row{grid-template-columns:1fr 76px;align-items:center;gap:10px;display:grid}.rj-editor-table-menu-row label{color:var(--rj-editor-text,#111827);font:500 13px/1.2 system-ui,sans-serif}.rj-editor{border:1px solid var(--rj-editor-border,#d9dde5);background:var(--rj-editor-bg,#fff);color:var(--rj-editor-text,#111827);text-align:left;border-radius:8px;transition:border-color .2s,box-shadow .2s;overflow:hidden}.rj-editor-hidden-file-input{display:none!important}.ant-form-item-has-error .rj-editor{border-color:var(--rj-editor-error-border,#ff4d4f);box-shadow:0 0 0 2px var(--rj-editor-error-shadow,#ff4d4f1a)}.ant-form-item-has-warning .rj-editor{border-color:var(--rj-editor-warning-border,#faad14);box-shadow:0 0 0 2px var(--rj-editor-warning-shadow,#faad141a)}.rj-editor--fullscreen{z-index:1000;border-radius:0;flex-direction:column;display:flex;position:fixed;inset:0}.rj-editor-body{flex:auto;min-height:0;position:relative}.rj-editor-input{outline:none;min-height:220px;padding:18px}.rj-editor--fullscreen .rj-editor-input{height:100%;min-height:0;overflow:auto}.rj-editor-placeholder{color:var(--rj-editor-placeholder,#8a94a6);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;top:18px;left:18px}.rj-editor-paragraph{margin:0 0 12px}.rj-editor-paragraph:last-child{margin-bottom:0}.rj-editor-text-bold{font-weight:700}.rj-editor-text-italic{font-style:italic}.rj-editor-text-strikethrough{text-decoration:line-through}.rj-editor-text-subscript{vertical-align:sub;font-size:.75em}.rj-editor-text-superscript{vertical-align:super;font-size:.75em}.rj-editor-text-underline{text-decoration:underline}.rj-editor-input a{color:var(--rj-editor-link,#2563eb);text-decoration:underline}.rj-editor-input hr{border:0;border-top:1px solid var(--rj-editor-border,#d9dde5);margin:16px 0}.rj-editor-equation-node{display:inline}.rj-editor-equation{cursor:pointer;vertical-align:middle;border-radius:6px;max-width:100%;padding:2px 4px;display:inline-flex}.rj-editor-equation--block{justify-content:center;width:100%;margin:10px 0;padding:8px;display:flex;overflow-x:auto}.rj-editor-equation-editor{flex-direction:column;align-items:center;gap:8px;max-width:100%;display:inline-flex}.rj-editor-equation-editor input{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:1px solid var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);resize:none;text-align:center;border-radius:4px;outline:none;min-width:260px;min-height:34px;padding:4px 8px;font:500 18px/1.25 Georgia,Times New Roman,serif}.rj-editor-equation-editor input::placeholder,.rj-editor-equation-content.is-empty{color:var(--rj-editor-placeholder,#8a94a6)}.rj-editor-equation-fraction-editor{place-items:center;gap:2px;min-width:52px;display:inline-grid}.rj-editor-equation-fraction-editor input{min-width:44px;min-height:30px;padding:2px 6px}.rj-editor-equation-fraction-line{background:var(--rj-editor-text,#111827);width:100%;height:2px;display:block}.rj-editor-equation.is-selected{outline:2px solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:2px}.rj-editor-equation-content,.rj-editor-equation-content math{max-width:100%}.rj-editor-equation-content .katex-display{margin:0}.rj-editor-image-node{margin:12px 0;display:block}.rj-editor-youtube-node{clear:both;margin:16px 0;display:block}.rj-editor-youtube{aspect-ratio:16/9;background:var(--rj-editor-toolbar-bg,#f8fafc);border:1px solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:8px;width:100%;max-width:720px;overflow:hidden}.rj-editor-youtube.is-selected{outline:2px solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:2px}.rj-editor-youtube iframe{border:0;width:100%;height:100%;display:block}.rj-editor-image-frame{width:100%;display:flex;position:relative}.rj-editor-image-frame--wrap-square{width:auto;max-width:100%;display:block}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--left{float:left;margin:4px 16px 10px 0}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--right{float:right;margin:4px 0 10px 16px}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--center,.rj-editor-image-frame--wrap-top-bottom{clear:both;width:100%;display:flex}.rj-editor-image-frame--left{justify-content:flex-start}.rj-editor-image-frame--center{justify-content:center}.rj-editor-image-frame--right{justify-content:flex-end}.rj-editor-image{width:100%;max-width:100%;height:auto;display:block}.rj-editor-image-box{transform-origin:50%;flex-direction:column;display:inline-flex;position:relative}.rj-editor-image-rotator{transform:rotate(var(--rj-image-rotation,0deg));transform-origin:50%;width:100%;display:block}.rj-editor-image-box.is-quarter-turn{display:block}.rj-editor-image-box.is-quarter-turn .rj-editor-image-rotator{transform:translate(-50%, -50%) rotate(var(--rj-image-rotation,0deg));position:absolute;top:50%;left:50%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-link,.rj-editor-image-box.is-quarter-turn .rj-editor-image{width:100%;max-width:none;height:100%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-caption{width:100%;position:absolute;top:100%;left:0}.rj-editor-image-box.has-border .rj-editor-image{border:1px solid var(--rj-editor-image-border,#94a3b8)}.rj-editor-image-box.has-shadow .rj-editor-image{box-shadow:var(--rj-editor-image-shadow,0 14px 32px #0f172a2e)}.rj-editor-image-link{display:block}.rj-editor-image-caption{color:var(--rj-editor-muted-text,#64748b);text-align:center;margin-top:6px;font:500 12px/1.35 system-ui,sans-serif;display:block}.rj-editor-image-frame.is-selected .rj-editor-image-box{outline:2px solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:2px}.rj-editor-image-floating-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border:1px solid var(--rj-editor-border,#d9dde5);z-index:1005;border-radius:8px;align-items:center;gap:4px;padding:4px;display:inline-flex;position:absolute;box-shadow:0 12px 28px #0f172a24}.rj-editor-image-floating-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:1px solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;min-width:28px;height:28px;padding:0 7px;font:500 12px/1 system-ui,sans-serif;display:inline-flex}.rj-editor-image-floating-toolbar button svg{width:20px;height:20px}.rj-editor-image-floating-toolbar button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-image-resize-handle{background:var(--rj-editor-focus-border,#7aa7f7);border:2px solid var(--rj-editor-bg,#fff);touch-action:none;z-index:2;border-radius:999px;width:12px;height:12px;position:absolute;transform:translate(-50%,-50%)}.rj-editor-image-resize-handle--left{cursor:ew-resize;top:50%;left:0}.rj-editor-image-resize-handle--right{cursor:ew-resize;top:50%;left:100%}.rj-editor-image-resize-handle--top{cursor:ns-resize;top:0;left:50%}.rj-editor-image-resize-handle--bottom{cursor:ns-resize;top:100%;left:50%}.rj-editor-image-resize-handle--top-left{cursor:nwse-resize;top:0;left:0}.rj-editor-image-resize-handle--top-right{cursor:nesw-resize;top:0;left:100%}.rj-editor-image-resize-handle--bottom-right{cursor:nwse-resize;top:100%;left:100%}.rj-editor-image-resize-handle--bottom-left{cursor:nesw-resize;top:100%;left:0}.rj-editor-table-scrollable-wrapper{max-width:100%;margin:12px 0;overflow-x:auto}.rj-editor-table{border-collapse:collapse;table-layout:fixed;width:100%}.rj-editor-table-cell,.rj-editor-table-cell-header{border:1px solid var(--rj-editor-table-border,#cbd5e1);vertical-align:top;min-width:80px;padding:8px 10px}.rj-editor-table-cell-header{background:var(--rj-editor-table-header-bg,#f1f5f9);font-weight:700}.rj-editor-table-cell-selected{background:var(--rj-editor-table-selected-bg,#eaf2ff);outline:2px solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:-2px}.rj-editor-list-ol,.rj-editor-list-ul{margin:0 0 12px 24px;padding:0}.rj-editor-list-item{margin:4px 0}
|
|
2
2
|
/*$vite$:1*/
|