@linker-design-plus/tiny-peony 1.3.12 → 1.4.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/dist/index.d.ts +12 -6
- package/dist/index.js +35 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2729 -2578
- package/dist/index.mjs.map +1 -1
- package/dist/intersection/components/editor/context.d.ts +1 -1
- package/dist/intersection/components/editor/editor.d.ts +4 -2
- package/dist/intersection/components/editor/index.d.ts +12 -6
- package/dist/intersection/hooks/use-editor.d.ts +1 -1
- package/dist/plugins/AnchorTagPlugin/plugin.d.ts +2 -0
- package/dist/typings/actions/i-anchor.d.ts +7 -0
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ export interface EditorContext {
|
|
|
35
35
|
isRange: () => boolean;
|
|
36
36
|
isSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
37
37
|
getAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
38
|
-
getAnchorTtsEmotionAndRole: (
|
|
38
|
+
getAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
39
39
|
isAllMarkedByAnchor: () => boolean;
|
|
40
40
|
addExtraAnchors: (data: IAnchor[]) => void;
|
|
41
41
|
clearContent: () => void;
|
|
@@ -87,9 +87,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
87
87
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
88
88
|
innerIsSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
89
89
|
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
90
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
90
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
91
91
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
92
92
|
innerAddExtraAnchors: (data: IAnchor[]) => void;
|
|
93
|
+
innerUpdateAnchor: (newAnchor: IAnchor) => void;
|
|
93
94
|
innerClearContent: () => void;
|
|
94
95
|
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
95
96
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
@@ -109,9 +110,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
109
110
|
isSelectionInDifferentParas(): boolean;
|
|
110
111
|
isSelectionContainsTag(type: PluginFlag): boolean;
|
|
111
112
|
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
112
|
-
getAnchorTtsEmotionAndRole(
|
|
113
|
+
getAnchorTtsEmotionAndRole(anchor: IAnchor): [string, string | undefined];
|
|
113
114
|
isAllMarkedByAnchor(): boolean;
|
|
114
115
|
addExtraAnchors(data: IAnchor[]): void;
|
|
116
|
+
updateAnchor(anchor: IAnchor): void;
|
|
115
117
|
clearContent(): void;
|
|
116
118
|
insertContentAtCursor(_content: string | string[]): void;
|
|
117
119
|
clear(): Promise<void>;
|
|
@@ -87,9 +87,10 @@ declare const EditorContainer: {
|
|
|
87
87
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
88
88
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
89
89
|
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
90
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
90
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
91
91
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
92
92
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
93
|
+
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
93
94
|
innerClearContent: () => void;
|
|
94
95
|
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
95
96
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
@@ -109,9 +110,10 @@ declare const EditorContainer: {
|
|
|
109
110
|
isSelectionInDifferentParas(): boolean;
|
|
110
111
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
111
112
|
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
112
|
-
getAnchorTtsEmotionAndRole(
|
|
113
|
+
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
113
114
|
isAllMarkedByAnchor(): boolean;
|
|
114
115
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
116
|
+
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
115
117
|
clearContent(): void;
|
|
116
118
|
insertContentAtCursor(_content: string | string[]): void;
|
|
117
119
|
clear(): Promise<void>;
|
|
@@ -231,9 +233,10 @@ declare const EditorContainer: {
|
|
|
231
233
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
232
234
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
233
235
|
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
234
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
236
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
235
237
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
236
238
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
239
|
+
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
237
240
|
innerClearContent: () => void;
|
|
238
241
|
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
239
242
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
@@ -253,9 +256,10 @@ declare const EditorContainer: {
|
|
|
253
256
|
isSelectionInDifferentParas(): boolean;
|
|
254
257
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
255
258
|
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
256
|
-
getAnchorTtsEmotionAndRole(
|
|
259
|
+
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
257
260
|
isAllMarkedByAnchor(): boolean;
|
|
258
261
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
262
|
+
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
259
263
|
clearContent(): void;
|
|
260
264
|
insertContentAtCursor(_content: string | string[]): void;
|
|
261
265
|
clear(): Promise<void>;
|
|
@@ -366,9 +370,10 @@ declare const EditorContainer: {
|
|
|
366
370
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
367
371
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
368
372
|
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
369
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
373
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
370
374
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
371
375
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
376
|
+
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
372
377
|
innerClearContent: () => void;
|
|
373
378
|
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
374
379
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
@@ -388,9 +393,10 @@ declare const EditorContainer: {
|
|
|
388
393
|
isSelectionInDifferentParas(): boolean;
|
|
389
394
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
390
395
|
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
391
|
-
getAnchorTtsEmotionAndRole(
|
|
396
|
+
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
392
397
|
isAllMarkedByAnchor(): boolean;
|
|
393
398
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
399
|
+
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
394
400
|
clearContent(): void;
|
|
395
401
|
insertContentAtCursor(_content: string | string[]): void;
|
|
396
402
|
clear(): Promise<void>;
|
|
@@ -45,7 +45,7 @@ export declare const useEditor: (editor: Ref<HTMLDivElement | undefined>, props:
|
|
|
45
45
|
isSelectionInDifferentParas: () => boolean;
|
|
46
46
|
isSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
47
47
|
getAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
48
|
-
getAnchorTtsEmotionAndRole: (
|
|
48
|
+
getAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
49
49
|
isAllMarkedByAnchor: () => boolean;
|
|
50
50
|
addExtraAnchors: (data: IAnchor[]) => void;
|
|
51
51
|
clearContent: () => void;
|
|
@@ -15,11 +15,13 @@ export declare class AnchorTagPlugin<T extends Record<string, any> = {
|
|
|
15
15
|
constructor(editor: IEditorCore);
|
|
16
16
|
add(options: T): void;
|
|
17
17
|
remove(target: HTMLSpanElement): void;
|
|
18
|
+
private _insertOverlapAnchor;
|
|
18
19
|
private _recordAnchor;
|
|
19
20
|
private get _newAnchorId();
|
|
20
21
|
private _insertAnchorTag;
|
|
21
22
|
private _isIntersectOtherAnchors;
|
|
22
23
|
private _calcTopValue;
|
|
24
|
+
private _fixedAnchorSelection;
|
|
23
25
|
/**
|
|
24
26
|
* MutationObserver 监听编辑器内容变化,当内容变化时重新计算 anchor 的 top 值。
|
|
25
27
|
*
|