@linker-design-plus/tiny-peony 1.4.32 → 1.4.34

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.
@@ -53,3 +53,12 @@ export declare const positionPopupUnderSpan: (parentDomRect?: DOMRect, spanDomRe
53
53
  * @return {HTMLElement[]} - 锚点标签数组
54
54
  */
55
55
  export declare const getAnchorTagsByUidAndId: (anchor: IAnchor) => HTMLElement[];
56
+ /**
57
+ * 删除指定父节点下包含目标属性的所有子节点
58
+ * @param {Element} parentNode - 要操作的父节点
59
+ * @param {string} targetAttr - 要查找的目标属性名
60
+ * @param {string} [attrValue] - 可选,属性值(不传则只要存在该属性就删除)
61
+ * @returns {number} 删除的节点数量
62
+ */
63
+ export declare function removeChildNodesByAttr(parentNode: Element, targetAttr: string, attrValue?: string): number;
64
+ export declare function getNodeTextIfHasAttr(node: Node, targetAttr: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linker-design-plus/tiny-peony",
3
- "version": "1.4.32",
3
+ "version": "1.4.34",
4
4
  "description": "a simple editor",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -8,11 +8,6 @@
8
8
  "registry": "https://registry.npmjs.org/",
9
9
  "access": "public"
10
10
  },
11
- "scripts": {
12
- "startup": "pnpm build",
13
- "build": "pnpm clean && vue-tsc --noEmit && vite build && vue-tsc --declaration --emitDeclarationOnly --outDir dist",
14
- "clean": "rm -rf dist"
15
- },
16
11
  "files": [
17
12
  "dist"
18
13
  ],
@@ -40,5 +35,10 @@
40
35
  "typescript": "^5.7.2",
41
36
  "vite": "^6.0.7",
42
37
  "vue-tsc": "^2.2.0"
38
+ },
39
+ "scripts": {
40
+ "startup": "pnpm build",
41
+ "build": "pnpm clean && vue-tsc --noEmit && vite build && vue-tsc --declaration --emitDeclarationOnly --outDir dist",
42
+ "clean": "rm -rf dist"
43
43
  }
44
44
  }