@rubin-epo/epo-widget-lib 0.5.1-alpha.0 → 0.6.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/dist/CameraFilter.d.ts +3 -0
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.d.ts +3 -0
- package/dist/ColorTool.js +115 -79
- package/dist/FilterTool.d.ts +3 -0
- package/dist/SourceSelector.d.ts +3 -0
- package/dist/atomic/Blinker/Blinker.d.ts +14 -0
- package/dist/atomic/Blinker/Controls/Controls.d.ts +11 -0
- package/dist/atomic/Blinker/Controls/styles.d.ts +272 -0
- package/dist/atomic/Blinker/Image/Image.d.ts +9 -0
- package/dist/atomic/Blinker/Image/styles.d.ts +283 -0
- package/dist/atomic/Blinker/Images/Images.d.ts +8 -0
- package/dist/atomic/Blinker/Images/styles.d.ts +544 -0
- package/dist/atomic/Blinker/_mocks/index.d.ts +2 -0
- package/dist/atomic/Blinker/index.d.ts +1 -0
- package/dist/atomic/ElapsedTime/ElapsedTime.d.ts +10 -0
- package/dist/atomic/ElapsedTime/index.d.ts +1 -0
- package/dist/atomic/ElapsedTime/styles.d.ts +1633 -0
- package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +9 -0
- package/dist/atomic/PlaybackControl/index.d.ts +1 -0
- package/dist/atomic/PlaybackControl/styles.d.ts +554 -0
- package/dist/hooks/useImage.cjs +1 -0
- package/dist/hooks/useImage.d.ts +10 -0
- package/dist/hooks/useImage.js +30 -0
- package/dist/hooks/useInterval.d.ts +1 -0
- package/dist/lib/reimg.cjs +1 -0
- package/dist/lib/reimg.d.ts +7 -0
- package/dist/lib/reimg.js +60 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/lib/utils.test.d.ts +1 -0
- package/dist/styles/svg.d.ts +272 -0
- package/dist/{types → widgets/CameraFilter}/CameraFilter.d.ts +3 -6
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.d.ts +9 -0
- package/dist/widgets/CameraFilter/CondensedFilterRanges/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.d.ts +10 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.d.ts +11 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.d.ts +14 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/data.d.ts +39 -0
- package/dist/widgets/CameraFilter/index.d.ts +1 -0
- package/dist/widgets/CameraFilter/styles.d.ts +4398 -0
- package/dist/widgets/ColorTool/Actions/Export/index.cjs +1 -0
- package/dist/widgets/ColorTool/Actions/Export/index.d.ts +12 -0
- package/dist/widgets/ColorTool/Actions/Export/index.js +36 -0
- package/dist/widgets/ColorTool/Actions/Reset/index.cjs +1 -0
- package/dist/widgets/ColorTool/Actions/Reset/index.d.ts +9 -0
- package/dist/widgets/ColorTool/Actions/Reset/index.js +39 -0
- package/dist/widgets/ColorTool/Actions/index.cjs +1 -0
- package/dist/widgets/ColorTool/Actions/index.d.ts +13 -0
- package/dist/widgets/ColorTool/Actions/index.js +55 -0
- package/dist/widgets/ColorTool/Actions/styles.cjs +5 -0
- package/dist/widgets/ColorTool/Actions/styles.d.ts +272 -0
- package/dist/widgets/ColorTool/Actions/styles.js +9 -0
- package/dist/{types → widgets/ColorTool}/ColorTool.d.ts +44 -45
- package/dist/widgets/ColorTool/FilterControls/FilterControls.cjs +1 -1
- package/dist/widgets/ColorTool/FilterControls/FilterControls.d.ts +14 -0
- package/dist/widgets/ColorTool/FilterControls/FilterControls.js +43 -41
- package/dist/widgets/ColorTool/FilterControls/index.d.ts +1 -0
- package/dist/widgets/ColorTool/FilterControls/styles.cjs +58 -0
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +956 -0
- package/dist/widgets/ColorTool/FilterControls/styles.js +67 -0
- package/dist/widgets/ColorTool/FilterImage/FilterImage.cjs +1 -1
- package/dist/widgets/ColorTool/FilterImage/FilterImage.d.ts +16 -0
- package/dist/widgets/ColorTool/FilterImage/FilterImage.js +40 -31
- package/dist/widgets/ColorTool/FilterImage/index.d.ts +1 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +12 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +54 -29
- package/dist/widgets/ColorTool/ImageComposite/index.d.ts +1 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.cjs +19 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.d.ts +544 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.js +24 -0
- package/dist/widgets/ColorTool/index.d.ts +1 -0
- package/dist/widgets/ColorTool/styles.cjs +21 -77
- package/dist/widgets/ColorTool/styles.d.ts +1906 -0
- package/dist/widgets/ColorTool/styles.js +29 -96
- package/dist/widgets/ColorTool/utilities.cjs +1 -1
- package/dist/widgets/ColorTool/utilities.d.ts +22 -0
- package/dist/widgets/ColorTool/utilities.js +30 -29
- package/dist/{types → widgets/FilterTool}/FilterTool.d.ts +11 -16
- package/dist/widgets/FilterTool/index.d.ts +1 -0
- package/dist/widgets/FilterTool/styles.d.ts +3710 -0
- package/dist/widgets/SourceSelector/Message/Message.d.ts +10 -0
- package/dist/widgets/SourceSelector/Message/index.d.ts +1 -0
- package/dist/widgets/SourceSelector/Message/styles.d.ts +5 -0
- package/dist/widgets/SourceSelector/Point/Point.d.ts +15 -0
- package/dist/widgets/SourceSelector/Point/index.d.ts +1 -0
- package/dist/widgets/SourceSelector/Point/styles.d.ts +4 -0
- package/dist/widgets/SourceSelector/Points/Points.d.ts +13 -0
- package/dist/widgets/SourceSelector/Points/index.d.ts +1 -0
- package/dist/{types → widgets/SourceSelector}/SourceSelector.d.ts +22 -28
- package/dist/widgets/SourceSelector/index.d.ts +1 -0
- package/dist/widgets/SourceSelector/mocks/index.d.ts +7 -0
- package/dist/widgets/SourceSelector/utilities.d.ts +1 -0
- package/dist/widgets/SourceSelector/utilities.test.d.ts +1 -0
- package/package.json +7 -23
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from "react";
|
|
2
|
+
export interface MessageProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
isVisible?: boolean;
|
|
5
|
+
onMessageChangeCallback: () => void;
|
|
6
|
+
/** list of ID's that contributed to this status message eg. if clicking on \<svg id="mySvg"/> created a message, pass ['mySvg'] */
|
|
7
|
+
forIds?: string[];
|
|
8
|
+
}
|
|
9
|
+
declare const Message: FunctionComponent<MessageProps>;
|
|
10
|
+
export default Message;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Message";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SourceType } from '../../../types/astro';
|
|
2
|
+
import { FunctionComponent } from "react";
|
|
3
|
+
export interface PointProps {
|
|
4
|
+
type: SourceType;
|
|
5
|
+
id: string;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
radius?: number;
|
|
11
|
+
className?: string;
|
|
12
|
+
color: string;
|
|
13
|
+
}
|
|
14
|
+
declare const Point: FunctionComponent<PointProps>;
|
|
15
|
+
export default Point;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Point";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { Source, SourceType } from '../../../types/astro';
|
|
3
|
+
interface PointsProps {
|
|
4
|
+
sources?: Source[];
|
|
5
|
+
selectedSource?: Source[];
|
|
6
|
+
activeType?: SourceType;
|
|
7
|
+
xScale: (value: number) => number;
|
|
8
|
+
yScale: (value: number) => number;
|
|
9
|
+
className?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Points: FunctionComponent<PointsProps>;
|
|
13
|
+
export default Points;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Points";
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ImageShape } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
blinkConfig?: BlinkConfig;
|
|
24
|
-
color?: string;
|
|
25
|
-
isDisplayOnly?: boolean;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { }
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { Alert, Source } from '../../types/astro';
|
|
3
|
+
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";
|
|
4
|
+
interface BlinkConfig {
|
|
5
|
+
autoplay?: boolean;
|
|
6
|
+
loop?: boolean;
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
interface SourceSelectorProps {
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
sources: Source[];
|
|
13
|
+
alerts?: Alert[];
|
|
14
|
+
selectedSource?: Source[];
|
|
15
|
+
images: ImageShape[];
|
|
16
|
+
selectionCallback?: (data: Source[]) => void;
|
|
17
|
+
blinkConfig?: BlinkConfig;
|
|
18
|
+
color?: string;
|
|
19
|
+
isDisplayOnly?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const SourceSelector: FunctionComponent<SourceSelectorProps>;
|
|
22
|
+
export default SourceSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SourceSelector";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLinearScale: (domain: number[], range: number[], clamp?: boolean) => (val: number) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubin-epo/epo-widget-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
|
|
5
5
|
"author": "Rubin EPO",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://lsst-epo.github.io/epo-react-lib",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/lsst-epo/epo-react-lib"
|
|
11
|
-
"directory": "packages/epo-widget-lib"
|
|
10
|
+
"url": "https://github.com/lsst-epo/epo-react-lib"
|
|
12
11
|
},
|
|
13
12
|
"supportedLocales": [
|
|
14
13
|
"en",
|
|
@@ -20,25 +19,10 @@
|
|
|
20
19
|
],
|
|
21
20
|
"sideEffects": false,
|
|
22
21
|
"exports": {
|
|
23
|
-
"
|
|
24
|
-
"import": "./dist
|
|
25
|
-
"require": "./dist
|
|
26
|
-
"types": "./dist
|
|
27
|
-
},
|
|
28
|
-
"./ColorTool": {
|
|
29
|
-
"import": "./dist/ColorTool.js",
|
|
30
|
-
"require": "./dist/ColorTool.cjs",
|
|
31
|
-
"types": "./dist/types/ColorTool.d.ts"
|
|
32
|
-
},
|
|
33
|
-
"./FilterTool": {
|
|
34
|
-
"import": "./dist/FilterTool.js",
|
|
35
|
-
"require": "./dist/FilterTool.cjs",
|
|
36
|
-
"types": "./dist/types/FilterTool.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"./SourceSelector": {
|
|
39
|
-
"import": "./dist/FilterTool.js",
|
|
40
|
-
"require": "./dist/FilterTool.cjs",
|
|
41
|
-
"types": "./dist/types/FilterTool.d.ts"
|
|
22
|
+
"./*": {
|
|
23
|
+
"import": "./dist/*.js",
|
|
24
|
+
"require": "./dist/*.cjs",
|
|
25
|
+
"types": "./dist/*.d.ts"
|
|
42
26
|
},
|
|
43
27
|
"./localeStrings": "./dist/localeStrings"
|
|
44
28
|
},
|
|
@@ -54,7 +38,7 @@
|
|
|
54
38
|
"react-i18next": "^12.2.0"
|
|
55
39
|
},
|
|
56
40
|
"dependencies": {
|
|
57
|
-
"@rubin-epo/epo-react-lib": "^2.0.
|
|
41
|
+
"@rubin-epo/epo-react-lib": "^2.0.7",
|
|
58
42
|
"lodash": "^4.17.21",
|
|
59
43
|
"styled-components": "^6.0.4",
|
|
60
44
|
"use-resize-observer": "^9.1.0"
|