@splicetree/core 0.0.1 → 0.1.1
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/README.md +6 -6
- package/dist/index.d.ts +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# @splicetree/core
|
|
2
2
|
|
|
3
|
+
## 简介
|
|
4
|
+
|
|
5
|
+
SpliceTree 是一个 Headless 树运行时,面向扁平数据构建可操作的树结构,提供精简 API,并通过插件扩展搜索、拖拽、懒加载、键盘导航等能力。
|
|
6
|
+
|
|
7
|
+
为扁平数据提供轻量、可扩展的树运行时。支持插件扩展事件与能力。
|
|
8
|
+
|
|
3
9
|
[](https://www.npmjs.com/package/@splicetree/core)
|
|
4
10
|
[](https://npmcharts.com/compare/%40splicetree%2Fcore?minimal=true)
|
|
5
11
|
[](https://www.npmjs.com/package/@splicetree/core)
|
|
6
12
|
[](https://www.splicetree.dev)
|
|
7
13
|
[](https://github.com/michaelcocova/splicetree)
|
|
8
14
|
|
|
9
|
-
为扁平数据提供轻量、可扩展的树运行时。支持插件扩展事件与能力。
|
|
10
|
-
|
|
11
|
-
## 简介
|
|
12
|
-
|
|
13
|
-
SpliceTree 是一个 Headless 树运行时,面向扁平数据构建可操作的树结构,提供精简 API,并通过插件扩展搜索、拖拽、懒加载、键盘导航等能力。
|
|
14
|
-
|
|
15
15
|
## 官方文档
|
|
16
16
|
|
|
17
17
|
文档与示例位于 [https://www.splicetree.dev](https://www.splicetree.dev)
|
package/dist/index.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ interface SpliceTreeEvents {
|
|
|
104
104
|
* - `defaultExpandedLevel`:默认展开的层级(或 `'deepest'` 表示展开到最深层)
|
|
105
105
|
* - 其余键允许被插件进行选项扩展
|
|
106
106
|
*/
|
|
107
|
+
interface SpliceTreeConfiguration {}
|
|
107
108
|
interface UseSpliceTreeOptions<T = SpliceTreeData> {
|
|
108
109
|
/**
|
|
109
110
|
* 主键字段名
|
|
@@ -130,9 +131,9 @@ interface UseSpliceTreeOptions<T = SpliceTreeData> {
|
|
|
130
131
|
*/
|
|
131
132
|
defaultExpandedLevel?: number | 'deepest';
|
|
132
133
|
/**
|
|
133
|
-
*
|
|
134
|
+
* 插件配置聚合入口(按插件名分类)
|
|
134
135
|
*/
|
|
135
|
-
|
|
136
|
+
configuration?: Partial<SpliceTreeConfiguration>;
|
|
136
137
|
}
|
|
137
138
|
/**
|
|
138
139
|
* 核心实例结构(可被插件扩展)
|
|
@@ -280,4 +281,4 @@ type CreateSpliceTree = <T = SpliceTreeData>(data: T[], options?: UseSpliceTreeO
|
|
|
280
281
|
*/
|
|
281
282
|
declare function createSpliceTree<T extends SpliceTreeData = SpliceTreeData>(data: T[], options?: UseSpliceTreeOptions<T>): SpliceTreeInstance<T>;
|
|
282
283
|
//#endregion
|
|
283
|
-
export { CreateSpliceTree, Fn, SpliceTreeData, SpliceTreeEventName, SpliceTreeEventPayload, SpliceTreeEventPayloadMap, SpliceTreeEvents, SpliceTreeInstance, SpliceTreeNode, SpliceTreePlugin, SpliceTreePluginContext, UseSpliceTreeOptions, createSpliceTree };
|
|
284
|
+
export { CreateSpliceTree, Fn, SpliceTreeConfiguration, SpliceTreeData, SpliceTreeEventName, SpliceTreeEventPayload, SpliceTreeEventPayloadMap, SpliceTreeEvents, SpliceTreeInstance, SpliceTreeNode, SpliceTreePlugin, SpliceTreePluginContext, UseSpliceTreeOptions, createSpliceTree };
|