@graphysdk/geom-sankey 0.0.0-stage → 0.1.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/LICENSE.md +17 -0
- package/README.md +49 -2
- package/dist/engine/sankey-layout.d.ts +39 -0
- package/dist/engine/sankey.geom.d.ts +100 -0
- package/dist/engine/sankey.stat.d.ts +11 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +611 -0
- package/dist/renderer/paint/sankey-flows.d.ts +17 -0
- package/dist/renderer/paint/sankey-labels.d.ts +14 -0
- package/dist/renderer/paint/sankey-nodes.d.ts +10 -0
- package/dist/renderer/paint/sankey-paint.d.ts +16 -0
- package/dist/renderer/sankey-edit-outline.d.ts +3 -0
- package/dist/renderer/sankey-highlight.d.ts +12 -0
- package/dist/renderer/sankey-hit-test.d.ts +3 -0
- package/dist/renderer/sankey-hover.d.ts +16 -0
- package/dist/renderer/sankey-layer.d.ts +12 -0
- package/dist/renderer/sankey.d.ts +13 -0
- package/dist/renderer/utils/place-node-label.d.ts +11 -0
- package/dist/utils/read-sankey.d.ts +41 -0
- package/dist/utils/ribbon-geometry.d.ts +19 -0
- package/dist/utils/sankey-variables.d.ts +33 -0
- package/licenses/PolyForm-Free-Trial-1.0.0.md +93 -0
- package/licenses/PolyForm-NonCommercial-1.0.0.md +131 -0
- package/licenses/PolyForm-Small-Business-1.0.0.md +121 -0
- package/package.json +76 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GeomStyleReaders, HoverHit, SceneLayer } from '@graphysdk/react';
|
|
2
|
+
interface HoveredObservationsProps {
|
|
3
|
+
layer: SceneLayer;
|
|
4
|
+
primary: HoverHit;
|
|
5
|
+
size: {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
styleReaders: GeomStyleReaders;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Raises a hovered node with its flows and the nodes at their other ends, or a hovered flow with its two nodes, so
|
|
13
|
+
* the path through it reads as one.
|
|
14
|
+
*/
|
|
15
|
+
export declare const HoveredObservations: ({ layer, primary, size, styleReaders }: HoveredObservationsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GeomStyleReaders, SceneLayer } from '@graphysdk/react';
|
|
2
|
+
interface SankeyLayerProps {
|
|
3
|
+
layer: SceneLayer;
|
|
4
|
+
size: {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
styleReaders: GeomStyleReaders;
|
|
9
|
+
shouldAnimateTransitions: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SankeyLayer: ({ layer, size, styleReaders, shouldAnimateTransitions }: SankeyLayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BoundGeomRendererDefinition } from '@graphysdk/react';
|
|
2
|
+
import { SankeyGeom } from '../engine/sankey.geom';
|
|
3
|
+
/**
|
|
4
|
+
* The sankey plugin: pass it to `createGraphyKit({ plugins: [sankey] })` for `kit.geom.sankey()`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const kit = createGraphyKit({ plugins: [sankey] });
|
|
8
|
+
* const spec = kit.pipe(
|
|
9
|
+
* kit.createSpec({ source: 'from', target: 'to', value: 'amount' }),
|
|
10
|
+
* kit.geom.sankey()
|
|
11
|
+
* );
|
|
12
|
+
*/
|
|
13
|
+
export declare const sankey: BoundGeomRendererDefinition<SankeyGeom>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SankeyNodeObservation } from '../../utils/read-sankey';
|
|
2
|
+
export interface NodeLabelPlacement {
|
|
3
|
+
/** Where the label is anchored, in unit space: the node's edge it sits beside, halfway down it. */
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
/** The gap off that edge, in pixels, signed towards the label. */
|
|
7
|
+
offsetX: number;
|
|
8
|
+
textAnchor: 'start' | 'end';
|
|
9
|
+
}
|
|
10
|
+
/** Places a node's label on the side facing the panel's middle, so the edge columns' labels run into the chart. */
|
|
11
|
+
export declare const placeNodeLabel: (node: SankeyNodeObservation) => NodeLabelPlacement;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Observation } from '@graphysdk/react';
|
|
2
|
+
/** A node's box in unit space, top-left origin. */
|
|
3
|
+
export interface SankeyNodeObservation {
|
|
4
|
+
kind: 'node';
|
|
5
|
+
observation: Observation;
|
|
6
|
+
/** What keys the observation across a data change. */
|
|
7
|
+
key: string;
|
|
8
|
+
/** The node's own key, which its flows name as their ends. */
|
|
9
|
+
nodeKey: string;
|
|
10
|
+
x0: number;
|
|
11
|
+
x1: number;
|
|
12
|
+
y0: number;
|
|
13
|
+
y1: number;
|
|
14
|
+
}
|
|
15
|
+
/** A flow's band where it leaves its source, at `x0`, and where it reaches its target, at `x1`, in unit space. */
|
|
16
|
+
export interface SankeyFlowObservation {
|
|
17
|
+
kind: 'flow';
|
|
18
|
+
observation: Observation;
|
|
19
|
+
key: string;
|
|
20
|
+
/** The key of the node the flow leaves. */
|
|
21
|
+
nodeKey: string;
|
|
22
|
+
/** The key of the node the flow reaches. */
|
|
23
|
+
targetKey: string;
|
|
24
|
+
x0: number;
|
|
25
|
+
x1: number;
|
|
26
|
+
y0: number;
|
|
27
|
+
y1: number;
|
|
28
|
+
targetY0: number;
|
|
29
|
+
targetY1: number;
|
|
30
|
+
}
|
|
31
|
+
export type SankeyObservation = SankeyNodeObservation | SankeyFlowObservation;
|
|
32
|
+
export interface SankeyObservations {
|
|
33
|
+
readonly nodes: readonly SankeyNodeObservation[];
|
|
34
|
+
readonly flows: readonly SankeyFlowObservation[];
|
|
35
|
+
}
|
|
36
|
+
/** Reads one observation back into what it places, or `null` for one the layout placed nowhere. */
|
|
37
|
+
export declare const readSankeyObservation: (observation: Observation) => SankeyObservation | null;
|
|
38
|
+
/** Splits observations into nodes and flows, in order, cached: a layer's observations never change once compiled. */
|
|
39
|
+
export declare const readSankeyObservations: (observations: Iterable<Observation>) => SankeyObservations;
|
|
40
|
+
/** Whether a flow leaves or reaches a node. */
|
|
41
|
+
export declare const isFlowOfNode: (flow: SankeyFlowObservation, node: SankeyNodeObservation) => boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SankeyFlowObservation } from './read-sankey';
|
|
2
|
+
/** A ribbon's top and bottom at `progress`, 0 at its source and 1 at its target. Paint, hit test and anchor read it. */
|
|
3
|
+
export declare const readRibbonEdges: (flow: SankeyFlowObservation, progress: number) => {
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
};
|
|
7
|
+
/** Whether a unit-space point lies on the ribbon. */
|
|
8
|
+
export declare const isOnRibbon: (flow: SankeyFlowObservation, point: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The ribbon's outline in pixels. A smoothstep edge is exactly a cubic Bézier with control points a third and two
|
|
14
|
+
* thirds along, level with the end they leave, so the path is the shape {@link isOnRibbon} tests.
|
|
15
|
+
*/
|
|
16
|
+
export declare const buildRibbonPath: (flow: SankeyFlowObservation, size: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}) => string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The columns the `sankey` stat writes and the renderer reads. They are internal: an author colors and highlights by
|
|
3
|
+
* the source and target columns, which the stat fills on node observations.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SANKEY_VARIABLES: {
|
|
6
|
+
/** Whether an observation is a `'node'` or a `'flow'`. */
|
|
7
|
+
readonly kind: "sankeyKind";
|
|
8
|
+
/** What `nodeKey` names, in the source and target columns' type and format, so labels print it as the data does. */
|
|
9
|
+
readonly nodeName: "sankeyNodeName";
|
|
10
|
+
/** What identifies an observation across a data change: a node by its name, a flow by its two ends. */
|
|
11
|
+
readonly observationKey: "sankeyObservationKey";
|
|
12
|
+
/**
|
|
13
|
+
* The key of the node an observation belongs to: a node's own, and the node a flow leaves. What joins a node to its
|
|
14
|
+
* flows, and what color groups by when it reads the source column. Always categorical, so a date node is its ISO
|
|
15
|
+
* string and every node takes a palette color.
|
|
16
|
+
*/
|
|
17
|
+
readonly nodeKey: "sankeyNodeKey";
|
|
18
|
+
/** The key of the node a flow reaches, and a node's own: what color groups by when it reads the target column. */
|
|
19
|
+
readonly targetKey: "sankeyTargetKey";
|
|
20
|
+
/** A node's left edge; a flow's start, its source's right edge. In unit space, like every column below. */
|
|
21
|
+
readonly x0: "sankeyX0";
|
|
22
|
+
/** A node's right edge; a flow's end, its target's left edge. */
|
|
23
|
+
readonly x1: "sankeyX1";
|
|
24
|
+
/** A node's top; a flow's top where it leaves its source. Unit space runs down from the top of the panel. */
|
|
25
|
+
readonly y0: "sankeyY0";
|
|
26
|
+
/** A node's bottom; a flow's bottom where it leaves its source. */
|
|
27
|
+
readonly y1: "sankeyY1";
|
|
28
|
+
/** A flow's top where it reaches its target. */
|
|
29
|
+
readonly targetY0: "sankeyTargetY0";
|
|
30
|
+
/** A flow's bottom where it reaches its target. */
|
|
31
|
+
readonly targetY1: "sankeyTargetY1";
|
|
32
|
+
};
|
|
33
|
+
export type SankeyKind = 'node' | 'flow';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# PolyForm Free Trial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/free-trial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software
|
|
14
|
+
to do everything you might do with the software that would
|
|
15
|
+
otherwise infringe the licensor's copyright in it for any
|
|
16
|
+
permitted purpose. However, you may only make changes or
|
|
17
|
+
new works based on the software according to [Changes and New
|
|
18
|
+
Works License](#changes-and-new-works-license), and you may
|
|
19
|
+
not distribute copies of the software.
|
|
20
|
+
|
|
21
|
+
## Changes and New Works License
|
|
22
|
+
|
|
23
|
+
The licensor grants you an additional copyright license to
|
|
24
|
+
make changes and new works based on the software for any
|
|
25
|
+
permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that
|
|
30
|
+
covers patent claims the licensor can license, or becomes able
|
|
31
|
+
to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Fair Use
|
|
34
|
+
|
|
35
|
+
You may have "fair use" rights for the software under the
|
|
36
|
+
law. These terms do not limit them.
|
|
37
|
+
|
|
38
|
+
## Free Trial
|
|
39
|
+
|
|
40
|
+
Use to evaluate whether the software suits a particular
|
|
41
|
+
application for less than 32 consecutive calendar days, on
|
|
42
|
+
behalf of you or your company, is use for a permitted purpose.
|
|
43
|
+
|
|
44
|
+
## No Other Rights
|
|
45
|
+
|
|
46
|
+
These terms do not allow you to sublicense or transfer any of
|
|
47
|
+
your licenses to anyone else, or prevent the licensor from
|
|
48
|
+
granting licenses to anyone else. These terms do not imply
|
|
49
|
+
any other licenses.
|
|
50
|
+
|
|
51
|
+
## Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or
|
|
54
|
+
contributes to infringement of any patent, your patent license
|
|
55
|
+
for the software granted under these terms ends immediately. If
|
|
56
|
+
your company makes such a claim, your patent license ends
|
|
57
|
+
immediately for work on behalf of your company.
|
|
58
|
+
|
|
59
|
+
## Violations
|
|
60
|
+
|
|
61
|
+
If you violate any of these terms, or do anything with the
|
|
62
|
+
software not covered by your licenses, all your licenses
|
|
63
|
+
end immediately.
|
|
64
|
+
|
|
65
|
+
## No Liability
|
|
66
|
+
|
|
67
|
+
_**As far as the law allows, the software comes as is, without
|
|
68
|
+
any warranty or condition, and the licensor will not be liable
|
|
69
|
+
to you for any damages arising out of these terms or the use
|
|
70
|
+
or nature of the software, under any kind of legal claim.**_
|
|
71
|
+
|
|
72
|
+
## Definitions
|
|
73
|
+
|
|
74
|
+
The **licensor** is the individual or entity offering these
|
|
75
|
+
terms, and the **software** is the software the licensor makes
|
|
76
|
+
available under these terms.
|
|
77
|
+
|
|
78
|
+
**You** refers to the individual or entity agreeing to these
|
|
79
|
+
terms.
|
|
80
|
+
|
|
81
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
82
|
+
or other kind of organization that you work for, plus all
|
|
83
|
+
organizations that have control over, are under the control of,
|
|
84
|
+
or are under common control with that organization. **Control**
|
|
85
|
+
means ownership of substantially all the assets of an entity,
|
|
86
|
+
or the power to direct its management and policies by vote,
|
|
87
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
88
|
+
|
|
89
|
+
**Your licenses** are all the licenses granted to you for the
|
|
90
|
+
software under these terms.
|
|
91
|
+
|
|
92
|
+
**Use** means anything you do with the software requiring one
|
|
93
|
+
of your licenses.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Graphy Technologies Ltd. (https://graphy.dev)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
## Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study, private
|
|
60
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
61
|
+
observance, without any anticipated commercial application,
|
|
62
|
+
is use for a permitted purpose.
|
|
63
|
+
|
|
64
|
+
## Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a permitted purpose
|
|
70
|
+
regardless of the source of funding or obligations resulting
|
|
71
|
+
from the funding.
|
|
72
|
+
|
|
73
|
+
## Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
## No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer any of
|
|
81
|
+
your licenses to anyone else, or prevent the licensor from
|
|
82
|
+
granting licenses to anyone else. These terms do not imply
|
|
83
|
+
any other licenses.
|
|
84
|
+
|
|
85
|
+
## Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes or
|
|
88
|
+
contributes to infringement of any patent, your patent license
|
|
89
|
+
for the software granted under these terms ends immediately. If
|
|
90
|
+
your company makes such a claim, your patent license ends
|
|
91
|
+
immediately for work on behalf of your company.
|
|
92
|
+
|
|
93
|
+
## Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the software
|
|
97
|
+
not covered by your licenses, your licenses can nonetheless
|
|
98
|
+
continue if you come into full compliance with these terms,
|
|
99
|
+
and take practical steps to correct past violations, within
|
|
100
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
101
|
+
end immediately.
|
|
102
|
+
|
|
103
|
+
## No Liability
|
|
104
|
+
|
|
105
|
+
_**As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be liable
|
|
107
|
+
to you for any damages arising out of these terms or the use
|
|
108
|
+
or nature of the software, under any kind of legal claim.**_
|
|
109
|
+
|
|
110
|
+
## Definitions
|
|
111
|
+
|
|
112
|
+
The **licensor** is the individual or entity offering these
|
|
113
|
+
terms, and the **software** is the software the licensor makes
|
|
114
|
+
available under these terms.
|
|
115
|
+
|
|
116
|
+
**You** refers to the individual or entity agreeing to these
|
|
117
|
+
terms.
|
|
118
|
+
|
|
119
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
120
|
+
or other kind of organization that you work for, plus all
|
|
121
|
+
organizations that have control over, are under the control of,
|
|
122
|
+
or are under common control with that organization. **Control**
|
|
123
|
+
means ownership of substantially all the assets of an entity,
|
|
124
|
+
or the power to direct its management and policies by vote,
|
|
125
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
126
|
+
|
|
127
|
+
**Your licenses** are all the licenses granted to you for the
|
|
128
|
+
software under these terms.
|
|
129
|
+
|
|
130
|
+
**Use** means anything you do with the software requiring one
|
|
131
|
+
of your licenses.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# PolyForm Small Business License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/small-business/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Graphy Technologies Ltd. (https://graphy.dev)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Fair Use
|
|
53
|
+
|
|
54
|
+
You may have "fair use" rights for the software under the
|
|
55
|
+
law. These terms do not limit them.
|
|
56
|
+
|
|
57
|
+
## Small Business
|
|
58
|
+
|
|
59
|
+
Use of the software for the benefit of your company is use for
|
|
60
|
+
a permitted purpose if your company has fewer than 100 total
|
|
61
|
+
individuals working as employees and independent contractors,
|
|
62
|
+
and less than 1,000,000 USD (2019) total revenue in the prior
|
|
63
|
+
tax year. Adjust this revenue threshold for inflation according
|
|
64
|
+
to the United States Bureau of Labor Statistics' consumer price
|
|
65
|
+
index for all urban consumers, U.S. city average, for all items,
|
|
66
|
+
not seasonally adjusted, with 1982–1984=100 reference base.
|
|
67
|
+
|
|
68
|
+
## No Other Rights
|
|
69
|
+
|
|
70
|
+
These terms do not allow you to sublicense or transfer any of
|
|
71
|
+
your licenses to anyone else, or prevent the licensor from
|
|
72
|
+
granting licenses to anyone else. These terms do not imply
|
|
73
|
+
any other licenses.
|
|
74
|
+
|
|
75
|
+
## Patent Defense
|
|
76
|
+
|
|
77
|
+
If you make any written claim that the software infringes or
|
|
78
|
+
contributes to infringement of any patent, your patent license
|
|
79
|
+
for the software granted under these terms ends immediately. If
|
|
80
|
+
your company makes such a claim, your patent license ends
|
|
81
|
+
immediately for work on behalf of your company.
|
|
82
|
+
|
|
83
|
+
## Violations
|
|
84
|
+
|
|
85
|
+
The first time you are notified in writing that you have
|
|
86
|
+
violated any of these terms, or done anything with the software
|
|
87
|
+
not covered by your licenses, your licenses can nonetheless
|
|
88
|
+
continue if you come into full compliance with these terms,
|
|
89
|
+
and take practical steps to correct past violations, within
|
|
90
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
91
|
+
end immediately.
|
|
92
|
+
|
|
93
|
+
## No Liability
|
|
94
|
+
|
|
95
|
+
_**As far as the law allows, the software comes as is, without
|
|
96
|
+
any warranty or condition, and the licensor will not be liable
|
|
97
|
+
to you for any damages arising out of these terms or the use
|
|
98
|
+
or nature of the software, under any kind of legal claim.**_
|
|
99
|
+
|
|
100
|
+
## Definitions
|
|
101
|
+
|
|
102
|
+
The **licensor** is the individual or entity offering these
|
|
103
|
+
terms, and the **software** is the software the licensor makes
|
|
104
|
+
available under these terms.
|
|
105
|
+
|
|
106
|
+
**You** refers to the individual or entity agreeing to these
|
|
107
|
+
terms.
|
|
108
|
+
|
|
109
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
110
|
+
or other kind of organization that you work for, plus all
|
|
111
|
+
organizations that have control over, are under the control of,
|
|
112
|
+
or are under common control with that organization. **Control**
|
|
113
|
+
means ownership of substantially all the assets of an entity,
|
|
114
|
+
or the power to direct its management and policies by vote,
|
|
115
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
116
|
+
|
|
117
|
+
**Your licenses** are all the licenses granted to you for the
|
|
118
|
+
software under these terms.
|
|
119
|
+
|
|
120
|
+
**Use** means anything you do with the software requiring one
|
|
121
|
+
of your licenses.
|
package/package.json
CHANGED
|
@@ -1,6 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphysdk/geom-sankey",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"author": "Graphy",
|
|
4
|
+
"description": "Sankey geom for the Graphy charting SDK (beta)",
|
|
5
|
+
"homepage": "https://docs.graphy.dev/sdk-next/graph-types/sankey",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"graphy",
|
|
9
|
+
"chart",
|
|
10
|
+
"react",
|
|
11
|
+
"visualization",
|
|
12
|
+
"grammar-of-graphics",
|
|
13
|
+
"sankey",
|
|
14
|
+
"flow",
|
|
15
|
+
"alluvial"
|
|
16
|
+
],
|
|
17
|
+
"version": "0.1.0",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"LICENSE.md",
|
|
24
|
+
"licenses",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"require": "./dist/index.cjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"d3-sankey": "^0.12.3"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": "^19.0.0",
|
|
39
|
+
"@graphysdk/react": "^1.9.0-beta.1791969243405"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@testing-library/react": "^16.3.1",
|
|
43
|
+
"@types/d3-sankey": "^0.12.5",
|
|
44
|
+
"@types/react": "^19.2.14",
|
|
45
|
+
"@types/react-dom": "^19.2.3",
|
|
46
|
+
"react": "^19.2.4",
|
|
47
|
+
"react-dom": "^19.2.4",
|
|
48
|
+
"rollup-plugin-node-externals": "^8.1.1",
|
|
49
|
+
"vite": "^8.1.5",
|
|
50
|
+
"vite-plugin-dts": "^4.5.4",
|
|
51
|
+
"vitest": "^4.1.11",
|
|
52
|
+
"@graphysdk/viz-engine": "1.8.0",
|
|
53
|
+
"@graphysdk/react": "1.9.0-beta.1791969243405",
|
|
54
|
+
"@graphytools/eslint-config": "0.0.1",
|
|
55
|
+
"@graphytools/typescript-config": "0.0.1",
|
|
56
|
+
"@graphytools/vitest-config": "1.0.0"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"lint-staged": {
|
|
62
|
+
"*.{ts,tsx,js,jsx,json,css,md}": [
|
|
63
|
+
"prettier --write"
|
|
64
|
+
],
|
|
65
|
+
"*.{ts,tsx}": [
|
|
66
|
+
"eslint --max-warnings=0 --fix"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "vite build",
|
|
71
|
+
"test": "vitest run",
|
|
72
|
+
"test:watch": "TZ=utc vitest",
|
|
73
|
+
"lint": "eslint . --max-warnings 0",
|
|
74
|
+
"lint:fix": "eslint . --fix",
|
|
75
|
+
"format": "prettier --write .",
|
|
76
|
+
"format:check": "prettier --check .",
|
|
77
|
+
"typecheck": "tsc --noEmit"
|
|
78
|
+
}
|
|
6
79
|
}
|