Skip to content

Commit

Permalink
chore(release): 1.6.0
Browse files Browse the repository at this point in the history
# [1.6.0](v1.5.6...v1.6.0) (2022-07-31)

### Features

* expose useNode plugin ([#29](#29)) ([8e4a337](8e4a337))
  • Loading branch information
semantic-release-bot committed Jul 31, 2022
1 parent 8e4a337 commit ede1def
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.6.0](https://github.com/jaredLunde/exploration/compare/v1.5.6...v1.6.0) (2022-07-31)


### Features

* expose useNode plugin ([#29](https://github.com/jaredLunde/exploration/issues/29)) ([8e4a337](https://github.com/jaredLunde/exploration/commit/8e4a337c380e0930771051b3a6cbb997d1f4bc2b))

## [1.5.6](https://github.com/jaredLunde/exploration/compare/v1.5.5...v1.5.6) (2022-07-30)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exploration",
"version": "1.5.6",
"version": "1.6.0",
"description": "",
"license": "MIT",
"author": "Jared Lunde <jared.lunde@gmail.com> (https://jaredlunde.com/)",
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { createFileTree, defaultComparator, isDir, isFile, isPrompt, FileTree, Dir, File, Prompt, } from "./file-tree";
export type { FileTreeNode, FileTreeData, FileTreeFactory, GetNodes, } from "./file-tree";
export { Node } from "./node";
export type { NodeProps } from "./node";
export { Node, useNode } from "./node";
export type { NodeProps, UseNodeConfig } from "./node";
export { SubjectMap, SubjectSet } from "./observable-data";
export * as pathFx from "./path-fx";
export { subject } from "./tree/subject";
Expand Down
9 changes: 7 additions & 2 deletions types/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ import type { NodePlugin } from "./use-node-plugins";
*/
export declare function Node<Meta>(props: NodeProps<Meta>): React.ReactElement<React.HTMLAttributes<HTMLElement>, string | React.JSXElementConstructor<any>>;
/**
* A hook that creates and memoizes node-specific props from a set of input props.
* A plugin that creates and memoizes node-specific props.
*
* @param fileTree - A file tree
* @param config - Props to generate exploration node-specific props from
*/
export declare function useNodeProps<Meta>(config: Omit<NodeProps<Meta>, "as">): React.HTMLAttributes<HTMLElement>;
export declare function useNode<Meta>(fileTree: FileTree<Meta>, config: UseNodeConfig<Meta>): {
didChange: import("./tree/subject").Subject<number>;
getProps(): React.HTMLAttributes<HTMLElement>;
};
export interface NodeProps<Meta> {
/**
* Render the node as this component
Expand Down Expand Up @@ -46,3 +50,4 @@ export interface NodeProps<Meta> {
*/
children: React.ReactNode;
}
export declare type UseNodeConfig<Meta> = Pick<NodeProps<Meta>, "node" | "index" | "style">;
Loading

0 comments on commit ede1def

Please sign in to comment.