@rubin-epo/epo-widget-lib 0.9.7 → 0.9.9

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.
Files changed (131) hide show
  1. package/dist/CameraFilter.cjs +1 -1
  2. package/dist/CameraFilter.js +25 -24
  3. package/dist/Charts.cjs +1 -1
  4. package/dist/Charts.js +14 -12
  5. package/dist/ColorTool.cjs +1 -1
  6. package/dist/ColorTool.js +98 -103
  7. package/dist/FilterTool.cjs +1 -1
  8. package/dist/FilterTool.js +1 -1
  9. package/dist/SupernovaThreeVector.cjs +1 -1
  10. package/dist/SupernovaThreeVector.js +12 -12
  11. package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -2
  12. package/dist/charts/Bars/index.d.ts +1 -1
  13. package/dist/charts/Base/index.d.ts +1 -1
  14. package/dist/charts/Guidelines/index.cjs +1 -1
  15. package/dist/charts/Guidelines/index.d.ts +1 -1
  16. package/dist/charts/Guidelines/index.js +9 -9
  17. package/dist/charts/Points/ErrorBar.cjs +1 -0
  18. package/dist/charts/Points/ErrorBar.d.ts +9 -0
  19. package/dist/charts/Points/ErrorBar.js +119 -0
  20. package/dist/charts/Points/index.cjs +1 -1
  21. package/dist/charts/Points/index.d.ts +5 -11
  22. package/dist/charts/Points/index.js +44 -22
  23. package/dist/charts/ScatterPlot/index.cjs +1 -0
  24. package/dist/charts/ScatterPlot/index.d.ts +24 -0
  25. package/dist/charts/ScatterPlot/index.js +133 -0
  26. package/dist/charts/ScatterPlot/styles.cjs +22 -0
  27. package/dist/charts/ScatterPlot/styles.d.ts +16 -0
  28. package/dist/charts/ScatterPlot/styles.js +29 -0
  29. package/dist/charts/XAxis/index.d.ts +1 -1
  30. package/dist/charts/YAxis/index.d.ts +1 -1
  31. package/dist/charts/defaults.cjs +1 -0
  32. package/dist/charts/defaults.d.ts +22 -0
  33. package/dist/charts/defaults.js +23 -0
  34. package/dist/charts/hooks/useAxis.d.ts +1 -1
  35. package/dist/charts/index.d.ts +1 -0
  36. package/dist/hooks/useInterval.cjs +1 -1
  37. package/dist/hooks/useInterval.js +10 -10
  38. package/dist/hooks/useWindowSize.d.ts +4 -0
  39. package/dist/layout/AspectRatio/index.cjs +1 -0
  40. package/dist/layout/AspectRatio/index.d.ts +18 -0
  41. package/dist/layout/AspectRatio/index.js +24 -0
  42. package/dist/layout/AspectRatio/styles.cjs +16 -0
  43. package/dist/{widgets/ColorTool/Actions → layout/AspectRatio}/styles.d.ts +1 -1
  44. package/dist/layout/AspectRatio/styles.js +22 -0
  45. package/dist/layout/Controls/index.cjs +1 -0
  46. package/dist/layout/Controls/index.d.ts +10 -0
  47. package/dist/layout/Controls/index.js +31 -0
  48. package/dist/layout/Controls/styles.cjs +63 -0
  49. package/dist/{widgets/ColorTool → layout/Controls}/styles.d.ts +604 -332
  50. package/dist/layout/Controls/styles.js +75 -0
  51. package/dist/lib/reimg.cjs +1 -1
  52. package/dist/lib/reimg.d.ts +2 -2
  53. package/dist/lib/reimg.js +30 -31
  54. package/dist/localeStrings/en/epo-widget-lib.json +2 -2
  55. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -1
  56. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +1 -1
  57. package/dist/widgets/CameraFilter/styles.cjs +24 -20
  58. package/dist/widgets/CameraFilter/styles.js +36 -32
  59. package/dist/widgets/ColorTool/Actions/index.cjs +1 -1
  60. package/dist/widgets/ColorTool/Actions/index.js +24 -25
  61. package/dist/widgets/ColorTool/FilterControls/styles.cjs +4 -4
  62. package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1252 -0
  63. package/dist/widgets/ColorTool/FilterControls/styles.js +1 -1
  64. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
  65. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +26 -29
  66. package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -3
  67. package/dist/widgets/ColorTool/ImageComposite/styles.js +4 -2
  68. package/dist/widgets/ColorTool/styles.cjs +10 -24
  69. package/dist/widgets/ColorTool/styles.js +15 -29
  70. package/dist/widgets/FilterTool/FilterTool.d.ts +1 -1
  71. package/dist/widgets/FilterTool/styles.cjs +9 -9
  72. package/dist/widgets/FilterTool/styles.d.ts +6 -269
  73. package/dist/widgets/FilterTool/styles.js +17 -16
  74. package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -0
  75. package/dist/widgets/LightCurvePlot/Plot/index.d.ts +12 -0
  76. package/dist/widgets/LightCurvePlot/Plot/index.js +99 -0
  77. package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.cjs +4 -4
  78. package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.js +7 -6
  79. package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/index.cjs +1 -0
  80. package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.d.ts +2 -2
  81. package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.js +2 -2
  82. package/dist/widgets/LightCurvePlot/PlotWithCurve/DM15Display/index.cjs +1 -0
  83. package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.js +2 -2
  84. package/dist/widgets/LightCurvePlot/PlotWithCurve/LightCurve/index.cjs +1 -0
  85. package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.d.ts +1 -1
  86. package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.js +2 -2
  87. package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.cjs +1 -0
  88. package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.d.ts +0 -2
  89. package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.js +53 -0
  90. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
  91. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +132 -119
  92. package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +9 -11
  93. package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +13 -16
  94. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
  95. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +2 -2
  96. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +17 -15
  97. package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
  98. package/dist/widgets/LightCurvePlot/helpers.d.ts +3 -12
  99. package/dist/widgets/LightCurvePlot/helpers.js +33 -18
  100. package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
  101. package/dist/widgets/SourceSelector/SourceSelector.js +53 -60
  102. package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
  103. package/dist/widgets/SupernovaThreeVector/index.d.ts +1 -1
  104. package/dist/widgets/SupernovaThreeVector/styles.cjs +10 -10
  105. package/dist/widgets/SupernovaThreeVector/styles.js +23 -22
  106. package/package.json +1 -1
  107. package/dist/styles/svg.cjs +0 -8
  108. package/dist/styles/svg.js +0 -13
  109. package/dist/widgets/ColorTool/Actions/styles.cjs +0 -5
  110. package/dist/widgets/ColorTool/Actions/styles.js +0 -10
  111. package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +0 -1
  112. package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +0 -1
  113. package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +0 -1
  114. package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.cjs +0 -1
  115. package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +0 -55
  116. package/dist/widgets/LightCurvePlot/Point/index.cjs +0 -1
  117. package/dist/widgets/LightCurvePlot/Point/index.d.ts +0 -11
  118. package/dist/widgets/LightCurvePlot/Point/index.js +0 -68
  119. package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +0 -1
  120. package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +0 -12
  121. package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +0 -176
  122. /package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.d.ts +0 -0
  123. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.cjs +0 -0
  124. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.d.ts +0 -0
  125. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.js +0 -0
  126. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.d.ts +0 -0
  127. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.cjs +0 -0
  128. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.d.ts +0 -0
  129. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.js +0 -0
  130. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.cjs +0 -0
  131. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.js +0 -0
