@linker-design-plus/tiny-peony 1.4.19 → 1.4.20

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.
Files changed (42) hide show
  1. package/dist/foundation/contentManager/contentManager.d.ts +0 -5
  2. package/dist/index.d.ts +21 -83
  3. package/dist/index.js +34 -42
  4. package/dist/index.mjs +3062 -4580
  5. package/dist/intersection/components/editor/context.d.ts +2 -128
  6. package/dist/intersection/components/editor/editor.d.ts +10 -54
  7. package/dist/intersection/components/editor/index.d.ts +21 -83
  8. package/dist/intersection/hooks/use-editor.d.ts +3 -5
  9. package/dist/plugins/AnchorTagPlugin/plugin.d.ts +0 -4
  10. package/dist/plugins/HomophonesTagPlugin/homophoner.vue.d.ts +2 -2
  11. package/dist/plugins/PronunciationTagPlugin/pronunciationor.vue.d.ts +2 -2
  12. package/dist/tiny-peony.css +1 -1
  13. package/dist/typings/actions/i-anchor.d.ts +0 -8
  14. package/dist/typings/intersection/editor.d.ts +1 -10
  15. package/dist/utils/dom.d.ts +1 -19
  16. package/dist/utils/shared.d.ts +0 -11
  17. package/package.json +6 -6
  18. package/dist/index.js.map +0 -1
  19. package/dist/index.mjs.map +0 -1
  20. package/dist/intersection/components/modals/Refine/RefineContent.d.ts +0 -20
  21. package/dist/intersection/components/modals/Refine/RefineGenerator.d.ts +0 -19
  22. package/dist/intersection/components/modals/Refine/RefineInput.d.ts +0 -18
  23. package/dist/intersection/components/modals/Refine/RefineShortcut.d.ts +0 -2
  24. package/dist/intersection/components/modals/Refine/RefineToolbar.d.ts +0 -2
  25. package/dist/intersection/components/modals/Refine/context.d.ts +0 -128
  26. package/dist/intersection/components/modals/Refine/icons/abort.vue.d.ts +0 -2
  27. package/dist/intersection/components/modals/Refine/icons/copy.vue.d.ts +0 -2
  28. package/dist/intersection/components/modals/Refine/icons/delete.vue.d.ts +0 -2
  29. package/dist/intersection/components/modals/Refine/icons/expand.vue.d.ts +0 -2
  30. package/dist/intersection/components/modals/Refine/icons/inexpand.vue.d.ts +0 -2
  31. package/dist/intersection/components/modals/Refine/icons/insert.vue.d.ts +0 -2
  32. package/dist/intersection/components/modals/Refine/icons/moreShortcut.vue.d.ts +0 -2
  33. package/dist/intersection/components/modals/Refine/icons/optimism.vue.d.ts +0 -2
  34. package/dist/intersection/components/modals/Refine/icons/prefix.vue.d.ts +0 -2
  35. package/dist/intersection/components/modals/Refine/icons/refresh.vue.d.ts +0 -2
  36. package/dist/intersection/components/modals/Refine/icons/replace.vue.d.ts +0 -2
  37. package/dist/intersection/components/modals/Refine/icons/send.vue.d.ts +0 -2
  38. package/dist/intersection/components/modals/Refine/index.d.ts +0 -3
  39. package/dist/intersection/components/modals/Refine/use-modal-pos.d.ts +0 -10
  40. package/dist/intersection/components/modals/Refine/use-range-highlight.d.ts +0 -6
  41. package/dist/intersection/hooks/use-copy.d.ts +0 -4
  42. package/dist/intersection/hooks/use-state.d.ts +0 -4
@@ -18,9 +18,4 @@ 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;
26
21
  }
package/dist/index.d.ts CHANGED
@@ -16,8 +16,8 @@ declare const TinyPeony: {
16
16
  default: undefined;
17
17
  };
18
18
  listenAnchorId: {
19
- type: StringConstructor;
20
- default: string;
19
+ type: NumberConstructor;
20
+ default: number;
21
21
  };
22
22
  listenMode: {
23
23
  type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
@@ -51,24 +51,12 @@ 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
- };
65
54
  showPreTime: {
66
55
  type: BooleanConstructor;
67
56
  default: boolean;
68
57
  };
