@linker-design-plus/tiny-peony 1.4.18 → 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 -77
  3. package/dist/index.js +34 -42
  4. package/dist/index.mjs +3063 -4575
  5. package/dist/intersection/components/editor/context.d.ts +2 -128
  6. package/dist/intersection/components/editor/editor.d.ts +10 -52
  7. package/dist/intersection/components/editor/index.d.ts +21 -77
  8. package/dist/intersection/hooks/use-editor.d.ts +3 -4
  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,13 +75,11 @@ declare const TinyPeony: {
87
75
  innerIsRange: () => boolean;
88
76
  innerIsSelectionInDifferentParas: () => boolean;
89
77
  innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
90
- innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
91
- innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
78
+ innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
79
+ innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
92
80
  innerIsAllMarkedByAnchor: () => boolean;
93
81
  innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
94
- innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
95
82
  innerClearContent: () => void;
96
- innerInsertContentAtCursor: (_content: string | string[]) => void;
97
83
  innerRenderHightlight: (matchingContent: string) => void;
98
84
  innerUnrenderHightlight: () => void;
99
85
  }, {}, {}, {
@@ -110,13 +96,11 @@ declare const TinyPeony: {
110
96
  isRange(): boolean;
111
97
  isSelectionInDifferentParas(): boolean;
112
98
  isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
113
- getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
114
- getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
99
+ getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
100
+ getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
115
101
  isAllMarkedByAnchor(): boolean;
116
102
  addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
117
- updateAnchor(anchor: import("./typings/index").IAnchor): void;
118
103
  clearContent(): void;
119
- insertContentAtCursor(_content: string | string[]): void;
120
104
  clear(): Promise<void>;
121
105
  renderHighlight(matchingContent: string): void;
122
106
  unrenderHighlight(): void;
@@ -126,7 +110,6 @@ declare const TinyPeony: {
126
110
  anchorListen: (value: import("./typings/index").IAnchor, text: string) => true;
127
111
  anchorListenStop: (value: import("./typings/index").IAnchor) => true;
128
112
  anchorRemove: (value: import("./typings/index").IAnchor) => true;
129
- clear: () => true;
130
113
  }, import("vue").PublicProps, {
131
114
  highlight: boolean;
132
115
  class: string | unknown[];
@@ -137,11 +120,9 @@ declare const TinyPeony: {
137
120
  simple: boolean;
138
121
  preTime: string;
139
122
  textCount: number;
140
- listenAnchorId: string;
123
+ listenAnchorId: number;
141
124
  listenMode: import("./typings/shared").ListenModeEnum;
142
125
  contentStyle: import("vue").CSSProperties;
143
- refinable: boolean;
144
- editorHeight: string | number;
145
126
  showPreTime: boolean;
146
127
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
147
128
  P: {};
@@ -164,8 +145,8 @@ declare const TinyPeony: {
164
145
  default: undefined;
165
146
  };
166
147
  listenAnchorId: {
167
- type: StringConstructor;
168
- default: string;
148
+ type: NumberConstructor;
149
+ default: number;
169
150
  };
170
151
  listenMode: {
171
152
  type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
@@ -199,24 +180,12 @@ declare const TinyPeony: {
199
180
  type: import("vue").PropType<import("vue").CSSProperties>;
200
181
  default: () => {};
201
182
  };
202
- refinable: {
203
- type: BooleanConstructor;
204
- default: boolean;
205
- };
206
- refineContext: {
207
- type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
208
- };
209
- editorHeight: {
210
- type: (StringConstructor | NumberConstructor)[];
211
- default: string;
212
- };
213
183
  showPreTime: {
214
184
  type: BooleanConstructor;
215
185
  default: boolean;
216
186
  };
217
187
  }>> & Readonly<{
218
188
  onChange?: ((contentLength: number) => any) | undefined;
219
- onClear?: (() => any) | undefined;
220
189
  "onUpdate:textCount"?: ((value: number) => any) | undefined;
221
190
  onAnchorListen?: ((value: import("./typings/index").IAnchor, text: string) => any) | undefined;
222
191
  onAnchorRemove?: ((value: import("./typings/index").IAnchor) => any) | undefined;
@@ -235,13 +204,11 @@ declare const TinyPeony: {
235
204
  innerIsRange: () => boolean;
236
205
  innerIsSelectionInDifferentParas: () => boolean;
237
206
  innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
238
- innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
239
- innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
207
+ innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
208
+ innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
240
209
  innerIsAllMarkedByAnchor: () => boolean;
241
210
  innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
242
- innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
243
211
  innerClearContent: () => void;
244
- innerInsertContentAtCursor: (_content: string | string[]) => void;
245
212
  innerRenderHightlight: (matchingContent: string) => void;
246
213
  innerUnrenderHightlight: () => void;
247
214
  }, {}, {}, {
@@ -258,13 +225,11 @@ declare const TinyPeony: {
258
225
  isRange(): boolean;
259
226
  isSelectionInDifferentParas(): boolean;
260
227
  isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
261
- getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
262
- getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
228
+ getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
229
+ getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
263
230
  isAllMarkedByAnchor(): boolean;
264
231
  addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
265
- updateAnchor(anchor: import("./typings/index").IAnchor): void;
266
232
  clearContent(): void;
267
- insertContentAtCursor(_content: string | string[]): void;
268
233
  clear(): Promise<void>;
269
234
  renderHighlight(matchingContent: string): void;
270
235
  unrenderHighlight(): void;
@@ -278,11 +243,9 @@ declare const TinyPeony: {
278
243
  simple: boolean;
279
244
  preTime: string;
280
245
  textCount: number;
281
- listenAnchorId: string;
246
+ listenAnchorId: number;
282
247
  listenMode: import("./typings/shared").ListenModeEnum;
283
248
  contentStyle: import("vue").CSSProperties;
284
- refinable: boolean;
285
- editorHeight: string | number;
286
249
  showPreTime: boolean;
287
250
  }>;
288
251
  __isFragment?: never;
@@ -302,8 +265,8 @@ declare const TinyPeony: {
302
265
  default: undefined;
303
266
  };
304
267
  listenAnchorId: {
305
- type: StringConstructor;
306
- default: string;
268
+ type: NumberConstructor;
269
+ default: number;
307
270
  };
308
271
  listenMode: {
309
272
  type: import("vue").PropType<import("./typings/shared").ListenModeEnum>;
@@ -337,24 +300,12 @@ declare const TinyPeony: {
337
300
  type: import("vue").PropType<import("vue").CSSProperties>;
338
301
  default: () => {};
339
302
  };
340
- refinable: {
341
- type: BooleanConstructor;
342
- default: boolean;
343
- };
344
- refineContext: {
345
- type: import("vue").PropType<import("./intersection/components/editor/context").RefineContext>;
346
- };
347
- editorHeight: {
348
- type: (StringConstructor | NumberConstructor)[];
349
- default: string;
350
- };
351
303
  showPreTime: {
352
304
  type: BooleanConstructor;
353
305
  default: boolean;
354
306
  };
355
307
  }>> & Readonly<{
356
308
  onChange?: ((contentLength: number) => any) | undefined;
357
- onClear?: (() => any) | undefined;
358
309
  "onUpdate:textCount"?: ((value: number) => any) | undefined;
359
310
  onAnchorListen?: ((value: import("./typings/index").IAnchor, text: string) => any) | undefined;
360
311
  onAnchorRemove?: ((value: import("./typings/index").IAnchor) => any) | undefined;
@@ -373,13 +324,11 @@ declare const TinyPeony: {
373
324
  innerIsRange: () => boolean;
374
325
  innerIsSelectionInDifferentParas: () => boolean;
375
326
  innerIsSelectionContainsTag: (type: import("./typings/shared").PluginFlag) => boolean;
376
- innerGetAnchorTtsMark: (anchor: import("./typings/index").IAnchor, startFromCursor?: boolean) => string;
377
- innerGetAnchorTtsEmotionAndRole: (anchor: import("./typings/index").IAnchor) => [string, string | undefined];
327
+ innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
328
+ innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
378
329
  innerIsAllMarkedByAnchor: () => boolean;
379
330
  innerAddExtraAnchors: (data: import("./typings/index").IAnchor[]) => void;
380
- innerUpdateAnchor: (newAnchor: import("./typings/index").IAnchor) => void;
381
331
  innerClearContent: () => void;
382
- innerInsertContentAtCursor: (_content: string | string[]) => void;
383
332
  innerRenderHightlight: (matchingContent: string) => void;
384
333
  innerUnrenderHightlight: () => void;
385
334
  }, {}, {}, {
@@ -396,13 +345,11 @@ declare const TinyPeony: {
396
345
  isRange(): boolean;
397
346
  isSelectionInDifferentParas(): boolean;
398
347
  isSelectionContainsTag(type: import("./typings/shared").PluginFlag): boolean;
399
- getAnchorTtsMark(anchor: import("./typings/index").IAnchor, startFromCursor?: boolean): string;
400
- getAnchorTtsEmotionAndRole(anchor: import("./typings/index").IAnchor): [string, string | undefined];
348
+ getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
349
+ getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
401
350
  isAllMarkedByAnchor(): boolean;
402
351
  addExtraAnchors(data: import("./typings/index").IAnchor[]): void;
403
- updateAnchor(anchor: import("./typings/index").IAnchor): void;
404
352
  clearContent(): void;
405
- insertContentAtCursor(_content: string | string[]): void;
406
353
  clear(): Promise<void>;
407
354
  renderHighlight(matchingContent: string): void;
408
355
  unrenderHighlight(): void;
@@ -412,7 +359,6 @@ declare const TinyPeony: {
412
359
  anchorListen: (value: import("./typings/index").IAnchor, text: string) => true;
413
360
  anchorListenStop: (value: import("./typings/index").IAnchor) => true;
414
361
  anchorRemove: (value: import("./typings/index").IAnchor) => true;
415
- clear: () => true;
416
362
  }, string, {
417
363
  highlight: boolean;
418
364
  class: string | unknown[];
@@ -423,11 +369,9 @@ declare const TinyPeony: {
423
369
  simple: boolean;
424
370
  preTime: string;
425
371
  textCount: number;
426
- listenAnchorId: string;
372
+ listenAnchorId: number;
427
373
  listenMode: import("./typings/shared").ListenModeEnum;
428
374
  contentStyle: import("vue").CSSProperties;
429
- refinable: boolean;
430
- editorHeight: string | number;
431
375
  showPreTime: boolean;
432
376
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
433
377
  install: (app: App, options?: Record<string, any>) => void;