@@ -1,176 +0,0 @@
1
- "use client";
2
- import { jsxs as L, jsx as o } from "react/jsx-runtime";
3
- import { useState as U } from "react";
4
- import { useTranslation as V } from "react-i18next";
5
- import { min as X, max as Y } from "d3-array";
6
- import P from "../../../charts/hooks/useAxis.js";
7
- import q from "../../../charts/XAxis/index.js";
8
- import G from "../../../charts/YAxis/index.js";
9
- import J from "../../../charts/Tooltip/index.js";
10
- import K from "../../../charts/ClippingContainer/index.js";
11
- import Q from "../../../charts/Viewport/index.js";
12
- import e from "../defaults.js";
13
- import Z from "../Point/index.js";
14
- import { PlotContainer as tt, Chart as ot, SliderOuterWrapper as et, SliderInnerWrapper as it } from "./styles.js";
15
- const rt = (i, f, g) => {
16
- const h = {};
17
- return Object.keys(i).forEach((r) => {
18
- const a = r === "top" || r === "bottom" ? g : f, c = `${r.charAt(0).toUpperCase()}${r.slice(1)}`;
19
- h[`padding${c}`] = `${i[r] / a * 100}%`;
20
- }), h;
21
- }, W = ({
22
- data: i,
23
- activeAlertId: f,
24
- xMin: g,
25
- xMax: h,
26
- yMin: b = e.yMin,
27
- yMax: r = e.yMax,
28
- width: a = e.width,
29
- height: c = e.height,
30
- name: D,
31
- children: O,
32
- slider: S,
33
- className: R
34
- }) => {
35
- const {
36
- t: p,
37
- i18n: { language: T }
38
- } = V(), [A, _] = U(), $ = p("light_curve.plot.x_label"), M = "xAxisLabel", j = p("light_curve.plot.y_label"), I = "yAxisLabel", n = typeof A < "u" ? i[A] : i.find(({ id: l }) => l === f), d = {
39
- top: 10,
40
- right: 10,
41
- bottom: 25,
42
- left: 40
43
- }, x = [0 + d.left, a - d.right], [C, z, s] = P({
44
- min: g || X(i, ({ x: l }) => l) || e.xMin,
45
- max: h || Y(i, ({ x: l }) => l) || e.xMax,
46
- step: e.xStep,
47
- range: x
48
- }), y = s(C[0]), u = [c - d.bottom, 0 + d.top], [m, H, t] = P({
49
- min: b,
50
- max: r,
51
- step: b < r ? Math.abs(e.yStep) : e.yStep,
52
- range: u
53
- }), k = t(m[0]);
54
- return /* @__PURE__ */ L(tt, { className: R, children: [
55
- /* @__PURE__ */ L(
56
- ot,
57
- {
58
- width: a,
59
- height: c,
60
- horizontalLabel: $,
61
- horizontalLabelId: M,
62
- verticalLabel: j,
63
- verticalLabelId: I,
64
- title: D,
65
- children: [
66
- /* @__PURE__ */ L(
67
- K,
68
- {
69
- x: y,
70
- y: t(m[1]),
71
- width: x[1] - x[0],
72
- height: u[0] - u[1],
73
- children: [
74
- /* @__PURE__ */ o(
75
- "rect",
76
- {
77
- x: s(0),
78
- y: t(m[1]),
79
- width: s(15) - s(0),
80
- height: k - t(m[1]),
81
- fill: "#F5F5F5"
82
- }
83
- ),
84
- /* @__PURE__ */ o(
85
- "g",
86
- {
87
- role: "list",
88
- "aria-label": p("light_curve.plot.plot_label") || void 0,
89
- children: i.map(({ x: l, y: F, error: B, id: N }, w) => {
90
- const v = Math.round(l), E = v > 0 ? "after" : v === 0 ? "peak" : "before";
91
- return /* @__PURE__ */ o(
92
- Z,
93
- {
94
- x: s(l),
95
- y: t(F),
96
- error: t(B) - t(0),
97
- onMouseOver: () => _(w),
98
- onMouseOut: () => _(void 0),
99
- description: p("light_curve.plot.point_label", {
100
- magnitude: F,
101
- count: Math.abs(v),
102
- context: E
103
- }) || void 0
104
- },
105
- N
106
- );
107
- })
108
- }
109
- )
110
- ]
111
- }
112
- ),
113
- /* @__PURE__ */ o(
114
- q,
115
- {
116
- ticks: z,
117
- y: k,
118
- labelledById: M,
119
- xDomain: C,
120
- xScale: s
121
- }
122
- ),
123
- /* @__PURE__ */ o(
124
- G,
125
- {
126
- ticks: H,
127
- x: y,
128
- labelledById: I,
129
- yDomain: m,
130
- yScale: t
131
- }
132
- ),
133
- /* @__PURE__ */ o(
134
- Q,
135
- {
136
- x: y,
137
- y: t(m[0]),
138
- outerWidth: x[1] - x[0],
139
- outerHeight: u[1] - u[0],
140
- innerWidth: a,
141
- innerHeight: c,
142
- children: O
143
- }
144
- ),
145
- /* @__PURE__ */ o(
146
- J,
147
- {
148
- x: n ? s(n.x) : void 0,
149
- y: n ? t(n.y) : void 0,
150
- visible: !!n,
151
- offset: 6,
152
- children: p("light_curve.plot.tooltip", {
153
- magnitude: n == null ? void 0 : n.y.toLocaleString(T, {
154
- minimumFractionDigits: 2,
155
- maximumFractionDigits: 2
156
- })
157
- })
158
- }
159
- )
160
- ]
161
- }
162
- ),
163
- S && /* @__PURE__ */ o(et, { children: /* @__PURE__ */ o(
164
- it,
165
- {
166
- style: { ...rt(d, a, c) },
167
- children: S
168
- }
169
- ) })
170
- ] });
171
- };
172
- W.displayName = "Widgets.LightCurve.ScatterPlot";
173
- const bt = W;
174
- export {
175
- bt as default
176
- };