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