@rubin-epo/epo-widget-lib 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +21 -15
- package/dist/CameraFilter.cjs +1 -0
- package/dist/CameraFilter.d.ts +3 -0
- package/dist/CameraFilter.js +99 -0
- package/dist/ColorTool.cjs +1 -0
- package/dist/ColorTool.d.ts +3 -0
- package/dist/ColorTool.js +116 -0
- package/dist/FilterTool.cjs +1 -0
- package/dist/FilterTool.d.ts +3 -0
- package/dist/FilterTool.js +253 -0
- package/dist/SourceSelector.cjs +1 -0
- package/dist/SourceSelector.d.ts +3 -0
- package/dist/SourceSelector.js +97 -0
- package/dist/atomic/Blinker/Blinker.cjs +1 -0
- package/dist/atomic/Blinker/Blinker.d.ts +2 -2
- package/dist/atomic/Blinker/Blinker.js +68 -0
- package/dist/atomic/Blinker/Controls/Controls.cjs +1 -0
- package/dist/atomic/Blinker/Controls/Controls.js +58 -0
- package/dist/atomic/Blinker/Controls/styles.cjs +13 -0
- package/dist/atomic/Blinker/Controls/styles.d.ts +2 -1
- package/dist/atomic/Blinker/Controls/styles.js +17 -0
- package/dist/atomic/Blinker/Image/Image.cjs +1 -0
- package/dist/atomic/Blinker/Image/Image.d.ts +2 -2
- package/dist/atomic/Blinker/Image/Image.js +23 -0
- package/dist/atomic/Blinker/Image/styles.cjs +22 -0
- package/dist/atomic/Blinker/Image/styles.d.ts +4 -3
- package/dist/atomic/Blinker/Image/styles.js +26 -0
- package/dist/atomic/Blinker/Images/Images.cjs +1 -0
- package/dist/atomic/Blinker/Images/Images.js +37 -0
- package/dist/atomic/Blinker/Images/styles.cjs +15 -0
- package/dist/atomic/Blinker/Images/styles.d.ts +5 -4
- package/dist/atomic/Blinker/Images/styles.js +20 -0
- package/dist/atomic/Blinker/_mocks/index.d.ts +2 -0
- package/dist/atomic/Blinker/styles.cjs +26 -0
- package/dist/atomic/Blinker/styles.d.ts +7 -9
- package/dist/atomic/Blinker/styles.js +34 -0
- package/dist/atomic/ElapsedTime/ElapsedTime.cjs +1 -0
- package/dist/atomic/ElapsedTime/ElapsedTime.js +34 -0
- package/dist/atomic/ElapsedTime/styles.cjs +40 -0
- package/dist/atomic/ElapsedTime/styles.d.ts +7 -6
- package/dist/atomic/ElapsedTime/styles.js +49 -0
- package/dist/atomic/PlaybackControl/PlaybackControl.cjs +1 -0
- package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -1
- package/dist/atomic/PlaybackControl/PlaybackControl.js +17 -0
- package/dist/atomic/PlaybackControl/styles.cjs +39 -0
- package/dist/atomic/PlaybackControl/styles.d.ts +3 -2
- package/dist/atomic/PlaybackControl/styles.js +44 -0
- package/dist/hooks/useInterval.cjs +1 -0
- package/dist/hooks/useInterval.js +18 -0
- package/dist/lib/utils.cjs +1 -0
- package/dist/lib/utils.js +18 -0
- package/dist/lib/utils.test.d.ts +1 -0
- package/dist/localeStrings/en/epo-widget-lib.json +77 -0
- package/dist/localeStrings/es/epo-widget-lib.json +33 -0
- package/dist/styles/svg.cjs +8 -0
- package/dist/styles/svg.d.ts +2 -1
- package/dist/styles/svg.js +12 -0
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs +1 -0
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js +61 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.cjs +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.js +95 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +98 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.cjs +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.js +58 -0
- package/dist/widgets/CameraFilter/data.cjs +1 -0
- package/dist/widgets/CameraFilter/data.js +85 -0
- package/dist/widgets/CameraFilter/styles.cjs +64 -0
- package/dist/widgets/CameraFilter/styles.d.ts +19 -18
- package/dist/widgets/CameraFilter/styles.js +82 -0
- package/dist/widgets/ColorTool/ColorTool.d.ts +1 -3
- package/dist/widgets/ColorTool/FilterControls/FilterControls.cjs +1 -0
- package/dist/widgets/ColorTool/FilterControls/FilterControls.d.ts +1 -1
- package/dist/widgets/ColorTool/FilterControls/FilterControls.js +63 -0
- package/dist/widgets/ColorTool/FilterImage/FilterImage.cjs +1 -0
- package/dist/widgets/ColorTool/FilterImage/FilterImage.js +41 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +33 -0
- package/dist/widgets/ColorTool/styles.cjs +129 -0
- package/dist/widgets/ColorTool/styles.d.ts +21 -21
- package/dist/widgets/ColorTool/styles.js +149 -0
- package/dist/widgets/ColorTool/utilities.cjs +1 -0
- package/dist/widgets/ColorTool/utilities.js +38 -0
- package/dist/widgets/FilterTool/FilterTool.d.ts +3 -1
- package/dist/widgets/FilterTool/styles.cjs +36 -0
- package/dist/widgets/FilterTool/styles.d.ts +10 -15
- package/dist/widgets/FilterTool/styles.js +49 -0
- package/dist/widgets/SourceSelector/Message/Message.cjs +1 -0
- package/dist/widgets/SourceSelector/Message/Message.js +21 -0
- package/dist/widgets/SourceSelector/Message/styles.cjs +23 -0
- package/dist/widgets/SourceSelector/Message/styles.d.ts +5 -0
- package/dist/widgets/SourceSelector/Message/styles.js +28 -0
- package/dist/widgets/SourceSelector/Point/Point.cjs +1 -0
- package/dist/widgets/SourceSelector/Point/Point.js +45 -0
- package/dist/widgets/SourceSelector/Point/styles.cjs +11 -0
- package/dist/widgets/SourceSelector/Point/styles.d.ts +4 -3
- package/dist/widgets/SourceSelector/Point/styles.js +15 -0
- package/dist/widgets/SourceSelector/Points/Points.cjs +1 -0
- package/dist/widgets/SourceSelector/Points/Points.js +35 -0
- package/dist/widgets/SourceSelector/SourceSelector.d.ts +2 -2
- package/dist/widgets/SourceSelector/mocks/index.d.ts +7 -0
- package/dist/widgets/SourceSelector/styles.cjs +20 -0
- package/dist/widgets/SourceSelector/styles.d.ts +9 -7
- package/dist/widgets/SourceSelector/styles.js +30 -0
- package/dist/widgets/SourceSelector/utilities.cjs +1 -0
- package/dist/widgets/SourceSelector/utilities.js +7 -0
- package/dist/widgets/SourceSelector/utilities.test.d.ts +1 -0
- package/package.json +10 -10
- package/dist/assets/locales/index.d.ts +0 -115
- package/dist/epo-widget-lib.es.js +0 -3434
- package/dist/epo-widget-lib.umd.js +0 -459
- package/dist/index.d.ts +0 -6
- package/dist/types/astro.d.ts +0 -35
- package/dist/vite-env.d.ts +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
const i = e.div`
|
|
3
|
+
background-color: var(--neutral20, #dce0e3);
|
|
4
|
+
border-radius: 5px;
|
|
5
|
+
color: var(--neutral95, "#1F2121");
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-areas: "header" "time";
|
|
8
|
+
font-size: 0.75em;
|
|
9
|
+
font-weight: var(--FONT_WEIGHT_NORMAL, 400);
|
|
10
|
+
min-width: 70px;
|
|
11
|
+
max-width: fit-content;
|
|
12
|
+
`, r = e.h2`
|
|
13
|
+
border-bottom: 1px solid var(--neutral95, "#1F2121");
|
|
14
|
+
font-weight: inherit;
|
|
15
|
+
font-size: 1em;
|
|
16
|
+
line-height: 1;
|
|
17
|
+
grid-area: header;
|
|
18
|
+
text-align: center;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0.5em 0.75em;
|
|
21
|
+
`, n = e.time`
|
|
22
|
+
grid-area: time;
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-auto-flow: column;
|
|
25
|
+
grid-template-rows: 1fr;
|
|
26
|
+
grid-auto-columns: 1fr;
|
|
27
|
+
`, o = e.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
padding: 0.25em 0.5em;
|
|
32
|
+
line-height: 1.6;
|
|
33
|
+
|
|
34
|
+
&:not(:first-of-type) {
|
|
35
|
+
border-left: 1px solid var(--neutral95, "#1F2121");
|
|
36
|
+
}
|
|
37
|
+
`, a = e.span`
|
|
38
|
+
font-size: 1.167em;
|
|
39
|
+
`, d = e.span`
|
|
40
|
+
font-size: 0.6em;
|
|
41
|
+
`;
|
|
42
|
+
export {
|
|
43
|
+
i as ElapsedTimeContainer,
|
|
44
|
+
r as Header,
|
|
45
|
+
o as Interval,
|
|
46
|
+
a as Number,
|
|
47
|
+
d as Step,
|
|
48
|
+
n as Time
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),r=require("@rubin-epo/epo-react-lib/IconComposer"),t=require("./styles.cjs"),i=e=>e&&e.__esModule?e:{default:e},a=i(r),n=({icon:e,label:s,handleClick:c,...l})=>o.jsxs(t.PlaybackButton,{...l,onClick:c,children:[o.jsx(t.IconContainer,{children:o.jsx(a.default,{icon:e,size:15})}),o.jsx("span",{children:s})]});n.displayName="Atomic.PlaybackControl";const u=n;exports.default=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, HTMLProps, MouseEventHandler } from "react";
|
|
2
|
-
import { IconKey } from "@rubin-epo/epo-react-lib
|
|
2
|
+
import { IconKey } from "@rubin-epo/epo-react-lib";
|
|
3
3
|
interface PlaybackControlProps extends HTMLProps<HTMLButtonElement> {
|
|
4
4
|
icon: IconKey;
|
|
5
5
|
label: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import l from "@rubin-epo/epo-react-lib/IconComposer";
|
|
3
|
+
import { PlaybackButton as e, IconContainer as s } from "./styles.js";
|
|
4
|
+
const n = ({
|
|
5
|
+
icon: r,
|
|
6
|
+
label: c,
|
|
7
|
+
handleClick: t,
|
|
8
|
+
...i
|
|
9
|
+
}) => /* @__PURE__ */ a(e, { ...i, onClick: t, children: [
|
|
10
|
+
/* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(l, { icon: r, size: 15 }) }),
|
|
11
|
+
/* @__PURE__ */ o("span", { children: c })
|
|
12
|
+
] });
|
|
13
|
+
n.displayName = "Atomic.PlaybackControl";
|
|
14
|
+
const k = n;
|
|
15
|
+
export {
|
|
16
|
+
k as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("styled-components"),r=t=>t&&t.__esModule?t:{default:t},e=r(n),o=e.default.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
width: 44px;
|
|
6
|
+
height: 44px;
|
|
7
|
+
border-radius: 22px;
|
|
8
|
+
background-color: var(--button-background-color);
|
|
9
|
+
color: var(--neutral95, #1f2121);
|
|
10
|
+
`,a=e.default.button`
|
|
11
|
+
--button-color: var(--white, #fff);
|
|
12
|
+
--button-background-color: var(--neutral15, #e6e6e6);
|
|
13
|
+
|
|
14
|
+
background: transparent;
|
|
15
|
+
border: none;
|
|
16
|
+
color: var(--button-color);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 0.75em;
|
|
22
|
+
text-align: center;
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
|
|
26
|
+
&:not(:disabled):not([aria-disabled="true"]):hover,
|
|
27
|
+
&:not(:disabled):not([aria-disabled="true"]):focus-visible,
|
|
28
|
+
&:not(:disabled):not([aria-disabled="true"]).focus-visible {
|
|
29
|
+
text-decoration: underline;
|
|
30
|
+
|
|
31
|
+
${o} {
|
|
32
|
+
outline: 1px solid var(--white, #fff);
|
|
33
|
+
outline-offset: 1px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
&:not(:disabled):not([aria-disabled="true"]):focus {
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
`;exports.IconContainer=o;exports.PlaybackButton=a;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const IconContainer: import("styled-components").IStyledComponent<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
3
|
+
export declare const PlaybackButton: import("styled-components").IStyledComponent<"web", Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
const t = o.div`
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
width: 44px;
|
|
7
|
+
height: 44px;
|
|
8
|
+
border-radius: 22px;
|
|
9
|
+
background-color: var(--button-background-color);
|
|
10
|
+
color: var(--neutral95, #1f2121);
|
|
11
|
+
`, n = o.button`
|
|
12
|
+
--button-color: var(--white, #fff);
|
|
13
|
+
--button-background-color: var(--neutral15, #e6e6e6);
|
|
14
|
+
|
|
15
|
+
background: transparent;
|
|
16
|
+
border: none;
|
|
17
|
+
color: var(--button-color);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 0.75em;
|
|
23
|
+
text-align: center;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
|
|
27
|
+
&:not(:disabled):not([aria-disabled="true"]):hover,
|
|
28
|
+
&:not(:disabled):not([aria-disabled="true"]):focus-visible,
|
|
29
|
+
&:not(:disabled):not([aria-disabled="true"]).focus-visible {
|
|
30
|
+
text-decoration: underline;
|
|
31
|
+
|
|
32
|
+
${t} {
|
|
33
|
+
outline: 1px solid var(--white, #fff);
|
|
34
|
+
outline-offset: 1px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&:not(:disabled):not([aria-disabled="true"]):focus {
|
|
38
|
+
outline: none;
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
export {
|
|
42
|
+
t as IconContainer,
|
|
43
|
+
n as PlaybackButton
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react");function s(u,e){const t=r.useRef();r.useEffect(()=>{t.current=u},[u]),r.useEffect(()=>{function n(){t.current&&t.current()}if(e!==null){let c=setInterval(n,e);return()=>clearInterval(c)}},[e])}exports.default=s;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useRef as f, useEffect as n } from "react";
|
|
2
|
+
function i(r, t) {
|
|
3
|
+
const e = f();
|
|
4
|
+
n(() => {
|
|
5
|
+
e.current = r;
|
|
6
|
+
}, [r]), n(() => {
|
|
7
|
+
function u() {
|
|
8
|
+
e.current && e.current();
|
|
9
|
+
}
|
|
10
|
+
if (t !== null) {
|
|
11
|
+
let c = setInterval(u, t);
|
|
12
|
+
return () => clearInterval(c);
|
|
13
|
+
}
|
|
14
|
+
}, [t]);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
i as default
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=(e,t)=>{switch(!0){case e>t:return 0;case e<0:return t;default:return e}},o=(e,t,r)=>e>=t&&e<=r,s=(e=[],t=[])=>{const r=e[0]<t[0]?e:t,n=r===e?t:e;return r[1]<n[0]?null:[n[0],r[1]<n[1]?r[1]:n[1]]};exports.between=o;exports.getClampedArrayIndex=c;exports.intersection=s;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const c = (t, e) => {
|
|
2
|
+
switch (!0) {
|
|
3
|
+
case t > e:
|
|
4
|
+
return 0;
|
|
5
|
+
case t < 0:
|
|
6
|
+
return e;
|
|
7
|
+
default:
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
}, s = (t, e, r) => t >= e && t <= r, u = (t = [], e = []) => {
|
|
11
|
+
const r = t[0] < e[0] ? t : e, n = r === t ? e : t;
|
|
12
|
+
return r[1] < n[0] ? null : [n[0], r[1] < n[1] ? r[1] : n[1]];
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
s as between,
|
|
16
|
+
c as getClampedArrayIndex,
|
|
17
|
+
u as intersection
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"blinker": {
|
|
3
|
+
"controls": {
|
|
4
|
+
"backward": "Rewind",
|
|
5
|
+
"forward": "Forward",
|
|
6
|
+
"play": "Play",
|
|
7
|
+
"pause": "Pause"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"elapsed_time": {
|
|
11
|
+
"title": "Elapsed Time",
|
|
12
|
+
"step": {
|
|
13
|
+
"day_one": "Day",
|
|
14
|
+
"day_other": "Days",
|
|
15
|
+
"hour_one": "Hour",
|
|
16
|
+
"hour_other": "Hours",
|
|
17
|
+
"minute_one": "Minute",
|
|
18
|
+
"minute_other": "Minutes",
|
|
19
|
+
"second_one": "Second",
|
|
20
|
+
"second_other": "Seconds",
|
|
21
|
+
"year_one": "Year",
|
|
22
|
+
"year_other": "Years"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"filterTool": {
|
|
26
|
+
"title": "Filter Tool",
|
|
27
|
+
"filter": "Filter",
|
|
28
|
+
"whiteLight": "White Light",
|
|
29
|
+
"prism": "Prism",
|
|
30
|
+
"selectLabel": "Select a filter:",
|
|
31
|
+
"light_out": "Light out",
|
|
32
|
+
"light_filtered": "Light filtered",
|
|
33
|
+
"colors": {
|
|
34
|
+
"violet": "Violet",
|
|
35
|
+
"blue": "Blue",
|
|
36
|
+
"green": "Green",
|
|
37
|
+
"yellow": "Yellow",
|
|
38
|
+
"orange": "Orange",
|
|
39
|
+
"red": "Red",
|
|
40
|
+
"none": "None"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"colorTool": {
|
|
44
|
+
"labels": {
|
|
45
|
+
"object_type": "Object type:",
|
|
46
|
+
"object": "Object:",
|
|
47
|
+
"object_selected": "Selected object:",
|
|
48
|
+
"filter": "Filter",
|
|
49
|
+
"color": "Color",
|
|
50
|
+
"color_intensity": "Color Intensity"
|
|
51
|
+
},
|
|
52
|
+
"actions": {
|
|
53
|
+
"select_an_object": "Select an object",
|
|
54
|
+
"select_filter": "Select a filter",
|
|
55
|
+
"reset": "Reset"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"source_selector": {
|
|
59
|
+
"messages": {
|
|
60
|
+
"success": "You found it!",
|
|
61
|
+
"failure": "Try again."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"camera_filter": {
|
|
65
|
+
"title": "Rubin Observatory LSST Camera Filter Ranges",
|
|
66
|
+
"labels": {
|
|
67
|
+
"select": "Select one of the Rubin filters",
|
|
68
|
+
"option": "{{band}} filter",
|
|
69
|
+
"option_none": "None",
|
|
70
|
+
"captured_range": "Electromagnetic spectrums captured with {{filter}} filter applied",
|
|
71
|
+
"captured_range_no_filter": "Electromagnetic spectrums without filter applied",
|
|
72
|
+
"ultraviolet": "Ultraviolet",
|
|
73
|
+
"visible": "Visible Light",
|
|
74
|
+
"infrared": "Infrared"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"elapsed_time": {
|
|
3
|
+
"title": "Tiempo transcurrido",
|
|
4
|
+
"step": {
|
|
5
|
+
"day_one": "Día",
|
|
6
|
+
"day_other": "Días",
|
|
7
|
+
"hour_one": "Hora",
|
|
8
|
+
"hour_other": "Horas",
|
|
9
|
+
"minute_one": "Minuto",
|
|
10
|
+
"minute_other": "Minutos",
|
|
11
|
+
"second_one": "Segundo",
|
|
12
|
+
"second_other": "Segundos",
|
|
13
|
+
"year_one": "Año",
|
|
14
|
+
"year_other": "Años"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"filterTool": {
|
|
18
|
+
"title": "Herramienta de filtro",
|
|
19
|
+
"filter": "El filtro",
|
|
20
|
+
"whiteLight": "Luz blanca",
|
|
21
|
+
"prism": "Prisma",
|
|
22
|
+
"selectLabel": "Seleccione un filtro:",
|
|
23
|
+
"colors": {
|
|
24
|
+
"violet": "Violeta",
|
|
25
|
+
"blue": "Azul",
|
|
26
|
+
"green": "Verde",
|
|
27
|
+
"yellow": "Amarillo",
|
|
28
|
+
"orange": "Naranja",
|
|
29
|
+
"red": "Rojo",
|
|
30
|
+
"none": "Ninguno"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),i=t=>t&&t.__esModule?t:{default:t},n=i(e),o=n.default.div`
|
|
2
|
+
position: relative;
|
|
3
|
+
min-width: var(--BREAK_MOBILE_MIN, 280px);
|
|
4
|
+
|
|
5
|
+
@media print {
|
|
6
|
+
width: var(--BREAK_MOBILE_MIN, 280px);
|
|
7
|
+
}
|
|
8
|
+
`;exports.Container=o;
|
package/dist/styles/svg.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("styled-components").IStyledComponent<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),m=require("react"),a=require("../styles.cjs"),c=({filters:o,min:i,spectrumRange:l})=>{const s=m.useRef(null),d=s.current?Array.from(s.current.children):null;return e.jsxs(e.Fragment,{children:[e.jsx(a.CondensedRangeRow,{ref:s,"data-testid":"condensed-filters",children:o.map(({range:t,band:n})=>e.jsxs(a.CondensedRange,{"aria-labelledby":`${n}-name`,children:[t.join("–"),e.jsx("br",{}),"nm"]},n))}),d&&e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMinYMin meet",viewBox:`${i} 0 ${l} 50`,role:"presentation","aria-hidden":"true",children:e.jsx("g",{role:"presentation",children:o.map(({range:t,band:n},u)=>{const x=d[u],{offsetLeft:f,offsetWidth:h,offsetParent:b}=x,{offsetWidth:g}=b,j=l/g,r=(t[0]+t[1])/2,p=(f+h/2)*j;return e.jsxs("g",{children:[e.jsx("line",{strokeWidth:1,stroke:"#b2b2b2",x1:r,x2:r,y1:"100%",y2:"75%",role:"presentation"}),e.jsx("line",{strokeWidth:1,stroke:"#b2b2b2",x1:r,x2:p+i,y1:"75%",y2:"0%",role:"presentation"})]},n)})})})]})};c.displayName="Widgets.CameraFilter.CondensedFilterRanges";const y=c;exports.default=y;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as s, Fragment as y, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as R } from "react";
|
|
3
|
+
import { CondensedRangeRow as w, CondensedRange as C } from "../styles.js";
|
|
4
|
+
const c = ({
|
|
5
|
+
filters: i,
|
|
6
|
+
min: l,
|
|
7
|
+
spectrumRange: d
|
|
8
|
+
}) => {
|
|
9
|
+
const r = R(null), a = r.current ? Array.from(r.current.children) : null;
|
|
10
|
+
return /* @__PURE__ */ s(y, { children: [
|
|
11
|
+
/* @__PURE__ */ e(w, { ref: r, "data-testid": "condensed-filters", children: i.map(({ range: t, band: n }) => /* @__PURE__ */ s(C, { "aria-labelledby": `${n}-name`, children: [
|
|
12
|
+
t.join("–"),
|
|
13
|
+
/* @__PURE__ */ e("br", {}),
|
|
14
|
+
"nm"
|
|
15
|
+
] }, n)) }),
|
|
16
|
+
a && /* @__PURE__ */ e(
|
|
17
|
+
"svg",
|
|
18
|
+
{
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
preserveAspectRatio: "xMinYMin meet",
|
|
21
|
+
viewBox: `${l} 0 ${d} 50`,
|
|
22
|
+
role: "presentation",
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
children: /* @__PURE__ */ e("g", { role: "presentation", children: i.map(({ range: t, band: n }, f) => {
|
|
25
|
+
const m = a[f], { offsetLeft: p, offsetWidth: h, offsetParent: b } = m, { offsetWidth: g } = b, x = d / g, o = (t[0] + t[1]) / 2, u = (p + h / 2) * x;
|
|
26
|
+
return /* @__PURE__ */ s("g", { children: [
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
"line",
|
|
29
|
+
{
|
|
30
|
+
strokeWidth: 1,
|
|
31
|
+
stroke: "#b2b2b2",
|
|
32
|
+
x1: o,
|
|
33
|
+
x2: o,
|
|
34
|
+
y1: "100%",
|
|
35
|
+
y2: "75%",
|
|
36
|
+
role: "presentation"
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
"line",
|
|
41
|
+
{
|
|
42
|
+
strokeWidth: 1,
|
|
43
|
+
stroke: "#b2b2b2",
|
|
44
|
+
x1: o,
|
|
45
|
+
x2: u + l,
|
|
46
|
+
y1: "75%",
|
|
47
|
+
y2: "0%",
|
|
48
|
+
role: "presentation"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] }, n);
|
|
52
|
+
}) })
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
c.displayName = "Widgets.CameraFilter.CondensedFilterRanges";
|
|
58
|
+
const v = c;
|
|
59
|
+
export {
|
|
60
|
+
v as default
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),y=require("../../../../lib/utils.cjs"),s=require("../../styles.cjs"),a=({colors:o,activeRange:x,isBandSelected:d,isCondensed:e})=>{const n=e?350:o[0].range[0],m=(e?1e3:820)-n,u=Math.floor(m/(o.length-1));return t.jsx("g",{role:"list","data-testid":"color-labels",children:o.map(({name:c,range:r,color:h},b)=>{const l=n+u*b,j=d&&y.intersection(r,x)===null,i=(r[0]+r[1])/2;return t.jsxs("g",{children:[t.jsx("line",{strokeWidth:1,stroke:"#b2b2b2",x1:i,x2:i,y1:"50%",y2:e?"52.5%":"55%",role:"presentation"}),t.jsx("line",{strokeWidth:1,stroke:"#b2b2b2",x1:i,x2:l,y1:e?"52.5%":"55%",y2:e?"72.5%":"70%",role:"presentation"}),t.jsx("circle",{cx:l,cy:e?"72.5%":"70%",r:e?15:10,fill:h,role:"presentation"}),t.jsxs("text",{x:l,dominantBaseline:"middle",textAnchor:"middle",y:"75%",role:"listitem","aria-hidden":j,children:[t.jsx(s.ColorName,{x:l,dy:"1.25em",textAnchor:"middle",children:c}),t.jsx(s.ColorSpectrum,{x:l,dy:"1.25em",textAnchor:"middle",children:r.join("–")}),t.jsx(s.ColorSpectrumUnit,{x:l,dy:"1.25em",textAnchor:"middle",children:"nm"})]})]},c)})})};a.displayName="Widgets.CameraFilter.ColorLabels";const p=a;exports.default=p;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { intersection as f } from "../../../../lib/utils.js";
|
|
3
|
+
import { ColorName as u, ColorSpectrum as k, ColorSpectrumUnit as A } from "../../styles.js";
|
|
4
|
+
const m = ({
|
|
5
|
+
colors: l,
|
|
6
|
+
activeRange: s,
|
|
7
|
+
isBandSelected: x,
|
|
8
|
+
isCondensed: t
|
|
9
|
+
}) => {
|
|
10
|
+
const c = t ? 350 : l[0].range[0], d = (t ? 1e3 : 820) - c, h = Math.floor(d / (l.length - 1));
|
|
11
|
+
return /* @__PURE__ */ o("g", { role: "list", "data-testid": "color-labels", children: l.map(({ name: n, range: r, color: p }, b) => {
|
|
12
|
+
const e = c + h * b, y = x && f(r, s) === null, i = (r[0] + r[1]) / 2;
|
|
13
|
+
return /* @__PURE__ */ a("g", { children: [
|
|
14
|
+
/* @__PURE__ */ o(
|
|
15
|
+
"line",
|
|
16
|
+
{
|
|
17
|
+
strokeWidth: 1,
|
|
18
|
+
stroke: "#b2b2b2",
|
|
19
|
+
x1: i,
|
|
20
|
+
x2: i,
|
|
21
|
+
y1: "50%",
|
|
22
|
+
y2: t ? "52.5%" : "55%",
|
|
23
|
+
role: "presentation"
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ o(
|
|
27
|
+
"line",
|
|
28
|
+
{
|
|
29
|
+
strokeWidth: 1,
|
|
30
|
+
stroke: "#b2b2b2",
|
|
31
|
+
x1: i,
|
|
32
|
+
x2: e,
|
|
33
|
+
y1: t ? "52.5%" : "55%",
|
|
34
|
+
y2: t ? "72.5%" : "70%",
|
|
35
|
+
role: "presentation"
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ o(
|
|
39
|
+
"circle",
|
|
40
|
+
{
|
|
41
|
+
cx: e,
|
|
42
|
+
cy: t ? "72.5%" : "70%",
|
|
43
|
+
r: t ? 15 : 10,
|
|
44
|
+
fill: p,
|
|
45
|
+
role: "presentation"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ a(
|
|
49
|
+
"text",
|
|
50
|
+
{
|
|
51
|
+
x: e,
|
|
52
|
+
dominantBaseline: "middle",
|
|
53
|
+
textAnchor: "middle",
|
|
54
|
+
y: "75%",
|
|
55
|
+
role: "listitem",
|
|
56
|
+
"aria-hidden": y,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ o(
|
|
59
|
+
u,
|
|
60
|
+
{
|
|
61
|
+
x: e,
|
|
62
|
+
dy: "1.25em",
|
|
63
|
+
textAnchor: "middle",
|
|
64
|
+
children: n
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ o(
|
|
68
|
+
k,
|
|
69
|
+
{
|
|
70
|
+
x: e,
|
|
71
|
+
dy: "1.25em",
|
|
72
|
+
textAnchor: "middle",
|
|
73
|
+
children: r.join("–")
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ o(
|
|
77
|
+
A,
|
|
78
|
+
{
|
|
79
|
+
x: e,
|
|
80
|
+
dy: "1.25em",
|
|
81
|
+
textAnchor: "middle",
|
|
82
|
+
children: "nm"
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }, n);
|
|
89
|
+
}) });
|
|
90
|
+
};
|
|
91
|
+
m.displayName = "Widgets.CameraFilter.ColorLabels";
|
|
92
|
+
const W = m;
|
|
93
|
+
export {
|
|
94
|
+
W as default
|
|
95
|
+
};
|
|
@@ -0,0 +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} 200`,"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:"50%",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;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs as p, jsx as r, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { between as k } from "../../../lib/utils.js";
|
|
3
|
+
import { spectrums as e } from "../data.js";
|
|
4
|
+
import l from "./SpectrumLabels/SpectrumLabels.js";
|
|
5
|
+
const o = ({
|
|
6
|
+
min: n,
|
|
7
|
+
max: g,
|
|
8
|
+
range: t,
|
|
9
|
+
isCondensed: f,
|
|
10
|
+
activeFilter: s
|
|
11
|
+
}) => /* @__PURE__ */ p(
|
|
12
|
+
"svg",
|
|
13
|
+
{
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
preserveAspectRatio: "xMinYMin meet",
|
|
16
|
+
viewBox: `${n} 0 ${t} 200`,
|
|
17
|
+
"data-testid": "spectrum-display",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ p("defs", { children: [
|
|
20
|
+
e.map(({ name: h, stops: d }) => /* @__PURE__ */ r("linearGradient", { id: `${h}-gradient`, children: d.map(({ offset: a, stopColor: m, id: x }) => /* @__PURE__ */ r(
|
|
21
|
+
"stop",
|
|
22
|
+
{
|
|
23
|
+
offset: a,
|
|
24
|
+
stopColor: m,
|
|
25
|
+
id: x
|
|
26
|
+
},
|
|
27
|
+
`${a}-${m}`
|
|
28
|
+
)) }, h)),
|
|
29
|
+
/* @__PURE__ */ p("mask", { id: "spectrumMask", children: [
|
|
30
|
+
/* @__PURE__ */ r("rect", { width: "100%", height: "50%", fill: "white", x: n }),
|
|
31
|
+
s && /* @__PURE__ */ p(w, { children: [
|
|
32
|
+
/* @__PURE__ */ r(
|
|
33
|
+
"rect",
|
|
34
|
+
{
|
|
35
|
+
x: n,
|
|
36
|
+
width: s.range[0] - n,
|
|
37
|
+
height: "100%",
|
|
38
|
+
fill: "black"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r(
|
|
42
|
+
"rect",
|
|
43
|
+
{
|
|
44
|
+
x: s.range[1],
|
|
45
|
+
width: g - s.range[1],
|
|
46
|
+
height: "100%",
|
|
47
|
+
fill: "black"
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] })
|
|
51
|
+
] })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ r("g", { mask: "url(#spectrumMask)", role: "presentation", children: e.map(({ name: h, upper: d, lower: a }) => /* @__PURE__ */ r(
|
|
54
|
+
"rect",
|
|
55
|
+
{
|
|
56
|
+
width: (d || g) - (a || n),
|
|
57
|
+
height: "50%",
|
|
58
|
+
fill: `url(#${h}-gradient)`,
|
|
59
|
+
x: a || n,
|
|
60
|
+
role: "presentation"
|
|
61
|
+
},
|
|
62
|
+
h
|
|
63
|
+
)) }),
|
|
64
|
+
/* @__PURE__ */ r("g", { children: e.map(
|
|
65
|
+
({ name: h, upper: d }) => d && /* @__PURE__ */ r(
|
|
66
|
+
"line",
|
|
67
|
+
{
|
|
68
|
+
strokeWidth: 2,
|
|
69
|
+
strokeDasharray: "8 8",
|
|
70
|
+
stroke: s && !k(d, s.range[0], s.range[1]) ? "#000" : "#fff",
|
|
71
|
+
x1: d,
|
|
72
|
+
x2: d,
|
|
73
|
+
y1: 0,
|
|
74
|
+
y2: "50%"
|
|
75
|
+
},
|
|
76
|
+
h
|
|
77
|
+
)
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ r(
|
|
80
|
+
l,
|
|
81
|
+
{
|
|
82
|
+
spectrums: e,
|
|
83
|
+
activeBand: s == null ? void 0 : s.band,
|
|
84
|
+
min: n,
|
|
85
|
+
max: g,
|
|
86
|
+
activeMin: s == null ? void 0 : s.range[0],
|
|
87
|
+
activeMax: s == null ? void 0 : s.range[1],
|
|
88
|
+
isCondensed: f
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
o.displayName = "Widgets.CameraFilter.SpectrumDisplay";
|
|
95
|
+
const M = o;
|
|
96
|
+
export {
|
|
97
|
+
M as default
|
|
98
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),L=require("react-i18next"),S=require("../../styles.cjs"),j=require("../../../../lib/utils.cjs"),_=require("../ColorLabels/ColorLabels.cjs"),c=({spectrums:u,activeBand:e,min:d,max:m,activeMin:l=0,activeMax:i=0,isCondensed:p})=>{const{t:a}=L.useTranslation(),b=a("camera_filter.labels.captured_range",{context:e?"":"no_filter",filter:e});return t.jsx("g",{role:"list","aria-label":b,"aria-live":"polite","data-testid":"spectrum-labels",children:u.map(({name:r,upper:f,lower:x,colors:n})=>{const o=f||m,s=x||d,g=e&&j.intersection([s,o],[l,i])===null;return t.jsxs("g",{role:"listitem","aria-hidden":g,children:[t.jsx(S.SpectrumLabel,{x:(o-s)/2+s,y:"25%",dominantBaseline:"middle",textAnchor:"middle",children:a(`camera_filter.labels.${r}`)},r),n&&t.jsx(_.default,{colors:n,isBandSelected:!!e,activeRange:[l,i],isCondensed:p})]},r)})})};c.displayName="Widgets.CameraFilter.SpectrumLabels";const h=c;exports.default=h;
|