anim-3d-obj 1.0.11 → 1.0.12
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 +4 -0
- package/dist/esm/components/Cuboid.d.ts +2 -1
- package/dist/esm/components/Cuboid.js +13 -23
- package/dist/esm/components/Cuboid.js.map +1 -1
- package/dist/esm/components/Faces/Face.js +15 -34
- package/dist/esm/components/Faces/Face.js.map +1 -1
- package/dist/esm/components/index.d.ts +0 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/Button.d.ts +0 -6
- package/dist/cjs/components/Button.js +0 -19
- package/dist/cjs/components/Button.js.map +0 -1
- package/dist/cjs/components/Cuboid.d.ts +0 -2
- package/dist/cjs/components/Cuboid.js +0 -48
- package/dist/cjs/components/Cuboid.js.map +0 -1
- package/dist/cjs/components/Faces/Face.d.ts +0 -3
- package/dist/cjs/components/Faces/Face.js +0 -96
- package/dist/cjs/components/Faces/Face.js.map +0 -1
- package/dist/cjs/components/index.d.ts +0 -2
- package/dist/cjs/components/index.js +0 -19
- package/dist/cjs/components/index.js.map +0 -1
- package/dist/cjs/components/styles/AnimWrap.d.ts +0 -2
- package/dist/cjs/components/styles/AnimWrap.js +0 -71
- package/dist/cjs/components/styles/AnimWrap.js.map +0 -1
- package/dist/cjs/components/styles/Anims.d.ts +0 -25
- package/dist/cjs/components/styles/Anims.js +0 -195
- package/dist/cjs/components/styles/Anims.js.map +0 -1
- package/dist/cjs/components/styles/Scene.d.ts +0 -9
- package/dist/cjs/components/styles/Scene.js +0 -22
- package/dist/cjs/components/styles/Scene.js.map +0 -1
- package/dist/cjs/hooks/index.d.ts +0 -1
- package/dist/cjs/hooks/index.js +0 -18
- package/dist/cjs/hooks/index.js.map +0 -1
- package/dist/cjs/hooks/useLogging.d.ts +0 -7
- package/dist/cjs/hooks/useLogging.js +0 -19
- package/dist/cjs/hooks/useLogging.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/library/Logging.d.ts +0 -25
- package/dist/cjs/library/Logging.js +0 -43
- package/dist/cjs/library/Logging.js.map +0 -1
- package/dist/cjs/library/index.d.ts +0 -1
- package/dist/cjs/library/index.js +0 -18
- package/dist/cjs/library/index.js.map +0 -1
- package/dist/esm/hooks/index.d.ts +0 -1
- package/dist/esm/hooks/index.js +0 -2
- package/dist/esm/hooks/index.js.map +0 -1
- package/dist/esm/hooks/useLogging.d.ts +0 -7
- package/dist/esm/hooks/useLogging.js +0 -12
- package/dist/esm/hooks/useLogging.js.map +0 -1
- package/dist/esm/library/Logging.d.ts +0 -25
- package/dist/esm/library/Logging.js +0 -39
- package/dist/esm/library/Logging.js.map +0 -1
- package/dist/esm/library/index.d.ts +0 -1
- package/dist/esm/library/index.js +0 -2
- package/dist/esm/library/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,41 +1,31 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { AnimWrap } from './styles/AnimWrap';
|
|
3
4
|
import { SceneStyle } from './styles/Scene';
|
|
4
5
|
import Face from './Faces/Face';
|
|
5
|
-
import React from 'react';
|
|
6
6
|
const CuboidWrapper = styled.div `
|
|
7
7
|
width: 100%;
|
|
8
8
|
height: 100%;
|
|
9
9
|
position: relative;
|
|
10
10
|
transform-style: preserve-3d;
|
|
11
11
|
`;
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
const buildFace = (faceType, child) => {
|
|
16
|
-
//const { faceType, child } = props;
|
|
12
|
+
const Cuboid = (props) => {
|
|
13
|
+
let { animSpecs = {}, width = 5, height = 5, depth = 5, faces, global, custom, tranz = (+height / 2) | 0, perspectiveOrigin, txt, zIndex } = props;
|
|
14
|
+
const buildFace = (faceType) => {
|
|
17
15
|
return (React.createElement(Face, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz,
|
|
18
|
-
// if specified opac / bgc / border will over-ride
|
|
19
|
-
|
|
20
|
-
React.createElement("div", { style: {
|
|
21
|
-
color,
|
|
22
|
-
fontWeight,
|
|
23
|
-
textShadow,
|
|
24
|
-
lineHeight,
|
|
25
|
-
fontSize,
|
|
26
|
-
fontFamily,
|
|
27
|
-
textAlign
|
|
28
|
-
} }, child)));
|
|
16
|
+
// if specified opac / bgc / border will over-ride global
|
|
17
|
+
global: global, custom: custom }));
|
|
29
18
|
};
|
|
30
19
|
return (React.createElement(SceneStyle, { width: width, height: height, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
31
20
|
React.createElement(AnimWrap, { duration: animSpecs.anim1duration, iterationCount: animSpecs.anim1count, animName: animSpecs.anim1, animLow: animSpecs.anim1low, animHi: animSpecs.anim1hi, animDirection: animSpecs.anim1direction },
|
|
32
21
|
React.createElement(AnimWrap, { duration: animSpecs.anim2duration, iterationCount: animSpecs.anim2count, animName: animSpecs.anim2, animLow: animSpecs.anim2low, animHi: animSpecs.anim2hi, animDirection: animSpecs.anim2direction },
|
|
33
22
|
React.createElement(CuboidWrapper, null,
|
|
34
|
-
!!faces && !!faces.front ? buildFace('front'
|
|
35
|
-
!!faces && !!faces.right ? buildFace('right'
|
|
36
|
-
!!faces && !!faces.back ? buildFace('back'
|
|
37
|
-
!!faces && !!faces.left ? buildFace('left'
|
|
38
|
-
!!faces && !!faces.top ? buildFace('top'
|
|
39
|
-
!!faces && !!faces.bottom ? buildFace('bottom'
|
|
23
|
+
!!faces && !!faces.front ? buildFace('front') : null,
|
|
24
|
+
!!faces && !!faces.right ? buildFace('right') : null,
|
|
25
|
+
!!faces && !!faces.back ? buildFace('back') : null,
|
|
26
|
+
!!faces && !!faces.left ? buildFace('left') : null,
|
|
27
|
+
!!faces && !!faces.top ? buildFace('top') : null,
|
|
28
|
+
!!faces && !!faces.bottom ? buildFace('bottom') : null)))));
|
|
40
29
|
};
|
|
30
|
+
export default Cuboid;
|
|
41
31
|
//# sourceMappingURL=Cuboid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cuboid.js","sourceRoot":"","sources":["../../../src/components/Cuboid.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,IAAI,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Cuboid.js","sourceRoot":"","sources":["../../../src/components/Cuboid.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,IAAI,MAAM,cAAc,CAAC;AAEhC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK/B,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAO,EAAE;IACvC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEnJ,MAAM,SAAS,GAAG,CAAC,QAAa,EAAO,EAAE;QACrC,OAAO,CACH,oBAAC,IAAI,IACD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd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,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;oBAClD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBAChD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAC3C,CACT,CACJ,CACF,CAChB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import styled from 'styled-components';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
const Face = (props) => {
|
|
4
|
-
let {
|
|
4
|
+
let { depth = 10, faceType, global = {}, height = 10, custom = false, tranz = 80, width = 100 } = props;
|
|
5
5
|
let transform;
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
bgc = !!vars && !!vars.bgc ? vars.bgc : props.bgc;
|
|
9
|
-
opac = !!vars && !!vars.opac ? vars.opac : props.opac;
|
|
10
|
-
border = !!vars && !!vars.border ? vars.border : props.border;
|
|
11
|
-
fontFamily = !!vars && !!vars.fontFamily ? vars.fontFamily : props.fontFamily;
|
|
12
|
-
return true;
|
|
13
|
-
};
|
|
6
|
+
const styles = !!custom[faceType].css ? custom[faceType].css : global.css;
|
|
7
|
+
const body = !!custom[faceType].body ? custom[faceType].body : global.body;
|
|
14
8
|
if (faceType === 'bottom') {
|
|
15
9
|
tranz = +height - +depth / 2;
|
|
16
10
|
height = +depth;
|
|
17
11
|
transform = `transform: rotateX(-90deg) translateZ(${tranz}px);`;
|
|
18
|
-
|
|
12
|
+
//styles = !!custom["top"] ? custom : global;
|
|
13
|
+
}
|
|
14
|
+
else if (faceType === 'top') {
|
|
15
|
+
height = +depth;
|
|
16
|
+
if (!!depth)
|
|
17
|
+
tranz = +depth / 2;
|
|
18
|
+
transform = `transform: rotateX(90deg) translateZ(${tranz}px);`;
|
|
19
19
|
}
|
|
20
20
|
else if (faceType === 'front') {
|
|
21
21
|
if (!!depth)
|
|
22
22
|
tranz = +depth / 2;
|
|
23
23
|
transform = `transform: rotateY(0deg) translateZ(${tranz}px);`;
|
|
24
|
-
setCustomVars(indivStyles['front'], props);
|
|
25
24
|
}
|
|
26
25
|
else if (faceType === 'back') {
|
|
27
26
|
if (!!depth)
|
|
28
27
|
tranz = +depth / 2;
|
|
29
28
|
transform = `transform: rotateY(180deg) translateZ(${tranz}px);`;
|
|
30
|
-
setCustomVars(indivStyles['back'], props);
|
|
31
|
-
}
|
|
32
|
-
else if (faceType === 'top') {
|
|
33
|
-
height = +depth;
|
|
34
|
-
if (!!depth)
|
|
35
|
-
tranz = +depth / 2;
|
|
36
|
-
transform = `transform: rotateX(90deg) translateZ(${tranz}px);`;
|
|
37
|
-
setCustomVars(indivStyles['top'], props);
|
|
38
29
|
}
|
|
39
30
|
else if (faceType === 'right') {
|
|
40
31
|
if (height > width && !depth) {
|
|
@@ -50,7 +41,6 @@ const Face = (props) => {
|
|
|
50
41
|
width = +depth;
|
|
51
42
|
}
|
|
52
43
|
transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
|
|
53
|
-
setCustomVars(indivStyles['right'], props);
|
|
54
44
|
}
|
|
55
45
|
else {
|
|
56
46
|
if (height > width && !depth) {
|
|
@@ -68,24 +58,15 @@ const Face = (props) => {
|
|
|
68
58
|
width = +depth;
|
|
69
59
|
}
|
|
70
60
|
transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
|
|
71
|
-
setCustomVars(indivStyles['left'], props);
|
|
72
61
|
}
|
|
73
62
|
const Specs = styled.div `
|
|
74
|
-
|
|
75
|
-
position: ${position};
|
|
76
|
-
left: ${left};
|
|
77
|
-
margin: ${margin};
|
|
78
|
-
padding: ${padding};
|
|
63
|
+
${styles}
|
|
79
64
|
width: ${width}px;
|
|
80
|
-
|
|
65
|
+
position: absolute;
|
|
81
66
|
height: ${height}px;
|
|
82
|
-
|
|
83
|
-
border: ${!!border ? border : globalStyles.border};
|
|
84
|
-
backface-visibility: ${!!bfv ? bfv : globalStyles.bfv};
|
|
85
|
-
${transform}
|
|
86
|
-
top: ${top};
|
|
67
|
+
${transform};
|
|
87
68
|
`;
|
|
88
|
-
return React.createElement(Specs, null,
|
|
69
|
+
return React.createElement(Specs, null, 'body');
|
|
89
70
|
};
|
|
90
71
|
export default Face;
|
|
91
72
|
//# sourceMappingURL=Face.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Face.js","sourceRoot":"","sources":["../../../../src/components/Faces/Face.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Face.js","sourceRoot":"","sources":["../../../../src/components/Faces/Face.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAO,EAAE;IACnC,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC;IAExG,IAAI,SAAS,CAAC;IACd,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAC1E,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,C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C,CAAC;YAC5B,KAAK,GAAG,CAAC,KAAK,CAAC;SAClB;QACD,SAAS,GAAG,wCAAwC,KAAK,MAAM,CAAC;KACnE;SAAM;QACH,IAAI,MAAM,GAAG,KAAK,IAAI,CAAC,KAAK,EAAE;YAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACf,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAChC,KAAK,GAAG,CAAC,MAAM,CAAC;SACnB;aAAM,IAAI,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;YACjC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACf,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;YACpB,MAAM,GAAG,CAAC,KAAK,CAAC;SACnB;aAAM;YACH,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;YACnB,KAAK,GAAG,CAAC,KAAK,CAAC;SAClB;QACD,SAAS,GAAG,yCAAyC,KAAK,MAAM,CAAC;KACpE;IAED,MAAM,KAAK,GAAQ,MAAM,CAAC,GAAG,CAAA;UACvB,MAAM;iBACC,KAAK;;kBAEJ,MAAM;UACd,SAAS;KACd,CAAC;IACF,OAAO,oBAAC,KAAK,QAAE,MAAM,CAAS,CAAC;AACnC,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,cAAc,UAAU,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/mdnelles/anim-3d-objs-launcher"
|
|
6
6
|
},
|
|
7
7
|
"homepage": "https://github.com/mdnelles/anim-3d-objs",
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.12",
|
|
9
9
|
"description": "A component library for getting people started with easy to re-use components for everyday projects.",
|
|
10
10
|
"main": "dist/cjs/index.js",
|
|
11
11
|
"module": "dist/esm/index.js",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
3
|
-
backgroundColor?: string;
|
|
4
|
-
color?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Button: React.FunctionComponent<IButtonProps>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Button = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Button = (props) => {
|
|
9
|
-
const { children, backgroundColor, color, style } = props;
|
|
10
|
-
let _style = style || {};
|
|
11
|
-
/** Override Defaults */
|
|
12
|
-
if (backgroundColor && _style)
|
|
13
|
-
_style.backgroundColor = backgroundColor;
|
|
14
|
-
if (color && _style)
|
|
15
|
-
_style.color = color;
|
|
16
|
-
return (react_1.default.createElement("button", Object.assign({ style: _style }, props), children));
|
|
17
|
-
};
|
|
18
|
-
exports.Button = Button;
|
|
19
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAOnB,MAAM,MAAM,GAA0C,CAAC,KAAK,EAAE,EAAE;IACnE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE1D,IAAI,MAAM,GAAwB,KAAK,IAAI,EAAE,CAAC;IAE9C,wBAAwB;IACxB,IAAI,eAAe,IAAI,MAAM;QAAE,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACxE,IAAI,KAAK,IAAI,MAAM;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAE1C,OAAO,CACH,wDAAQ,KAAK,EAAE,MAAM,IAAM,KAAK,GAC3B,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC;AAdW,QAAA,MAAM,UAcjB"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Cuboid = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const AnimWrap_1 = require("./styles/AnimWrap");
|
|
9
|
-
const Scene_1 = require("./styles/Scene");
|
|
10
|
-
const Face_1 = __importDefault(require("./Faces/Face"));
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const CuboidWrapper = styled_components_1.default.div `
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
position: relative;
|
|
16
|
-
transform-style: preserve-3d;
|
|
17
|
-
`;
|
|
18
|
-
const Cuboid = (props) => {
|
|
19
|
-
let color = '#eee', fontWeight = 800, fontFamily = 'helvetica', textShadow = '1px 1px #555', lineHeight = 1.2, fontSize = 20, textAlign = 'center';
|
|
20
|
-
let { animSpecs = {}, width = 5, height = 5, depth = 5, faces, globalStyles, indivStyles, tranz = (+height / 2) | 0, perspectiveOrigin, zIndex } = props;
|
|
21
|
-
const buildFace = (faceType, child) => {
|
|
22
|
-
//const { faceType, child } = props;
|
|
23
|
-
return (react_1.default.createElement(Face_1.default, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz,
|
|
24
|
-
// if specified opac / bgc / border will over-ride globalStyles
|
|
25
|
-
globalStyles: globalStyles, indivStyles: indivStyles },
|
|
26
|
-
react_1.default.createElement("div", { style: {
|
|
27
|
-
color,
|
|
28
|
-
fontWeight,
|
|
29
|
-
textShadow,
|
|
30
|
-
lineHeight,
|
|
31
|
-
fontSize,
|
|
32
|
-
fontFamily,
|
|
33
|
-
textAlign
|
|
34
|
-
} }, child)));
|
|
35
|
-
};
|
|
36
|
-
return (react_1.default.createElement(Scene_1.SceneStyle, { width: width, height: height, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
37
|
-
react_1.default.createElement(AnimWrap_1.AnimWrap, { duration: animSpecs.anim1duration, iterationCount: animSpecs.anim1count, animName: animSpecs.anim1, animLow: animSpecs.anim1low, animHi: animSpecs.anim1hi, animDirection: animSpecs.anim1direction },
|
|
38
|
-
react_1.default.createElement(AnimWrap_1.AnimWrap, { duration: animSpecs.anim2duration, iterationCount: animSpecs.anim2count, animName: animSpecs.anim2, animLow: animSpecs.anim2low, animHi: animSpecs.anim2hi, animDirection: animSpecs.anim2direction },
|
|
39
|
-
react_1.default.createElement(CuboidWrapper, null,
|
|
40
|
-
!!faces && !!faces.front ? buildFace('front', 'FRONT') : null,
|
|
41
|
-
!!faces && !!faces.right ? buildFace('right', 'RIGHT') : null,
|
|
42
|
-
!!faces && !!faces.back ? buildFace('back', 'BACK') : null,
|
|
43
|
-
!!faces && !!faces.left ? buildFace('left', 'LEFT') : null,
|
|
44
|
-
!!faces && !!faces.top ? buildFace('top', 'TOP') : null,
|
|
45
|
-
!!faces && !!faces.bottom ? buildFace('bottom', 'BOTTOM') : null)))));
|
|
46
|
-
};
|
|
47
|
-
exports.Cuboid = Cuboid;
|
|
48
|
-
//# sourceMappingURL=Cuboid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Cuboid.js","sourceRoot":"","sources":["../../../src/components/Cuboid.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AACvC,gDAA6C;AAC7C,0CAA4C;AAE5C,wDAAgC;AAChC,kDAA0B;AAE1B,MAAM,aAAa,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;CAK/B,CAAC;AAEK,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAO,EAAE;IAC9C,IAAI,KAAK,GAAG,MAAM,EACd,UAAU,GAAoB,GAAG,EACjC,UAAU,GAAW,WAAW,EAChC,UAAU,GAAW,cAAc,EACnC,UAAU,GAAW,GAAG,EACxB,QAAQ,GAAoB,EAAE,EAC9B,SAAS,GAAiB,QAAQ,CAAC;IAEvC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzJ,MAAM,SAAS,GAAG,CAAC,QAAa,EAAE,KAAU,EAAO,EAAE;QACjD,oCAAoC;QAEpC,OAAO,CACH,8BAAC,cAAI,IACD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,KAAK;YACZ,+DAA+D;YAC/D,YAAY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AM,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1D,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1D,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBACvD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CACrD,CACT,CACJ,CACF,CAChB,CAAC;AACN,CAAC,CAAC;AAzEW,QAAA,MAAM,UAyEjB"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const Face = (props) => {
|
|
9
|
-
let { bfv = false, bgc = false, border = false, children, depth = 10, faceType, globalStyles = {}, fontFamily, height = 10, indivStyles = false, left = 0, margin = 0, opac = false, padding = 20, position = 'absolute', top = 0, tranz = 80, width = 10 } = props;
|
|
10
|
-
let transform;
|
|
11
|
-
const setCustomVars = (vars, props) => {
|
|
12
|
-
bfv = !!vars && !!vars.bfv ? vars.bfv : props.bfv;
|
|
13
|
-
bgc = !!vars && !!vars.bgc ? vars.bgc : props.bgc;
|
|
14
|
-
opac = !!vars && !!vars.opac ? vars.opac : props.opac;
|
|
15
|
-
border = !!vars && !!vars.border ? vars.border : props.border;
|
|
16
|
-
fontFamily = !!vars && !!vars.fontFamily ? vars.fontFamily : props.fontFamily;
|
|
17
|
-
return true;
|
|
18
|
-
};
|
|
19
|
-
if (faceType === 'bottom') {
|
|
20
|
-
tranz = +height - +depth / 2;
|
|
21
|
-
height = +depth;
|
|
22
|
-
transform = `transform: rotateX(-90deg) translateZ(${tranz}px);`;
|
|
23
|
-
setCustomVars(indivStyles['bottom'], props);
|
|
24
|
-
}
|
|
25
|
-
else if (faceType === 'front') {
|
|
26
|
-
if (!!depth)
|
|
27
|
-
tranz = +depth / 2;
|
|
28
|
-
transform = `transform: rotateY(0deg) translateZ(${tranz}px);`;
|
|
29
|
-
setCustomVars(indivStyles['front'], props);
|
|
30
|
-
}
|
|
31
|
-
else if (faceType === 'back') {
|
|
32
|
-
if (!!depth)
|
|
33
|
-
tranz = +depth / 2;
|
|
34
|
-
transform = `transform: rotateY(180deg) translateZ(${tranz}px);`;
|
|
35
|
-
setCustomVars(indivStyles['back'], props);
|
|
36
|
-
}
|
|
37
|
-
else if (faceType === 'top') {
|
|
38
|
-
height = +depth;
|
|
39
|
-
if (!!depth)
|
|
40
|
-
tranz = +depth / 2;
|
|
41
|
-
transform = `transform: rotateX(90deg) translateZ(${tranz}px);`;
|
|
42
|
-
setCustomVars(indivStyles['top'], props);
|
|
43
|
-
}
|
|
44
|
-
else if (faceType === 'right') {
|
|
45
|
-
if (height > width && !depth) {
|
|
46
|
-
tranz = -(+height / 2 - +width);
|
|
47
|
-
width = +height;
|
|
48
|
-
}
|
|
49
|
-
else if (width > height && !depth) {
|
|
50
|
-
tranz = +height / 2;
|
|
51
|
-
height = +width;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
tranz = +width - +depth / 2;
|
|
55
|
-
width = +depth;
|
|
56
|
-
}
|
|
57
|
-
transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
|
|
58
|
-
setCustomVars(indivStyles['right'], props);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
if (height > width && !depth) {
|
|
62
|
-
console.log(1);
|
|
63
|
-
tranz = -(+height / 2 - +width);
|
|
64
|
-
width = +height;
|
|
65
|
-
}
|
|
66
|
-
else if (width > height && !depth) {
|
|
67
|
-
console.log(2);
|
|
68
|
-
tranz = +height / 2;
|
|
69
|
-
height = +width;
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
tranz = +depth / 2;
|
|
73
|
-
width = +depth;
|
|
74
|
-
}
|
|
75
|
-
transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
|
|
76
|
-
setCustomVars(indivStyles['left'], props);
|
|
77
|
-
}
|
|
78
|
-
const Specs = styled_components_1.default.div `
|
|
79
|
-
opacity: ${!!opac ? opac : globalStyles.opac};
|
|
80
|
-
position: ${position};
|
|
81
|
-
left: ${left};
|
|
82
|
-
margin: ${margin};
|
|
83
|
-
padding: ${padding};
|
|
84
|
-
width: ${width}px;
|
|
85
|
-
font-family: ${fontFamily};
|
|
86
|
-
height: ${height}px;
|
|
87
|
-
background-color: ${!!bgc ? bgc : globalStyles.bgc};
|
|
88
|
-
border: ${!!border ? border : globalStyles.border};
|
|
89
|
-
backface-visibility: ${!!bfv ? bfv : globalStyles.bfv};
|
|
90
|
-
${transform}
|
|
91
|
-
top: ${top};
|
|
92
|
-
`;
|
|
93
|
-
return react_1.default.createElement(Specs, null, children);
|
|
94
|
-
};
|
|
95
|
-
exports.default = Face;
|
|
96
|
-
//# sourceMappingURL=Face.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Face.js","sourceRoot":"","sources":["../../../../src/components/Faces/Face.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,0EAAuC;AAGvC,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAO,EAAE;IACnC,IAAI,EACA,GAAG,GAAG,KAAK,EACX,GAAG,GAAG,KAAK,EACX,MAAM,GAAG,KAAK,EACd,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,QAAQ,EACR,YAAY,GAAG,EAA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ACxC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM;+BAC1B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG;UACnD,SAAS;eACJ,GAAG;KACb,CAAC;IACF,OAAO,8BAAC,KAAK,QAAE,QAAQ,CAAS,CAAC;AACrC,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Button"), exports);
|
|
18
|
-
__exportStar(require("./Cuboid"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AnimWrap = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const Anims_1 = require("./Anims");
|
|
10
|
-
const AnimWrap = (props) => {
|
|
11
|
-
const { duration = 0, iterationCount = 0, animName = 'noAnim', fillMode = 'forward', children = '', borderColor = '', animLow = 0, animHi = 0, animDirection = 'normal' } = props;
|
|
12
|
-
const { X360, Y360, fadeInkf, wobY, wobX, fwdx018, fwdx1836, fwdx09, fwdx918, fwdx1827, fwdx2736, fwdy018, fwdy1836, fwdy09, fwdy918, fwdy1827, fwdy2736, noAnim } = (0, Anims_1.allAnims)({ animLow, animHi });
|
|
13
|
-
let theAnim = 'noAnim';
|
|
14
|
-
// need to iterate through all animation posibilities and not use eval() to satisfy TS
|
|
15
|
-
if (animName === 'X360')
|
|
16
|
-
theAnim = X360;
|
|
17
|
-
else if (animName === 'Y360')
|
|
18
|
-
theAnim = Y360;
|
|
19
|
-
else if (animName === 'fadeInkf')
|
|
20
|
-
theAnim = fadeInkf;
|
|
21
|
-
else if (animName === 'wobX')
|
|
22
|
-
theAnim = wobX;
|
|
23
|
-
else if (animName === 'wobY')
|
|
24
|
-
theAnim = wobY;
|
|
25
|
-
else if (animName === 'fwdx018')
|
|
26
|
-
theAnim = fwdx018;
|
|
27
|
-
else if (animName === 'fwdx1836')
|
|
28
|
-
theAnim = fwdx1836;
|
|
29
|
-
else if (animName === 'fwdx09')
|
|
30
|
-
theAnim = fwdx09;
|
|
31
|
-
else if (animName === 'fwdx918')
|
|
32
|
-
theAnim = fwdx918;
|
|
33
|
-
else if (animName === 'fwdx1827')
|
|
34
|
-
theAnim = fwdx1827;
|
|
35
|
-
else if (animName === 'fwdx2736')
|
|
36
|
-
theAnim = fwdx2736;
|
|
37
|
-
else if (animName === 'fwdy018')
|
|
38
|
-
theAnim = fwdy018;
|
|
39
|
-
else if (animName === 'fwdy1836')
|
|
40
|
-
theAnim = fwdy1836;
|
|
41
|
-
else if (animName === 'fwdy09')
|
|
42
|
-
theAnim = fwdy09;
|
|
43
|
-
else if (animName === 'fwdy918')
|
|
44
|
-
theAnim = fwdy918;
|
|
45
|
-
else if (animName === 'fwdy1827')
|
|
46
|
-
theAnim = fwdy1827;
|
|
47
|
-
else if (animName === 'fwdy2736')
|
|
48
|
-
theAnim = fwdy2736;
|
|
49
|
-
else
|
|
50
|
-
theAnim = noAnim;
|
|
51
|
-
const AnimWrapDiv = styled_components_1.default.div `
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
position: relative;
|
|
55
|
-
border: 0px dotted ${borderColor};
|
|
56
|
-
transform-style: preserve-3d;
|
|
57
|
-
-webkit-animation-duration: ${duration}s;
|
|
58
|
-
animation-duration: ${duration}s;
|
|
59
|
-
-webkit-animation-iteration-count: ${iterationCount};
|
|
60
|
-
animation-iteration-count: ${iterationCount};
|
|
61
|
-
-webkit-animation-name: ${theAnim};
|
|
62
|
-
animation-name: ${theAnim};
|
|
63
|
-
-webkit-animation-fill-mode: ${fillMode};
|
|
64
|
-
animation-fill-mode: ${fillMode};
|
|
65
|
-
animation-direction: ${animDirection};
|
|
66
|
-
-webkit-animation-direction: ${animDirection};
|
|
67
|
-
`;
|
|
68
|
-
return react_1.default.createElement(AnimWrapDiv, null, children);
|
|
69
|
-
};
|
|
70
|
-
exports.AnimWrap = AnimWrap;
|
|
71
|
-
//# sourceMappingURL=AnimWrap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnimWrap.js","sourceRoot":"","sources":["../../../../src/components/styles/AnimWrap.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AACvC,kDAA0B;AAE1B,mCAAmC;AAE5B,MAAM,QAAQ,GAAG,CAA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,UAAU;QAAE,OAAO,GAAG,QAAQ,CAAC;SAChD,IAAI,QAAQ,KAAK,UAAU;QAAE,OAAO,GAAG,QAAQ,CAAC;SAChD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,GAAG,OAAO,CAAC;SAC9C,IAAI,QAAQ,KAAK,UAAU;QAAE,OAAO,GAAG,QAAQ,CAAC;SAChD,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,GAAG,MAAM,CAAC;SAC5C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,GAAG,OAAO,CAAC;SAC9C,IAAI,QAAQ,KAAK,UAAU;QAAE,OAAO,GAAG,QAAQ,CAAC;SAChD,IAAI,QAAQ,KAAK,UAAU;QAAE,OAAO,GAAG,QAAQ,CAAC;;QAChD,OAAO,GAAG,MAAM,CAAC;IAEtB,MAAM,WAAW,GAAQ,2BAAM,CAAC,GAAG,CAAA;;;;6BAIV,WAAW;;sCAEF,QAAQ;8BAChB,QAAQ;6CACO,cAAc;qCACtB,cAAc;kCACjB,OAAO;0BACf,OAAO;uCACM,QAAQ;+BAChB,QAAQ;+BACR,aAAa;uCACL,aAAa;KAC/C,CAAC;IAEF,OAAO,8BAAC,WAAW,QAAE,QAAQ,CAAe,CAAC;AACjD,CAAC,CAAC;AA5CW,QAAA,QAAQ,YA4CnB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface AllAnimsProps {
|
|
2
|
-
animLow?: number;
|
|
3
|
-
animHi?: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const allAnims: (props: AllAnimsProps) => {
|
|
6
|
-
X360: import("styled-components").Keyframes;
|
|
7
|
-
Y360: import("styled-components").Keyframes;
|
|
8
|
-
fadeInkf: import("styled-components").Keyframes;
|
|
9
|
-
wobY: import("styled-components").Keyframes;
|
|
10
|
-
wobX: import("styled-components").Keyframes;
|
|
11
|
-
fwdx018: import("styled-components").Keyframes;
|
|
12
|
-
fwdx1836: import("styled-components").Keyframes;
|
|
13
|
-
fwdx09: import("styled-components").Keyframes;
|
|
14
|
-
fwdx918: import("styled-components").Keyframes;
|
|
15
|
-
fwdx1827: import("styled-components").Keyframes;
|
|
16
|
-
fwdx2736: import("styled-components").Keyframes;
|
|
17
|
-
fwdy018: import("styled-components").Keyframes;
|
|
18
|
-
fwdy1836: import("styled-components").Keyframes;
|
|
19
|
-
fwdy09: import("styled-components").Keyframes;
|
|
20
|
-
fwdy918: import("styled-components").Keyframes;
|
|
21
|
-
fwdy1827: import("styled-components").Keyframes;
|
|
22
|
-
fwdy2736: import("styled-components").Keyframes;
|
|
23
|
-
noAnim: import("styled-components").Keyframes;
|
|
24
|
-
};
|
|
25
|
-
export {};
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allAnims = void 0;
|
|
4
|
-
const styled_components_1 = require("styled-components");
|
|
5
|
-
const allAnims = (props) => {
|
|
6
|
-
const { animLow = 0, animHi = 0 } = props;
|
|
7
|
-
const X360 = (0, styled_components_1.keyframes) `
|
|
8
|
-
from {
|
|
9
|
-
-webkit-transform: rotateX(360deg);
|
|
10
|
-
transform: rotateX(360deg);
|
|
11
|
-
}
|
|
12
|
-
to {
|
|
13
|
-
-webkit-transform: rotateX(0deg);
|
|
14
|
-
transform: rotateX(0deg);
|
|
15
|
-
}
|
|
16
|
-
}`;
|
|
17
|
-
//////// Y360
|
|
18
|
-
const Y360 = (0, styled_components_1.keyframes) `
|
|
19
|
-
from {
|
|
20
|
-
-webkit-transform: rotateY(360deg);
|
|
21
|
-
transform: rotateY(360deg);
|
|
22
|
-
}
|
|
23
|
-
to {
|
|
24
|
-
-webkit-transform: rotateY(0deg);
|
|
25
|
-
transform: rotateY(0deg);
|
|
26
|
-
}`;
|
|
27
|
-
const fadeInkf = (0, styled_components_1.keyframes) `
|
|
28
|
-
from {
|
|
29
|
-
opacity: 0;
|
|
30
|
-
}
|
|
31
|
-
to {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
}`;
|
|
34
|
-
const wobY = (0, styled_components_1.keyframes) `
|
|
35
|
-
0% {
|
|
36
|
-
-webkit-transform: rotateY(${animLow}deg);
|
|
37
|
-
transform: rotateY(${animLow}deg);
|
|
38
|
-
}
|
|
39
|
-
50% {
|
|
40
|
-
-webkit-transform: rotateY(${animHi}deg);
|
|
41
|
-
transform: rotateY(${animHi}deg);
|
|
42
|
-
}
|
|
43
|
-
100% {
|
|
44
|
-
-webkit-transform: rotateY(${animLow}deg);
|
|
45
|
-
transform: rotateY(${animLow}deg);
|
|
46
|
-
}`;
|
|
47
|
-
const wobX = (0, styled_components_1.keyframes) `
|
|
48
|
-
0% {
|
|
49
|
-
-webkit-transform: rotateX(${animLow}deg);
|
|
50
|
-
transform: rotateX(${animLow}deg);
|
|
51
|
-
}
|
|
52
|
-
50% {
|
|
53
|
-
-webkit-transform: rotateX(${animHi}deg);
|
|
54
|
-
transform: rotateX(${animHi}deg);
|
|
55
|
-
}
|
|
56
|
-
100% {
|
|
57
|
-
-webkit-transform: rotateX(${animLow}deg);
|
|
58
|
-
transform: rotateX(${animLow}deg);
|
|
59
|
-
}`;
|
|
60
|
-
/* ============================== x-axis 0-180 >180 - 360 */
|
|
61
|
-
const fwdx018 = (0, styled_components_1.keyframes) `
|
|
62
|
-
from {
|
|
63
|
-
-webkit-transform: rotateX(360deg);
|
|
64
|
-
transform: rotateX(360deg);
|
|
65
|
-
}
|
|
66
|
-
to {
|
|
67
|
-
-webkit-transform: rotateX(180deg);
|
|
68
|
-
transform: rotateX(180deg);
|
|
69
|
-
}`;
|
|
70
|
-
const fwdx1836 = (0, styled_components_1.keyframes) `
|
|
71
|
-
from {
|
|
72
|
-
-webkit-transform: rotateX(180deg);
|
|
73
|
-
transform: rotateX(180deg);
|
|
74
|
-
}
|
|
75
|
-
to {
|
|
76
|
-
-webkit-transform: rotateX(0deg);
|
|
77
|
-
transform: rotateX(0deg);
|
|
78
|
-
}`;
|
|
79
|
-
/* ============================= x-axis 0-90, 90-180, 180-270, 270-360 */
|
|
80
|
-
const fwdx09 = (0, styled_components_1.keyframes) `
|
|
81
|
-
from {
|
|
82
|
-
-webkit-transform: rotateX(360deg);
|
|
83
|
-
transform: rotateX(360deg);
|
|
84
|
-
}
|
|
85
|
-
to {
|
|
86
|
-
-webkit-transform: rotateX(90deg);
|
|
87
|
-
transform: rotateX(90deg);
|
|
88
|
-
}`;
|
|
89
|
-
const fwdx918 = (0, styled_components_1.keyframes) `
|
|
90
|
-
from {
|
|
91
|
-
-webkit-transform: rotateX(-90deg);
|
|
92
|
-
transform: rotateX(-90deg);
|
|
93
|
-
}
|
|
94
|
-
to {
|
|
95
|
-
-webkit-transform: rotateX(-180deg);
|
|
96
|
-
transform: rotateX(-180deg);
|
|
97
|
-
}`;
|
|
98
|
-
const fwdx1827 = (0, styled_components_1.keyframes) `
|
|
99
|
-
from {
|
|
100
|
-
-webkit-transform: rotateX(-180deg);
|
|
101
|
-
transform: rotateX(-180deg);
|
|
102
|
-
}
|
|
103
|
-
to {
|
|
104
|
-
-webkit-transform: rotateX(-270deg);
|
|
105
|
-
transform: rotateX(-270deg);
|
|
106
|
-
}`;
|
|
107
|
-
const fwdx2736 = (0, styled_components_1.keyframes) `
|
|
108
|
-
from {
|
|
109
|
-
-webkit-transform: rotateX(-270deg);
|
|
110
|
-
transform: rotateX(-270deg);
|
|
111
|
-
}
|
|
112
|
-
to {
|
|
113
|
-
-webkit-transform: rotateX(-360deg);
|
|
114
|
-
transform: rotateX(-360deg);
|
|
115
|
-
}`;
|
|
116
|
-
/* ============================== y-axis 0-180 >180 - 360 */
|
|
117
|
-
const fwdy018 = (0, styled_components_1.keyframes) `
|
|
118
|
-
from {
|
|
119
|
-
-webkit-transform: rotateY(360deg);
|
|
120
|
-
transform: rotateY(360deg);
|
|
121
|
-
}
|
|
122
|
-
to {
|
|
123
|
-
-webkit-transform: rotateY(180deg);
|
|
124
|
-
transform: rotateY(180deg);
|
|
125
|
-
}`;
|
|
126
|
-
const fwdy1836 = (0, styled_components_1.keyframes) `
|
|
127
|
-
from {
|
|
128
|
-
-webkit-transform: rotateY(180deg);
|
|
129
|
-
transform: rotateY(180deg);
|
|
130
|
-
}
|
|
131
|
-
to {
|
|
132
|
-
-webkit-transform: rotateY(0deg);
|
|
133
|
-
transform: rotateY(0deg);
|
|
134
|
-
}`;
|
|
135
|
-
/* ============================= y-axis 0-90, 90-180, 180-270, 270-360 */
|
|
136
|
-
const fwdy09 = (0, styled_components_1.keyframes) `
|
|
137
|
-
from {
|
|
138
|
-
-webkit-transform: rotateY(360deg);
|
|
139
|
-
transform: rotateY(360deg);
|
|
140
|
-
}
|
|
141
|
-
to {
|
|
142
|
-
-webkit-transform: rotateY(90deg);
|
|
143
|
-
transform: rotateY(90deg);
|
|
144
|
-
}`;
|
|
145
|
-
const fwdy918 = (0, styled_components_1.keyframes) `
|
|
146
|
-
from {
|
|
147
|
-
-webkit-transform: rotateY(-90deg);
|
|
148
|
-
transform: rotateY(-90deg);
|
|
149
|
-
}
|
|
150
|
-
to {
|
|
151
|
-
-webkit-transform: rotateY(-180deg);
|
|
152
|
-
transform: rotateY(-180deg);
|
|
153
|
-
}`;
|
|
154
|
-
const fwdy1827 = (0, styled_components_1.keyframes) `
|
|
155
|
-
from {
|
|
156
|
-
-webkit-transform: rotateY(-180deg);
|
|
157
|
-
transform: rotateY(-180deg);
|
|
158
|
-
}
|
|
159
|
-
to {
|
|
160
|
-
-webkit-transform: rotateY(-270deg);
|
|
161
|
-
transform: rotateY(-270deg);
|
|
162
|
-
}`;
|
|
163
|
-
const fwdy2736 = (0, styled_components_1.keyframes) `
|
|
164
|
-
from {
|
|
165
|
-
-webkit-transform: rotateY(-270deg);
|
|
166
|
-
transform: rotateY(-270deg);
|
|
167
|
-
}
|
|
168
|
-
to {
|
|
169
|
-
-webkit-transform: rotateY(-360deg);
|
|
170
|
-
transform: rotateY(-360deg);
|
|
171
|
-
}`;
|
|
172
|
-
const noAnim = (0, styled_components_1.keyframes) ``;
|
|
173
|
-
return {
|
|
174
|
-
X360,
|
|
175
|
-
Y360,
|
|
176
|
-
fadeInkf,
|
|
177
|
-
wobY,
|
|
178
|
-
wobX,
|
|
179
|
-
fwdx018,
|
|
180
|
-
fwdx1836,
|
|
181
|
-
fwdx09,
|
|
182
|
-
fwdx918,
|
|
183
|
-
fwdx1827,
|
|
184
|
-
fwdx2736,
|
|
185
|
-
fwdy018,
|
|
186
|
-
fwdy1836,
|
|
187
|
-
fwdy09,
|
|
188
|
-
fwdy918,
|
|
189
|
-
fwdy1827,
|
|
190
|
-
fwdy2736,
|
|
191
|
-
noAnim
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
exports.allAnims = allAnims;
|
|
195
|
-
//# sourceMappingURL=Anims.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Anims.js","sourceRoot":"","sources":["../../../../src/components/styles/Anims.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAOvC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC7C,MAAM,EAAE,OAAO,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IAE1C,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;;;;;;;;EASxB,CAAC;IAEC,aAAa;IACb,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;;;;;;;MAQpB,CAAC;IAEH,MAAM,QAAQ,GAAG,IAAA,6BAAS,EAAA;;;;;;MAMxB,CAAC;IAEH,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;qCAEW,OAAO;6BACf,OAAO;;;qCAGC,MAAM;6BACd,MAAM;;;qCAGE,OAAO;6BACf,OAAO;MAC9B,CAAC;IAEH,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;qCAEW,OAAO;6BACf,OAAO;;;qCAGC,MAAM;6BACd,MAAM;;;qCAGE,OAAO;6BACf,OAAO;MAC9B,CAA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|
-
width?: number | string;
|
|
3
|
-
height?: number | string;
|
|
4
|
-
perspectiveOrigin?: string | undefined;
|
|
5
|
-
zIndex?: number | undefined;
|
|
6
|
-
children: any;
|
|
7
|
-
}
|
|
8
|
-
export declare const SceneStyle: (props: SceneStyleProps) => JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SceneStyle = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const SceneStyle = (props) => {
|
|
10
|
-
const { width = 0, height = 0, perspectiveOrigin = '50% 50%', zIndex = 10, children = {} } = props;
|
|
11
|
-
console.log('z-index:' + zIndex);
|
|
12
|
-
const SceneStyleDiv = styled_components_1.default.div `
|
|
13
|
-
width: ${width}px;
|
|
14
|
-
height: ${height}px;
|
|
15
|
-
perspective: 600px;
|
|
16
|
-
perspective-origin: ${perspectiveOrigin};
|
|
17
|
-
`;
|
|
18
|
-
return (react_1.default.createElement("div", { style: { zIndex } },
|
|
19
|
-
react_1.default.createElement(SceneStyleDiv, null, children)));
|
|
20
|
-
};
|
|
21
|
-
exports.SceneStyle = SceneStyle;
|
|
22
|
-
//# sourceMappingURL=Scene.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Scene.js","sourceRoot":"","sources":["../../../../src/components/styles/Scene.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AACvC,kDAA0B;AAUnB,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IACjD,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,iBAAiB,GAAG,SAAS,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IACnG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC;IACjC,MAAM,aAAa,GAAQ,2BAAM,CAAC,GAAG,CAAA;iBACxB,KAAK;kBACJ,MAAM;;8BAEM,iBAAiB;KAC1C,CAAC;IAEF,OAAO,CACH,uCAAK,KAAK,EAAE,EAAE,MAAM,EAAE;QAClB,8BAAC,aAAa,QAAE,QAAQ,CAAiB,CACvC,CACT,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useLogging';
|
package/dist/cjs/hooks/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./useLogging"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Logging, { ILoggingOptions } from '../library/Logging';
|
|
2
|
-
/**
|
|
3
|
-
* A hook for a simple logging library.
|
|
4
|
-
* @param options Options to pass our logger.
|
|
5
|
-
* @returns object of type Logging
|
|
6
|
-
*/
|
|
7
|
-
export declare const useLogging: (options?: ILoggingOptions) => [Logging];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useLogging = void 0;
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const Logging_1 = __importDefault(require("../library/Logging"));
|
|
9
|
-
/**
|
|
10
|
-
* A hook for a simple logging library.
|
|
11
|
-
* @param options Options to pass our logger.
|
|
12
|
-
* @returns object of type Logging
|
|
13
|
-
*/
|
|
14
|
-
const useLogging = (options) => {
|
|
15
|
-
const { current: logging } = (0, react_1.useRef)(new Logging_1.default(options));
|
|
16
|
-
return [logging];
|
|
17
|
-
};
|
|
18
|
-
exports.useLogging = useLogging;
|
|
19
|
-
//# sourceMappingURL=useLogging.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLogging.js","sourceRoot":"","sources":["../../../src/hooks/useLogging.ts"],"names":[],"mappings":";;;;;;AAAA,iCAA+B;AAC/B,iEAA8D;AAE9D;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAC,OAAyB,EAAa,EAAE;IAC/D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAA,cAAM,EAAC,IAAI,iBAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1D,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC,CAAC;AAJW,QAAA,UAAU,cAIrB"}
|
package/dist/cjs/index.d.ts
DELETED
package/dist/cjs/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./hooks"), exports);
|
|
18
|
-
__exportStar(require("./library"), exports);
|
|
19
|
-
__exportStar(require("./components"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,+CAA6B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const DEBUG = "DEBUG";
|
|
2
|
-
export declare const INFO = "INFO";
|
|
3
|
-
export declare const WARN = "WARN";
|
|
4
|
-
export declare const ERROR = "ERROR";
|
|
5
|
-
export interface ILoggingOptions {
|
|
6
|
-
namespace?: string;
|
|
7
|
-
debug?: boolean;
|
|
8
|
-
applyStyles?: boolean;
|
|
9
|
-
styles?: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare class Logging {
|
|
14
|
-
private namespace;
|
|
15
|
-
private applyStyles;
|
|
16
|
-
private environment;
|
|
17
|
-
private styles;
|
|
18
|
-
constructor(options?: ILoggingOptions);
|
|
19
|
-
log: (key: string, obj: any, ...objs: any[]) => void;
|
|
20
|
-
debug: (obj: any, ...objs: any[]) => void;
|
|
21
|
-
info: (obj: any, ...objs: any[]) => void;
|
|
22
|
-
warn: (obj: any, ...objs: any[]) => void;
|
|
23
|
-
error: (obj: any, ...objs: any[]) => void;
|
|
24
|
-
}
|
|
25
|
-
export default Logging;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Logging = exports.ERROR = exports.WARN = exports.INFO = exports.DEBUG = void 0;
|
|
4
|
-
exports.DEBUG = 'DEBUG';
|
|
5
|
-
exports.INFO = 'INFO';
|
|
6
|
-
exports.WARN = 'WARN';
|
|
7
|
-
exports.ERROR = 'ERROR';
|
|
8
|
-
class Logging {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
this.styles = {
|
|
11
|
-
DEBUG: 'display: inline-block; background-color: Blue; color: white; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;',
|
|
12
|
-
INFO: 'display: inline-block; background-color: Green; color: black; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;',
|
|
13
|
-
WARN: 'display: inline-block; background-color: gold; color: black; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;',
|
|
14
|
-
ERROR: 'display: inline-block; background-color: Red; color: black; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;'
|
|
15
|
-
};
|
|
16
|
-
this.log = (key, obj, ...objs) => {
|
|
17
|
-
if (this.environment === 'production')
|
|
18
|
-
return;
|
|
19
|
-
if (this.applyStyles) {
|
|
20
|
-
console.log(`[${new Date().toISOString()}] [${this.namespace}] %c[${key}] ${obj}`, this.styles[key], ...objs);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
console.log(`[${new Date().toISOString()}] [${this.namespace}] [${key}] ${obj}`, ...objs);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
this.debug = (obj, ...objs) => this.log(exports.DEBUG, obj, ...objs);
|
|
27
|
-
this.info = (obj, ...objs) => this.log(exports.INFO, obj, ...objs);
|
|
28
|
-
this.warn = (obj, ...objs) => this.log(exports.WARN, obj, ...objs);
|
|
29
|
-
this.error = (obj, ...objs) => this.log(exports.ERROR, obj, ...objs);
|
|
30
|
-
this.namespace = (options === null || options === void 0 ? void 0 : options.namespace) || 'Default';
|
|
31
|
-
this.applyStyles = (options === null || options === void 0 ? void 0 : options.applyStyles) || false;
|
|
32
|
-
this.environment = process.env.NODE_ENV || 'development';
|
|
33
|
-
if ((options === null || options === void 0 ? void 0 : options.styles) && this.applyStyles) {
|
|
34
|
-
for (let key in options.styles) {
|
|
35
|
-
if (this.styles[key])
|
|
36
|
-
this.styles[key] = options.styles[key];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.Logging = Logging;
|
|
42
|
-
exports.default = Logging;
|
|
43
|
-
//# sourceMappingURL=Logging.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logging.js","sourceRoot":"","sources":["../../../src/library/Logging.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,KAAK,GAAG,OAAO,CAAC;AAS7B,MAAa,OAAO;IAYhB,YAAY,OAAyB;QAP7B,WAAM,GAA8B;YACxC,KAAK,EAAE,+HAA+H;YACtI,IAAI,EAAE,gIAAgI;YACtI,IAAI,EAAE,+HA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CAAE,SAAS,KAAI,SAAS,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,KAAK,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;QAEzD,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,KAAI,IAAI,CAAC,WAAW,EAAE;YACrC,KAAK,IAAI,GAAG,IAAI,OAAO,CAAC,MAAM,EAAE;gBAC5B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;oBAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aAChE;SACJ;IACL,CAAC;CAgBJ;AAtCD,0BAsCC;AAED,kBAAe,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Logging';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Logging"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/library/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useLogging';
|
package/dist/esm/hooks/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Logging, { ILoggingOptions } from '../library/Logging';
|
|
2
|
-
/**
|
|
3
|
-
* A hook for a simple logging library.
|
|
4
|
-
* @param options Options to pass our logger.
|
|
5
|
-
* @returns object of type Logging
|
|
6
|
-
*/
|
|
7
|
-
export declare const useLogging: (options?: ILoggingOptions) => [Logging];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useRef } from 'react';
|
|
2
|
-
import Logging from '../library/Logging';
|
|
3
|
-
/**
|
|
4
|
-
* A hook for a simple logging library.
|
|
5
|
-
* @param options Options to pass our logger.
|
|
6
|
-
* @returns object of type Logging
|
|
7
|
-
*/
|
|
8
|
-
export const useLogging = (options) => {
|
|
9
|
-
const { current: logging } = useRef(new Logging(options));
|
|
10
|
-
return [logging];
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=useLogging.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLogging.js","sourceRoot":"","sources":["../../../src/hooks/useLogging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,OAA4B,MAAM,oBAAoB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAyB,EAAa,EAAE;IAC/D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1D,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const DEBUG = "DEBUG";
|
|
2
|
-
export declare const INFO = "INFO";
|
|
3
|
-
export declare const WARN = "WARN";
|
|
4
|
-
export declare const ERROR = "ERROR";
|
|
5
|
-
export interface ILoggingOptions {
|
|
6
|
-
namespace?: string;
|
|
7
|
-
debug?: boolean;
|
|
8
|
-
applyStyles?: boolean;
|
|
9
|
-
styles?: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare class Logging {
|
|
14
|
-
private namespace;
|
|
15
|
-
private applyStyles;
|
|
16
|
-
private environment;
|
|
17
|
-
private styles;
|
|
18
|
-
constructor(options?: ILoggingOptions);
|
|
19
|
-
log: (key: string, obj: any, ...objs: any[]) => void;
|
|
20
|
-
debug: (obj: any, ...objs: any[]) => void;
|
|
21
|
-
info: (obj: any, ...objs: any[]) => void;
|
|
22
|
-
warn: (obj: any, ...objs: any[]) => void;
|
|
23
|
-
error: (obj: any, ...objs: any[]) => void;
|
|
24
|
-
}
|
|
25
|
-
export default Logging;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export const DEBUG = 'DEBUG';
|
|
2
|
-
export const INFO = 'INFO';
|
|
3
|
-
export const WARN = 'WARN';
|
|
4
|
-
export const ERROR = 'ERROR';
|
|
5
|
-
export class Logging {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
this.styles = {
|
|
8
|
-
DEBUG: 'display: inline-block; background-color: Blue; color: white; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;',
|
|
9
|
-
INFO: 'display: inline-block; background-color: Green; color: black; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;',
|
|
10
|
-
WARN: 'display: inline-block; background-color: gold; color: black; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;',
|
|
11
|
-
ERROR: 'display: inline-block; background-color: Red; color: black; font-weight: bold; padding: 3px 7px 3px 7px; border-radius: 3px;'
|
|
12
|
-
};
|
|
13
|
-
this.log = (key, obj, ...objs) => {
|
|
14
|
-
if (this.environment === 'production')
|
|
15
|
-
return;
|
|
16
|
-
if (this.applyStyles) {
|
|
17
|
-
console.log(`[${new Date().toISOString()}] [${this.namespace}] %c[${key}] ${obj}`, this.styles[key], ...objs);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
console.log(`[${new Date().toISOString()}] [${this.namespace}] [${key}] ${obj}`, ...objs);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
this.debug = (obj, ...objs) => this.log(DEBUG, obj, ...objs);
|
|
24
|
-
this.info = (obj, ...objs) => this.log(INFO, obj, ...objs);
|
|
25
|
-
this.warn = (obj, ...objs) => this.log(WARN, obj, ...objs);
|
|
26
|
-
this.error = (obj, ...objs) => this.log(ERROR, obj, ...objs);
|
|
27
|
-
this.namespace = (options === null || options === void 0 ? void 0 : options.namespace) || 'Default';
|
|
28
|
-
this.applyStyles = (options === null || options === void 0 ? void 0 : options.applyStyles) || false;
|
|
29
|
-
this.environment = process.env.NODE_ENV || 'development';
|
|
30
|
-
if ((options === null || options === void 0 ? void 0 : options.styles) && this.applyStyles) {
|
|
31
|
-
for (let key in options.styles) {
|
|
32
|
-
if (this.styles[key])
|
|
33
|
-
this.styles[key] = options.styles[key];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export default Logging;
|
|
39
|
-
//# sourceMappingURL=Logging.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logging.js","sourceRoot":"","sources":["../../../src/library/Logging.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO,CAAC;AAC7B,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