@linker-design-plus/tiny-peony 1.2.34 → 1.2.36
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 +15 -0
- package/dist/index.js +18 -18
- package/dist/index.mjs +887 -862
- package/dist/intersection/components/editor/editor.d.ts +9 -0
- package/dist/intersection/components/editor/index.d.ts +15 -0
- package/dist/typings/intersection/editor.d.ts +4 -0
- package/dist/utils/dom.d.ts +17 -0
- package/package.json +1 -1
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
15
15
|
type: NumberConstructor;
|
|
16
16
|
default: number;
|
|
17
17
|
};
|
|
18
|
+
highlight: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
18
22
|
listenAnchorId: {
|
|
19
23
|
type: NumberConstructor;
|
|
20
24
|
default: number;
|
|
@@ -113,6 +117,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
113
117
|
type: NumberConstructor;
|
|
114
118
|
default: number;
|
|
115
119
|
};
|
|
120
|
+
highlight: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
default: undefined;
|
|
123
|
+
};
|
|
116
124
|
listenAnchorId: {
|
|
117
125
|
type: NumberConstructor;
|
|
118
126
|
default: number;
|
|
@@ -156,6 +164,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
156
164
|
onAnchorRemove?: ((value: IAnchor) => any) | undefined;
|
|
157
165
|
onAnchorListenStop?: ((value: IAnchor) => any) | undefined;
|
|
158
166
|
}>, {
|
|
167
|
+
highlight: boolean;
|
|
159
168
|
class: string | unknown[];
|
|
160
169
|
disabled: boolean;
|
|
161
170
|
placeholder: string;
|
|
@@ -15,6 +15,10 @@ declare const EditorContainer: {
|
|
|
15
15
|
type: NumberConstructor;
|
|
16
16
|
default: number;
|
|
17
17
|
};
|
|
18
|
+
highlight: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
18
22
|
listenAnchorId: {
|
|
19
23
|
type: NumberConstructor;
|
|
20
24
|
default: number;
|
|
@@ -107,6 +111,7 @@ declare const EditorContainer: {
|
|
|
107
111
|
anchorListenStop: (value: import("../../..").IAnchor) => true;
|
|
108
112
|
anchorRemove: (value: import("../../..").IAnchor) => true;
|
|
109
113
|
}, import("vue").PublicProps, {
|
|
114
|
+
highlight: boolean;
|
|
110
115
|
class: string | unknown[];
|
|
111
116
|
disabled: boolean;
|
|
112
117
|
placeholder: string;
|
|
@@ -139,6 +144,10 @@ declare const EditorContainer: {
|
|
|
139
144
|
type: NumberConstructor;
|
|
140
145
|
default: number;
|
|
141
146
|
};
|
|
147
|
+
highlight: {
|
|
148
|
+
type: BooleanConstructor;
|
|
149
|
+
default: undefined;
|
|
150
|
+
};
|
|
142
151
|
listenAnchorId: {
|
|
143
152
|
type: NumberConstructor;
|
|
144
153
|
default: number;
|
|
@@ -225,6 +234,7 @@ declare const EditorContainer: {
|
|
|
225
234
|
renderHighlight(matchingContent: string): void;
|
|
226
235
|
unrenderHighlight(): void;
|
|
227
236
|
}, {
|
|
237
|
+
highlight: boolean;
|
|
228
238
|
class: string | unknown[];
|
|
229
239
|
disabled: boolean;
|
|
230
240
|
placeholder: string;
|
|
@@ -254,6 +264,10 @@ declare const EditorContainer: {
|
|
|
254
264
|
type: NumberConstructor;
|
|
255
265
|
default: number;
|
|
256
266
|
};
|
|
267
|
+
highlight: {
|
|
268
|
+
type: BooleanConstructor;
|
|
269
|
+
default: undefined;
|
|
270
|
+
};
|
|
257
271
|
listenAnchorId: {
|
|
258
272
|
type: NumberConstructor;
|
|
259
273
|
default: number;
|
|
@@ -346,6 +360,7 @@ declare const EditorContainer: {
|
|
|
346
360
|
anchorListenStop: (value: import("../../..").IAnchor) => true;
|
|
347
361
|
anchorRemove: (value: import("../../..").IAnchor) => true;
|
|
348
362
|
}, string, {
|
|
363
|
+
highlight: boolean;
|
|
349
364
|
class: string | unknown[];
|
|
350
365
|
disabled: boolean;
|
|
351
366
|
placeholder: string;
|
package/dist/utils/dom.d.ts
CHANGED
|
@@ -16,3 +16,20 @@ export declare const spellingTextNode: (node: Node, spellingText?: string, first
|
|
|
16
16
|
* 空间复杂度:O(n) - text2字符串长度
|
|
17
17
|
*/
|
|
18
18
|
export declare const longestConsecutiveSubsequence: (text1: string, text2: string) => string;
|
|
19
|
+
/**
|
|
20
|
+
* 判断光标是否在 <p> 段落的末尾
|
|
21
|
+
*
|
|
22
|
+
* 使用场景:
|
|
23
|
+
* - 监听 Backspace/Delete 时,避免浏览器默认合并段落的行为
|
|
24
|
+
* - 用于富文本编辑器中,检测用户是否在段落结尾输入
|
|
25
|
+
*
|
|
26
|
+
* 实现思路:
|
|
27
|
+
* 1. 获取当前 selection 对象(window.getSelection)
|
|
28
|
+
* 2. 如果没有光标或当前是选区(Range),直接返回 false
|
|
29
|
+
* 3. 找到光标所在的最近 <p> 段落
|
|
30
|
+
* 4. 克隆一个 range,从光标位置扩展到段落结尾
|
|
31
|
+
* 5. 如果扩展后的 range 没有内容,说明光标就在段落末尾
|
|
32
|
+
*
|
|
33
|
+
* @returns {boolean} true 表示光标在当前 <p> 段落的末尾
|
|
34
|
+
*/
|
|
35
|
+
export declare const isCursorAtParagraphEnd: () => boolean;
|