@linker-design-plus/tiny-peony 1.4.16 → 1.4.17
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/foundation/contentManager/contentManager.d.ts +5 -0
- package/dist/index.d.ts +72 -21
- package/dist/index.js +42 -34
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4576 -3063
- package/dist/index.mjs.map +1 -0
- package/dist/intersection/components/editor/context.d.ts +128 -2
- package/dist/intersection/components/editor/editor.d.ts +50 -10
- package/dist/intersection/components/editor/index.d.ts +72 -21
- package/dist/intersection/components/modals/Refine/RefineContent.d.ts +20 -0
- package/dist/intersection/components/modals/Refine/RefineGenerator.d.ts +19 -0
- package/dist/intersection/components/modals/Refine/RefineInput.d.ts +18 -0
- package/dist/intersection/components/modals/Refine/RefineShortcut.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/RefineToolbar.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/context.d.ts +128 -0
- package/dist/intersection/components/modals/Refine/icons/abort.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/copy.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/delete.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/expand.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/inexpand.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/insert.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/moreShortcut.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/optimism.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/prefix.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/refresh.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/replace.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/send.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/index.d.ts +3 -0
- package/dist/intersection/components/modals/Refine/use-modal-pos.d.ts +10 -0
- package/dist/intersection/components/modals/Refine/use-range-highlight.d.ts +6 -0
- package/dist/intersection/hooks/use-copy.d.ts +4 -0
- package/dist/intersection/hooks/use-editor.d.ts +3 -2
- package/dist/intersection/hooks/use-state.d.ts +4 -0
- package/dist/plugins/AnchorTagPlugin/plugin.d.ts +4 -0
- package/dist/plugins/HomophonesTagPlugin/homophoner.vue.d.ts +2 -2
- package/dist/plugins/PronunciationTagPlugin/pronunciationor.vue.d.ts +2 -2
- package/dist/tiny-peony.css +1 -1
- package/dist/typings/actions/i-anchor.d.ts +8 -0
- package/dist/typings/intersection/editor.d.ts +10 -1
- package/dist/utils/dom.d.ts +19 -1
- package/dist/utils/shared.d.ts +11 -0
- package/package.json +1 -1
|
@@ -18,4 +18,9 @@ export declare class ContentManager extends IContentManager {
|
|
|
18
18
|
private _insert;
|
|
19
19
|
private _delete;
|
|
20
20
|
private _update;
|
|
21
|
+
/**
|
|
22
|
+
* 将 fragment 插入到 range 所在 contenteditable 的上一个 <p> 元素末尾
|
|
23
|
+
* @param {Range} range - 当前的 Range 对象
|
|
24
|
+
*/
|
|
25
|
+
private _calcRange;
|
|
21
26
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ declare const TinyPeony: {
|
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
18
|
listenAnchorId: {
|
|
19
|
-
type:
|
|
20
|
-
default:
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
21
|
};
|
|
22
22
|
listenMode: {
|
|
23
23
|
type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
|
|
@@ -51,6 +51,17 @@ declare const TinyPeony: {
|
|
|
51
51
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
52
52
|
default: () => {};
|
|
53
53
|
};
|
|
54
|
+
refinable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
refineContext: {
|
|
59
|
+
type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
|
|
60
|
+
};
|
|
61
|
+
editorHeight: {
|
|
62
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
54
65
|
showPreTime: {
|
|
55
66
|
type: BooleanConstructor;
|
|
56
67
|
default: boolean;
|
|
@@ -75,11 +86,13 @@ declare const TinyPeony: {
|
|
|
75
86
|
innerIsRange: () => boolean;
|
|
76
87
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
77
88
|
innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
|
|
78
|
-
innerGetAnchorTtsMark: (
|
|
79
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
89
|
+
innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
|
|
90
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
|
|
80
91
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
81
92
|
innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
|
|
93
|
+
innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
|
|
82
94
|
innerClearContent: () => void;
|
|
95
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
83
96
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
84
97
|
innerUnrenderHightlight: () => void;
|
|
85
98
|
}, {}, {}, {
|
|
@@ -96,11 +109,13 @@ declare const TinyPeony: {
|
|
|
96
109
|
isRange(): boolean;
|
|
97
110
|
isSelectionInDifferentParas(): boolean;
|
|
98
111
|
isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
|
|
99
|
-
getAnchorTtsMark(
|
|
100
|
-
getAnchorTtsEmotionAndRole(
|
|
112
|
+
getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
|
|
113
|
+
getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
|
|
101
114
|
isAllMarkedByAnchor(): boolean;
|
|
102
115
|
addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
|
|
116
|
+
updateAnchor(anchor: import("./typings/index").IAnchor): void;
|
|
103
117
|
clearContent(): void;
|
|
118
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
104
119
|
clear(): Promise<void>;
|
|
105
120
|
renderHighlight(matchingContent: string): void;
|
|
106
121
|
unrenderHighlight(): void;
|
|
@@ -120,9 +135,11 @@ declare const TinyPeony: {
|
|
|
120
135
|
simple: boolean;
|
|
121
136
|
preTime: string;
|
|
122
137
|
textCount: number;
|
|
123
|
-
listenAnchorId:
|
|
138
|
+
listenAnchorId: string;
|
|
124
139
|
listenMode: import("./typings/shared").ListenModeEnum;
|
|
125
140
|
contentStyle: import("vue").CSSProperties;
|
|
141
|
+
refinable: boolean;
|
|
142
|
+
editorHeight: string | number;
|
|
126
143
|
showPreTime: boolean;
|
|
127
144
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
128
145
|
P: {};
|
|
@@ -145,8 +162,8 @@ declare const TinyPeony: {
|
|
|
145
162
|
default: undefined;
|
|
146
163
|
};
|
|
147
164
|
listenAnchorId: {
|
|
148
|
-
type:
|
|
149
|
-
default:
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
default: string;
|
|
150
167
|
};
|
|
151
168
|
listenMode: {
|
|
152
169
|
type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
|
|
@@ -180,6 +197,17 @@ declare const TinyPeony: {
|
|
|
180
197
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
181
198
|
default: () => {};
|
|
182
199
|
};
|
|
200
|
+
refinable: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
default: boolean;
|
|
203
|
+
};
|
|
204
|
+
refineContext: {
|
|
205
|
+
type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
|
|
206
|
+
};
|
|
207
|
+
editorHeight: {
|
|
208
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
209
|
+
default: string;
|
|
210
|
+
};
|
|
183
211
|
showPreTime: {
|
|
184
212
|
type: BooleanConstructor;
|
|
185
213
|
default: boolean;
|
|
@@ -204,11 +232,13 @@ declare const TinyPeony: {
|
|
|
204
232
|
innerIsRange: () => boolean;
|
|
205
233
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
206
234
|
innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
|
|
207
|
-
innerGetAnchorTtsMark: (
|
|
208
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
235
|
+
innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
|
|
236
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
|
|
209
237
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
210
238
|
innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
|
|
239
|
+
innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
|
|
211
240
|
innerClearContent: () => void;
|
|
241
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
212
242
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
213
243
|
innerUnrenderHightlight: () => void;
|
|
214
244
|
}, {}, {}, {
|
|
@@ -225,11 +255,13 @@ declare const TinyPeony: {
|
|
|
225
255
|
isRange(): boolean;
|
|
226
256
|
isSelectionInDifferentParas(): boolean;
|
|
227
257
|
isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
|
|
228
|
-
getAnchorTtsMark(
|
|
229
|
-
getAnchorTtsEmotionAndRole(
|
|
258
|
+
getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
|
|
259
|
+
getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
|
|
230
260
|
isAllMarkedByAnchor(): boolean;
|
|
231
261
|
addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
|
|
262
|
+
updateAnchor(anchor: import("./typings/index").IAnchor): void;
|
|
232
263
|
clearContent(): void;
|
|
264
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
233
265
|
clear(): Promise<void>;
|
|
234
266
|
renderHighlight(matchingContent: string): void;
|
|
235
267
|
unrenderHighlight(): void;
|
|
@@ -243,9 +275,11 @@ declare const TinyPeony: {
|
|
|
243
275
|
simple: boolean;
|
|
244
276
|
preTime: string;
|
|
245
277
|
textCount: number;
|
|
246
|
-
listenAnchorId:
|
|
278
|
+
listenAnchorId: string;
|
|
247
279
|
listenMode: import("./typings/shared").ListenModeEnum;
|
|
248
280
|
contentStyle: import("vue").CSSProperties;
|
|
281
|
+
refinable: boolean;
|
|
282
|
+
editorHeight: string | number;
|
|
249
283
|
showPreTime: boolean;
|
|
250
284
|
}>;
|
|
251
285
|
__isFragment?: never;
|
|
@@ -265,8 +299,8 @@ declare const TinyPeony: {
|
|
|
265
299
|
default: undefined;
|
|
266
300
|
};
|
|
267
301
|
listenAnchorId: {
|
|
268
|
-
type:
|
|
269
|
-
default:
|
|
302
|
+
type: StringConstructor;
|
|
303
|
+
default: string;
|
|
270
304
|
};
|
|
271
305
|
listenMode: {
|
|
272
306
|
type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
|
|
@@ -300,6 +334,17 @@ declare const TinyPeony: {
|
|
|
300
334
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
301
335
|
default: () => {};
|
|
302
336
|
};
|
|
337
|
+
refinable: {
|
|
338
|
+
type: BooleanConstructor;
|
|
339
|
+
default: boolean;
|
|
340
|
+
};
|
|
341
|
+
refineContext: {
|
|
342
|
+
type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
|
|
343
|
+
};
|
|
344
|
+
editorHeight: {
|
|
345
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
346
|
+
default: string;
|
|
347
|
+
};
|
|
303
348
|
showPreTime: {
|
|
304
349
|
type: BooleanConstructor;
|
|
305
350
|
default: boolean;
|
|
@@ -324,11 +369,13 @@ declare const TinyPeony: {
|
|
|
324
369
|
innerIsRange: () => boolean;
|
|
325
370
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
326
371
|
innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
|
|
327
|
-
innerGetAnchorTtsMark: (
|
|
328
|
-
innerGetAnchorTtsEmotionAndRole: (
|
|
372
|
+
innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
|
|
373
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
|
|
329
374
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
330
375
|
innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
|
|
376
|
+
innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
|
|
331
377
|
innerClearContent: () => void;
|
|
378
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
332
379
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
333
380
|
innerUnrenderHightlight: () => void;
|
|
334
381
|
}, {}, {}, {
|
|
@@ -345,11 +392,13 @@ declare const TinyPeony: {
|
|
|
345
392
|
isRange(): boolean;
|
|
346
393
|
isSelectionInDifferentParas(): boolean;
|
|
347
394
|
isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
|
|
348
|
-
getAnchorTtsMark(
|
|
349
|
-
getAnchorTtsEmotionAndRole(
|
|
395
|
+
getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
|
|
396
|
+
getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
|
|
350
397
|
isAllMarkedByAnchor(): boolean;
|
|
351
398
|
addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
|
|
399
|
+
updateAnchor(anchor: import("./typings/index").IAnchor): void;
|
|
352
400
|
clearContent(): void;
|
|
401
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
353
402
|
clear(): Promise<void>;
|
|
354
403
|
renderHighlight(matchingContent: string): void;
|
|
355
404
|
unrenderHighlight(): void;
|
|
@@ -369,9 +418,11 @@ declare const TinyPeony: {
|
|
|
369
418
|
simple: boolean;
|
|
370
419
|
preTime: string;
|
|
371
420
|
textCount: number;
|
|
372
|
-
listenAnchorId:
|
|
421
|
+
listenAnchorId: string;
|
|
373
422
|
listenMode: import("./typings/shared").ListenModeEnum;
|
|
374
423
|
contentStyle: import("vue").CSSProperties;
|
|
424
|
+
refinable: boolean;
|
|
425
|
+
editorHeight: string | number;
|
|
375
426
|
showPreTime: boolean;
|
|
376
427
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
377
428
|
install: (app: App, options?: Record<string, any>) => void;
|