squarified 0.3.7 → 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 +2 -41
- package/dist/dom-event-BPqG0KO2.js +1712 -0
- package/dist/dom-event-DQ8OFrZa.mjs +1471 -0
- package/dist/index.d.mts +613 -345
- package/dist/index.d.ts +613 -345
- package/dist/index.js +103 -1987
- package/dist/index.mjs +72 -1974
- package/dist/plugin.d.mts +431 -0
- package/dist/plugin.d.ts +431 -0
- package/dist/plugin.js +399 -0
- package/dist/plugin.mjs +394 -0
- package/package.json +23 -9
package/README.md
CHANGED
|
@@ -10,48 +10,9 @@ https://github.com/user-attachments/assets/caf30d9d-0a5a-446a-b767-7927bf4387c9
|
|
|
10
10
|
$ yarn add squarified
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Document
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### API
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
// convert data into expected data
|
|
21
|
-
declare function c2m<
|
|
22
|
-
T extends AnyObject & {
|
|
23
|
-
groups: any[]
|
|
24
|
-
},
|
|
25
|
-
K extends keyof T
|
|
26
|
-
>(data: T, key: K, modifier?: (data: T) => T): T & {
|
|
27
|
-
weight: number
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// preset theme layout (unstable)
|
|
31
|
-
declare function presetDecorator(app: TreemapLayout): void
|
|
32
|
-
|
|
33
|
-
declare function getNodeDepth(node: NativeModule): number
|
|
34
|
-
|
|
35
|
-
declare function visit<T extends AnyObject>(data: T[], fn: (data: T) => boolean | void): T | null
|
|
36
|
-
|
|
37
|
-
declare function findRelativeNode(p: {
|
|
38
|
-
x: number,
|
|
39
|
-
y: number
|
|
40
|
-
}, layoutNodes: LayoutModule[]): LayoutModule | null
|
|
41
|
-
|
|
42
|
-
declare function findRelativeNodeById(id: string, layoutNodes: LayoutModule[]): LayoutModule | null
|
|
43
|
-
|
|
44
|
-
interface App {
|
|
45
|
-
init: (el: HTMLElement) => void
|
|
46
|
-
dispose: () => void
|
|
47
|
-
setOptions: (options: TreemapOptions) => void
|
|
48
|
-
resize: () => void
|
|
49
|
-
use: (using: Using, register: (app: TreemapLayout) => void) => void
|
|
50
|
-
zoom: (id: string) => void
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare function createTreemap(): App
|
|
54
|
-
```
|
|
15
|
+
nonzzz.github.io/squarified/
|
|
55
16
|
|
|
56
17
|
### Auth
|
|
57
18
|
|