@rubin-epo/epo-widget-lib 1.0.9 → 1.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/dist/ColorTool.d.ts +2 -2
- package/dist/FilterTool.d.ts +2 -2
- package/dist/IsochronePlot.js +14 -14
- package/dist/ViewIndicator.cjs +1 -0
- package/dist/ViewIndicator.d.ts +3 -0
- package/dist/ViewIndicator.js +149 -0
- package/dist/charts/Bars/index.cjs +1 -1
- package/dist/charts/Bars/index.js +18 -19
- package/dist/charts/Base/index.cjs +1 -1
- package/dist/charts/Base/index.js +22 -23
- package/dist/charts/Base/styles.d.ts +1 -1
- package/dist/charts/ClippingContainer/index.cjs +1 -1
- package/dist/charts/ClippingContainer/index.js +9 -10
- package/dist/charts/ForeignObject/index.cjs +1 -1
- package/dist/charts/ForeignObject/index.js +8 -9
- package/dist/charts/Guidelines/index.cjs +1 -1
- package/dist/charts/Guidelines/index.js +10 -11
- package/dist/charts/Points/index.cjs +1 -1
- package/dist/charts/Points/index.js +30 -31
- package/dist/charts/Readout/index.cjs +1 -1
- package/dist/charts/Readout/index.js +6 -6
- package/dist/charts/ScatterPlot/index.cjs +1 -1
- package/dist/charts/ScatterPlot/index.js +49 -50
- package/dist/charts/Tooltip/index.cjs +1 -1
- package/dist/charts/Tooltip/index.js +14 -15
- package/dist/charts/Viewport/index.cjs +1 -1
- package/dist/charts/Viewport/index.js +13 -14
- package/dist/charts/XAxis/index.cjs +1 -1
- package/dist/charts/XAxis/index.js +21 -22
- package/dist/charts/YAxis/index.cjs +1 -1
- package/dist/charts/YAxis/index.js +17 -18
- package/dist/charts/styles.d.ts +6 -6
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.js +11 -15
- package/dist/widgets/CameraFilter/styles.d.ts +5 -5
- package/dist/widgets/ColorTool/Actions/index.d.ts +1 -1
- package/dist/widgets/ColorTool/FilterControls/FilterControls.d.ts +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +1 -1
- package/dist/widgets/ColorTool/__mocks__/index.d.ts +1 -1
- package/dist/widgets/ColorTool/hooks/useFilteredImages.d.ts +1 -1
- package/dist/widgets/ColorTool/index.d.ts +46 -1
- package/dist/widgets/ColorTool/lib/server.d.ts +1 -1
- package/dist/widgets/ColorTool/lib/utils.d.ts +1 -1
- package/dist/widgets/FilterTool/index.d.ts +12 -1
- package/dist/widgets/FilterTool/styles.d.ts +6 -6
- package/dist/widgets/SourceSelector/SourceMap/styles.d.ts +2 -2
- package/dist/widgets/SupernovaThreeVector/Histogram/index.js +6 -6
- package/dist/widgets/SupernovaThreeVector/Histogram/styles.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/index.cjs +1 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/index.js +22 -22
- package/dist/widgets/SupernovaThreeVector/Skymap/styles.d.ts +7 -7
- package/dist/widgets/ViewIndicator/index.d.ts +13 -0
- package/dist/widgets/ViewIndicator/styles.cjs +37 -0
- package/dist/widgets/ViewIndicator/styles.d.ts +1510 -0
- package/dist/widgets/ViewIndicator/styles.js +45 -0
- package/package.json +2 -1
- package/dist/CameraFilter.cjs +0 -1
- package/dist/CameraFilter.d.ts +0 -3
- package/dist/CameraFilter.js +0 -102
- package/dist/Charts.cjs +0 -1
- package/dist/Charts.d.ts +0 -1
- package/dist/Charts.js +0 -24
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs +0 -1
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js +0 -61
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.cjs +0 -1
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.js +0 -99
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +0 -1
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +0 -97
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.cjs +0 -1
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.js +0 -58
- package/dist/widgets/CameraFilter/data.cjs +0 -1
- package/dist/widgets/CameraFilter/data.js +0 -84
- package/dist/widgets/CameraFilter/styles.cjs +0 -105
- package/dist/widgets/CameraFilter/styles.js +0 -128
- package/dist/widgets/ColorTool/ColorTool.d.ts +0 -46
- package/dist/widgets/FilterTool/FilterTool.d.ts +0 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { ScreenreaderText as c } from "@rubin-epo/epo-react-lib/styles";
|
|
3
|
-
import m from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { DisplayContainer as m, Display as f } from "./styles.js";
|
|
4
|
+
import u from "../ForeignObject/index.js";
|
|
5
|
+
import d from "../Viewport/index.js";
|
|
6
6
|
const p = (n = "") => {
|
|
7
7
|
const s = ["top", "right"], o = ["center", "center"], i = n ? [...n.split(" "), ...o].slice(0, 2) : s, t = {
|
|
8
8
|
justifyContent: null,
|
|
@@ -35,8 +35,8 @@ const p = (n = "") => {
|
|
|
35
35
|
forIds: t,
|
|
36
36
|
forScreenreaders: r
|
|
37
37
|
}) => {
|
|
38
|
-
const a = /* @__PURE__ */ e(
|
|
39
|
-
|
|
38
|
+
const a = /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(m, { style: p(o), children: /* @__PURE__ */ l(
|
|
39
|
+
f,
|
|
40
40
|
{
|
|
41
41
|
form: Array.isArray(t) ? t.join(" ") : t,
|
|
42
42
|
className: n,
|
|
@@ -46,7 +46,7 @@ const p = (n = "") => {
|
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
) }) });
|
|
49
|
-
return i ? /* @__PURE__ */ e(
|
|
49
|
+
return i ? /* @__PURE__ */ e(d, { ...i, children: a }) : a;
|
|
50
50
|
};
|
|
51
51
|
y.displayName = "Charts.Readout";
|
|
52
52
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),J=require("react")
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),J=require("react"),$=require("../hooks/useAxis.cjs"),K=require("./styles.cjs"),R=require("../defaults.cjs"),Q=require("../canvas/Points/index.cjs"),U=require("../YAxis/index.cjs"),V=require("../ClippingContainer/index.cjs"),H=require("../Guidelines/index.cjs"),X=require("../XAxis/index.cjs"),Y=require("../Tooltip/index.cjs"),Z=require("../Points/index.cjs"),w={svg:Z.default,canvas:Q.default},M=({data:C,className:D,xAxis:l,yAxis:c,width:d,height:u,title:T,activePointId:p,margins:z,tooltip:a,onLoadedCallback:B,renderer:E="svg",plotChildren:y})=>{const[q,h]=J.useState(),{label:O,points:x}=C,o={...R.default.margins,...z},e=typeof q<"u"?x[q]:x.find(({id:v})=>v===p),f=[0+o.left,d-o.right],b=[u-o.bottom,0+o.top],[r,j,t]=$.default({...l,range:f}),[i,m,s]=$.default({...c,range:b}),S=s(i[0]),g=t(r[0]),I=s(i[1]),_=t(r[1]),k="x-axis-label",L="y-axis-label",N=Math.abs(f[1]-f[0]),W=Math.abs(b[1]-b[0]),F=w[E],P=n.jsx(F,{data:x,onHoverCallback:a?v=>h(v):void 0,onHoverOutCallback:a?()=>h(void 0):void 0,width:d,height:u,xScale:t,yScale:s,label:O,onLoadedCallback:B}),G={Data:P,xScale:t,yScale:s,yStart:S,yEnd:I,xStart:g,xEnd:_,yDomain:i,xDomain:r};return n.jsxs(K.Chart,{verticalLabel:c.label,verticalLabelId:L,horizontalLabel:l.label,horizontalLabelId:k,className:D,width:d,height:u,title:T,children:[n.jsx(U.default,{ticks:m,x:g,labelledById:L,yDomain:i,yScale:s}),n.jsxs(V.default,{x:g,y:I,width:N,height:W,children:[l.guidelines&&n.jsx(H.default,{guides:j.length,direction:"vertical",xDomain:r,yDomain:i,xScale:t,yScale:s}),c.guidelines&&n.jsx(H.default,{guides:m.length,xDomain:r,yDomain:i,xScale:t,yScale:s}),y?y(G):P]}),n.jsx(X.default,{ticks:j,y:S,labelledById:k,xDomain:r,xScale:t}),a&&n.jsxs(Y.default,{x:e?t(e.x):void 0,y:e?s(e.y):void 0,visible:!!e,offset:R.default.pointRadius,children:[e&&typeof a=="function"&&a(e),e&&typeof a=="string"&&a]})]})};M.displayName="Charts.ScatterPlot";exports.default=M;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import R from "../Guidelines/index.js";
|
|
7
|
-
import U from "../Points/index.js";
|
|
8
|
-
import V from "../Tooltip/index.js";
|
|
9
|
-
import Z from "../ClippingContainer/index.js";
|
|
10
|
-
import B from "../hooks/useAxis.js";
|
|
11
|
-
import { Chart as _ } from "./styles.js";
|
|
3
|
+
import { useState as F } from "react";
|
|
4
|
+
import R from "../hooks/useAxis.js";
|
|
5
|
+
import { Chart as J } from "./styles.js";
|
|
12
6
|
import D from "../defaults.js";
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
import K from "../canvas/Points/index.js";
|
|
8
|
+
import Q from "../YAxis/index.js";
|
|
9
|
+
import U from "../ClippingContainer/index.js";
|
|
10
|
+
import T from "../Guidelines/index.js";
|
|
11
|
+
import V from "../XAxis/index.js";
|
|
12
|
+
import Z from "../Tooltip/index.js";
|
|
13
|
+
import _ from "../Points/index.js";
|
|
14
|
+
const $ = {
|
|
15
|
+
svg: _,
|
|
16
|
+
canvas: K
|
|
17
|
+
}, w = ({
|
|
18
18
|
data: j,
|
|
19
19
|
className: z,
|
|
20
|
-
xAxis:
|
|
21
|
-
yAxis:
|
|
20
|
+
xAxis: l,
|
|
21
|
+
yAxis: c,
|
|
22
22
|
width: d,
|
|
23
23
|
height: m,
|
|
24
|
-
title:
|
|
25
|
-
activePointId:
|
|
26
|
-
margins:
|
|
24
|
+
title: B,
|
|
25
|
+
activePointId: E,
|
|
26
|
+
margins: M,
|
|
27
27
|
tooltip: n,
|
|
28
|
-
onLoadedCallback:
|
|
29
|
-
renderer:
|
|
28
|
+
onLoadedCallback: A,
|
|
29
|
+
renderer: G = "svg",
|
|
30
30
|
plotChildren: x
|
|
31
31
|
}) => {
|
|
32
|
-
const [y, h] =
|
|
33
|
-
|
|
32
|
+
const [y, h] = F(), { label: N, points: f } = j, r = { ...D.margins, ...M }, t = typeof y < "u" ? f[y] : f.find(({ id: p }) => p === E), b = [0 + r.left, d - r.right], g = [m - r.bottom, 0 + r.top], [s, I, e] = R({ ...l, range: b }), [a, P, o] = R({ ...c, range: g }), S = o(a[0]), v = e(s[0]), k = o(a[1]), O = e(s[1]), C = "x-axis-label", L = "y-axis-label", W = Math.abs(b[1] - b[0]), X = Math.abs(g[1] - g[0]), Y = $[G], H = /* @__PURE__ */ i(
|
|
33
|
+
Y,
|
|
34
34
|
{
|
|
35
35
|
data: f,
|
|
36
36
|
onHoverCallback: n ? (p) => h(p) : void 0,
|
|
@@ -39,36 +39,36 @@ const w = {
|
|
|
39
39
|
height: m,
|
|
40
40
|
xScale: e,
|
|
41
41
|
yScale: o,
|
|
42
|
-
label:
|
|
43
|
-
onLoadedCallback:
|
|
42
|
+
label: N,
|
|
43
|
+
onLoadedCallback: A
|
|
44
44
|
}
|
|
45
|
-
),
|
|
45
|
+
), q = {
|
|
46
46
|
Data: H,
|
|
47
47
|
xScale: e,
|
|
48
48
|
yScale: o,
|
|
49
|
-
yStart:
|
|
49
|
+
yStart: S,
|
|
50
50
|
yEnd: k,
|
|
51
51
|
xStart: v,
|
|
52
|
-
xEnd:
|
|
52
|
+
xEnd: O,
|
|
53
53
|
yDomain: a,
|
|
54
54
|
xDomain: s
|
|
55
55
|
};
|
|
56
56
|
return /* @__PURE__ */ u(
|
|
57
|
-
|
|
57
|
+
J,
|
|
58
58
|
{
|
|
59
|
-
verticalLabel:
|
|
59
|
+
verticalLabel: c.label,
|
|
60
60
|
verticalLabelId: L,
|
|
61
|
-
horizontalLabel:
|
|
61
|
+
horizontalLabel: l.label,
|
|
62
62
|
horizontalLabelId: C,
|
|
63
63
|
className: z,
|
|
64
64
|
width: d,
|
|
65
65
|
height: m,
|
|
66
|
-
title:
|
|
66
|
+
title: B,
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ i(
|
|
69
69
|
Q,
|
|
70
70
|
{
|
|
71
|
-
ticks:
|
|
71
|
+
ticks: P,
|
|
72
72
|
x: v,
|
|
73
73
|
labelledById: L,
|
|
74
74
|
yDomain: a,
|
|
@@ -76,17 +76,17 @@ const w = {
|
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
78
|
/* @__PURE__ */ u(
|
|
79
|
-
|
|
79
|
+
U,
|
|
80
80
|
{
|
|
81
81
|
x: v,
|
|
82
82
|
y: k,
|
|
83
|
-
width:
|
|
84
|
-
height:
|
|
83
|
+
width: W,
|
|
84
|
+
height: X,
|
|
85
85
|
children: [
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
l.guidelines && /* @__PURE__ */ i(
|
|
87
|
+
T,
|
|
88
88
|
{
|
|
89
|
-
guides:
|
|
89
|
+
guides: I.length,
|
|
90
90
|
direction: "vertical",
|
|
91
91
|
xDomain: s,
|
|
92
92
|
yDomain: a,
|
|
@@ -94,32 +94,32 @@ const w = {
|
|
|
94
94
|
yScale: o
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
c.guidelines && /* @__PURE__ */ i(
|
|
98
|
+
T,
|
|
99
99
|
{
|
|
100
|
-
guides:
|
|
100
|
+
guides: P.length,
|
|
101
101
|
xDomain: s,
|
|
102
102
|
yDomain: a,
|
|
103
103
|
xScale: e,
|
|
104
104
|
yScale: o
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
|
-
x ? x(
|
|
107
|
+
x ? x(q) : H
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
111
|
/* @__PURE__ */ i(
|
|
112
|
-
|
|
112
|
+
V,
|
|
113
113
|
{
|
|
114
|
-
ticks:
|
|
115
|
-
y:
|
|
114
|
+
ticks: I,
|
|
115
|
+
y: S,
|
|
116
116
|
labelledById: C,
|
|
117
117
|
xDomain: s,
|
|
118
118
|
xScale: e
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
121
|
n && /* @__PURE__ */ u(
|
|
122
|
-
|
|
122
|
+
Z,
|
|
123
123
|
{
|
|
124
124
|
x: t ? e(t.x) : void 0,
|
|
125
125
|
y: t ? o(t.y) : void 0,
|
|
@@ -135,8 +135,7 @@ const w = {
|
|
|
135
135
|
}
|
|
136
136
|
);
|
|
137
137
|
};
|
|
138
|
-
|
|
139
|
-
const ft = T;
|
|
138
|
+
w.displayName = "Charts.ScatterPlot";
|
|
140
139
|
export {
|
|
141
|
-
|
|
140
|
+
w as default
|
|
142
141
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),u=require("./styles.cjs"),h=require("../../lib/utils.cjs"),O=(t,e)=>t.includes("left")?`calc(0% + ${e}px)`:t.includes("right")?`calc(-100% - ${e}px)`:(t.includes("center"),"-50%"),b=(t,e)=>t.includes("top")?`calc(0% + ${e}px)`:t.includes("bottom")?`calc(-100% - ${e}px)`:(t.includes("center"),"-50%"),g=t=>{let e="0",n="0",r="0",s="0",l="0deg";return t.includes("center")&&(e="50%",n="50%",r="-50%",s="-50%"),t.includes("top")&&(n="0",s="-100%",l="180deg"),t.includes("right")&&(e="100%",r="-25%",l="-90deg"),t.includes("left")&&(e="0",r="-75%",l="90deg"),t.includes("bottom")&&(n="100%",s="0"),{left:e,top:n,transform:`translate(${r}, ${s}) rotate(${l})`}},d=({x:t,y:e,visible:n=!0,offset:r=5,origin:s="center bottom",children:l,className:p})=>{const c=[...s.split(" "),..."center center".split(" ")].slice(0,2).join(" "),i=6,a=O(c,i+r),f=b(c,i+r),$=c.includes("center")&&c.split(" ").filter(m=>m!=="center").length===1,x=g(c);return o.jsx(u.TooltipContainer,{children:typeof t=="number"&&typeof e=="number"&&o.jsxs(u.Tooltip,{className:p,style:h.isSafari()?{left:`${t}px`,top:`${e}px`,transform:`translate(${a},${f})`}:{transform:`translate(calc(${a} + ${t}px), calc(${f} + ${e}px))`},hidden:!n,children:[l,$&&o.jsx(u.Arrow,{style:{"--arrow-size":`${i}px`,...x}})]})})};d.displayName="Charts.Tooltip";exports.default=d;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as f, jsxs as
|
|
2
|
-
import { TooltipContainer as
|
|
3
|
-
import { isSafari as
|
|
4
|
-
const b = (t, e) => t.includes("left") ? `calc(0% + ${e}px)` : t.includes("right") ? `calc(-100% - ${e}px)` : (t.includes("center"), "-50%"), g = (t, e) => t.includes("top") ? `calc(0% + ${e}px)` : t.includes("bottom") ? `calc(-100% - ${e}px)` : (t.includes("center"), "-50%"),
|
|
1
|
+
import { jsx as f, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { TooltipContainer as x, Tooltip as h, Arrow as w } from "./styles.js";
|
|
3
|
+
import { isSafari as O } from "../../lib/utils.js";
|
|
4
|
+
const b = (t, e) => t.includes("left") ? `calc(0% + ${e}px)` : t.includes("right") ? `calc(-100% - ${e}px)` : (t.includes("center"), "-50%"), g = (t, e) => t.includes("top") ? `calc(0% + ${e}px)` : t.includes("bottom") ? `calc(-100% - ${e}px)` : (t.includes("center"), "-50%"), T = (t) => {
|
|
5
5
|
let e = "0", n = "0", r = "0", l = "0", s = "0deg";
|
|
6
6
|
return t.includes("center") && (e = "50%", n = "50%", r = "-50%", l = "-50%"), t.includes("top") && (n = "0", l = "-100%", s = "180deg"), t.includes("right") && (e = "100%", r = "-25%", s = "-90deg"), t.includes("left") && (e = "0", r = "-75%", s = "90deg"), t.includes("bottom") && (n = "100%", l = "0"), {
|
|
7
7
|
left: e,
|
|
8
8
|
top: n,
|
|
9
9
|
transform: `translate(${r}, ${l}) rotate(${s})`
|
|
10
10
|
};
|
|
11
|
-
},
|
|
11
|
+
}, y = ({
|
|
12
12
|
x: t,
|
|
13
13
|
y: e,
|
|
14
14
|
visible: n = !0,
|
|
@@ -17,12 +17,12 @@ const b = (t, e) => t.includes("left") ? `calc(0% + ${e}px)` : t.includes("right
|
|
|
17
17
|
children: s,
|
|
18
18
|
className: u
|
|
19
19
|
}) => {
|
|
20
|
-
const o = [...l.split(" "), ..."center center".split(" ")].slice(0, 2).join(" "), c = 6, i = b(o, c + r), a = g(o, c + r),
|
|
21
|
-
return /* @__PURE__ */ f(
|
|
22
|
-
|
|
20
|
+
const o = [...l.split(" "), ..."center center".split(" ")].slice(0, 2).join(" "), c = 6, i = b(o, c + r), a = g(o, c + r), p = o.includes("center") && o.split(" ").filter(($) => $ !== "center").length === 1, d = T(o);
|
|
21
|
+
return /* @__PURE__ */ f(x, { children: typeof t == "number" && typeof e == "number" && /* @__PURE__ */ m(
|
|
22
|
+
h,
|
|
23
23
|
{
|
|
24
24
|
className: u,
|
|
25
|
-
style:
|
|
25
|
+
style: O() ? {
|
|
26
26
|
left: `${t}px`,
|
|
27
27
|
top: `${e}px`,
|
|
28
28
|
transform: `translate(${i},${a})`
|
|
@@ -32,12 +32,12 @@ const b = (t, e) => t.includes("left") ? `calc(0% + ${e}px)` : t.includes("right
|
|
|
32
32
|
hidden: !n,
|
|
33
33
|
children: [
|
|
34
34
|
s,
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
p && /* @__PURE__ */ f(
|
|
36
|
+
w,
|
|
37
37
|
{
|
|
38
38
|
style: {
|
|
39
39
|
"--arrow-size": `${c}px`,
|
|
40
|
-
|
|
40
|
+
...d
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
)
|
|
@@ -45,8 +45,7 @@ const b = (t, e) => t.includes("left") ? `calc(0% + ${e}px)` : t.includes("right
|
|
|
45
45
|
}
|
|
46
46
|
) });
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
const X = p;
|
|
48
|
+
y.displayName = "Charts.Tooltip";
|
|
50
49
|
export {
|
|
51
|
-
|
|
50
|
+
y as default
|
|
52
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),e=({innerWidth:t,innerHeight:i,outerWidth:r,outerHeight:s,x:o,y:u,children:a})=>n.jsx("svg",{preserveAspectRatio:"none",x:o,y:u,width:r,height:s,viewBox:`0 0 ${t} ${i}`,children:a});e.displayName="Widgets.Charts.Viewport";exports.default=e;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const
|
|
3
|
-
innerWidth:
|
|
4
|
-
innerHeight:
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
const d = ({
|
|
3
|
+
innerWidth: e,
|
|
4
|
+
innerHeight: t,
|
|
5
5
|
outerWidth: r,
|
|
6
6
|
outerHeight: i,
|
|
7
|
-
x:
|
|
8
|
-
y:
|
|
9
|
-
children:
|
|
10
|
-
}) => /* @__PURE__ */
|
|
7
|
+
x: o,
|
|
8
|
+
y: s,
|
|
9
|
+
children: p
|
|
10
|
+
}) => /* @__PURE__ */ a(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
13
13
|
preserveAspectRatio: "none",
|
|
14
|
-
x:
|
|
15
|
-
y:
|
|
14
|
+
x: o,
|
|
15
|
+
y: s,
|
|
16
16
|
width: r,
|
|
17
17
|
height: i,
|
|
18
|
-
viewBox: `0 0 ${
|
|
19
|
-
children:
|
|
18
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
19
|
+
children: p
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
|
-
|
|
23
|
-
const d = e;
|
|
22
|
+
d.displayName = "Widgets.Charts.Viewport";
|
|
24
23
|
export {
|
|
25
24
|
d as default
|
|
26
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),M=require("d3-array"),c=require("../styles.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),M=require("d3-array"),c=require("../styles.cjs"),q=require("react-i18next"),b=({xDomain:e,xScale:o,y:i=0,ticks:a=0,labelRender:g,labelledById:h,margin:y,tickHeight:d=5,showBaseline:j=!0,className:x})=>{const{i18n:{language:A}}=q.useTranslation();if(e.length<2)return console.error("Failed to render: invalid domain",e),null;const f={...{top:0,right:0,bottom:0,left:0},...y},u=Array.isArray(a)?a:M.ticks(e[0],e[1],a),m=u.reduce((t,n)=>{if(Number.isInteger(n))return t;{const s=n.toString().split(".")[1].length;return s>t?s:t}},0),{format:F}=new Intl.NumberFormat(A,{minimumFractionDigits:m,maximumFractionDigits:m});return r.jsxs(r.Fragment,{children:[j&&r.jsx(c.BaseLine,{x1:o(e[0])-f.left,x2:o(e[1])+f.right,y1:i,y2:i}),u.length>0&&r.jsx("g",{role:"list","aria-labelledby":h,className:x,children:u.map((t,n)=>{if(t>=e[1])return null;const s=i+d,l=o(t);return r.jsxs("g",{role:"listitem",children:[d>0&&r.jsx(c.Tick,{x1:l,x2:l,y1:i,y2:s}),g?g(t,l,s,n):r.jsx(c.XLabel,{x:l,y:s,children:F(t)})]},n)})})]})};b.displayName="Charts.XAxis";exports.default=b;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as d, Fragment as
|
|
3
|
-
import { ticks as
|
|
4
|
-
import { BaseLine as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
2
|
+
import { jsxs as d, Fragment as X, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { ticks as x } from "d3-array";
|
|
4
|
+
import { BaseLine as M, Tick as N, XLabel as j } from "../styles.js";
|
|
5
|
+
import { useTranslation as I } from "react-i18next";
|
|
6
|
+
const L = ({
|
|
7
7
|
xDomain: r,
|
|
8
8
|
xScale: o,
|
|
9
9
|
y: e = 0,
|
|
10
10
|
ticks: a = 0,
|
|
11
11
|
labelRender: g,
|
|
12
|
-
labelledById:
|
|
13
|
-
margin:
|
|
12
|
+
labelledById: h,
|
|
13
|
+
margin: b,
|
|
14
14
|
tickHeight: m = 5,
|
|
15
|
-
showBaseline:
|
|
16
|
-
className:
|
|
15
|
+
showBaseline: p = !0,
|
|
16
|
+
className: y
|
|
17
17
|
}) => {
|
|
18
18
|
const {
|
|
19
|
-
i18n: { language:
|
|
20
|
-
} =
|
|
19
|
+
i18n: { language: A }
|
|
20
|
+
} = I();
|
|
21
21
|
if (r.length < 2)
|
|
22
22
|
return console.error("Failed to render: invalid domain", r), null;
|
|
23
|
-
const u = { ...{ top: 0, right: 0, bottom: 0, left: 0 }, ...
|
|
23
|
+
const u = { ...{ top: 0, right: 0, bottom: 0, left: 0 }, ...b }, c = Array.isArray(a) ? a : x(r[0], r[1], a), f = c.reduce((t, n) => {
|
|
24
24
|
if (Number.isInteger(n))
|
|
25
25
|
return t;
|
|
26
26
|
{
|
|
27
27
|
const i = n.toString().split(".")[1].length;
|
|
28
28
|
return i > t ? i : t;
|
|
29
29
|
}
|
|
30
|
-
}, 0), { format:
|
|
30
|
+
}, 0), { format: F } = new Intl.NumberFormat(A, {
|
|
31
31
|
minimumFractionDigits: f,
|
|
32
32
|
maximumFractionDigits: f
|
|
33
33
|
});
|
|
34
|
-
return /* @__PURE__ */ d(
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
return /* @__PURE__ */ d(X, { children: [
|
|
35
|
+
p && /* @__PURE__ */ l(
|
|
36
|
+
M,
|
|
37
37
|
{
|
|
38
38
|
x1: o(r[0]) - u.left,
|
|
39
39
|
x2: o(r[1]) + u.right,
|
|
@@ -41,18 +41,17 @@ const h = ({
|
|
|
41
41
|
y2: e
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
c.length > 0 && /* @__PURE__ */ l("g", { role: "list", "aria-labelledby":
|
|
44
|
+
c.length > 0 && /* @__PURE__ */ l("g", { role: "list", "aria-labelledby": h, className: y, children: c.map((t, n) => {
|
|
45
45
|
if (t >= r[1]) return null;
|
|
46
46
|
const i = e + m, s = o(t);
|
|
47
47
|
return /* @__PURE__ */ d("g", { role: "listitem", children: [
|
|
48
|
-
m > 0 && /* @__PURE__ */ l(
|
|
49
|
-
g ? g(t, s, i, n) : /* @__PURE__ */ l(
|
|
48
|
+
m > 0 && /* @__PURE__ */ l(N, { x1: s, x2: s, y1: e, y2: i }),
|
|
49
|
+
g ? g(t, s, i, n) : /* @__PURE__ */ l(j, { x: s, y: i, children: F(t) })
|
|
50
50
|
] }, n);
|
|
51
51
|
}) })
|
|
52
52
|
] });
|
|
53
53
|
};
|
|
54
|
-
|
|
55
|
-
const Y = h;
|
|
54
|
+
L.displayName = "Charts.XAxis";
|
|
56
55
|
export {
|
|
57
|
-
|
|
56
|
+
L as default
|
|
58
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),M=require("d3-array"),c=require("../styles.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),M=require("d3-array"),c=require("../styles.cjs"),p=require("react-i18next"),b=({yDomain:s,yScale:l,x:n=0,margin:f,ticks:o=0,labelRender:g,labelledById:h,showBaseline:j=!0,tickLength:d=5,className:A})=>{const{i18n:{language:y}}=p.useTranslation();if(s.length<2)return console.error("Failed to render: invalid domain",s),null;const m={...{top:0,right:0,bottom:0,left:0},...f},a=Array.isArray(o)?o:M.ticks(s[0],s[1],o),x=a.reduce((t,i)=>{if(Number.isInteger(i))return t;{const e=i.toString().split(".")[1].length;return e>t?e:t}},0),{format:F}=new Intl.NumberFormat(y,{minimumFractionDigits:x,maximumFractionDigits:x});return r.jsxs(r.Fragment,{children:[j&&r.jsx(c.BaseLine,{x1:n,x2:n,y1:l(s[0])+m.top,y2:l(s[1])-m.bottom}),a.length>0&&r.jsx("g",{role:"list","aria-labelledby":h,className:A,children:a.map((t,i)=>{const e=l(t),u=n-d;return r.jsxs("g",{role:"listitem",children:[d>0&&r.jsx(c.Tick,{x1:u,x2:n,y1:e,y2:e}),g?g(t,u,e,i):r.jsx(c.YLabel,{x:u,y:e,children:F(t)})]},i)})})]})};b.displayName="Charts.YAxis";exports.default=b;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as f, Fragment as
|
|
3
|
-
import { ticks as
|
|
4
|
-
import { BaseLine as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
2
|
+
import { jsxs as f, Fragment as Y, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { ticks as M } from "d3-array";
|
|
4
|
+
import { BaseLine as N, Tick as j, YLabel as y } from "../styles.js";
|
|
5
|
+
import { useTranslation as I } from "react-i18next";
|
|
6
|
+
const T = ({
|
|
7
7
|
yDomain: i,
|
|
8
8
|
yScale: o,
|
|
9
9
|
x: e = 0,
|
|
@@ -13,27 +13,27 @@ const x = ({
|
|
|
13
13
|
labelledById: h,
|
|
14
14
|
showBaseline: p = !0,
|
|
15
15
|
tickLength: g = 5,
|
|
16
|
-
className:
|
|
16
|
+
className: x
|
|
17
17
|
}) => {
|
|
18
18
|
const {
|
|
19
|
-
i18n: { language:
|
|
20
|
-
} =
|
|
19
|
+
i18n: { language: A }
|
|
20
|
+
} = I();
|
|
21
21
|
if (i.length < 2)
|
|
22
22
|
return console.error("Failed to render: invalid domain", i), null;
|
|
23
|
-
const u = { ...{ top: 0, right: 0, bottom: 0, left: 0 }, ...b }, a = Array.isArray(l) ? l :
|
|
23
|
+
const u = { ...{ top: 0, right: 0, bottom: 0, left: 0 }, ...b }, a = Array.isArray(l) ? l : M(i[0], i[1], l), d = a.reduce((t, n) => {
|
|
24
24
|
if (Number.isInteger(n))
|
|
25
25
|
return t;
|
|
26
26
|
{
|
|
27
27
|
const r = n.toString().split(".")[1].length;
|
|
28
28
|
return r > t ? r : t;
|
|
29
29
|
}
|
|
30
|
-
}, 0), { format:
|
|
30
|
+
}, 0), { format: F } = new Intl.NumberFormat(A, {
|
|
31
31
|
minimumFractionDigits: d,
|
|
32
32
|
maximumFractionDigits: d
|
|
33
33
|
});
|
|
34
|
-
return /* @__PURE__ */ f(
|
|
34
|
+
return /* @__PURE__ */ f(Y, { children: [
|
|
35
35
|
p && /* @__PURE__ */ s(
|
|
36
|
-
|
|
36
|
+
N,
|
|
37
37
|
{
|
|
38
38
|
x1: e,
|
|
39
39
|
x2: e,
|
|
@@ -41,17 +41,16 @@ const x = ({
|
|
|
41
41
|
y2: o(i[1]) - u.bottom
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
a.length > 0 && /* @__PURE__ */ s("g", { role: "list", "aria-labelledby": h, className:
|
|
44
|
+
a.length > 0 && /* @__PURE__ */ s("g", { role: "list", "aria-labelledby": h, className: x, children: a.map((t, n) => {
|
|
45
45
|
const r = o(t), m = e - g;
|
|
46
46
|
return /* @__PURE__ */ f("g", { role: "listitem", children: [
|
|
47
|
-
g > 0 && /* @__PURE__ */ s(
|
|
48
|
-
c ? c(t, m, r, n) : /* @__PURE__ */ s(
|
|
47
|
+
g > 0 && /* @__PURE__ */ s(j, { x1: m, x2: e, y1: r, y2: r }),
|
|
48
|
+
c ? c(t, m, r, n) : /* @__PURE__ */ s(y, { x: m, y: r, children: F(t) })
|
|
49
49
|
] }, n);
|
|
50
50
|
}) })
|
|
51
51
|
] });
|
|
52
52
|
};
|
|
53
|
-
|
|
54
|
-
const X = x;
|
|
53
|
+
T.displayName = "Charts.YAxis";
|
|
55
54
|
export {
|
|
56
|
-
|
|
55
|
+
T as default
|
|
57
56
|
};
|
package/dist/charts/styles.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const BaseLine: import('styled-components').IStyledComponent<"web
|
|
|
21
21
|
accentHeight?: string | number | undefined;
|
|
22
22
|
accumulate?: "none" | "sum" | undefined;
|
|
23
23
|
additive?: "replace" | "sum" | undefined;
|
|
24
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
24
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
25
25
|
allowReorder?: "yes" | "no" | undefined;
|
|
26
26
|
alphabetic?: string | number | undefined;
|
|
27
27
|
amplitude?: string | number | undefined;
|
|
@@ -503,7 +503,7 @@ export declare const Guide: import('styled-components').IStyledComponent<"web",
|
|
|
503
503
|
accentHeight?: string | number | undefined;
|
|
504
504
|
accumulate?: "none" | "sum" | undefined;
|
|
505
505
|
additive?: "replace" | "sum" | undefined;
|
|
506
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
506
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
507
507
|
allowReorder?: "yes" | "no" | undefined;
|
|
508
508
|
alphabetic?: string | number | undefined;
|
|
509
509
|
amplitude?: string | number | undefined;
|
|
@@ -985,7 +985,7 @@ export declare const Tick: import('styled-components').IStyledComponent<"web", {
|
|
|
985
985
|
accentHeight?: string | number | undefined;
|
|
986
986
|
accumulate?: "none" | "sum" | undefined;
|
|
987
987
|
additive?: "replace" | "sum" | undefined;
|
|
988
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
988
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
989
989
|
allowReorder?: "yes" | "no" | undefined;
|
|
990
990
|
alphabetic?: string | number | undefined;
|
|
991
991
|
amplitude?: string | number | undefined;
|
|
@@ -1467,7 +1467,7 @@ export declare const Bar: import('styled-components').IStyledComponent<"web", {
|
|
|
1467
1467
|
accentHeight?: string | number | undefined;
|
|
1468
1468
|
accumulate?: "none" | "sum" | undefined;
|
|
1469
1469
|
additive?: "replace" | "sum" | undefined;
|
|
1470
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
1470
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
1471
1471
|
allowReorder?: "yes" | "no" | undefined;
|
|
1472
1472
|
alphabetic?: string | number | undefined;
|
|
1473
1473
|
amplitude?: string | number | undefined;
|
|
@@ -1949,7 +1949,7 @@ export declare const XLabel: import('styled-components').IStyledComponent<"web",
|
|
|
1949
1949
|
accentHeight?: string | number | undefined;
|
|
1950
1950
|
accumulate?: "none" | "sum" | undefined;
|
|
1951
1951
|
additive?: "replace" | "sum" | undefined;
|
|
1952
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
1952
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
1953
1953
|
allowReorder?: "yes" | "no" | undefined;
|
|
1954
1954
|
alphabetic?: string | number | undefined;
|
|
1955
1955
|
amplitude?: string | number | undefined;
|
|
@@ -2431,7 +2431,7 @@ export declare const YLabel: import('styled-components').IStyledComponent<"web",
|
|
|
2431
2431
|
accentHeight?: string | number | undefined;
|
|
2432
2432
|
accumulate?: "none" | "sum" | undefined;
|
|
2433
2433
|
additive?: "replace" | "sum" | undefined;
|
|
2434
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
2434
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
2435
2435
|
allowReorder?: "yes" | "no" | undefined;
|
|
2436
2436
|
alphabetic?: string | number | undefined;
|
|
2437
2437
|
amplitude?: string | number | undefined;
|
package/dist/lib/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash/mergeWith"),g=require("lodash/isNil"),o=t=>t&&t.__esModule?t:{default:t},m=o(d),c=o(g),h=(t,e)=>{switch(!0){case t>e:return 0;case t<0:return e;default:return t}},M=(t,e,r)=>t>=e&&t<=r,p=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash/mergeWith"),g=require("lodash/isNil"),o=t=>t&&t.__esModule?t:{default:t},m=o(d),c=o(g),h=(t,e)=>{switch(!0){case t>e:return 0;case t<0:return e;default:return t}},M=(t,e,r)=>t>=e&&t<=r,p=t=>t[Math.round((t.length-1)/2)],A=(t=[0,1],e=[0,1],r)=>{const n={clamp:!1,fractionDigits:2},{clamp:i,fractionDigits:s}={...n,...r};return l=>{const u=t[1]-t[0];if(u===0)return(e[0]+e[1])/2;let a=(l-t[0])/u;return i&&(a=Math.min(Math.max(a,0),1)),Number((a*(e[1]-e[0])+e[0]).toFixed(s))}},S=()=>{const t=navigator.userAgent.indexOf("Chrome")>-1;return navigator.userAgent.indexOf("Safari")>-1&&!t},f=(t,e)=>c.default(e)&&t?c.default(t)?e:t:e,_=(t,e)=>m.default({},e,t,f),b=(t,e=[0,0])=>t.reduce((r,{x:n,y:i},s)=>r+=`${s===0?"M":" L"}${n+e[0]},${i+e[1]}`,"");exports.between=M;exports.buildPath=b;exports.defaultsMerger=f;exports.getClampedArrayIndex=h;exports.getLinearScale=A;exports.isSafari=S;exports.mergeWithDefaults=_;exports.middle=p;
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import u from "lodash/mergeWith";
|
|
2
|
+
import a from "lodash/isNil";
|
|
3
|
+
const d = (t, e) => {
|
|
4
4
|
switch (!0) {
|
|
5
5
|
case t > e:
|
|
6
6
|
return 0;
|
|
@@ -9,10 +9,7 @@ const l = (t, e) => {
|
|
|
9
9
|
default:
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
12
|
-
},
|
|
13
|
-
const r = t[0] < e[0] ? t : e, n = r === t ? e : t;
|
|
14
|
-
return r[1] < n[0] ? null : [n[0], r[1] < n[1] ? r[1] : n[1]];
|
|
15
|
-
}, A = (t) => t[Math.round((t.length - 1) / 2)], M = (t = [0, 1], e = [0, 1], r) => {
|
|
12
|
+
}, l = (t, e, r) => t >= e && t <= r, p = (t) => t[Math.round((t.length - 1) / 2)], A = (t = [0, 1], e = [0, 1], r) => {
|
|
16
13
|
const n = { clamp: !1, fractionDigits: 2 }, { clamp: i, fractionDigits: s } = { ...n, ...r };
|
|
17
14
|
return (f) => {
|
|
18
15
|
const c = t[1] - t[0];
|
|
@@ -23,18 +20,17 @@ const l = (t, e) => {
|
|
|
23
20
|
(o * (e[1] - e[0]) + e[0]).toFixed(s)
|
|
24
21
|
);
|
|
25
22
|
};
|
|
26
|
-
},
|
|
23
|
+
}, M = () => {
|
|
27
24
|
const t = navigator.userAgent.indexOf("Chrome") > -1;
|
|
28
25
|
return navigator.userAgent.indexOf("Safari") > -1 && !t;
|
|
29
|
-
}, m = (t, e) =>
|
|
26
|
+
}, m = (t, e) => a(e) && t ? a(t) ? e : t : e, D = (t, e) => u({}, e, t, m), I = (t, e = [0, 0]) => t.reduce((r, { x: n, y: i }, s) => r += `${s === 0 ? "M" : " L"}${n + e[0]},${i + e[1]}`, "");
|
|
30
27
|
export {
|
|
31
|
-
|
|
28
|
+
l as between,
|
|
32
29
|
I as buildPath,
|
|
33
30
|
m as defaultsMerger,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
x as isSafari,
|
|
31
|
+
d as getClampedArrayIndex,
|
|
32
|
+
A as getLinearScale,
|
|
33
|
+
M as isSafari,
|
|
38
34
|
D as mergeWithDefaults,
|
|
39
|
-
|
|
35
|
+
p as middle
|
|
40
36
|
};
|