@longline/aqua-ui 1.0.16 → 1.0.18
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/containers/PublicRoute/Help.d.ts +13 -0
- package/containers/PublicRoute/Help.js +28 -0
- package/containers/PublicRoute/PublicRoute.d.ts +11 -0
- package/containers/PublicRoute/PublicRoute.js +45 -0
- package/containers/PublicRoute/index.d.ts +1 -0
- package/containers/PublicRoute/index.js +1 -0
- package/controls/Dropzone/Dropbox.d.ts +14 -0
- package/controls/Dropzone/Dropbox.js +47 -0
- package/controls/Dropzone/Dropzone.d.ts +30 -0
- package/controls/Dropzone/Dropzone.js +30 -0
- package/controls/Dropzone/index.d.ts +1 -0
- package/controls/Dropzone/index.js +1 -0
- package/helper/RgbColor.d.ts +5 -0
- package/helper/RgbColor.js +8 -0
- package/map/Map/Map.d.ts +16 -1
- package/map/Map/Map.js +3 -3
- package/modules/Globe/Elevations.d.ts +6 -0
- package/modules/Globe/Elevations.js +14 -0
- package/modules/Globe/FragmentShader.d.ts +2 -0
- package/modules/Globe/FragmentShader.js +2 -0
- package/modules/Globe/Globe.d.ts +7 -0
- package/modules/Globe/Globe.js +140 -0
- package/modules/Globe/VertexShader.d.ts +2 -0
- package/modules/Globe/VertexShader.js +2 -0
- package/modules/Globe/index.d.ts +1 -0
- package/modules/Globe/index.js +1 -0
- package/modules/ParticleGlobe/FadeShader.d.ts +3 -0
- package/modules/ParticleGlobe/FadeShader.js +3 -0
- package/modules/ParticleGlobe/GL.d.ts +7 -0
- package/modules/ParticleGlobe/GL.js +65 -0
- package/modules/ParticleGlobe/OutlineFragmentShader.d.ts +2 -0
- package/modules/ParticleGlobe/OutlineFragmentShader.js +2 -0
- package/modules/ParticleGlobe/OutlineShader.d.ts +3 -0
- package/modules/ParticleGlobe/OutlineShader.js +3 -0
- package/modules/ParticleGlobe/OutputShader.d.ts +3 -0
- package/modules/ParticleGlobe/OutputShader.js +4 -0
- package/modules/ParticleGlobe/OutputVertexShaderOld.d.ts +2 -0
- package/modules/ParticleGlobe/OutputVertexShaderOld.js +2 -0
- package/modules/ParticleGlobe/ParticleGlobe.d.ts +91 -0
- package/modules/ParticleGlobe/ParticleGlobe.js +508 -0
- package/modules/ParticleGlobe/PointsShader.d.ts +3 -0
- package/modules/ParticleGlobe/PointsShader.js +4 -0
- package/modules/ParticleGlobe/SphereShader.d.ts +3 -0
- package/modules/ParticleGlobe/SphereShader.js +3 -0
- package/modules/ParticleGlobe/TextureShader.d.ts +3 -0
- package/modules/ParticleGlobe/TextureShader.js +3 -0
- package/modules/ParticleGlobe/include/decodeSpeed.include.d.ts +2 -0
- package/modules/ParticleGlobe/include/decodeSpeed.include.js +2 -0
- package/package.json +3 -1
- package/services/Auth/Auth.d.ts +26 -0
- package/services/Auth/Auth.js +63 -0
- package/services/Auth/AuthContext.d.ts +11 -0
- package/services/Auth/AuthContext.js +3 -0
- package/services/Auth/index.d.ts +2 -0
- package/services/Auth/index.js +2 -0
- package/services/Auth/useAuth.d.ts +5 -0
- package/services/Auth/useAuth.js +9 -0
- package/spritemap.svg +1 -1
- package/svg/index.d.ts +2 -0
- package/svg/index.js +2 -1
- package/svg/other/index.d.ts +3 -0
- package/svg/other/index.js +4 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** @ignore */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Help currenty active?
|
|
9
|
+
*/
|
|
10
|
+
active?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Help: (props: IProps) => React.JSX.Element;
|
|
13
|
+
export { Help };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
import styled from 'styled-components';
|
|
18
|
+
var HelpBase = function (props) {
|
|
19
|
+
return (React.createElement("div", { className: props.className },
|
|
20
|
+
React.createElement(Body, null,
|
|
21
|
+
React.createElement(Content, null, props.children))));
|
|
22
|
+
};
|
|
23
|
+
var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 16px;\n user-select: none;\n color: white;\n\n a {\n color: #E9A759 !important;\n } \n"], ["\n padding: 16px;\n user-select: none;\n color: white;\n\n a {\n color: #E9A759 !important;\n } \n"])));
|
|
24
|
+
var Body = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n box-sizing: border-box;\n background: \n linear-gradient(#1C242A, #1C242A) padding-box,\n linear-gradient(330deg, #505050 3.25%, rgba(23, 23, 23, 0.56) 18.64%, rgba(0, 0, 0, 0) 105.88%) border-box;\n border-radius: ", "px;\n border: 1px solid transparent; \n font-size: 14px;\n margin-bottom: 32px;\n\n &:after {\n position: absolute;\n content: '';\n top: calc(100% - 9px);\n right: 30px;\n width: 20px;\n height: 20px;\n background: #1C242A;\n transform-origin: 50% 50%;\n transform: rotate(45deg);\n z-index: 1;\n border-right: solid 1px #505050;\n border-bottom: solid 1px #505050;\n box-sizing: border-box;\n } \n"], ["\n position: relative;\n box-sizing: border-box;\n background: \n linear-gradient(#1C242A, #1C242A) padding-box,\n linear-gradient(330deg, #505050 3.25%, rgba(23, 23, 23, 0.56) 18.64%, rgba(0, 0, 0, 0) 105.88%) border-box;\n border-radius: ", "px;\n border: 1px solid transparent; \n font-size: 14px;\n margin-bottom: 32px;\n\n &:after {\n position: absolute;\n content: '';\n top: calc(100% - 9px);\n right: 30px;\n width: 20px;\n height: 20px;\n background: #1C242A;\n transform-origin: 50% 50%;\n transform: rotate(45deg);\n z-index: 1;\n border-right: solid 1px #505050;\n border-bottom: solid 1px #505050;\n box-sizing: border-box;\n } \n"])), function (p) { return p.theme.radius.normal; });
|
|
25
|
+
var HelpStyled = styled(HelpBase)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n height: ", ";\n overflow: hidden;\n transition: height ease-in-out 250ms;\n"], ["\n position: relative;\n height: ", ";\n overflow: hidden;\n transition: height ease-in-out 250ms;\n"])), function (p) { return p.active ? 'auto' : '0px'; });
|
|
26
|
+
var Help = function (props) { return React.createElement(HelpStyled, __assign({}, props)); };
|
|
27
|
+
export { Help };
|
|
28
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** @ignore */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
logoUrl: string;
|
|
8
|
+
help?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const PublicRoute: (props: IProps) => React.JSX.Element;
|
|
11
|
+
export { PublicRoute };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
import { styled } from 'styled-components';
|
|
18
|
+
import { InfoBox } from '../InfoBox';
|
|
19
|
+
import { Help } from './Help';
|
|
20
|
+
import { Icon } from '../../controls/Icon';
|
|
21
|
+
import { SVG } from '../../svg';
|
|
22
|
+
import { ParticleGlobe } from '../../modules/ParticleGlobe/ParticleGlobe';
|
|
23
|
+
var PublicRouteBase = function (props) {
|
|
24
|
+
var _a = React.useState(false), showHelp = _a[0], setShowHelp = _a[1];
|
|
25
|
+
return (React.createElement("div", { className: props.className },
|
|
26
|
+
React.createElement(ParticleGlobe, { landmass: 'day', globe: true, glow: 20, trails: 5, pointSize: 1.0, numParticles: 100000, brightness: 0.9, speedFactor: 750, minLifetime: 1000, maxLifetime: 1000, responsive: true }),
|
|
27
|
+
React.createElement(Content, null,
|
|
28
|
+
React.createElement(Help, { active: showHelp },
|
|
29
|
+
"Help content",
|
|
30
|
+
React.createElement("br", null),
|
|
31
|
+
"Help content",
|
|
32
|
+
React.createElement("br", null),
|
|
33
|
+
"Help content"),
|
|
34
|
+
React.createElement(InfoBox, { width: 400, padded: true, header: React.createElement(Header, null,
|
|
35
|
+
React.createElement(Logo, null,
|
|
36
|
+
React.createElement("use", { xlinkHref: props.logoUrl })),
|
|
37
|
+
React.createElement(Icon, { circle: true, url: SVG.Icons.Info, onClick: function () { return setShowHelp(!showHelp); } })) }, props.children))));
|
|
38
|
+
};
|
|
39
|
+
var Logo = styled.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 32px;\n"], ["\n height: 32px;\n"])));
|
|
40
|
+
var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
41
|
+
var Content = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n width: 400px;\n max-width: 90vw;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 1;\n"], ["\n position: absolute;\n width: 400px;\n max-width: 90vw;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 1;\n"])));
|
|
42
|
+
var PublicRouteStyled = styled(PublicRouteBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden; \n background: conic-gradient(from 0deg at 0 0, #071119 0deg, #071119 90deg, #243961 180deg, #243961 -1deg);\n background-blend-mode: multiply; \n"], ["\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden; \n background: conic-gradient(from 0deg at 0 0, #071119 0deg, #071119 90deg, #243961 180deg, #243961 -1deg);\n background-blend-mode: multiply; \n"])));
|
|
43
|
+
var PublicRoute = function (props) { return React.createElement(PublicRouteStyled, __assign({}, props)); };
|
|
44
|
+
export { PublicRoute };
|
|
45
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PublicRoute';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PublicRoute';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
onDragover: () => void;
|
|
6
|
+
onDragLeave: () => void;
|
|
7
|
+
onAddFiles: (files: File[]) => void;
|
|
8
|
+
/** Is box currently hovered (with a file)? */
|
|
9
|
+
hover: boolean;
|
|
10
|
+
/** Optional custom hint message. */
|
|
11
|
+
message?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const Dropbox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<IProps, never>> & string & Omit<(props: IProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
|
|
14
|
+
export { Dropbox };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import styled, { css } from 'styled-components';
|
|
7
|
+
import { SVG } from '../../svg';
|
|
8
|
+
var DropboxBase = function (props) {
|
|
9
|
+
var _a;
|
|
10
|
+
var inputElement = React.useRef(null);
|
|
11
|
+
var handleClick = function () {
|
|
12
|
+
inputElement.current.click();
|
|
13
|
+
};
|
|
14
|
+
var fileListToArray = function (list) {
|
|
15
|
+
var array = [];
|
|
16
|
+
for (var i = 0; i < list.length; i++) {
|
|
17
|
+
array.push(list.item(i));
|
|
18
|
+
}
|
|
19
|
+
return array;
|
|
20
|
+
};
|
|
21
|
+
var handleAddFile = function (e) {
|
|
22
|
+
var list = e.target.files;
|
|
23
|
+
var arr = fileListToArray(list);
|
|
24
|
+
props.onAddFiles(arr);
|
|
25
|
+
};
|
|
26
|
+
var handleDragOver = function (e) {
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
props.onDragover();
|
|
29
|
+
};
|
|
30
|
+
var handleDragLeave = function (e) {
|
|
31
|
+
props.onDragLeave();
|
|
32
|
+
};
|
|
33
|
+
var handleDrop = function (e) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
var files = e.dataTransfer.files;
|
|
36
|
+
var array = fileListToArray(files);
|
|
37
|
+
props.onAddFiles(array);
|
|
38
|
+
};
|
|
39
|
+
return (React.createElement("div", { className: props.className, onClick: handleClick, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop },
|
|
40
|
+
React.createElement("div", null, (_a = props.message) !== null && _a !== void 0 ? _a : "Drop a file here to upload, or click to select."),
|
|
41
|
+
React.createElement("svg", null,
|
|
42
|
+
React.createElement("use", { xlinkHref: SVG.Other.CloudUpload })),
|
|
43
|
+
React.createElement("input", { ref: inputElement, type: "file", multiple: true, onChange: handleAddFile })));
|
|
44
|
+
};
|
|
45
|
+
var Dropbox = styled(DropboxBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n border: dashed 2px ", ";\n border-radius: ", "px;\n cursor: pointer;\n width: 100%;\n text-align: center;\n\n ", "\n\n div {\n margin-top: 8px;\n font-weight: 500;\n color: ", ";\n }\n\n svg {\n display: block;\n margin: 8px;\n width: 100%;\n height: 150px;\n fill: ", ";\n }\n\n input {\n display: none;\n }\n"], ["\n position: relative;\n border: dashed 2px ", ";\n border-radius: ", "px;\n cursor: pointer;\n width: 100%;\n text-align: center;\n\n ", "\n\n div {\n margin-top: 8px;\n font-weight: 500;\n color: ", ";\n }\n\n svg {\n display: block;\n margin: 8px;\n width: 100%;\n height: 150px;\n fill: ", ";\n }\n\n input {\n display: none;\n }\n"])), function (p) { return p.hover ? p.theme.colors.neutral[100] : p.theme.colors.neutral[80]; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.hover && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), p.theme.colors.primary[3]); }, function (p) { return p.hover ? p.theme.colors.neutral[100] : p.theme.colors.neutral[80]; }, function (p) { return p.hover ? p.theme.colors.primary[1] : p.theme.colors.primary[2]; });
|
|
46
|
+
export { Dropbox };
|
|
47
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IDropzoneProps {
|
|
3
|
+
/** @ignore */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** @ignore */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Callback to call when files are dropped in the Dropzone. Multiple files can be uploaded at
|
|
9
|
+
* a time.
|
|
10
|
+
*/
|
|
11
|
+
onAddFiles: (files: File[]) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Optional translation override for Dropzone message.
|
|
14
|
+
*/
|
|
15
|
+
message?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A `Dropzone` accepts files, either by dragging them into the zone or by clicking the
|
|
19
|
+
* zone and selection files. Multiple files may be dragged or selected at the same
|
|
20
|
+
* time. When files are selected, Dropzone fires `onAddFiles` with a `Files[]` argument.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <Dropzone
|
|
24
|
+
* onAddFiles={(files: File[]) => console.log("Files dropped", files)}
|
|
25
|
+
* />
|
|
26
|
+
*
|
|
27
|
+
* @link https://henck.github.io/typeui/?path=/story/controls-dropzone--properties
|
|
28
|
+
*/
|
|
29
|
+
declare const Dropzone: (props: IDropzoneProps) => React.JSX.Element;
|
|
30
|
+
export { Dropzone };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
// Other controls
|
|
3
|
+
import { Dropbox } from './Dropbox';
|
|
4
|
+
/**
|
|
5
|
+
* A `Dropzone` accepts files, either by dragging them into the zone or by clicking the
|
|
6
|
+
* zone and selection files. Multiple files may be dragged or selected at the same
|
|
7
|
+
* time. When files are selected, Dropzone fires `onAddFiles` with a `Files[]` argument.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <Dropzone
|
|
11
|
+
* onAddFiles={(files: File[]) => console.log("Files dropped", files)}
|
|
12
|
+
* />
|
|
13
|
+
*
|
|
14
|
+
* @link https://henck.github.io/typeui/?path=/story/controls-dropzone--properties
|
|
15
|
+
*/
|
|
16
|
+
var Dropzone = function (props) {
|
|
17
|
+
var _a = React.useState(false), hover = _a[0], setHover = _a[1];
|
|
18
|
+
var handleAddFiles = function (files) {
|
|
19
|
+
props.onAddFiles(files);
|
|
20
|
+
setHover(false);
|
|
21
|
+
};
|
|
22
|
+
var handleDragOver = function () {
|
|
23
|
+
setHover(true);
|
|
24
|
+
};
|
|
25
|
+
var handleDragLeave = function () {
|
|
26
|
+
setHover(false);
|
|
27
|
+
};
|
|
28
|
+
return (React.createElement(Dropbox, { hover: hover, message: props.message, onDragover: handleDragOver, onDragLeave: handleDragLeave, onAddFiles: handleAddFiles }));
|
|
29
|
+
};
|
|
30
|
+
export { Dropzone };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dropzone } from './Dropzone';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dropzone } from './Dropzone';
|
package/helper/RgbColor.d.ts
CHANGED
|
@@ -39,5 +39,10 @@ declare class RgbColor {
|
|
|
39
39
|
* Return string representation of this RgbColor instance.
|
|
40
40
|
*/
|
|
41
41
|
toString(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Convert a hex color (e.g. #ff0022) to an [r,g,b,a] array,
|
|
44
|
+
* where r,g,b,a are in the 0.0-1.0 range. This is for WebGL purposes.
|
|
45
|
+
*/
|
|
46
|
+
static toRGBA: (color: string) => number[];
|
|
42
47
|
}
|
|
43
48
|
export { RgbColor };
|
package/helper/RgbColor.js
CHANGED
|
@@ -157,6 +157,14 @@ var RgbColor = /** @class */ (function () {
|
|
|
157
157
|
// Reduce #FFFFFF to #FFF if possible:
|
|
158
158
|
return this.reduceHexValue(hex);
|
|
159
159
|
};
|
|
160
|
+
/**
|
|
161
|
+
* Convert a hex color (e.g. #ff0022) to an [r,g,b,a] array,
|
|
162
|
+
* where r,g,b,a are in the 0.0-1.0 range. This is for WebGL purposes.
|
|
163
|
+
*/
|
|
164
|
+
RgbColor.toRGBA = function (color) {
|
|
165
|
+
var rgb = RgbColor.FromString(color);
|
|
166
|
+
return [rgb.red / 255.0, rgb.green / 255.0, rgb.blue / 255.0, rgb.alpha];
|
|
167
|
+
};
|
|
160
168
|
return RgbColor;
|
|
161
169
|
}());
|
|
162
170
|
export { RgbColor };
|
package/map/Map/Map.d.ts
CHANGED
|
@@ -41,7 +41,22 @@ interface IProps {
|
|
|
41
41
|
* @default false
|
|
42
42
|
*/
|
|
43
43
|
clipped?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optional Mapbox logo position.
|
|
46
|
+
* @default top-right
|
|
47
|
+
*/
|
|
48
|
+
logoPosition?: "top-right" | "top-left" | "bottom-left" | "bottom-right";
|
|
49
|
+
/**
|
|
50
|
+
* Optional minimum zoom level.
|
|
51
|
+
* @default 1
|
|
52
|
+
*/
|
|
53
|
+
minZoom?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Optional maximum zoom level.
|
|
56
|
+
* @default 20
|
|
57
|
+
*/
|
|
58
|
+
maxZoom?: number;
|
|
44
59
|
}
|
|
45
60
|
declare const useViewState: () => ViewState;
|
|
46
|
-
declare const Map: ({ longitude, latitude, zoom, pitch, bearing, clipped, ...props }: IProps) => React.JSX.Element;
|
|
61
|
+
declare const Map: ({ longitude, latitude, zoom, pitch, bearing, clipped, logoPosition, minZoom, maxZoom, ...props }: IProps) => React.JSX.Element;
|
|
47
62
|
export { Map, useViewState };
|
package/map/Map/Map.js
CHANGED
|
@@ -203,7 +203,7 @@ var MapBase = function (props) {
|
|
|
203
203
|
var handleMove = function (e) {
|
|
204
204
|
setViewState(e.viewState);
|
|
205
205
|
};
|
|
206
|
-
return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition:
|
|
206
|
+
return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: 1, maxZoom: 20, doubleClickZoom: true, onMove: handleMove }),
|
|
207
207
|
props.clipped && React.createElement(React.Fragment, null,
|
|
208
208
|
React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
|
|
209
209
|
React.createElement(Layer, { id: "overlay", type: "raster" })),
|
|
@@ -214,8 +214,8 @@ var MapBase = function (props) {
|
|
|
214
214
|
};
|
|
215
215
|
var Controls = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n & > * {\n pointer-events: all;\n }\n\n ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n & > * {\n pointer-events: all;\n }\n\n ", ";\n"])), function (p) { return p.theme.font.bodyMedium; });
|
|
216
216
|
var Map = function (_a) {
|
|
217
|
-
var _b = _a.longitude, longitude = _b === void 0 ? -64.6 : _b, _c = _a.latitude, latitude = _c === void 0 ? 44.02 : _c, _d = _a.zoom, zoom = _d === void 0 ? 11 : _d, _e = _a.pitch, pitch = _e === void 0 ? 0 : _e, _f = _a.bearing, bearing = _f === void 0 ? 0 : _f, _g = _a.clipped, clipped = _g === void 0 ? false : _g, props = __rest(_a, ["longitude", "latitude", "zoom", "pitch", "bearing", "clipped"]);
|
|
218
|
-
return React.createElement(MapBase, __assign({ longitude: longitude, latitude: latitude, zoom: zoom, pitch: pitch, bearing: bearing, clipped: clipped }, props));
|
|
217
|
+
var _b = _a.longitude, longitude = _b === void 0 ? -64.6 : _b, _c = _a.latitude, latitude = _c === void 0 ? 44.02 : _c, _d = _a.zoom, zoom = _d === void 0 ? 11 : _d, _e = _a.pitch, pitch = _e === void 0 ? 0 : _e, _f = _a.bearing, bearing = _f === void 0 ? 0 : _f, _g = _a.clipped, clipped = _g === void 0 ? false : _g, _h = _a.logoPosition, logoPosition = _h === void 0 ? 'top-right' : _h, _j = _a.minZoom, minZoom = _j === void 0 ? 1 : _j, _k = _a.maxZoom, maxZoom = _k === void 0 ? 20 : _k, props = __rest(_a, ["longitude", "latitude", "zoom", "pitch", "bearing", "clipped", "logoPosition", "minZoom", "maxZoom"]);
|
|
218
|
+
return React.createElement(MapBase, __assign({ longitude: longitude, latitude: latitude, zoom: zoom, pitch: pitch, bearing: bearing, clipped: clipped, logoPosition: logoPosition, minZoom: minZoom, maxZoom: maxZoom }, props));
|
|
219
219
|
};
|
|
220
220
|
export { Map, useViewState };
|
|
221
221
|
var templateObject_1;
|