oolong-engine 0.0.2-t.6 → 0.0.2-t.7
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/dist/ability/checkbox/CheckboxWorker.d.ts +1 -1
- package/dist/ability/create/handler/DocCreateHandler.d.ts +7 -0
- package/dist/ability/delete/DeleteWorker.d.ts +1 -1
- package/dist/ability/doc/DocContainerChildrenSortPosWorker.d.ts +8 -0
- package/dist/ability/doc/DocContainerConstants.d.ts +7 -0
- package/dist/ability/doc/DocContainerCreator.d.ts +23 -0
- package/dist/ability/line/BatchLineTextWorker.d.ts +1 -1
- package/dist/ability/line/CollectRelatedLineWorker.d.ts +8 -0
- package/dist/ability/line/LayoutWorker.d.ts +2 -1
- package/dist/ability/line/LineTextWorker.d.ts +1 -1
- package/dist/ability/line/handler/AbsLineLayoutHandler.d.ts +2 -1
- package/dist/ability/line/handler/CurveLayoutHandler.d.ts +1 -1
- package/dist/ability/line/handler/SimpleLineLayoutHandler.d.ts +1 -1
- package/dist/ability/line/handler/polyline/PolyLineLayoutHandler.d.ts +1 -1
- package/dist/ability/textInput/textFont/AbsTextFontWorker.d.ts +2 -0
- package/dist/ability/textInput/textFont/TextFontSizeWorker.d.ts +6 -0
- package/dist/ability/textInput/textParagraphPrefix/TextNormalWorker.d.ts +3 -1
- package/dist/ability/textInput/textParagraphPrefix/TextOrderWorker.d.ts +3 -1
- package/dist/ability/textInput/textParagraphPrefix/TextParaPrefixWorker.d.ts +2 -1
- package/dist/ability/textInput/textParagraphPrefix/TextQuoteWorker.d.ts +3 -1
- package/dist/ability/textInput/textParagraphPrefix/TextUnOrderWorker.d.ts +3 -1
- package/dist/action/executor/afterInterceptor/slide/AfterSlideCoverUpdateInterceptor.d.ts +15 -0
- package/dist/action/executor/beforeInterceptor/slide/SlideCoverUpdateInterceptor.d.ts +3 -4
- package/dist/action/render/IFocusInfo.d.ts +5 -0
- package/dist/action/render/RenderManager.d.ts +5 -7
- package/dist/action/render/drawMode/AbsDrawMode.d.ts +6 -0
- package/dist/action/render/drawMode/DocEditDrawMode.d.ts +7 -0
- package/dist/action/render/drawMode/NormalDrawMode.d.ts +7 -0
- package/dist/action/render/drawMode/SlideEditDrawMode.d.ts +7 -0
- package/dist/action/render/drawMode/SlidePlayingDrawMode.d.ts +7 -0
- package/dist/app/AppEventContext.d.ts +4 -1
- package/dist/app/OolongApp.d.ts +2 -0
- package/dist/app/api/OolongAPI.d.ts +3 -0
- package/dist/app/api/module/CreateAPI.d.ts +4 -0
- package/dist/app/api/module/doc/DocAPI.d.ts +8 -0
- package/dist/app/api/module/text/TextAPI.d.ts +11 -0
- package/dist/app/docModeManager/DocModeSwitchContext.d.ts +2 -0
- package/dist/app/docModeManager/switchHandler/AbsSwitchHandler.d.ts +2 -2
- package/dist/app/docModeManager/switchHandler/board/BoardToDocEditHandler.d.ts +6 -0
- package/dist/app/docModeManager/switchHandler/board/BoardToSlideEditHandler.d.ts +2 -2
- package/dist/app/docModeManager/switchHandler/board/BoardToSlidePlayHandler.d.ts +2 -2
- package/dist/app/docModeManager/switchHandler/docEdit/DocEditToBoardHandler.d.ts +6 -0
- package/dist/app/docModeManager/switchHandler/slide-edit/SlideEditToBoardHandler.d.ts +2 -2
- package/dist/app/docModeManager/switchHandler/slide-play/SlidePlayToBoardHandler.d.ts +2 -2
- package/dist/app/docState/DocMode.d.ts +2 -1
- package/dist/app/docState/DocModeStatus.d.ts +8 -0
- package/dist/app/docState/DocState.d.ts +5 -0
- package/dist/app/docState/SlideStatus.d.ts +1 -1
- package/dist/auxiliary/graphics/AuxiliaryType.d.ts +9 -1
- package/dist/auxiliary/graphics/hover/DocContainerTextHoverBound.d.ts +15 -0
- package/dist/auxiliary/graphics/select/DocContainerTextSelectBound.d.ts +15 -0
- package/dist/common/detect/DetectorEnum.d.ts +2 -1
- package/dist/doc/DocManager.d.ts +5 -0
- package/dist/engine.js +8956 -7340
- package/dist/engine.umd.cjs +18 -18
- package/dist/graphics/OolongDocContainer.d.ts +16 -0
- package/dist/graphics/OolongNode.d.ts +2 -0
- package/dist/graphics/line/LineIntersectionUtils.d.ts +1 -1
- package/dist/graphics/line/arrow/AbsArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/CircleArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/DiamondArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/EmptyCircleArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/EmptyDiamondArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/EmptyTriangleArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/SimpleArrowDrawer.d.ts +1 -1
- package/dist/graphics/line/arrow/TriangleArrowDrawer.d.ts +1 -1
- package/dist/graphics/props/DocProps.d.ts +11 -0
- package/dist/graphics/props/PropType.d.ts +2 -1
- package/dist/graphics/utils/GraphicUtils.d.ts +21 -6
- package/dist/idl/NodeType.d.ts +1 -0
- package/dist/idl/capInfo/ICapInfo.d.ts +2 -0
- package/dist/idl/capInfo/IDocProps.d.ts +3 -0
- package/dist/index.css +1 -1
- package/dist/plugin-copy-paste/copy-paste/paste/img/ImgPasteHandler.d.ts +27 -0
- package/dist/plugin-hotkey/hotkey/normal/DeleteKey.d.ts +1 -1
- package/dist/plugin-hotkey/hotkey/normal/move/ArrowDownKey.d.ts +2 -0
- package/dist/plugin-hotkey/hotkey/normal/move/ArrowLeftKey.d.ts +2 -0
- package/dist/plugin-hotkey/hotkey/normal/move/ArrowRightKey.d.ts +2 -0
- package/dist/plugin-hotkey/hotkey/normal/move/ArrowUpKey.d.ts +2 -0
- package/dist/plugin-hotkey/hotkey/normal/move/DocContainerArrowWorker.d.ts +19 -0
- package/dist/plugin-hotkey/hotkey/text/AbsArrowKey.d.ts +33 -0
- package/dist/plugin-hotkey/hotkey/text/ArrowDownKey.d.ts +1 -0
- package/dist/plugin-hotkey/hotkey/text/ArrowLeftKey.d.ts +1 -0
- package/dist/plugin-hotkey/hotkey/text/ArrowRightKey.d.ts +1 -0
- package/dist/plugin-hotkey/hotkey/text/ArrowUpKey.d.ts +1 -0
- package/dist/plugin-hotkey/hotkey/text/deleteKey/DeleteHandler.d.ts +17 -0
- package/dist/plugin-hotkey/hotkey/text/deleteKey/DocContainerDeleteHandler.d.ts +26 -0
- package/dist/plugin-hotkey/hotkey/text/deleteKey/NormalDeleteHandler.d.ts +13 -0
- package/dist/plugin-hotkey/hotkey/text/deleteKey/TextDeleteKey.d.ts +13 -0
- package/dist/plugin-hotkey/hotkey/text/deleteKey/index.d.ts +4 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/DocContainerEnterHandler.d.ts +16 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/DocContainerEnterStep.d.ts +48 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/DocContainerTextSplitter.d.ts +18 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/EnterHandler.d.ts +15 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/EnterHotKey.d.ts +13 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/ListLevelDecreaseHelper.d.ts +29 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/NormalEnterHandler.d.ts +16 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/index.d.ts +7 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/AdjustSiblingsStep.d.ts +9 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/CreateNewNodeStep.d.ts +13 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/ExpandContainerStep.d.ts +8 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/FocusNewNodeStep.d.ts +7 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/UpdateChildrenStep.d.ts +7 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/UpdateCurrentNodeStep.d.ts +8 -0
- package/dist/plugin-hotkey/hotkey/text/enterKey/steps/index.d.ts +6 -0
- package/dist/plugin-hotkey/index.d.ts +2 -2
- package/dist/plugin-pointer/interact/default/click/handler/ClickDocContainerTextHandler.d.ts +17 -0
- package/dist/plugin-pointer/interact/default/click/handler/ClickTextHandler.d.ts +3 -2
- package/dist/plugin-pointer/interact/default/click/handler/widget/CheckboxHandler.d.ts +1 -1
- package/dist/plugin-pointer/interact/default/create/normal/grab/handler/CreateUpDocHandler.d.ts +15 -0
- package/dist/plugin-pointer/interact/default/dbClick/handler/DBClickTextHandler.d.ts +3 -2
- package/dist/plugin-pointer/interact/default/dbClick/handler/DbCheckboxHandler.d.ts +1 -1
- package/dist/plugin-pointer/interact/default/dragSlide/DragSlideProcessor.d.ts +4 -0
- package/dist/plugin-pointer/interact/default/normal/hover/handler/HoverDocContainerTextHandler.d.ts +11 -0
- package/dist/plugin-pointer/interact/detector/DetectorResult.d.ts +2 -0
- package/dist/plugin-pointer/interact/detector/doc/DocParaDetector.d.ts +14 -0
- package/dist/preview/previewCreate/handler/PreviewDocHandler.d.ts +7 -0
- package/dist/select/status/single/SingleDocContainerTextStatusHandler.d.ts +11 -0
- package/dist/slide/SlideManager.d.ts +1 -1
- package/dist/slot/SlotKeyType.d.ts +2 -1
- package/dist/tool/ToolEnum.d.ts +2 -1
- package/dist/tool/ToolManager.d.ts +1 -1
- package/package.json +1 -2
- package/dist/plugin-hotkey/hotkey/text/EnterHotKey.d.ts +0 -14
- package/dist/plugin-hotkey/hotkey/text/TextDeleteKey.d.ts +0 -11
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EnterHandler } from "./EnterHandler";
|
|
2
|
+
import { AppEventContext } from "../../../../app";
|
|
3
|
+
import { EditTextInfo } from "../../../../input/EditTextInfo";
|
|
4
|
+
/**
|
|
5
|
+
* 普通文本节点的 Enter 键处理器
|
|
6
|
+
* 在文本中插入换行
|
|
7
|
+
*/
|
|
8
|
+
export declare class NormalEnterHandler extends EnterHandler {
|
|
9
|
+
private styleWorker;
|
|
10
|
+
private editTextWorker;
|
|
11
|
+
private selectionDeleteWorker;
|
|
12
|
+
private lineBreakWorker;
|
|
13
|
+
private listLevelHelper;
|
|
14
|
+
enable(_editInfo: EditTextInfo): boolean;
|
|
15
|
+
handle(context: AppEventContext): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { EnterHotKey } from "./EnterHotKey";
|
|
2
|
+
export { EnterHandler } from "./EnterHandler";
|
|
3
|
+
export { DocContainerEnterHandler } from "./DocContainerEnterHandler";
|
|
4
|
+
export { NormalEnterHandler } from "./NormalEnterHandler";
|
|
5
|
+
export { DocContainerTextSplitter } from "./DocContainerTextSplitter";
|
|
6
|
+
export { DocContainerEnterStep } from "./DocContainerEnterStep";
|
|
7
|
+
export type { DocContainerEnterContext } from "./DocContainerEnterStep";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DocContainerEnterStep, DocContainerEnterContext } from "../DocContainerEnterStep";
|
|
2
|
+
import { DocContainerChildrenSortPosWorker } from "@/ability/doc/DocContainerChildrenSortPosWorker";
|
|
3
|
+
/**
|
|
4
|
+
* 步骤3: 调整后续兄弟节点的位置
|
|
5
|
+
*/
|
|
6
|
+
export declare class AdjustSiblingsStep extends DocContainerEnterStep {
|
|
7
|
+
docPosWorker: DocContainerChildrenSortPosWorker;
|
|
8
|
+
execute(ctx: DocContainerEnterContext): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocContainerEnterStep, DocContainerEnterContext } from "../DocContainerEnterStep";
|
|
2
|
+
/**
|
|
3
|
+
* 步骤2: 创建新的文本节点
|
|
4
|
+
*/
|
|
5
|
+
export declare class CreateNewNodeStep extends DocContainerEnterStep {
|
|
6
|
+
execute(ctx: DocContainerEnterContext): void;
|
|
7
|
+
/**
|
|
8
|
+
* 继承当前节点的列表样式
|
|
9
|
+
* - 无序列表:保持相同的 level,orderIndex 为 -1
|
|
10
|
+
* - 有序列表:保持相同的 level,orderIndex 递增
|
|
11
|
+
*/
|
|
12
|
+
private inheritListStyle;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DocContainerEnterStep, DocContainerEnterContext } from "../DocContainerEnterStep";
|
|
2
|
+
/**
|
|
3
|
+
* 步骤5: 检查并扩展容器高度
|
|
4
|
+
* 如果任何节点超出容器范围,则扩展容器高度
|
|
5
|
+
*/
|
|
6
|
+
export declare class ExpandContainerStep extends DocContainerEnterStep {
|
|
7
|
+
execute(ctx: DocContainerEnterContext): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DocContainerEnterStep, DocContainerEnterContext } from "../DocContainerEnterStep";
|
|
2
|
+
/**
|
|
3
|
+
* 步骤1: 更新当前节点文本(如果需要分割)
|
|
4
|
+
* 删除光标之后的内容
|
|
5
|
+
*/
|
|
6
|
+
export declare class UpdateCurrentNodeStep extends DocContainerEnterStep {
|
|
7
|
+
execute(ctx: DocContainerEnterContext): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { UpdateCurrentNodeStep } from "./UpdateCurrentNodeStep";
|
|
2
|
+
export { CreateNewNodeStep } from "./CreateNewNodeStep";
|
|
3
|
+
export { AdjustSiblingsStep } from "./AdjustSiblingsStep";
|
|
4
|
+
export { UpdateChildrenStep } from "./UpdateChildrenStep";
|
|
5
|
+
export { ExpandContainerStep } from "./ExpandContainerStep";
|
|
6
|
+
export { FocusNewNodeStep } from "./FocusNewNodeStep";
|
|
@@ -17,5 +17,5 @@ export * from "./hotkey/text/ArrowDownKey";
|
|
|
17
17
|
export * from "./hotkey/text/ArrowLeftKey";
|
|
18
18
|
export * from "./hotkey/text/ArrowRightKey";
|
|
19
19
|
export * from "./hotkey/text/ArrowUpKey";
|
|
20
|
-
export * from "./hotkey/text/
|
|
21
|
-
export * from "./hotkey/text/
|
|
20
|
+
export * from "./hotkey/text/enterKey";
|
|
21
|
+
export * from "./hotkey/text/deleteKey";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ClickHandler } from "../../../basic/ClickHandler";
|
|
2
|
+
import { OolongNode } from "../../../../../graphics";
|
|
3
|
+
import { InteractiveEvent } from "../../../../../common";
|
|
4
|
+
import { AppEventContext } from "../../../../../app";
|
|
5
|
+
/**
|
|
6
|
+
* DocContainer 内文本节点的点击处理器
|
|
7
|
+
* 点击时选中节点并直接进入文字编辑态
|
|
8
|
+
*/
|
|
9
|
+
export declare class ClickDocContainerTextHandler extends ClickHandler {
|
|
10
|
+
node: OolongNode | null;
|
|
11
|
+
relativePos: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
} | null;
|
|
15
|
+
enable(event: InteractiveEvent, ctx: AppEventContext): boolean;
|
|
16
|
+
handle(_event: InteractiveEvent, ctx: AppEventContext): void;
|
|
17
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OolongNode } from "../../../../../graphics";
|
|
2
|
+
import type { OolongLine } from "../../../../../graphics/line/OolongLine";
|
|
2
3
|
import { IPoint } from "../../../../../idl";
|
|
3
4
|
import { ClickHandler } from "../../../basic/ClickHandler";
|
|
4
5
|
import { InteractiveEvent } from "../../../../../common";
|
|
5
6
|
import { AppEventContext } from "../../../../../app";
|
|
6
7
|
import { TextCursorPosition } from "../../../../../renderText";
|
|
7
|
-
import { OolongCheckboxText } from "../../../../../graphics/widget/checkbox/OolongCheckboxText";
|
|
8
|
+
import type { OolongCheckboxText } from "../../../../../graphics/widget/checkbox/OolongCheckboxText";
|
|
8
9
|
interface IClickTextRes {
|
|
9
10
|
node: OolongNode | OolongLine | OolongCheckboxText;
|
|
10
11
|
relativePos: IPoint;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClickHandler } from "../../../../basic/ClickHandler";
|
|
2
2
|
import { InteractiveEvent } from "../../../../../../common";
|
|
3
3
|
import { AppEventContext } from "../../../../../../app";
|
|
4
|
-
import { OolongCheckbox } from "../../../../../../graphics/widget/checkbox/OolongCheckbox";
|
|
4
|
+
import type { OolongCheckbox } from "../../../../../../graphics/widget/checkbox/OolongCheckbox";
|
|
5
5
|
import { CheckboxWorker } from "../../../../../../ability/checkbox/CheckboxWorker";
|
|
6
6
|
export declare class CheckboxHandler extends ClickHandler {
|
|
7
7
|
node: OolongCheckbox | null;
|
package/dist/plugin-pointer/interact/default/create/normal/grab/handler/CreateUpDocHandler.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbsCreateUpHandler } from "./AbsCreateUpHandler";
|
|
2
|
+
import { ToolEnum } from "../../../../../../../tool";
|
|
3
|
+
import { AppEventContext } from "../../../../../../../app";
|
|
4
|
+
import { IPoint } from "../../../../../../../idl";
|
|
5
|
+
import { InteractiveEvent } from "../../../../../../../common";
|
|
6
|
+
import { AddNodeInfo } from "../../../../../../../action";
|
|
7
|
+
export declare class CreateUpDocHandler extends AbsCreateUpHandler {
|
|
8
|
+
autoFocus(): boolean;
|
|
9
|
+
enable(tool: ToolEnum, shapeCode: number): boolean;
|
|
10
|
+
makeupAddNodeInfo(ctx: AppEventContext, startPos: IPoint, event: InteractiveEvent): Promise<AddNodeInfo>;
|
|
11
|
+
/**
|
|
12
|
+
* 重写 handle 方法以支持创建带子节点的 DocContainer
|
|
13
|
+
*/
|
|
14
|
+
handle(ctx: AppEventContext, startPos: IPoint, event: InteractiveEvent): void;
|
|
15
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { OolongLine
|
|
1
|
+
import type { OolongLine } from "../../../../../graphics";
|
|
2
|
+
import { OolongNode } from "../../../../../graphics";
|
|
2
3
|
import { IPoint } from "../../../../../idl";
|
|
3
4
|
import { ClickHandler } from "../../../basic/ClickHandler";
|
|
4
5
|
import { InteractiveEvent } from "../../../../../common";
|
|
5
6
|
import { AppEventContext } from "../../../../../app";
|
|
6
|
-
import { OolongCheckboxText } from "../../../../../graphics/widget/checkbox/OolongCheckboxText";
|
|
7
|
+
import type { OolongCheckboxText } from "../../../../../graphics/widget/checkbox/OolongCheckboxText";
|
|
7
8
|
interface IClickTextRes {
|
|
8
9
|
node: OolongNode | OolongLine | OolongCheckboxText;
|
|
9
10
|
relativePos: IPoint;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClickHandler } from "../../../basic/ClickHandler";
|
|
2
2
|
import { InteractiveEvent } from "../../../../../common";
|
|
3
3
|
import { AppEventContext } from "../../../../../app";
|
|
4
|
-
import { OolongCheckbox } from "../../../../../graphics/widget/checkbox/OolongCheckbox";
|
|
4
|
+
import type { OolongCheckbox } from "../../../../../graphics/widget/checkbox/OolongCheckbox";
|
|
5
5
|
import { CheckboxWorker } from "../../../../../ability/checkbox/CheckboxWorker";
|
|
6
6
|
export declare class DbCheckboxHandler extends ClickHandler {
|
|
7
7
|
node: OolongCheckbox | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StreamProcessor } from "../../basic/StreamProcessor";
|
|
2
2
|
import { InteractiveEvent } from "../../../../common";
|
|
3
3
|
import { AppEventContext } from "../../../../app";
|
|
4
|
+
import { LayoutWorker } from "@/ability/line/LayoutWorker";
|
|
4
5
|
export declare class DragSlideProcessor extends StreamProcessor {
|
|
5
6
|
private originPos;
|
|
6
7
|
private originNodePos;
|
|
@@ -14,9 +15,12 @@ export declare class DragSlideProcessor extends StreamProcessor {
|
|
|
14
15
|
private isInsertNewRow;
|
|
15
16
|
private originIndex;
|
|
16
17
|
private insertIndex;
|
|
18
|
+
layoutWorker: LayoutWorker;
|
|
17
19
|
private computeRowNodes;
|
|
18
20
|
onStart(event: InteractiveEvent, ctx: AppEventContext): void;
|
|
19
21
|
onMove(event: InteractiveEvent, ctx: AppEventContext): void;
|
|
22
|
+
private batchCollectNodeLinks;
|
|
23
|
+
private collectNodeLinks;
|
|
20
24
|
/**
|
|
21
25
|
* 重新布局一行的所有节点
|
|
22
26
|
*/
|
package/dist/plugin-pointer/interact/default/normal/hover/handler/HoverDocContainerTextHandler.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GraphicNode } from "../../../../../../graphics";
|
|
2
|
+
import { AppEventContext } from "../../../../../../app";
|
|
3
|
+
import { AbsHoverHandler } from "./AbsHoverHandler";
|
|
4
|
+
/**
|
|
5
|
+
* DocContainer 内文本节点的 hover 处理器
|
|
6
|
+
* 显示浅灰色背景效果
|
|
7
|
+
*/
|
|
8
|
+
export declare class HoverDocContainerTextHandler implements AbsHoverHandler {
|
|
9
|
+
enable(node: GraphicNode): boolean;
|
|
10
|
+
handle(node: GraphicNode, ctx: AppEventContext): void;
|
|
11
|
+
}
|
|
@@ -19,6 +19,7 @@ import { CurveEndPointDetector } from "./line/CurveEndPointDetector";
|
|
|
19
19
|
import { DragLineTextDetector } from "./dragText/DragLineTextDetector";
|
|
20
20
|
import { SlideGapDetector } from "./slide/SlideGapDetector";
|
|
21
21
|
import { EmptySlideContainerAddDetector } from "./slide/EmptySlideContainerAddDetector";
|
|
22
|
+
import { DocParaDetector } from "./doc/DocParaDetector";
|
|
22
23
|
export interface DetectorResult {
|
|
23
24
|
[DetectorEnum.Node]: NodeDetector["result"];
|
|
24
25
|
[DetectorEnum.HoverNode]: HoverNodeDetector["result"];
|
|
@@ -40,5 +41,6 @@ export interface DetectorResult {
|
|
|
40
41
|
[DetectorEnum.DragLineText]: DragLineTextDetector["result"];
|
|
41
42
|
[DetectorEnum.SlideGap]: SlideGapDetector["result"];
|
|
42
43
|
[DetectorEnum.EmptySlideContainer]: EmptySlideContainerAddDetector["result"];
|
|
44
|
+
[DetectorEnum.DocPara]: DocParaDetector["result"];
|
|
43
45
|
[key: number]: any;
|
|
44
46
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbsDetector, InteractiveEvent } from "@/common";
|
|
2
|
+
import { AppEventContext } from "@/app";
|
|
3
|
+
import { OolongDocContainer } from "@/graphics/OolongDocContainer";
|
|
4
|
+
import { OolongNode } from "@/graphics";
|
|
5
|
+
import { IPoint } from "@/idl";
|
|
6
|
+
export interface DocParaResult {
|
|
7
|
+
docContainer: OolongDocContainer;
|
|
8
|
+
hoverPara: OolongNode;
|
|
9
|
+
hoverParaIndex: number;
|
|
10
|
+
clientPoint: IPoint;
|
|
11
|
+
}
|
|
12
|
+
export declare class DocParaDetector extends AbsDetector<DocParaResult> {
|
|
13
|
+
protected onDetect(event: InteractiveEvent, ctx: AppEventContext): boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ToolEnum } from "../../../tool";
|
|
2
|
+
import { AppEventContext } from "../../../app";
|
|
3
|
+
import { AbsPreviewHandler } from "./AbsPreviewHandler";
|
|
4
|
+
export declare class PreviewDocHandler extends AbsPreviewHandler {
|
|
5
|
+
enable(tool: ToolEnum, shapeType: number): boolean;
|
|
6
|
+
handle(id: string, ctx: AppEventContext): Promise<import("../../..").GraphicNode>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbsStatusHandler } from "../AbsStatusHandler";
|
|
2
|
+
import { GraphicNode } from "../../../graphics";
|
|
3
|
+
import { AuxiliaryManager } from "../../../auxiliary";
|
|
4
|
+
/**
|
|
5
|
+
* DocContainer 内文本节点的单选状态处理器
|
|
6
|
+
* 显示浅灰色背景和文字副本
|
|
7
|
+
*/
|
|
8
|
+
export declare class SingleDocContainerTextStatusHandler extends AbsStatusHandler {
|
|
9
|
+
enable(nodes: GraphicNode[]): boolean;
|
|
10
|
+
handle(nodes: GraphicNode[], auxiliary: AuxiliaryManager): void;
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SlidePlayWorker } from "../ability/slide/SlidePlayWorker";
|
|
2
|
-
import { OolongSlideContainer } from "../graphics/OolongSlideContainer";
|
|
2
|
+
import type { OolongSlideContainer } from "../graphics/OolongSlideContainer";
|
|
3
3
|
import { GraphicNode } from "../graphics";
|
|
4
4
|
import { AppEventContext, DocState } from "../app";
|
|
5
5
|
import { SlideCoverManager } from "./SlideCoverManager";
|
package/dist/tool/ToolEnum.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { NodeManager } from "../application";
|
|
|
2
2
|
import { InputManager } from "../input/InputManager";
|
|
3
3
|
import { ToolEnum } from "./ToolEnum";
|
|
4
4
|
import { SlotManager } from "../slot";
|
|
5
|
-
import { OolongLine } from "../graphics";
|
|
5
|
+
import type { OolongLine } from "../graphics";
|
|
6
6
|
import { CursorManager } from "../cursor/CursorManager";
|
|
7
7
|
export declare class ToolManager {
|
|
8
8
|
nodeManager: NodeManager;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oolong-engine",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.2-t.
|
|
4
|
+
"version": "0.0.2-t.7",
|
|
5
5
|
"main": "./dist/engine.umd.cjs",
|
|
6
6
|
"module": "./dist/engine.js",
|
|
7
7
|
"type": "module",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"test": "jest"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"canvg": "^4.0.2",
|
|
35
34
|
"crypto-js": "^4.2.0",
|
|
36
35
|
"jspdf": "^3.0.1",
|
|
37
36
|
"kld-intersections": "^0.7.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HotKey } from "../HotKey";
|
|
2
|
-
import { EditTextWorker, TextSelectionDeleteWorker } from "../../../renderText";
|
|
3
|
-
import { AppEventContext } from "../../../app";
|
|
4
|
-
import { TextLineBreakWorker } from "../../../ability/textInput/TextLineBreakWorker";
|
|
5
|
-
import { TextParagraphStyleWorker } from "../../../ability/textInput/TextParagraphStyleWorker";
|
|
6
|
-
export declare class EnterHotKey extends HotKey {
|
|
7
|
-
styleWorker: TextParagraphStyleWorker;
|
|
8
|
-
type: string;
|
|
9
|
-
editTextWorker: EditTextWorker;
|
|
10
|
-
selectionDeleteWorker: TextSelectionDeleteWorker;
|
|
11
|
-
lineBreakWorker: TextLineBreakWorker;
|
|
12
|
-
enable(_event: KeyboardEvent): boolean;
|
|
13
|
-
work(_event: KeyboardEvent, context: AppEventContext): void;
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HotKey } from "../HotKey";
|
|
2
|
-
import { EditTextWorker, GraphemeSplit, TextSelectionDeleteWorker } from "../../../renderText/index";
|
|
3
|
-
import { AppEventContext } from "../../../app/index";
|
|
4
|
-
export declare class TextDeleteKey extends HotKey {
|
|
5
|
-
type: string;
|
|
6
|
-
editTextWorker: EditTextWorker;
|
|
7
|
-
graphemeSplit: GraphemeSplit;
|
|
8
|
-
selectionDeleteWorker: TextSelectionDeleteWorker;
|
|
9
|
-
enable(_event: KeyboardEvent): boolean;
|
|
10
|
-
work(_event: KeyboardEvent, context: AppEventContext): void;
|
|
11
|
-
}
|