@skaldapp/flat-json-tree 2.2.69 → 2.3.0

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 CHANGED
@@ -10,16 +10,9 @@ declare const _default: (tree: MaybeRef<unObject[]>, { branch: keyBranch, childr
10
10
  prev?: string | undefined;
11
11
  siblings?: string | undefined;
12
12
  }) => {
13
- add: (pId: string) => string | undefined;
14
- addChild: (pId: string) => string | undefined;
15
- down: (pId: string) => string | undefined;
16
13
  kvNodes: import("vue").ComputedRef<{
17
14
  [k: string]: unObject;
18
15
  }>;
19
- left: (pId: string) => string | undefined;
20
16
  nodes: import("vue").ComputedRef<unObject[]>;
21
- remove: (pId: string) => string | undefined;
22
- right: (pId: string) => string | undefined;
23
- up: (pId: string) => string | undefined;
24
17
  };
25
18
  export default _default;
package/dist/index.js CHANGED
@@ -108,14 +108,8 @@ export default (tree, { branch: keyBranch = "branch", children: keyChildren = "c
108
108
  return undefined;
109
109
  };
110
110
  return {
111
- add: (pId) => run(pId, "add"),
112
- addChild: (pId) => run(pId, "addChild"),
113
- down: (pId) => run(pId, "down"),
114
111
  kvNodes,
115
- left: (pId) => run(pId, "left"),
116
112
  nodes,
117
- remove: (pId) => run(pId, "remove"),
118
- right: (pId) => run(pId, "right"),
119
- up: (pId) => run(pId, "up"),
113
+ ...Object.fromEntries(["add", "addChild", "down", "left", "remove", "right", "up"].map((key) => [key, (pId) => run(pId, key)])),
120
114
  };
121
115
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@skaldapp/flat-json-tree",
4
- "version": "2.2.69",
4
+ "version": "2.3.0",
5
5
  "description": "A Vue 3 composable that transforms JSON tree objects into flat arrays for easy manipulation with standard array operations while maintaining tree structure through computed properties",
6
6
  "keywords": [
7
7
  "vue",
@@ -48,7 +48,7 @@
48
48
  "vue": "^3.5.35"
49
49
  },
50
50
  "devDependencies": {
51
- "@skaldapp/configs": "^1.2.112",
52
- "eslint": "^10.4.0"
51
+ "@skaldapp/configs": "^1.4.3",
52
+ "eslint": "^10.4.1"
53
53
  }
54
54
  }