@rubin-epo/epo-widget-lib 0.9.8 → 0.9.10
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/CameraFilter.cjs +1 -1
- package/dist/CameraFilter.js +25 -24
- package/dist/Charts.cjs +1 -1
- package/dist/Charts.js +14 -12
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.js +98 -103
- package/dist/FilterTool.cjs +1 -1
- package/dist/FilterTool.js +1 -1
- package/dist/SupernovaThreeVector.cjs +1 -1
- package/dist/SupernovaThreeVector.js +12 -12
- package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -2
- package/dist/charts/Bars/index.d.ts +1 -1
- package/dist/charts/Base/index.d.ts +1 -1
- package/dist/charts/Guidelines/index.cjs +1 -1
- package/dist/charts/Guidelines/index.d.ts +1 -1
- package/dist/charts/Guidelines/index.js +9 -9
- package/dist/charts/Points/ErrorBar.cjs +1 -0
- package/dist/charts/Points/ErrorBar.d.ts +9 -0
- package/dist/charts/Points/ErrorBar.js +119 -0
- package/dist/charts/Points/index.cjs +1 -1
- package/dist/charts/Points/index.d.ts +5 -11
- package/dist/charts/Points/index.js +44 -22
- package/dist/charts/ScatterPlot/index.cjs +1 -0
- package/dist/charts/ScatterPlot/index.d.ts +24 -0
- package/dist/charts/ScatterPlot/index.js +133 -0
- package/dist/charts/ScatterPlot/styles.cjs +22 -0
- package/dist/charts/ScatterPlot/styles.d.ts +16 -0
- package/dist/charts/ScatterPlot/styles.js +29 -0
- package/dist/charts/XAxis/index.d.ts +1 -1
- package/dist/charts/YAxis/index.d.ts +1 -1
- package/dist/charts/defaults.cjs +1 -0
- package/dist/charts/defaults.d.ts +22 -0
- package/dist/charts/defaults.js +23 -0
- package/dist/charts/hooks/useAxis.d.ts +1 -1
- package/dist/charts/index.d.ts +1 -0
- package/dist/hooks/useInterval.cjs +1 -1
- package/dist/hooks/useInterval.js +10 -10
- package/dist/hooks/useWindowSize.d.ts +4 -0
- package/dist/layout/AspectRatio/index.cjs +1 -0
- package/dist/layout/AspectRatio/index.d.ts +18 -0
- package/dist/layout/AspectRatio/index.js +24 -0
- package/dist/layout/AspectRatio/styles.cjs +16 -0
- package/dist/{widgets/ColorTool/Actions → layout/AspectRatio}/styles.d.ts +1 -1
- package/dist/layout/AspectRatio/styles.js +22 -0
- package/dist/layout/Controls/index.cjs +1 -0
- package/dist/layout/Controls/index.d.ts +10 -0
- package/dist/layout/Controls/index.js +31 -0
- package/dist/layout/Controls/styles.cjs +63 -0
- package/dist/{widgets/ColorTool → layout/Controls}/styles.d.ts +604 -332
- package/dist/layout/Controls/styles.js +75 -0
- package/dist/lib/reimg.cjs +1 -1
- package/dist/lib/reimg.d.ts +2 -2
- package/dist/lib/reimg.js +30 -31
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -1
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +1 -1
- package/dist/widgets/CameraFilter/styles.cjs +24 -20
- package/dist/widgets/CameraFilter/styles.js +36 -32
- package/dist/widgets/ColorTool/Actions/index.cjs +1 -1
- package/dist/widgets/ColorTool/Actions/index.js +24 -25
- package/dist/widgets/ColorTool/FilterControls/styles.cjs +4 -4
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1252 -0
- package/dist/widgets/ColorTool/FilterControls/styles.js +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +26 -29
- package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -3
- package/dist/widgets/ColorTool/ImageComposite/styles.js +4 -2
- package/dist/widgets/ColorTool/styles.cjs +10 -24
- package/dist/widgets/ColorTool/styles.js +15 -29
- package/dist/widgets/FilterTool/FilterTool.d.ts +1 -1
- package/dist/widgets/FilterTool/styles.cjs +9 -9
- package/dist/widgets/FilterTool/styles.d.ts +6 -269
- package/dist/widgets/FilterTool/styles.js +17 -16
- package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/Plot/index.d.ts +12 -0
- package/dist/widgets/LightCurvePlot/Plot/index.js +99 -0
- package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.cjs +4 -4
- package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.js +7 -6
- package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/DM15Display/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/LightCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.d.ts +1 -1
- package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.js +1 -1
- package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.d.ts +0 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +129 -115
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +9 -11
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +13 -16
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +17 -15
- package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
- package/dist/widgets/LightCurvePlot/helpers.d.ts +3 -12
- package/dist/widgets/LightCurvePlot/helpers.js +33 -18
- package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.js +53 -60
- package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/styles.cjs +10 -10
- package/dist/widgets/SupernovaThreeVector/styles.js +23 -22
- package/package.json +1 -1
- package/dist/styles/svg.cjs +0 -8
- package/dist/styles/svg.js +0 -13
- package/dist/widgets/ColorTool/Actions/styles.cjs +0 -5
- package/dist/widgets/ColorTool/Actions/styles.js +0 -10
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/Point/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/Point/index.d.ts +0 -11
- package/dist/widgets/LightCurvePlot/Point/index.js +0 -68
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +0 -12
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +0 -178
- /package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.js +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.js +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.js +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.js +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import t from "styled-components";
|
|
3
|
+
import { token as i } from "@rubin-epo/epo-react-lib/styles";
|
|
4
|
+
const a = t.div`
|
|
5
|
+
--default-widget-padding: calc(var(--PADDING_SMALL, 20px) / 2);
|
|
6
|
+
--widget-gap: var(--widget-padding, var(--default-widget-padding));
|
|
7
|
+
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
max-height: 100%;
|
|
13
|
+
gap: var(--widget-gap);
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
|
|
16
|
+
@container (min-width: ${i("BREAK_PHABLET_MIN")}) {
|
|
17
|
+
--default-widget-padding: var(--PADDING_SMALL, 20px);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@container (min-width: ${i("BREAK_LARGE_TABLET")}) {
|
|
21
|
+
height: 100%;
|
|
22
|
+
overflow-y: initial;
|
|
23
|
+
}
|
|
24
|
+
`, o = t.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
flex-grow: 1;
|
|
28
|
+
gap: var(--widget-gap);
|
|
29
|
+
|
|
30
|
+
@container (min-width: ${i("BREAK_LARGE_TABLET")}) {
|
|
31
|
+
flex-direction: row-reverse;
|
|
32
|
+
}
|
|
33
|
+
`, d = t.div`
|
|
34
|
+
aspect-ratio: 1;
|
|
35
|
+
flex: 1 1 auto;
|
|
36
|
+
max-height: 100%;
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
justify-self: center;
|
|
39
|
+
|
|
40
|
+
@container (min-width: ${i("BREAK_LARGE_TABLET")}) {
|
|
41
|
+
max-height: unset;
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
`, r = t.div`
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: var(--widget-gap);
|
|
48
|
+
flex: 0 1 100%;
|
|
49
|
+
`, l = t.div`
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
gap: var(--widget-gap);
|
|
53
|
+
|
|
54
|
+
@container (min-width: ${i("BREAK_LARGE_TABLET")}) {
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
}
|
|
57
|
+
`, c = t.div`
|
|
58
|
+
@container (min-width: ${i("BREAK_LARGE_TABLET")}) {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
`, g = t.div`
|
|
62
|
+
display: none;
|
|
63
|
+
@container (min-width: ${i("BREAK_LARGE_TABLET")}) {
|
|
64
|
+
display: block;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
export {
|
|
68
|
+
l as Actions,
|
|
69
|
+
r as Controls,
|
|
70
|
+
o as InteractionRow,
|
|
71
|
+
g as LandscapeCaption,
|
|
72
|
+
c as PortraitCaption,
|
|
73
|
+
d as Widget,
|
|
74
|
+
a as WidgetLayout
|
|
75
|
+
};
|
package/dist/lib/reimg.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(c,i){const r=function(){return c.indexOf("data:image/png")===0},a=function(t,n){const o=document.createElement("a");o.href=t,o.download=n,document.body.appendChild(o),o.click()};return{toBase64:function(){return c},toImg:function(){const t=document.createElement("img");return t.src=c,t},toCanvas:function(t){const n=document.createElement("canvas"),o=i==null?void 0:i.getBoundingClientRect();n.width=(o==null?void 0:o.width)||0,n.height=(o==null?void 0:o.height)||0;const e=n.getContext("2d"),u=this.toImg();u.onload=function(){e==null||e.drawImage(u,0,0),t(n)}},toPng:function(){if(r()){const t=document.createElement("img");return t.src=c,t}this.toCanvas(function(t){const n=document.createElement("img");return n.src=t.toDataURL(),n})},toJpeg:function(t){t=t||1,(n=>{this.toCanvas(function(o){const e=document.createElement("img");return e.src=o.toDataURL("image/jpeg",n),e})})(t)},downloadPng:function(t){if(t=t||"image.png",r()){a(c,t);return}this.toCanvas(function(n){a(n.toDataURL(),t)})}}}function g(c){const i=c.toDataURL();return s(i)}exports.fromCanvas=g;
|
package/dist/lib/reimg.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare function fromSvg(svgElement: SVGElement): {
|
|
2
|
-
[key: string]:
|
|
2
|
+
[key: string]: (...args: any) => any;
|
|
3
3
|
};
|
|
4
4
|
declare function fromCanvas(canvasElement: HTMLCanvasElement): {
|
|
5
|
-
[key: string]:
|
|
5
|
+
[key: string]: (...args: any) => any;
|
|
6
6
|
};
|
|
7
7
|
export { fromSvg, fromCanvas };
|
package/dist/lib/reimg.js
CHANGED
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
return
|
|
4
|
-
},
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
function s(c, r) {
|
|
2
|
+
const e = function() {
|
|
3
|
+
return c.indexOf("data:image/png") === 0;
|
|
4
|
+
}, a = function(t, n) {
|
|
5
|
+
const o = document.createElement("a");
|
|
6
|
+
o.href = t, o.download = n, document.body.appendChild(o), o.click();
|
|
7
7
|
};
|
|
8
8
|
return {
|
|
9
9
|
toBase64: function() {
|
|
10
|
-
return
|
|
10
|
+
return c;
|
|
11
11
|
},
|
|
12
12
|
toImg: function() {
|
|
13
13
|
const t = document.createElement("img");
|
|
14
|
-
return t.src =
|
|
14
|
+
return t.src = c, t;
|
|
15
15
|
},
|
|
16
16
|
toCanvas: function(t) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
var u = this.toImg();
|
|
17
|
+
const n = document.createElement("canvas"), o = r == null ? void 0 : r.getBoundingClientRect();
|
|
18
|
+
n.width = (o == null ? void 0 : o.width) || 0, n.height = (o == null ? void 0 : o.height) || 0;
|
|
19
|
+
const i = n.getContext("2d"), u = this.toImg();
|
|
21
20
|
u.onload = function() {
|
|
22
|
-
|
|
21
|
+
i == null || i.drawImage(u, 0, 0), t(n);
|
|
23
22
|
};
|
|
24
23
|
},
|
|
25
24
|
toPng: function() {
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
return t.src =
|
|
25
|
+
if (e()) {
|
|
26
|
+
const t = document.createElement("img");
|
|
27
|
+
return t.src = c, t;
|
|
29
28
|
}
|
|
30
|
-
this.toCanvas(function(
|
|
31
|
-
|
|
32
|
-
return n.src =
|
|
29
|
+
this.toCanvas(function(t) {
|
|
30
|
+
const n = document.createElement("img");
|
|
31
|
+
return n.src = t.toDataURL(), n;
|
|
33
32
|
});
|
|
34
33
|
},
|
|
35
34
|
toJpeg: function(t) {
|
|
36
|
-
t = t || 1, ((
|
|
37
|
-
this.toCanvas(function(
|
|
38
|
-
|
|
39
|
-
return
|
|
35
|
+
t = t || 1, ((n) => {
|
|
36
|
+
this.toCanvas(function(o) {
|
|
37
|
+
const i = document.createElement("img");
|
|
38
|
+
return i.src = o.toDataURL("image/jpeg", n), i;
|
|
40
39
|
});
|
|
41
40
|
})(t);
|
|
42
41
|
},
|
|
43
42
|
downloadPng: function(t) {
|
|
44
|
-
if (t = t || "image.png",
|
|
45
|
-
|
|
43
|
+
if (t = t || "image.png", e()) {
|
|
44
|
+
a(c, t);
|
|
46
45
|
return;
|
|
47
46
|
}
|
|
48
|
-
this.toCanvas(function(
|
|
49
|
-
|
|
47
|
+
this.toCanvas(function(n) {
|
|
48
|
+
a(n.toDataURL(), t);
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
52
|
}
|
|
54
|
-
function
|
|
55
|
-
const
|
|
56
|
-
return
|
|
53
|
+
function g(c) {
|
|
54
|
+
const r = c.toDataURL();
|
|
55
|
+
return s(r);
|
|
57
56
|
}
|
|
58
57
|
export {
|
|
59
|
-
|
|
58
|
+
g as fromCanvas
|
|
60
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("../../../lib/utils.cjs"),t=require("../data.cjs"),j=require("./SpectrumLabels/SpectrumLabels.cjs"),x=({min:n,max:u,range:g,isCondensed:p,activeFilter:s})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMinYMin meet",viewBox:`${n} 0 ${g}
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("../../../lib/utils.cjs"),t=require("../data.cjs"),j=require("./SpectrumLabels/SpectrumLabels.cjs"),x=({min:n,max:u,range:g,isCondensed:p,activeFilter:s})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMinYMin meet",viewBox:`${n} 0 ${g} 260`,"data-testid":"spectrum-display",children:[e.jsxs("defs",{children:[t.spectrums.map(({name:d,stops:r})=>e.jsx("linearGradient",{id:`${d}-gradient`,children:r.map(({offset:a,stopColor:h,id:o})=>e.jsx("stop",{offset:a,stopColor:h,id:o},`${a}-${h}`))},d)),e.jsxs("mask",{id:"spectrumMask",children:[e.jsx("rect",{width:"100%",height:"100",fill:"white",x:n}),s&&e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:n,width:s.range[0]-n,height:"100%",fill:"black"}),e.jsx("rect",{x:s.range[1],width:u-s.range[1],height:"100%",fill:"black"})]})]})]}),e.jsx("g",{mask:"url(#spectrumMask)",role:"presentation",children:t.spectrums.map(({name:d,upper:r,lower:a})=>e.jsx("rect",{width:(r||u)-(a||n),height:"50%",fill:`url(#${d}-gradient)`,x:a||n,role:"presentation"},d))}),e.jsx("g",{children:t.spectrums.map(({name:d,upper:r})=>r&&e.jsx("line",{strokeWidth:2,strokeDasharray:"8 8",stroke:s&&!c.between(r,s.range[0],s.range[1])?"#000":"#fff",x1:r,x2:r,y1:0,y2:"50%"},d))}),e.jsx(j.default,{spectrums:t.spectrums,activeBand:s==null?void 0:s.band,min:n,max:u,activeMin:s==null?void 0:s.range[0],activeMax:s==null?void 0:s.range[1],isCondensed:p})]});x.displayName="Widgets.CameraFilter.SpectrumDisplay";const l=x;exports.default=l;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),o=n=>n&&n.__esModule?n:{default:n},e=o(i),a=e.default.div`
|
|
2
2
|
container-type: inline-size;
|
|
3
3
|
container-name: camera-filter;
|
|
4
4
|
|
|
@@ -6,14 +6,19 @@
|
|
|
6
6
|
grid-template-columns: 1fr;
|
|
7
7
|
grid-auto-rows: min-content;
|
|
8
8
|
text-align: center;
|
|
9
|
+
padding-block: var(--PADDING_SMALL, 20px);
|
|
9
10
|
position: relative;
|
|
10
|
-
`,
|
|
11
|
-
margin
|
|
11
|
+
`,l=e.default.h3`
|
|
12
|
+
margin: 0;
|
|
12
13
|
`,r=e.default.table`
|
|
13
14
|
border-collapse: collapse;
|
|
14
15
|
text-align: center;
|
|
15
16
|
margin-inline-start: var(--filter-table-margin-inline-start);
|
|
16
17
|
width: var(--filter-table-width);
|
|
18
|
+
|
|
19
|
+
@container (min-width: ${t.token("BREAK_TABLET")}) {
|
|
20
|
+
margin-block-start: var(--PADDING_SMALL, 20px);
|
|
21
|
+
}
|
|
17
22
|
`,s=e.default.tbody`
|
|
18
23
|
display: table-header-group;
|
|
19
24
|
`,d=e.default.thead`
|
|
@@ -29,67 +34,66 @@
|
|
|
29
34
|
border: var(--filter-name-border);
|
|
30
35
|
border-width: 1px;
|
|
31
36
|
|
|
32
|
-
@container
|
|
37
|
+
@container (min-width: ${t.token("BREAK_TABLET")}) {
|
|
33
38
|
border-width: 3px;
|
|
34
39
|
}
|
|
35
40
|
`,u=e.default.div`
|
|
36
41
|
min-width: 20ch;
|
|
37
42
|
width: 50%;
|
|
38
43
|
max-width: 30ch;
|
|
39
|
-
margin-block: 1em;
|
|
40
44
|
justify-self: center;
|
|
41
45
|
text-align: left;
|
|
42
|
-
`,
|
|
46
|
+
`,p=e.default.label`
|
|
43
47
|
font-size: 0.75em;
|
|
44
|
-
`,
|
|
48
|
+
`,g=e.default.text`
|
|
45
49
|
font-size: 2em;
|
|
46
50
|
|
|
47
|
-
@container
|
|
51
|
+
@container (min-width: ${t.token("BREAK_MOBILE")}) {
|
|
48
52
|
font-size: 1.25em;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
|
-
@container
|
|
55
|
+
@container (min-width: ${t.token("BREAK_PHABLET_MIN")}) {
|
|
52
56
|
font-size: 0.75em;
|
|
53
57
|
}
|
|
54
58
|
`,h=e.default.tspan`
|
|
55
59
|
font-size: 2em;
|
|
56
60
|
|
|
57
|
-
@container
|
|
61
|
+
@container (min-width: ${t.token("BREAK_MOBILE")}) {
|
|
58
62
|
font-size: 1.25em;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
|
-
@container
|
|
65
|
+
@container (min-width: ${t.token("BREAK_PHABLET_MIN")}) {
|
|
62
66
|
font-size: 0.75em;
|
|
63
67
|
}
|
|
64
68
|
`,b=e.default.tspan`
|
|
65
69
|
font-size: 1.5em;
|
|
66
70
|
|
|
67
|
-
@container
|
|
71
|
+
@container (min-width: ${t.token("BREAK_MOBILE")}) {
|
|
68
72
|
font-size: 1em;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
@container
|
|
75
|
+
@container (min-width: ${t.token("BREAK_PHABLET_MIN")}) {
|
|
72
76
|
font-size: 0.5em;
|
|
73
77
|
}
|
|
74
|
-
`,
|
|
78
|
+
`,_=e.default.tspan`
|
|
75
79
|
font-size: 1.3em;
|
|
76
80
|
|
|
77
|
-
@container
|
|
81
|
+
@container (min-width: ${t.token("BREAK_MOBILE")}) {
|
|
78
82
|
font-size: 0.8em;
|
|
79
83
|
}
|
|
80
84
|
|
|
81
|
-
@container
|
|
85
|
+
@container (min-width: ${t.token("BREAK_PHABLET_MIN")}) {
|
|
82
86
|
font-size: 0.4em;
|
|
83
87
|
}
|
|
84
|
-
`,
|
|
88
|
+
`,w=e.default.ul`
|
|
85
89
|
display: flex;
|
|
86
90
|
justify-content: space-between;
|
|
87
91
|
line-height: 1.2;
|
|
88
92
|
font-size: 80%;
|
|
89
|
-
margin: 0;
|
|
93
|
+
margin: var(--PADDING_SMALL, 20px) 0 0;
|
|
90
94
|
padding: 0;
|
|
91
95
|
list-style-type: none;
|
|
92
|
-
`,
|
|
96
|
+
`,A=e.default.li`
|
|
93
97
|
list-style-type: none;
|
|
94
98
|
margin: 0;
|
|
95
99
|
padding: 0;
|
|
@@ -97,4 +101,4 @@
|
|
|
97
101
|
&:before {
|
|
98
102
|
content: "\200B";
|
|
99
103
|
}
|
|
100
|
-
`;exports.ColorName=h;exports.ColorSpectrum=b;exports.ColorSpectrumUnit=
|
|
104
|
+
`;exports.ColorName=h;exports.ColorSpectrum=b;exports.ColorSpectrumUnit=_;exports.CondensedRange=A;exports.CondensedRangeRow=w;exports.FilterContainer=a;exports.FilterName=f;exports.FilterNames=d;exports.FilterRange=c;exports.FilterRanges=s;exports.FilterTable=r;exports.FilterTitle=l;exports.SelectContainer=u;exports.SelectLabel=p;exports.SpectrumLabel=g;exports.Wavelength=m;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e from "styled-components";
|
|
3
3
|
import { token as t } from "@rubin-epo/epo-react-lib/styles";
|
|
4
|
-
const
|
|
4
|
+
const o = e.div`
|
|
5
5
|
container-type: inline-size;
|
|
6
6
|
container-name: camera-filter;
|
|
7
7
|
|
|
@@ -9,17 +9,22 @@ const r = e.div`
|
|
|
9
9
|
grid-template-columns: 1fr;
|
|
10
10
|
grid-auto-rows: min-content;
|
|
11
11
|
text-align: center;
|
|
12
|
+
padding-block: var(--PADDING_SMALL, 20px);
|
|
12
13
|
position: relative;
|
|
13
|
-
`,
|
|
14
|
-
margin
|
|
15
|
-
`,
|
|
14
|
+
`, r = e.h3`
|
|
15
|
+
margin: 0;
|
|
16
|
+
`, a = e.table`
|
|
16
17
|
border-collapse: collapse;
|
|
17
18
|
text-align: center;
|
|
18
19
|
margin-inline-start: var(--filter-table-margin-inline-start);
|
|
19
20
|
width: var(--filter-table-width);
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
@container (min-width: ${t("BREAK_TABLET")}) {
|
|
23
|
+
margin-block-start: var(--PADDING_SMALL, 20px);
|
|
24
|
+
}
|
|
25
|
+
`, s = e.tbody`
|
|
21
26
|
display: table-header-group;
|
|
22
|
-
`,
|
|
27
|
+
`, l = e.thead`
|
|
23
28
|
display: table-row-group;
|
|
24
29
|
`, c = e.td`
|
|
25
30
|
line-height: 1.2;
|
|
@@ -32,56 +37,55 @@ const r = e.div`
|
|
|
32
37
|
border: var(--filter-name-border);
|
|
33
38
|
border-width: 1px;
|
|
34
39
|
|
|
35
|
-
@container
|
|
40
|
+
@container (min-width: ${t("BREAK_TABLET")}) {
|
|
36
41
|
border-width: 3px;
|
|
37
42
|
}
|
|
38
|
-
`,
|
|
43
|
+
`, p = e.div`
|
|
39
44
|
min-width: 20ch;
|
|
40
45
|
width: 50%;
|
|
41
46
|
max-width: 30ch;
|
|
42
|
-
margin-block: 1em;
|
|
43
47
|
justify-self: center;
|
|
44
48
|
text-align: left;
|
|
45
|
-
`,
|
|
49
|
+
`, f = e.label`
|
|
46
50
|
font-size: 0.75em;
|
|
47
|
-
`,
|
|
51
|
+
`, h = e.text`
|
|
48
52
|
font-size: 2em;
|
|
49
53
|
|
|
50
|
-
@container
|
|
54
|
+
@container (min-width: ${t("BREAK_MOBILE")}) {
|
|
51
55
|
font-size: 1.25em;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
@container
|
|
58
|
+
@container (min-width: ${t("BREAK_PHABLET_MIN")}) {
|
|
55
59
|
font-size: 0.75em;
|
|
56
60
|
}
|
|
57
61
|
`, g = e.tspan`
|
|
58
62
|
font-size: 2em;
|
|
59
63
|
|
|
60
|
-
@container
|
|
64
|
+
@container (min-width: ${t("BREAK_MOBILE")}) {
|
|
61
65
|
font-size: 1.25em;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
|
-
@container
|
|
68
|
+
@container (min-width: ${t("BREAK_PHABLET_MIN")}) {
|
|
65
69
|
font-size: 0.75em;
|
|
66
70
|
}
|
|
67
|
-
`,
|
|
71
|
+
`, A = e.tspan`
|
|
68
72
|
font-size: 1.5em;
|
|
69
73
|
|
|
70
|
-
@container
|
|
74
|
+
@container (min-width: ${t("BREAK_MOBILE")}) {
|
|
71
75
|
font-size: 1em;
|
|
72
76
|
}
|
|
73
77
|
|
|
74
|
-
@container
|
|
78
|
+
@container (min-width: ${t("BREAK_PHABLET_MIN")}) {
|
|
75
79
|
font-size: 0.5em;
|
|
76
80
|
}
|
|
77
|
-
`,
|
|
81
|
+
`, w = e.tspan`
|
|
78
82
|
font-size: 1.3em;
|
|
79
83
|
|
|
80
|
-
@container
|
|
84
|
+
@container (min-width: ${t("BREAK_MOBILE")}) {
|
|
81
85
|
font-size: 0.8em;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
@container
|
|
88
|
+
@container (min-width: ${t("BREAK_PHABLET_MIN")}) {
|
|
85
89
|
font-size: 0.4em;
|
|
86
90
|
}
|
|
87
91
|
`, B = e.ul`
|
|
@@ -89,7 +93,7 @@ const r = e.div`
|
|
|
89
93
|
justify-content: space-between;
|
|
90
94
|
line-height: 1.2;
|
|
91
95
|
font-size: 80%;
|
|
92
|
-
margin: 0;
|
|
96
|
+
margin: var(--PADDING_SMALL, 20px) 0 0;
|
|
93
97
|
padding: 0;
|
|
94
98
|
list-style-type: none;
|
|
95
99
|
`, E = e.li`
|
|
@@ -103,19 +107,19 @@ const r = e.div`
|
|
|
103
107
|
`;
|
|
104
108
|
export {
|
|
105
109
|
g as ColorName,
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
A as ColorSpectrum,
|
|
111
|
+
w as ColorSpectrumUnit,
|
|
108
112
|
E as CondensedRange,
|
|
109
113
|
B as CondensedRangeRow,
|
|
110
|
-
|
|
114
|
+
o as FilterContainer,
|
|
111
115
|
d as FilterName,
|
|
112
|
-
|
|
116
|
+
l as FilterNames,
|
|
113
117
|
c as FilterRange,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
s as FilterRanges,
|
|
119
|
+
a as FilterTable,
|
|
120
|
+
r as FilterTitle,
|
|
121
|
+
p as SelectContainer,
|
|
122
|
+
f as SelectLabel,
|
|
123
|
+
h as SpectrumLabel,
|
|
120
124
|
m as Wavelength
|
|
121
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),f=require("react-i18next"),x=require("../../../atomic/Button/patterns/Reset.cjs"),g=require("./Export/index.cjs"),a=require("../lib/utils.cjs"),b=i=>i.map(t=>{const{defaultValue:e,min:s,max:o}=t,r=e||1;return{...t,active:!1,color:"",brightness:a.getBrightnessValue(s,o,r),value:r}}),c=({actions:i,isDisabled:t,selectedData:e,selectionCallback:s,canvas:o})=>{const{t:r}=f.useTranslation(),{name:d,filters:m}=e,u=t||!a.areActionsActive(e);return n.jsx(n.Fragment,{children:i.map(l=>{switch(l){case"reset":return n.jsx(x.default,{isDisabled:u,onResetCallback:()=>s&&s({...e,filters:b(m)})},l);case"export":return n.jsx(g.default,{isDisabled:u,canvas:o,filename:d,children:r("colorTool.actions.export")},l);case"save":return null;default:return null}})})};c.displayName="Widgets.ColorTool.Actions";const p=c;exports.default=p;
|
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const { defaultValue: t, min: e, max: n } = s, o = t || 1;
|
|
2
|
+
import { jsx as l, Fragment as p } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslation as f } from "react-i18next";
|
|
4
|
+
import d from "../../../atomic/Button/patterns/Reset.js";
|
|
5
|
+
import x from "./Export/index.js";
|
|
6
|
+
import { areActionsActive as g, getBrightnessValue as h } from "../lib/utils.js";
|
|
7
|
+
const A = (o) => o.map((t) => {
|
|
8
|
+
const { defaultValue: e, min: r, max: n } = t, s = e || 1;
|
|
10
9
|
return {
|
|
11
|
-
...
|
|
10
|
+
...t,
|
|
12
11
|
active: !1,
|
|
13
12
|
color: "",
|
|
14
|
-
brightness: h(
|
|
15
|
-
value:
|
|
13
|
+
brightness: h(r, n, s),
|
|
14
|
+
value: s
|
|
16
15
|
};
|
|
17
16
|
}), c = ({
|
|
18
|
-
actions:
|
|
19
|
-
isDisabled:
|
|
20
|
-
selectedData:
|
|
21
|
-
selectionCallback:
|
|
17
|
+
actions: o,
|
|
18
|
+
isDisabled: t,
|
|
19
|
+
selectedData: e,
|
|
20
|
+
selectionCallback: r,
|
|
22
21
|
canvas: n
|
|
23
22
|
}) => {
|
|
24
|
-
const { t:
|
|
25
|
-
return /* @__PURE__ */ l(
|
|
23
|
+
const { t: s } = f(), { name: m, filters: u } = e, a = t || !g(e);
|
|
24
|
+
return /* @__PURE__ */ l(p, { children: o.map((i) => {
|
|
26
25
|
switch (i) {
|
|
27
26
|
case "reset":
|
|
28
27
|
return /* @__PURE__ */ l(
|
|
29
|
-
|
|
28
|
+
d,
|
|
30
29
|
{
|
|
31
30
|
isDisabled: a,
|
|
32
|
-
onResetCallback: () =>
|
|
33
|
-
...
|
|
34
|
-
filters:
|
|
31
|
+
onResetCallback: () => r && r({
|
|
32
|
+
...e,
|
|
33
|
+
filters: A(u)
|
|
35
34
|
})
|
|
36
35
|
},
|
|
37
36
|
i
|
|
38
37
|
);
|
|
39
38
|
case "export":
|
|
40
39
|
return /* @__PURE__ */ l(
|
|
41
|
-
|
|
40
|
+
x,
|
|
42
41
|
{
|
|
43
42
|
isDisabled: a,
|
|
44
43
|
canvas: n,
|
|
45
44
|
filename: m,
|
|
46
|
-
children:
|
|
45
|
+
children: s("colorTool.actions.export")
|
|
47
46
|
},
|
|
48
47
|
i
|
|
49
48
|
);
|
|
@@ -55,7 +54,7 @@ const b = (r) => r.map((s) => {
|
|
|
55
54
|
}) });
|
|
56
55
|
};
|
|
57
56
|
c.displayName = "Widgets.ColorTool.Actions";
|
|
58
|
-
const
|
|
57
|
+
const V = c;
|
|
59
58
|
export {
|
|
60
|
-
|
|
59
|
+
V as default
|
|
61
60
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),n=require("@rubin-epo/epo-react-lib/HorizontalSlider"),l=require("@rubin-epo/epo-react-lib/Button"),o=t=>t&&t.__esModule?t:{default:t},e=o(i),d=o(n),r=o(l),a=e.default.fieldset`
|
|
2
2
|
padding: 0;
|
|
3
3
|
margin: 0;
|
|
4
4
|
border: none;
|
|
5
5
|
display: grid;
|
|
6
6
|
align-items: center;
|
|
7
|
-
gap: var(--
|
|
7
|
+
gap: var(--widget-padding);
|
|
8
8
|
grid-template-columns: max-content minmax(100px, 1fr) minmax(100px, 2fr);
|
|
9
9
|
grid-auto-rows: max-content;
|
|
10
10
|
grid-column: 1 / -1;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
height: 1px;
|
|
16
16
|
top: auto;
|
|
17
17
|
overflow: hidden;
|
|
18
|
-
`,u=e.default(
|
|
18
|
+
`,u=e.default(r.default)`
|
|
19
19
|
background-color: var(--filter-toggle-background, #f7f7f7);
|
|
20
20
|
border: 1px solid;
|
|
21
21
|
color: var(--filter-toggle-color, #6c6e6e);
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
outline: 1px solid var(--white, #fff);
|
|
63
63
|
outline-offset: -3px;
|
|
64
64
|
}
|
|
65
|
-
`,c=e.default(
|
|
65
|
+
`,c=e.default(d.default)`
|
|
66
66
|
padding: 0;
|
|
67
67
|
width: 100%;
|
|
68
68
|
`;exports.FilterContainer=a;exports.FilterLabel=f;exports.FilterToggle=u;exports.HiddenCheckbox=s;exports.Slider=c;
|