69
58
  }>> & Readonly<{
70
59
  onChange?: ((contentLength: number) => any) | undefined;
71
- onClear?: (() => any) | undefined;
72
60
  "onUpdate:textCount"?: ((value: number) => any) | undefined;
73
61
  onAnchorListen?: ((value: import("./typings/index").IAnchor, text: string) => any) | undefined;
74
62
  onAnchorRemove?: ((value: import("./typings/index").IAnchor) => any) | undefined;
@@ -87,14 +75,11 @@ declare const TinyPeony: {
87
75
  innerIsRange: () => boolean;
88
76
  innerIsSelectionInDifferentParas: () => boolean;
89
77
  innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
90
- innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
91
- innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
92
- innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
78
+ innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
79
+ innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
93
80
  innerIsAllMarkedByAnchor: () => boolean;
94
81
  innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
95
- innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
96
82
  innerClearContent: () => void;
97
- innerInsertContentAtCursor: (_content: string | string[]) => void;
98
83
  innerRenderHightlight: (matchingContent: string) => void;
99
84
  innerUnrenderHightlight: () => void;
100
85
  }, {}, {}, {
@@ -111,14 +96,11 @@ declare const TinyPeony: {
111
96
  isRange(): boolean;
112
97
  isSelectionInDifferentParas(): boolean;
113
98
  isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
114
- convertToContent(node: HTMLElement | Text): string | undefined;
115
- getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
116
- getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
99
+ getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
100
+ getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
117
101
  isAllMarkedByAnchor(): boolean;
118
102
  addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
119
- updateAnchor(anchor: import("./typings/index").IAnchor): void;
120
103
  clearContent(): void;
121
- insertContentAtCursor(_content: string | string[]): void;
122
104
  clear(): Promise<void>;
123
105
  renderHighlight(matchingContent: string): void;
124
106
  unrenderHighlight(): void;
@@ -128,7 +110,6 @@ declare const TinyPeony: {
128
110
  anchorListen: (value: import("./typings/index").IAnchor, text: string) => true;
129
111
  anchorListenStop: (value: import("./typings/index").IAnchor) => true;
130
112
  anchorRemove: (value: import("./typings/index").IAnchor) => true;
131
- clear: () => true;
132
113
  }, import("vue").PublicProps, {
133
114
  highlight: boolean;
134
115
  class: string | unknown[];
@@ -139,11 +120,9 @@ declare const TinyPeony: {
139
120
  simple: boolean;
140
121
  preTime: string;
141
122
  textCount: number;
142
- listenAnchorId: string;
123
+ listenAnchorId: number;
143
124
  listenMode: import("./typings/shared").ListenModeEnum;
144
125
  contentStyle: import("vue").CSSProperties;
145
- refinable: boolean;
146
- editorHeight: string | number;
147
126
  showPreTime: boolean;
148
127
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
149
128
  P: {};
@@ -166,8 +145,8 @@ declare const TinyPeony: {
166
145
  default: undefined;
167
146
  };
168
147
  listenAnchorId: {
169
- type: StringConstructor;
170
- default: string;
148
+ type: NumberConstructor;
149
+ default: number;
171
150
  };
172
151
  listenMode: {
173
152
  type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
@@ -201,24 +180,12 @@ declare const TinyPeony: {
201
180
  type: import("vue").PropType<import("vue").CSSProperties>;
202
181
  default: () => {};
203
182
  };
204
- refinable: {
205
- type: BooleanConstructor;
206
- default: boolean;
207
- };
208
- refineContext: {
209
- type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
210
- };
211
- editorHeight: {
212
- type: (StringConstructor | NumberConstructor)[];
213
- default: string;
214
- };
215
183
  showPreTime: {
216
184
  type: BooleanConstructor;
217
185
  default: boolean;
218
186
  };
219
187
  }>> & Readonly<{
220
188
  onChange?: ((contentLength: number) => any) | undefined;
221
- onClear?: (() => any) | undefined;
222
189
  "onUpdate:textCount"?: ((value: number) => any) | undefined;
223
190
  onAnchorListen?: ((value: import("./typings/index").IAnchor, text: string) => any) | undefined;
224
191
  onAnchorRemove?: ((value: import("./typings/index").IAnchor) => any) | undefined;
@@ -237,14 +204,11 @@ declare const TinyPeony: {
237
204
  innerIsRange: () => boolean;
238
205
  innerIsSelectionInDifferentParas: () => boolean;
239
206
  innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
240
- innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
241
- innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
242
- innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
207
+ innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
208
+ innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
243
209
  innerIsAllMarkedByAnchor: () => boolean;
244
210
  innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
245
- innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
246
211
  innerClearContent: () => void;
247
- innerInsertContentAtCursor: (_content: string | string[]) => void;
248
212
  innerRenderHightlight: (matchingContent: string) => void;
249
213
  innerUnrenderHightlight: () => void;
250
214
  }, {}, {}, {
@@ -261,14 +225,11 @@ declare const TinyPeony: {
261
225
  isRange(): boolean;
262
226
  isSelectionInDifferentParas(): boolean;
263
227
  isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
264
- convertToContent(node: HTMLElement | Text): string | undefined;
265
- getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
266
- getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
228
+ getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
229
+ getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
267
230
  isAllMarkedByAnchor(): boolean;
268
231
  addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
269
- updateAnchor(anchor: import("./typings/index").IAnchor): void;
270
232
  clearContent(): void;
271
- insertContentAtCursor(_content: string | string[]): void;
272
233
  clear(): Promise<void>;
273
234
  renderHighlight(matchingContent: string): void;
274
235
  unrenderHighlight(): void;
@@ -282,11 +243,9 @@ declare const TinyPeony: {
282
243
  simple: boolean;
283
244
  preTime: string;
284
245
  textCount: number;
285
- listenAnchorId: string;
246
+ listenAnchorId: number;
286
247
  listenMode: import("./typings/shared").ListenModeEnum;
287
248
  contentStyle: import("vue").CSSProperties;
288
- refinable: boolean;
289
- editorHeight: string | number;
290
249
  showPreTime: boolean;
291
250
  }>;
292
251
  __isFragment?: never;
@@ -306,8 +265,8 @@ declare const TinyPeony: {
306
265
  default: undefined;
307
266
  };
308
267
  listenAnchorId: {
309
- type: StringConstructor;
310
- default: string;
268
+ type: NumberConstructor;
269
+ default: number;
311
270
  };
312
271
  listenMode: {
313
272
  type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
@@ -341,24 +300,12 @@ declare const TinyPeony: {
341
300
  type: import("vue").PropType<import("vue").CSSProperties>;
342
301
  default: () => {};
343
302
  };
344
- refinable: {
345
- type: BooleanConstructor;
346
- default: boolean;
347
- };
348
- refineContext: {
349
- type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
350
- };
351
- editorHeight: {
352
- type: (StringConstructor | NumberConstructor)[];
353
- default: string;
354
- };
355
303
  showPreTime: {
356
304
  type: BooleanConstructor;
357
305
  default: boolean;
358
306
  };
359
307
  }>> & Readonly<{
360
308
  onChange?: ((contentLength: number) => any) | undefined;
361
- onClear?: (() => any) | undefined;
362
309
  "onUpdate:textCount"?: ((value: number) => any) | undefined;
363
310
  onAnchorListen?: ((value: import("./typings/index").IAnchor, text: string) => any) | undefined;
364
311
  onAnchorRemove?: ((value: import("./typings/index").IAnchor) => any) | undefined;
@@ -377,14 +324,11 @@ declare const TinyPeony: {
377
324
  innerIsRange: () => boolean;
378
325
  innerIsSelectionInDifferentParas: () => boolean;
379
326
  innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
380
- innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
381
- innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
382
- innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
327
+ innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
328
+ innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
383
329
  innerIsAllMarkedByAnchor: () => boolean;
384
330
  innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
385
- innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
386
331
  innerClearContent: () => void;
387
- innerInsertContentAtCursor: (_content: string | string[]) => void;
388
332
  innerRenderHightlight: (matchingContent: string) => void;
389
333
  innerUnrenderHightlight: () => void;
390
334
  }, {}, {}, {
@@ -401,14 +345,11 @@ declare const TinyPeony: {
401
345
  isRange(): boolean;
402
346
  isSelectionInDifferentParas(): boolean;
403
347
  isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
404
- convertToContent(node: HTMLElement | Text): string | undefined;
405
- getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
406
- getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
348
+ getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
349
+ getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
407
350
  isAllMarkedByAnchor(): boolean;
408
351
  addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
409
- updateAnchor(anchor: import("./typings/index").IAnchor): void;
410
352
  clearContent(): void;
411
- insertContentAtCursor(_content: string | string[]): void;
412
353
  clear(): Promise<void>;
413
354
  renderHighlight(matchingContent: string): void;
414
355
  unrenderHighlight(): void;
@@ -418,7 +359,6 @@ declare const TinyPeony: {
418
359
  anchorListen: (value: import("./typings/index").IAnchor, text: string) => true;
419
360
  anchorListenStop: (value: import("./typings/index").IAnchor) => true;
420
361
  anchorRemove: (value: import("./typings/index").IAnchor) => true;
421
- clear: () => true;
422
362
  }, string, {
423
363
  highlight: boolean;
424
364
  class: string | unknown[];
@@ -429,11 +369,9 @@ declare const TinyPeony: {
429
369
  simple: boolean;
430
370
  preTime: string;
431
371
  textCount: number;
432
- listenAnchorId: string;
372
+ listenAnchorId: number;
433
373
  listenMode: import("./typings/shared").ListenModeEnum;
434
374
  contentStyle: import("vue").CSSProperties;
435
- refinable: boolean;
436
- editorHeight: string | number;
437
375
  showPreTime: boolean;
438
376
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
439
377
  install: (app: App, options?: Record<string, any>) => void;