@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
|
@@ -1385,7 +1385,7 @@ export declare const FilterRange: import('styled-components').IStyledComponent<"
|
|
|
1385
1385
|
abbr?: string | undefined;
|
|
1386
1386
|
height?: string | number | undefined;
|
|
1387
1387
|
width?: string | number | undefined;
|
|
1388
|
-
valign?: "
|
|
1388
|
+
valign?: "top" | "bottom" | "baseline" | "middle" | undefined;
|
|
1389
1389
|
defaultChecked?: boolean | undefined;
|
|
1390
1390
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
1391
1391
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -2772,7 +2772,7 @@ export declare const SpectrumLabel: import('styled-components').IStyledComponent
|
|
|
2772
2772
|
accentHeight?: string | number | undefined;
|
|
2773
2773
|
accumulate?: "none" | "sum" | undefined;
|
|
2774
2774
|
additive?: "replace" | "sum" | undefined;
|
|
2775
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
2775
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
2776
2776
|
allowReorder?: "yes" | "no" | undefined;
|
|
2777
2777
|
alphabetic?: string | number | undefined;
|
|
2778
2778
|
amplitude?: string | number | undefined;
|
|
@@ -3254,7 +3254,7 @@ export declare const ColorName: import('styled-components').IStyledComponent<"we
|
|
|
3254
3254
|
accentHeight?: string | number | undefined;
|
|
3255
3255
|
accumulate?: "none" | "sum" | undefined;
|
|
3256
3256
|
additive?: "replace" | "sum" | undefined;
|
|
3257
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
3257
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
3258
3258
|
allowReorder?: "yes" | "no" | undefined;
|
|
3259
3259
|
alphabetic?: string | number | undefined;
|
|
3260
3260
|
amplitude?: string | number | undefined;
|
|
@@ -3736,7 +3736,7 @@ export declare const ColorSpectrum: import('styled-components').IStyledComponent
|
|
|
3736
3736
|
accentHeight?: string | number | undefined;
|
|
3737
3737
|
accumulate?: "none" | "sum" | undefined;
|
|
3738
3738
|
additive?: "replace" | "sum" | undefined;
|
|
3739
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
3739
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
3740
3740
|
allowReorder?: "yes" | "no" | undefined;
|
|
3741
3741
|
alphabetic?: string | number | undefined;
|
|
3742
3742
|
amplitude?: string | number | undefined;
|
|
@@ -4218,7 +4218,7 @@ export declare const ColorSpectrumUnit: import('styled-components').IStyledCompo
|
|
|
4218
4218
|
accentHeight?: string | number | undefined;
|
|
4219
4219
|
accumulate?: "none" | "sum" | undefined;
|
|
4220
4220
|
additive?: "replace" | "sum" | undefined;
|
|
4221
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
4221
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
4222
4222
|
allowReorder?: "yes" | "no" | undefined;
|
|
4223
4223
|
alphabetic?: string | number | undefined;
|
|
4224
4224
|
amplitude?: string | number | undefined;
|
|
@@ -1 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ListboxOption } from '@rubin-epo/epo-react-lib/SelectListbox';
|
|
3
|
+
|
|
4
|
+
export interface ImageFilter {
|
|
5
|
+
label: string;
|
|
6
|
+
defaultColor?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
active: boolean;
|
|
9
|
+
image: string;
|
|
10
|
+
isDisabled: boolean;
|
|
11
|
+
value: number;
|
|
12
|
+
defaultValue?: number;
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
brightness?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface AstroObject {
|
|
18
|
+
name: string;
|
|
19
|
+
filters: ImageFilter[];
|
|
20
|
+
}
|
|
21
|
+
export interface AstroCategory {
|
|
22
|
+
type: string;
|
|
23
|
+
objects: AstroObject[];
|
|
24
|
+
}
|
|
25
|
+
export type ColorToolAction = "reset" | "export" | "save";
|
|
26
|
+
interface ColorToolConfig {
|
|
27
|
+
actions?: Array<ColorToolAction>;
|
|
28
|
+
/** pixel width of the images in the tool */
|
|
29
|
+
width?: number;
|
|
30
|
+
/** pixel height of the images in the tool */
|
|
31
|
+
height?: number;
|
|
32
|
+
hideSubtitle?: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface ColorToolProps {
|
|
35
|
+
selectionCallback: (selectedData: AstroObject) => void;
|
|
36
|
+
data: AstroCategory[];
|
|
37
|
+
selectedData: AstroObject;
|
|
38
|
+
objectOptions?: ListboxOption[];
|
|
39
|
+
colorOptions?: ListboxOption[];
|
|
40
|
+
isDisabled?: boolean;
|
|
41
|
+
isDisplayOnly?: boolean;
|
|
42
|
+
config?: ColorToolConfig;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
declare const ColorTool: FunctionComponent<ColorToolProps>;
|
|
46
|
+
export default ColorTool;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExportFormat } from 'skia-canvas';
|
|
2
|
-
import { ImageFilter } from '
|
|
2
|
+
import { ImageFilter } from '..';
|
|
3
3
|
|
|
4
4
|
/** server safe renderer */
|
|
5
5
|
declare const getFilteredImageBase64: (filters?: Array<ImageFilter>, format?: ExportFormat, width?: number, height?: number) => Promise<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AstroCategory, AstroObject, ImageFilter } from '
|
|
1
|
+
import { AstroCategory, AstroObject, ImageFilter } from '..';
|
|
2
2
|
|
|
3
3
|
/** calculates a value that can be used in the CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness brightness filter } */
|
|
4
4
|
export declare const getBrightnessValue: (min: number, max: number, value: number) => number;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
|
|
3
|
+
type FilterColor = "violet" | "blue" | "green" | "yellow" | "orange" | "red";
|
|
4
|
+
interface FilterToolProps {
|
|
5
|
+
selectionCallback?: (color: FilterColor) => void;
|
|
6
|
+
selectedColor?: FilterColor | "none";
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
labelledById?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const FilterTool: FunctionComponent<FilterToolProps>;
|
|
12
|
+
export default FilterTool;
|
|
@@ -572,7 +572,7 @@ export declare const PrismSVG: import('styled-components').IStyledComponent<"web
|
|
|
572
572
|
accentHeight?: string | number | undefined;
|
|
573
573
|
accumulate?: "none" | "sum" | undefined;
|
|
574
574
|
additive?: "replace" | "sum" | undefined;
|
|
575
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
575
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
576
576
|
allowReorder?: "yes" | "no" | undefined;
|
|
577
577
|
alphabetic?: string | number | undefined;
|
|
578
578
|
amplitude?: string | number | undefined;
|
|
@@ -1054,7 +1054,7 @@ export declare const WhiteLine: import('styled-components').IStyledComponent<"we
|
|
|
1054
1054
|
accentHeight?: string | number | undefined;
|
|
1055
1055
|
accumulate?: "none" | "sum" | undefined;
|
|
1056
1056
|
additive?: "replace" | "sum" | undefined;
|
|
1057
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
1057
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
1058
1058
|
allowReorder?: "yes" | "no" | undefined;
|
|
1059
1059
|
alphabetic?: string | number | undefined;
|
|
1060
1060
|
amplitude?: string | number | undefined;
|
|
@@ -1536,7 +1536,7 @@ export declare const Ray: import('styled-components').IStyledComponent<"web", {
|
|
|
1536
1536
|
accentHeight?: string | number | undefined;
|
|
1537
1537
|
accumulate?: "none" | "sum" | undefined;
|
|
1538
1538
|
additive?: "replace" | "sum" | undefined;
|
|
1539
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
1539
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
1540
1540
|
allowReorder?: "yes" | "no" | undefined;
|
|
1541
1541
|
alphabetic?: string | number | undefined;
|
|
1542
1542
|
amplitude?: string | number | undefined;
|
|
@@ -2018,7 +2018,7 @@ export declare const Arrow: import('styled-components').IStyledComponent<"web",
|
|
|
2018
2018
|
accentHeight?: string | number | undefined;
|
|
2019
2019
|
accumulate?: "none" | "sum" | undefined;
|
|
2020
2020
|
additive?: "replace" | "sum" | undefined;
|
|
2021
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
2021
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
2022
2022
|
allowReorder?: "yes" | "no" | undefined;
|
|
2023
2023
|
alphabetic?: string | number | undefined;
|
|
2024
2024
|
amplitude?: string | number | undefined;
|
|
@@ -2500,7 +2500,7 @@ export declare const PrismOutline: import('styled-components').IStyledComponent<
|
|
|
2500
2500
|
accentHeight?: string | number | undefined;
|
|
2501
2501
|
accumulate?: "none" | "sum" | undefined;
|
|
2502
2502
|
additive?: "replace" | "sum" | undefined;
|
|
2503
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
2503
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
2504
2504
|
allowReorder?: "yes" | "no" | undefined;
|
|
2505
2505
|
alphabetic?: string | number | undefined;
|
|
2506
2506
|
amplitude?: string | number | undefined;
|
|
@@ -2982,7 +2982,7 @@ export declare const Filter: import('styled-components').IStyledComponent<"web",
|
|
|
2982
2982
|
accentHeight?: string | number | undefined;
|
|
2983
2983
|
accumulate?: "none" | "sum" | undefined;
|
|
2984
2984
|
additive?: "replace" | "sum" | undefined;
|
|
2985
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
2985
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
2986
2986
|
allowReorder?: "yes" | "no" | undefined;
|
|
2987
2987
|
alphabetic?: string | number | undefined;
|
|
2988
2988
|
amplitude?: string | number | undefined;
|
|
@@ -21,7 +21,7 @@ export declare const SVG: 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 Point: 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;
|
|
@@ -12,8 +12,8 @@ import { XLabel as T } from "../../../charts/styles.js";
|
|
|
12
12
|
import { between as X } from "../../../lib/utils.js";
|
|
13
13
|
import { YLabel as Y } from "./styles.js";
|
|
14
14
|
const Z = ({
|
|
15
|
-
data:
|
|
16
|
-
margin:
|
|
15
|
+
data: a,
|
|
16
|
+
margin: u,
|
|
17
17
|
activeRange: b,
|
|
18
18
|
xDomain: t,
|
|
19
19
|
yDomain: s,
|
|
@@ -26,7 +26,7 @@ const Z = ({
|
|
|
26
26
|
height: M,
|
|
27
27
|
className: _
|
|
28
28
|
}) => {
|
|
29
|
-
const { t: h } = j(), [d, v] = w(), B = l(s[0]), c = A(), p = typeof d == "number", m =
|
|
29
|
+
const { t: h } = j(), [d, v] = w(), B = l(s[0]), c = A(), p = typeof d == "number", m = a.map(({ value: o, bin: r }, n) => ({
|
|
30
30
|
x: r,
|
|
31
31
|
value: o,
|
|
32
32
|
width: 12,
|
|
@@ -72,7 +72,7 @@ const Z = ({
|
|
|
72
72
|
xScale: i,
|
|
73
73
|
yDomain: s,
|
|
74
74
|
yScale: l,
|
|
75
|
-
margin:
|
|
75
|
+
margin: u
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
78
|
/* @__PURE__ */ e(O, { data: m, xDomain: t, yDomain: s, xScale: i, yScale: l }),
|
|
@@ -85,13 +85,13 @@ const Z = ({
|
|
|
85
85
|
labelRender: (o, r, n) => /* @__PURE__ */ e(T, { x: r, y: n + 5, children: o }),
|
|
86
86
|
xDomain: t,
|
|
87
87
|
xScale: i,
|
|
88
|
-
margin:
|
|
88
|
+
margin: u
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
91
|
/* @__PURE__ */ e(
|
|
92
92
|
R,
|
|
93
93
|
{
|
|
94
|
-
x: p ? i(
|
|
94
|
+
x: p ? i(a[d].bin) : 0,
|
|
95
95
|
y: p ? l(m[d].value) : 0,
|
|
96
96
|
visible: p,
|
|
97
97
|
children: p ? m[d].value : null
|
|
@@ -21,7 +21,7 @@ export declare const YLabel: 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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),S=require("react"),_=require("d3-geo-projection"),M=require("d3-geo"),q=require("d3-array"),E=require("../../../
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),S=require("react"),_=require("d3-geo-projection"),M=require("d3-geo"),q=require("d3-array"),E=require("../../../atomic/ImageStack/index.cjs"),a=require("./styles.cjs"),N=require("../../../charts/Base/index.cjs"),U=require("../../../charts/Tooltip/index.cjs"),y=({className:L,objects:p=[],images:v=[],visibleImages:w=[],describedById:G})=>{const[O,P]=S.useState(!1),[x,f]=S.useState(),l=600,c=300,n={top:20,right:0,bottom:20,left:20},W=l+n.right+n.left,$=c+n.top+n.bottom,d=15,u=30,j=-90,m=90,g=-180,k=180,h=2,i=_.geoAitoff(),s=M.geoGraticule();s.step([u,d]),s.extent([[g,j],[k,m]]),i.fitExtent([[n.left,n.top],[n.left+l-h,n.top+c]],s.outline());const B=q.range(j+d,m,d),A=q.range(g+u,k,u),C=M.geoPath(i).pointRadius(6),r=t=>C(t)||void 0,o=typeof x<"u"?p[x]:void 0,b=(o?i([o==null?void 0:o.long,o==null?void 0:o.lat]):[0,0])||[0,0];return e.jsxs(N.default,{width:W,height:$,className:L,children:[e.jsx("mask",{id:"imageMask",children:e.jsx("path",{d:r(s.outline()),fill:"white"})}),e.jsx(a.Background,{d:r(s.outline())}),e.jsx(a.Graticule,{d:r(s())}),e.jsx(a.ImageStackerWrapper,{style:{"--image-stack-opacity":O&&1},x:n.left,y:n.top,width:l-h,height:c,mask:"url(#imageMask)",children:e.jsx(E.default,{images:v,describedById:G,visible:w,loadCallback:()=>P(!0),showBackdrop:!1,showLoader:!1})}),e.jsx("g",{children:p.map(({id:t,lat:H,long:R},T)=>e.jsx(a.UserObject,{d:r({type:"Point",coordinates:[R,H]}),onMouseOver:()=>f(T),onMouseOut:()=>f(void 0)},t))}),e.jsx("g",{"aria-hidden":"true",children:B.map(t=>t===0?null:e.jsxs(a.LatLabel,{style:{dominantBaseline:t>0?"text-after-edge":"text-before-edge"},transform:`translate(${i([g,t])})`,children:[t,"°"]},t))}),e.jsx("g",{"aria-hidden":"true",children:A.map(t=>e.jsxs(a.LongLabel,{transform:`translate(${i([t,0])})`,children:[t,"°"]},t))}),e.jsx(a.Outline,{strokeWidth:h,d:r(s.outline())}),e.jsx(U.default,{visible:!!o,x:b[0],y:b[1],children:o==null?void 0:o.id})]})};y.displayName="Widgets.SupernovaThreeVector.Skymap";exports.default=y;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { useState as L } from "react";
|
|
4
4
|
import { geoAitoff as E } from "d3-geo-projection";
|
|
5
5
|
import { geoGraticule as N, geoPath as R } from "d3-geo";
|
|
6
6
|
import { range as M } from "d3-array";
|
|
7
|
-
import U from "../../../
|
|
8
|
-
import V from "
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import U from "../../../atomic/ImageStack/index.js";
|
|
8
|
+
import { Background as V, Graticule as q, ImageStackerWrapper as z, UserObject as D, LatLabel as F, LongLabel as J, Outline as K } from "./styles.js";
|
|
9
|
+
import Q from "../../../charts/Base/index.js";
|
|
10
|
+
import X from "../../../charts/Tooltip/index.js";
|
|
11
11
|
const Y = ({
|
|
12
12
|
className: y,
|
|
13
|
-
objects:
|
|
13
|
+
objects: g = [],
|
|
14
14
|
images: v = [],
|
|
15
15
|
visibleImages: w = [],
|
|
16
16
|
describedById: B
|
|
@@ -20,7 +20,7 @@ const Y = ({
|
|
|
20
20
|
right: 0,
|
|
21
21
|
bottom: 20,
|
|
22
22
|
left: 20
|
|
23
|
-
}, j = s + a.right + a.left,
|
|
23
|
+
}, j = s + a.right + a.left, C = l + a.top + a.bottom, c = 15, d = 30, k = -90, x = 90, p = -180, b = 180, m = 2, i = E(), n = N();
|
|
24
24
|
n.step([d, c]), n.extent([
|
|
25
25
|
[p, k],
|
|
26
26
|
[b, x]
|
|
@@ -31,13 +31,13 @@ const Y = ({
|
|
|
31
31
|
],
|
|
32
32
|
n.outline()
|
|
33
33
|
);
|
|
34
|
-
const
|
|
35
|
-
return /* @__PURE__ */
|
|
34
|
+
const G = M(k + c, x, c), H = M(p + d, b, d), P = R(i).pointRadius(6), r = (t) => P(t) || void 0, o = typeof f < "u" ? g[f] : void 0, S = (o ? i([o == null ? void 0 : o.long, o == null ? void 0 : o.lat]) : [0, 0]) || [0, 0];
|
|
35
|
+
return /* @__PURE__ */ h(Q, { width: j, height: C, className: y, children: [
|
|
36
36
|
/* @__PURE__ */ e("mask", { id: "imageMask", children: /* @__PURE__ */ e("path", { d: r(n.outline()), fill: "white" }) }),
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
/* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e(V, { d: r(n.outline()) }),
|
|
38
|
+
/* @__PURE__ */ e(q, { d: r(n()) }),
|
|
39
39
|
/* @__PURE__ */ e(
|
|
40
|
-
|
|
40
|
+
z,
|
|
41
41
|
{
|
|
42
42
|
style: { "--image-stack-opacity": O && 1 },
|
|
43
43
|
x: a.left,
|
|
@@ -46,7 +46,7 @@ const Y = ({
|
|
|
46
46
|
height: l,
|
|
47
47
|
mask: "url(#imageMask)",
|
|
48
48
|
children: /* @__PURE__ */ e(
|
|
49
|
-
|
|
49
|
+
U,
|
|
50
50
|
{
|
|
51
51
|
images: v,
|
|
52
52
|
describedById: B,
|
|
@@ -58,8 +58,8 @@ const Y = ({
|
|
|
58
58
|
)
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
|
-
/* @__PURE__ */ e("g", { children:
|
|
62
|
-
|
|
61
|
+
/* @__PURE__ */ e("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ e(
|
|
62
|
+
D,
|
|
63
63
|
{
|
|
64
64
|
d: r({
|
|
65
65
|
type: "Point",
|
|
@@ -70,9 +70,9 @@ const Y = ({
|
|
|
70
70
|
},
|
|
71
71
|
t
|
|
72
72
|
)) }),
|
|
73
|
-
/* @__PURE__ */ e("g", { "aria-hidden": "true", children:
|
|
74
|
-
(t) => t === 0 ? null : /* @__PURE__ */
|
|
75
|
-
|
|
73
|
+
/* @__PURE__ */ e("g", { "aria-hidden": "true", children: G.map(
|
|
74
|
+
(t) => t === 0 ? null : /* @__PURE__ */ h(
|
|
75
|
+
F,
|
|
76
76
|
{
|
|
77
77
|
style: {
|
|
78
78
|
dominantBaseline: t > 0 ? "text-after-edge" : "text-before-edge"
|
|
@@ -86,8 +86,8 @@ const Y = ({
|
|
|
86
86
|
t
|
|
87
87
|
)
|
|
88
88
|
) }),
|
|
89
|
-
/* @__PURE__ */ e("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */
|
|
90
|
-
|
|
89
|
+
/* @__PURE__ */ e("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
|
|
90
|
+
J,
|
|
91
91
|
{
|
|
92
92
|
transform: `translate(${i([t, 0])})`,
|
|
93
93
|
children: [
|
|
@@ -98,14 +98,14 @@ const Y = ({
|
|
|
98
98
|
t
|
|
99
99
|
)) }),
|
|
100
100
|
/* @__PURE__ */ e(
|
|
101
|
-
|
|
101
|
+
K,
|
|
102
102
|
{
|
|
103
103
|
strokeWidth: m,
|
|
104
104
|
d: r(n.outline())
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
|
-
|
|
108
|
+
X,
|
|
109
109
|
{
|
|
110
110
|
visible: !!o,
|
|
111
111
|
x: S[0],
|
|
@@ -21,7 +21,7 @@ export declare const Background: import('styled-components').IStyledComponent<"w
|
|
|
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 Graticule: import('styled-components').IStyledComponent<"we
|
|
|
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 Outline: 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 LatLabel: 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 LongLabel: import('styled-components').IStyledComponent<"we
|
|
|
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 ImageStackerWrapper: import('styled-components').IStyledCom
|
|
|
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;
|
|
@@ -2913,7 +2913,7 @@ export declare const UserObject: import('styled-components').IStyledComponent<"w
|
|
|
2913
2913
|
accentHeight?: string | number | undefined;
|
|
2914
2914
|
accumulate?: "none" | "sum" | undefined;
|
|
2915
2915
|
additive?: "replace" | "sum" | undefined;
|
|
2916
|
-
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "
|
|
2916
|
+
alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
|
|
2917
2917
|
allowReorder?: "yes" | "no" | undefined;
|
|
2918
2918
|
alphabetic?: string | number | undefined;
|
|
2919
2919
|
amplitude?: string | number | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ViewerProps {
|
|
4
|
+
ra: number;
|
|
5
|
+
dec: number;
|
|
6
|
+
fov: [number, number];
|
|
7
|
+
}
|
|
8
|
+
interface ViewIndicatorProps extends Partial<ViewerProps> {
|
|
9
|
+
size?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ViewIndicator: FC<ViewIndicatorProps>;
|
|
13
|
+
export default ViewIndicator;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),i=e=>e&&e.__esModule?e:{default:e},o=i(r),t=o.default.div`
|
|
2
|
+
--size-svg-inner: calc(var(--size-container) * 0.65);
|
|
3
|
+
|
|
4
|
+
aspect-ratio: 1;
|
|
5
|
+
background-color: #313333;
|
|
6
|
+
block-size: var(--size-container);
|
|
7
|
+
border-radius: calc(var(--size-container) / 2);
|
|
8
|
+
color: var(--color-font-invert);
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
position: relative;
|
|
13
|
+
user-select: none;
|
|
14
|
+
`,l=o.default.svg`
|
|
15
|
+
aspect-ratio: 1;
|
|
16
|
+
overflow: visible;
|
|
17
|
+
fill: none;
|
|
18
|
+
stroke: currentColor;
|
|
19
|
+
stroke-width: 2;
|
|
20
|
+
width: calc(var(--size-container) * 0.65);
|
|
21
|
+
`,n=o.default.div`
|
|
22
|
+
font-size: calc(calc(var(--size-container) - var(--size-svg-inner)) / 2);
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
line-height: 1;
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0px;
|
|
27
|
+
`,a=o.default.g`
|
|
28
|
+
--color-fill-primary: var(--color-rubin-yellow-200);
|
|
29
|
+
--color-fill-secondary: #eba85b;
|
|
30
|
+
fill: var(--color-fill-primary);
|
|
31
|
+
fill: color-mix(
|
|
32
|
+
in hsl,
|
|
33
|
+
var(--color-fill-primary) var(--percent-mix-primary),
|
|
34
|
+
var(--color-fill-secondary) var(--percent-mix-secondary)
|
|
35
|
+
);
|
|
36
|
+
stroke: none;
|
|
37
|
+
`;exports.Container=t;exports.NorthDirection=n;exports.SVG=l;exports.ViewCone=a;
|