@linker-design-plus/tiny-peony 1.2.33 → 1.2.35

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.
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, SVGSVGElement>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, SVGSVGElement>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, SVGSVGElement>;
2
+ export default _default;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linker-design-plus/tiny-peony",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "description": "a simple editor",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,20 +0,0 @@
1
- declare const IconFont: import("vue").DefineComponent<{
2
- type: StringConstructor;
3
- size: (StringConstructor | NumberConstructor)[];
4
- rotate: NumberConstructor;
5
- spin: BooleanConstructor;
6
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
7
- type?: unknown;
8
- size?: unknown;
9
- rotate?: unknown;
10
- spin?: unknown;
11
- } & {
12
- spin: boolean;
13
- } & {
14
- size?: string | number | undefined;
15
- type?: string | undefined;
16
- rotate?: number | undefined;
17
- }>, {
18
- spin: boolean;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
20
- export { IconFont };