squarified 0.3.6 → 0.4.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/README.md CHANGED
@@ -2,60 +2,17 @@
2
2
 
3
3
  `squarified` is a minimal and powerful treemap component.
4
4
 
5
-
6
-
7
5
  https://github.com/user-attachments/assets/caf30d9d-0a5a-446a-b767-7927bf4387c9
8
6
 
9
-
10
-
11
7
  ## Install
12
8
 
13
9
  ```shell
14
10
  $ yarn add squarified
15
11
  ```
16
12
 
17
- ## Usage
18
-
19
- See the dev directory for a minimal example.
20
-
21
- ### API
22
-
23
- ```ts
24
- // convert data into expected data
25
- declare function c2m<
26
- T extends AnyObject & {
27
- groups: any[]
28
- },
29
- K extends keyof T
30
- >(data: T, key: K, modifier?: (data: T) => T): T & {
31
- weight: number
32
- }
13
+ ### Document
33
14
 
34
- // preset theme layout (unstable)
35
- declare function presetDecorator(app: TreemapLayout): void
36
-
37
- declare function getNodeDepth(node: NativeModule): number
38
-
39
- declare function visit<T extends AnyObject>(data: T[], fn: (data: T) => boolean | void): T | null
40
-
41
- declare function findRelativeNode(p: {
42
- x: number,
43
- y: number
44
- }, layoutNodes: LayoutModule[]): LayoutModule | null
45
-
46
- declare function findRelativeNodeById(id: string, layoutNodes: LayoutModule[]): LayoutModule | null
47
-
48
- interface App {
49
- init: (el: HTMLElement) => void
50
- dispose: () => void
51
- setOptions: (options: TreemapOptions) => void
52
- resize: () => void
53
- use: (using: Using, register: (app: TreemapLayout) => void) => void
54
- zoom: (id: string) => void
55
- }
56
-
57
- declare function createTreemap(): App
58
- ```
15
+ nonzzz.github.io/squarified/
59
16
 
60
17
  ### Auth
61
18