@threekit-tools/treble 0.0.83 → 0.0.85-next-2
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/Treble/Treble.d.ts +9 -3
- package/dist/Treble/Treble.js +37 -7
- package/dist/Treble/index.d.ts +2 -2
- package/dist/Treble/index.js +2 -2
- package/dist/Treble/{Snapshots.d.ts → snapshots.d.ts} +4 -9
- package/dist/Treble/snapshots.js +247 -0
- package/dist/Treble/{Wishlist.d.ts → wishlist.d.ts} +2 -6
- package/dist/Treble/wishlist.js +135 -0
- package/dist/api/orders.d.ts +5 -7
- package/dist/components/AttributeValue/index.js +2 -2
- package/dist/components/AwaitThreekitLoad/index.d.ts +3 -2
- package/dist/components/AwaitThreekitLoad/index.js +7 -2
- package/dist/components/Cards/index.d.ts +2 -1
- package/dist/components/Cards/index.js +3 -3
- package/dist/components/DraggableHint/draggableIndicator.styles.d.ts +5 -0
- package/dist/components/DraggableHint/draggableIndicator.styles.js +35 -0
- package/dist/components/DraggableHint/index.d.ts +8 -0
- package/dist/components/DraggableHint/index.js +49 -0
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/Dropdown/index.js +3 -3
- package/dist/components/FlatForm/index.js +5 -3
- package/dist/components/Player/index.d.ts +1 -1
- package/dist/components/PlayerLoadingCircular/index.d.ts +6 -0
- package/dist/components/PlayerLoadingCircular/index.js +18 -0
- package/dist/components/PlayerLoadingCircular/playerLoadingCircular.styles.d.ts +7 -0
- package/dist/components/PlayerLoadingCircular/playerLoadingCircular.styles.js +17 -0
- package/dist/components/PlayerLoadingSpinner/index.d.ts +7 -0
- package/dist/components/PlayerLoadingSpinner/index.js +17 -0
- package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.d.ts +4 -0
- package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.js +35 -0
- package/dist/components/Share/index.d.ts +2 -0
- package/dist/components/Share/index.js +139 -9
- package/dist/components/Share/share.styles.d.ts +9 -0
- package/dist/components/Share/share.styles.js +23 -0
- package/dist/components/Skeleton/index.d.ts +18 -0
- package/dist/components/Skeleton/index.js +73 -0
- package/dist/components/Skeleton/skeleton.styles.d.ts +14 -0
- package/dist/components/Skeleton/skeleton.styles.js +43 -0
- package/dist/components/Strips/index.d.ts +2 -1
- package/dist/components/Strips/index.js +3 -3
- package/dist/components/Swatch/index.d.ts +2 -1
- package/dist/components/Swatch/index.js +3 -3
- package/dist/components/Switch/index.d.ts +2 -1
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/TextInput/index.d.ts +2 -1
- package/dist/components/TextInput/index.js +2 -2
- package/dist/components/Tiles/index.d.ts +2 -1
- package/dist/components/Tiles/index.js +3 -3
- package/dist/components/TilesGroup/index.d.ts +2 -1
- package/dist/components/TilesGroup/index.js +3 -3
- package/dist/components/Upload/index.d.ts +2 -1
- package/dist/components/Upload/index.js +2 -2
- package/dist/components/UploadArea/index.d.ts +2 -1
- package/dist/components/UploadArea/index.js +2 -2
- package/dist/components/formComponents.d.ts +12 -0
- package/dist/components/formComponents.js +5 -5
- package/dist/constants.d.ts +0 -22
- package/dist/constants.js +1 -23
- package/dist/hooks/useFirstPlayerInteraction/index.d.ts +6 -0
- package/dist/hooks/useFirstPlayerInteraction/index.js +9 -0
- package/dist/hooks/useLoadingProgress/index.d.ts +1 -1
- package/dist/hooks/useSingleAnimation/index.js +15 -14
- package/dist/http/orders.d.ts +6 -8
- package/dist/icons/Draggable.d.ts +3 -0
- package/dist/icons/Draggable.js +23 -0
- package/dist/icons/index.js +2 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +12 -2
- package/dist/store/product.js +3 -1
- package/dist/store/treble.d.ts +5 -2
- package/dist/store/treble.js +30 -3
- package/dist/types.d.ts +71 -24
- package/dist/types.js +54 -0
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +5 -4
- package/package.json +3 -1
- package/dist/Treble/Snapshots.js +0 -250
- package/dist/Treble/Wishlist.js +0 -136
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ShimmerProps {
|
|
2
|
+
shimmer?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const ShimmerDiv: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
5
|
+
export declare const SkeletonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
6
|
+
export declare const FormHeaderWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
7
|
+
export declare const FormDescriptionWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
8
|
+
export declare const TitleWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
9
|
+
export declare const DescriptionWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
10
|
+
export declare const RowWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const SwatchItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ShimmerProps, never>;
|
|
12
|
+
export declare const StripsItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const CardItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.CardItem = exports.StripsItem = exports.SwatchItem = exports.RowWrapper = exports.DescriptionWrapper = exports.TitleWrapper = exports.FormDescriptionWrapper = exports.FormHeaderWrapper = exports.SkeletonWrapper = exports.ShimmerDiv = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
var shimmer = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n background-position: -468px 0;\n }\n \n 100% {\n background-position: 468px 0; \n }\n"], ["\n 0% {\n background-position: -468px 0;\n }\n \n 100% {\n background-position: 468px 0; \n }\n"])));
|
|
33
|
+
exports.ShimmerDiv = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: #d9d9d9;\n background-image: linear-gradient(\n to right,\n #d9d9d9 0%,\n #c9c9c9 20%,\n #d9d9d9 40%,\n #d9d9d9 100%\n );\n background-repeat: no-repeat;\n background-size: 800px 140px;\n\n animation-duration: 1.4s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n"], ["\n background: #d9d9d9;\n background-image: linear-gradient(\n to right,\n #d9d9d9 0%,\n #c9c9c9 20%,\n #d9d9d9 40%,\n #d9d9d9 100%\n );\n background-repeat: no-repeat;\n background-size: 800px 140px;\n\n animation-duration: 1.4s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n"])), shimmer);
|
|
34
|
+
exports.SkeletonWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 32px 0 32px 0;\n\n ", " {\n ", "\n }\n"], ["\n margin: 32px 0 32px 0;\n\n ", " {\n ", "\n }\n"])), exports.ShimmerDiv, function (props) { return (props.shimmer ? '' : "background: #d9d9d9;"); });
|
|
35
|
+
exports.FormHeaderWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n & > div:nth-child(1) {\n height: 32px;\n width: 400px;\n border-radius: 2px;\n margin-bottom: 10px;\n ", "\n }\n\n & > div:nth-child(2) {\n height: 20px;\n width: 250px;\n border-radius: 2px;\n ", "\n }\n"], ["\n & > div:nth-child(1) {\n height: 32px;\n width: 400px;\n border-radius: 2px;\n margin-bottom: 10px;\n ", "\n }\n\n & > div:nth-child(2) {\n height: 20px;\n width: 250px;\n border-radius: 2px;\n ", "\n }\n"])), function (props) { return (props.shimmer ? '' : "background: #d9d9d9;"); }, function (props) { return (props.shimmer ? '' : "background: #d9d9d9;"); });
|
|
36
|
+
exports.FormDescriptionWrapper = (0, styled_components_1.default)(exports.ShimmerDiv)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 100%;\n max-width: 440px;\n height: 62px;\n border-radius: 2px;\n margin: 32px 0;\n\n background-size: 800px 62px;\n ", "\n"], ["\n width: 100%;\n max-width: 440px;\n height: 62px;\n border-radius: 2px;\n margin: 32px 0;\n\n background-size: 800px 62px;\n ", "\n"])), function (props) { return (props.shimmer ? '' : "background: #d9d9d9;"); });
|
|
37
|
+
exports.TitleWrapper = (0, styled_components_1.default)(exports.ShimmerDiv)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius: 2px;\n margin-bottom: 8px;\n height: 32px;\n width: 200px;\n ", "\n"], ["\n border-radius: 2px;\n margin-bottom: 8px;\n height: 32px;\n width: 200px;\n ", "\n"])), function (props) { return (props.shimmer ? '' : "background: #d9d9d9;"); });
|
|
38
|
+
exports.DescriptionWrapper = (0, styled_components_1.default)(exports.ShimmerDiv)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 2px;\n margin-bottom: 8px;\n height: 20px;\n width: 250px;\n ", "\n"], ["\n border-radius: 2px;\n margin-bottom: 8px;\n height: 20px;\n width: 250px;\n ", "\n"])), function (props) { return (props.shimmer ? '' : "background: #d9d9d9;"); });
|
|
39
|
+
exports.RowWrapper = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n\n & > div {\n margin-right: 12px;\n }\n\n & > div:last-child {\n margin-right: 0;\n }\n"], ["\n display: flex;\n flex-direction: row;\n\n & > div {\n margin-right: 12px;\n }\n\n & > div:last-child {\n margin-right: 0;\n }\n"])));
|
|
40
|
+
exports.SwatchItem = (0, styled_components_1.default)(exports.ShimmerDiv)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 40px;\n width: 40px;\n border-radius: 50%;\n"], ["\n height: 40px;\n width: 40px;\n border-radius: 50%;\n"])));
|
|
41
|
+
exports.StripsItem = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n height: max-content;\n width: 440px;\n border-radius: 2px;\n background: #d9d9d94d;\n padding: 8px;\n margin-bottom: 10px;\n\n display: grid;\n grid-template-columns: max-content auto max-content;\n grid-gap: 12px;\n\n & > div:nth-child(1) {\n height: 48px;\n width: 48px;\n border-radius: 2px;\n }\n\n & > div:nth-child(2) {\n & > div:nth-child(1) {\n height: 20px;\n width: 220px;\n margin-bottom: 6px;\n border-radius: 2px;\n }\n\n & > div:nth-child(2) {\n height: 20px;\n width: 170px;\n border-radius: 2px;\n }\n }\n\n & > div:nth-child(3) {\n height: 100%;\n display: flex;\n justify-content: space-around;\n flex-direction: column;\n\n & > div {\n height: 20px;\n width: 61px;\n border-radius: 2px;\n }\n }\n"], ["\n height: max-content;\n width: 440px;\n border-radius: 2px;\n background: #d9d9d94d;\n padding: 8px;\n margin-bottom: 10px;\n\n display: grid;\n grid-template-columns: max-content auto max-content;\n grid-gap: 12px;\n\n & > div:nth-child(1) {\n height: 48px;\n width: 48px;\n border-radius: 2px;\n }\n\n & > div:nth-child(2) {\n & > div:nth-child(1) {\n height: 20px;\n width: 220px;\n margin-bottom: 6px;\n border-radius: 2px;\n }\n\n & > div:nth-child(2) {\n height: 20px;\n width: 170px;\n border-radius: 2px;\n }\n }\n\n & > div:nth-child(3) {\n height: 100%;\n display: flex;\n justify-content: space-around;\n flex-direction: column;\n\n & > div {\n height: 20px;\n width: 61px;\n border-radius: 2px;\n }\n }\n"])));
|
|
42
|
+
exports.CardItem = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n height: max-content;\n width: max-content;\n border-radius: 2px;\n background: #d9d9d94d;\n padding: 22px 12px;\n\n & > div:nth-child(1) {\n height: 110px;\n width: 110px;\n margin-bottom: 6px;\n }\n\n & > div:nth-child(2) {\n height: 20px;\n width: 110px;\n margin-bottom: 6px;\n border-radius: 2px;\n }\n\n & > div:nth-child(3) {\n height: 20px;\n width: 72px;\n border-radius: 2px;\n }\n"], ["\n height: max-content;\n width: max-content;\n border-radius: 2px;\n background: #d9d9d94d;\n padding: 22px 12px;\n\n & > div:nth-child(1) {\n height: 110px;\n width: 110px;\n margin-bottom: 6px;\n }\n\n & > div:nth-child(2) {\n height: 20px;\n width: 110px;\n margin-bottom: 6px;\n border-radius: 2px;\n }\n\n & > div:nth-child(3) {\n height: 20px;\n width: 72px;\n border-radius: 2px;\n }\n"])));
|
|
43
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
3
4
|
import { IFormComponentProps, IOption } from '../containers/formInputContainer';
|
|
4
5
|
export interface IStrips extends IFormComponentProps<IOption> {
|
|
5
6
|
showThumbnail?: boolean;
|
|
@@ -46,7 +47,7 @@ export declare const Strips: {
|
|
|
46
47
|
onClick: undefined;
|
|
47
48
|
};
|
|
48
49
|
componentName: string;
|
|
49
|
-
compatibleAttributes: Set<
|
|
50
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
50
51
|
};
|
|
51
52
|
declare const _default: (props: IStrips) => JSX.Element | null;
|
|
52
53
|
export default _default;
|
|
@@ -11,7 +11,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
|
|
|
11
11
|
var strips_styles_1 = require("./strips.styles");
|
|
12
12
|
var shared_styles_1 = require("../shared.styles");
|
|
13
13
|
var utils_1 = require("../../utils");
|
|
14
|
-
var
|
|
14
|
+
var types_1 = require("../../types");
|
|
15
15
|
var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
|
|
16
16
|
var Thumbnail = function (props) {
|
|
17
17
|
var imageUrl = props.imageUrl, color = props.color, name = props.name, className = props.className;
|
|
@@ -100,7 +100,7 @@ exports.Strips.defaultProps = {
|
|
|
100
100
|
};
|
|
101
101
|
exports.Strips.componentName = 'strips';
|
|
102
102
|
exports.Strips.compatibleAttributes = new Set([
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
types_1.ATTRIBUTE_TYPES.ASSET,
|
|
104
|
+
types_1.ATTRIBUTE_TYPES.STRING,
|
|
105
105
|
]);
|
|
106
106
|
exports.default = (0, formInputContainer_1.default)(exports.Strips);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
3
4
|
import { IFormComponentProps, IOption } from '../containers/formInputContainer';
|
|
4
5
|
export interface ISwatch extends IFormComponentProps<IOption> {
|
|
5
6
|
showThumbnail?: boolean;
|
|
@@ -51,7 +52,7 @@ export declare const Swatch: {
|
|
|
51
52
|
onClick: undefined;
|
|
52
53
|
};
|
|
53
54
|
componentName: string;
|
|
54
|
-
compatibleAttributes: Set<
|
|
55
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
55
56
|
};
|
|
56
57
|
declare const _default: (props: ISwatch) => JSX.Element | null;
|
|
57
58
|
export default _default;
|
|
@@ -11,7 +11,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
|
|
|
11
11
|
var swatch_styles_1 = require("./swatch.styles");
|
|
12
12
|
var shared_styles_1 = require("../shared.styles");
|
|
13
13
|
var utils_1 = require("../../utils");
|
|
14
|
-
var
|
|
14
|
+
var types_1 = require("../../types");
|
|
15
15
|
var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
|
|
16
16
|
var SwatchInfo = function (props) {
|
|
17
17
|
var title = props.title, price = props.price, description = props.description;
|
|
@@ -94,7 +94,7 @@ exports.Swatch.defaultProps = {
|
|
|
94
94
|
};
|
|
95
95
|
exports.Swatch.componentName = 'swatch';
|
|
96
96
|
exports.Swatch.compatibleAttributes = new Set([
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
types_1.ATTRIBUTE_TYPES.ASSET,
|
|
98
|
+
types_1.ATTRIBUTE_TYPES.STRING,
|
|
99
99
|
]);
|
|
100
100
|
exports.default = (0, formInputContainer_1.default)(exports.Swatch);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
3
4
|
import { IFormComponentProps, IOption } from '../containers/formInputContainer';
|
|
4
5
|
export interface ISwitch extends IFormComponentProps<IOption> {
|
|
5
6
|
showDescription?: boolean;
|
|
@@ -27,7 +28,7 @@ export declare const Switch: {
|
|
|
27
28
|
onClick: undefined;
|
|
28
29
|
};
|
|
29
30
|
componentName: string;
|
|
30
|
-
compatibleAttributes: Set<
|
|
31
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
31
32
|
};
|
|
32
33
|
declare const _default: (props: ISwitch) => JSX.Element | null;
|
|
33
34
|
export default _default;
|
|
@@ -11,7 +11,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
|
|
|
11
11
|
var switch_styles_1 = require("./switch.styles");
|
|
12
12
|
var shared_styles_1 = require("../shared.styles");
|
|
13
13
|
var utils_1 = require("../../utils");
|
|
14
|
-
var
|
|
14
|
+
var types_1 = require("../../types");
|
|
15
15
|
var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
|
|
16
16
|
var Switch = function (props) {
|
|
17
17
|
var title = props.title, value = props.value, onChange = props.onChange, description = props.description, customClassName = props.className, showDescription = props.showDescription;
|
|
@@ -46,5 +46,5 @@ exports.Switch.defaultProps = {
|
|
|
46
46
|
onClick: undefined,
|
|
47
47
|
};
|
|
48
48
|
exports.Switch.componentName = 'Switch';
|
|
49
|
-
exports.Switch.compatibleAttributes = new Set([
|
|
49
|
+
exports.Switch.compatibleAttributes = new Set([types_1.ATTRIBUTE_TYPES.BOOLEAN]);
|
|
50
50
|
exports.default = (0, formInputContainer_1.default)(exports.Switch);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
2
3
|
import { IFormComponentProps } from '../containers/formInputContainer';
|
|
3
4
|
export interface ITextInput extends IFormComponentProps<undefined> {
|
|
4
5
|
maxLength?: number;
|
|
@@ -6,7 +7,7 @@ export interface ITextInput extends IFormComponentProps<undefined> {
|
|
|
6
7
|
export declare const TextInput: {
|
|
7
8
|
(props: ITextInput): JSX.Element;
|
|
8
9
|
componentName: string;
|
|
9
|
-
compatibleAttributes: Set<
|
|
10
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: (props: ITextInput) => JSX.Element | null;
|
|
12
13
|
export default _default;
|
|
@@ -10,7 +10,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
|
|
|
10
10
|
var textInput_styles_1 = require("./textInput.styles");
|
|
11
11
|
var shared_styles_1 = require("../shared.styles");
|
|
12
12
|
var utils_1 = require("../../utils");
|
|
13
|
-
var
|
|
13
|
+
var types_1 = require("../../types");
|
|
14
14
|
var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
|
|
15
15
|
var TextInput = function (props) {
|
|
16
16
|
var title = props.title, description = props.description, value = props.value, onChange = props.onChange, maxLength = props.maxLength, customClassName = props.className;
|
|
@@ -24,5 +24,5 @@ var TextInput = function (props) {
|
|
|
24
24
|
};
|
|
25
25
|
exports.TextInput = TextInput;
|
|
26
26
|
exports.TextInput.componentName = 'text-input';
|
|
27
|
-
exports.TextInput.compatibleAttributes = new Set([
|
|
27
|
+
exports.TextInput.compatibleAttributes = new Set([types_1.ATTRIBUTE_TYPES.STRING]);
|
|
28
28
|
exports.default = (0, formInputContainer_1.default)(exports.TextInput);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
3
4
|
import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
|
|
4
5
|
export interface ITiles extends IFormComponentProps<IOptionShared> {
|
|
5
6
|
columns?: number;
|
|
@@ -32,7 +33,7 @@ export declare const Tiles: {
|
|
|
32
33
|
onClick: undefined;
|
|
33
34
|
};
|
|
34
35
|
componentName: string;
|
|
35
|
-
compatibleAttributes: Set<
|
|
36
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
36
37
|
};
|
|
37
38
|
declare const _default: (props: ITiles) => JSX.Element | null;
|
|
38
39
|
export default _default;
|
|
@@ -11,7 +11,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
|
|
|
11
11
|
var tiles_styles_1 = require("./tiles.styles");
|
|
12
12
|
var shared_styles_1 = require("../shared.styles");
|
|
13
13
|
var utils_1 = require("../../utils");
|
|
14
|
-
var
|
|
14
|
+
var types_1 = require("../../types");
|
|
15
15
|
var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
|
|
16
16
|
var Tiles = function (props) {
|
|
17
17
|
var _a = Object.assign({ columns: 2 }, props), title = _a.title, description = _a.description, options = _a.options, customClassName = _a.className, columns = _a.columns;
|
|
@@ -54,7 +54,7 @@ exports.Tiles.defaultProps = {
|
|
|
54
54
|
};
|
|
55
55
|
exports.Tiles.componentName = 'tiles';
|
|
56
56
|
exports.Tiles.compatibleAttributes = new Set([
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
types_1.ATTRIBUTE_TYPES.ASSET,
|
|
58
|
+
types_1.ATTRIBUTE_TYPES.STRING,
|
|
59
59
|
]);
|
|
60
60
|
exports.default = (0, formInputContainer_1.default)(exports.Tiles);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
3
4
|
import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
|
|
4
5
|
export interface ITilesGroup extends IFormComponentProps<IOptionShared> {
|
|
5
6
|
columns?: number;
|
|
@@ -30,7 +31,7 @@ export declare const TilesGroup: {
|
|
|
30
31
|
onClick: undefined;
|
|
31
32
|
};
|
|
32
33
|
componentName: string;
|
|
33
|
-
compatibleAttributes: Set<
|
|
34
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
34
35
|
};
|
|
35
36
|
declare const _default: (props: ITilesGroup) => JSX.Element | null;
|
|
36
37
|
export default _default;
|
|
@@ -11,7 +11,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
|
|
|
11
11
|
var tilesGroup_styles_1 = require("./tilesGroup.styles");
|
|
12
12
|
var shared_styles_1 = require("../shared.styles");
|
|
13
13
|
var utils_1 = require("../../utils");
|
|
14
|
-
var
|
|
14
|
+
var types_1 = require("../../types");
|
|
15
15
|
var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
|
|
16
16
|
var TilesGroup = function (props) {
|
|
17
17
|
var _a = Object.assign({ stretch: true }, props), stretch = _a.stretch, title = _a.title, description = _a.description, options = _a.options, customClassName = _a.className;
|
|
@@ -52,7 +52,7 @@ exports.TilesGroup.defaultProps = {
|
|
|
52
52
|
};
|
|
53
53
|
exports.TilesGroup.componentName = 'tiles-group';
|
|
54
54
|
exports.TilesGroup.compatibleAttributes = new Set([
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
types_1.ATTRIBUTE_TYPES.ASSET,
|
|
56
|
+
types_1.ATTRIBUTE_TYPES.STRING,
|
|
57
57
|
]);
|
|
58
58
|
exports.default = (0, formInputContainer_1.default)(exports.TilesGroup);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
2
3
|
import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
|
|
3
4
|
export interface IUpload extends Pick<IFormComponentProps<IOptionShared>, 'title' | 'description' | 'className' | 'value'> {
|
|
4
5
|
onChange: (file: File | undefined) => Promise<void>;
|
|
@@ -6,7 +7,7 @@ export interface IUpload extends Pick<IFormComponentProps<IOptionShared>, 'title
|
|
|
6
7
|
export declare const Upload: {
|
|
7
8
|
(props: IUpload): JSX.Element;
|
|
8
9
|
componentName: string;
|
|
9
|
-
compatibleAttributes: Set<
|
|
10
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: (props: IUpload) => JSX.Element | null;
|
|
12
13
|
export default _default;
|
|
@@ -64,10 +64,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
65
|
exports.Upload = void 0;
|
|
66
66
|
var react_1 = __importStar(require("react"));
|
|
67
|
-
var constants_1 = require("../../constants");
|
|
68
67
|
var FormComponentTitle_1 = __importDefault(require("../FormComponentTitle"));
|
|
69
68
|
var FormComponentDescription_1 = __importDefault(require("../FormComponentDescription"));
|
|
70
69
|
var shared_styles_1 = require("../shared.styles");
|
|
70
|
+
var types_1 = require("../../types");
|
|
71
71
|
var utils_1 = require("../../utils");
|
|
72
72
|
var Spinner_1 = __importDefault(require("../../icons/Spinner"));
|
|
73
73
|
var Add_1 = __importDefault(require("../../icons/Add"));
|
|
@@ -142,5 +142,5 @@ var Upload = function (props) {
|
|
|
142
142
|
};
|
|
143
143
|
exports.Upload = Upload;
|
|
144
144
|
exports.Upload.componentName = 'upload';
|
|
145
|
-
exports.Upload.compatibleAttributes = new Set([
|
|
145
|
+
exports.Upload.compatibleAttributes = new Set([types_1.ATTRIBUTE_TYPES.ASSET]);
|
|
146
146
|
exports.default = (0, formInputContainer_1.default)(exports.Upload);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ATTRIBUTE_TYPES } from '../../types';
|
|
2
3
|
import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
|
|
3
4
|
export interface IUpload extends Pick<IFormComponentProps<IOptionShared>, 'title' | 'description' | 'className' | 'value'> {
|
|
4
5
|
onChange: (file: File) => Promise<void>;
|
|
@@ -6,7 +7,7 @@ export interface IUpload extends Pick<IFormComponentProps<IOptionShared>, 'title
|
|
|
6
7
|
export declare const UploadArea: {
|
|
7
8
|
(props: IUpload): JSX.Element;
|
|
8
9
|
componentName: string;
|
|
9
|
-
compatibleAttributes: Set<
|
|
10
|
+
compatibleAttributes: Set<ATTRIBUTE_TYPES>;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: (props: IUpload) => JSX.Element | null;
|
|
12
13
|
export default _default;
|
|
@@ -64,10 +64,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
65
|
exports.UploadArea = void 0;
|
|
66
66
|
var react_1 = __importStar(require("react"));
|
|
67
|
-
var constants_1 = require("../../constants");
|
|
68
67
|
var FormComponentTitle_1 = __importDefault(require("../FormComponentTitle"));
|
|
69
68
|
var FormComponentDescription_1 = __importDefault(require("../FormComponentDescription"));
|
|
70
69
|
var shared_styles_1 = require("../shared.styles");
|
|
70
|
+
var types_1 = require("../../types");
|
|
71
71
|
var utils_1 = require("../../utils");
|
|
72
72
|
var Spinner_1 = __importDefault(require("../../icons/Spinner"));
|
|
73
73
|
var Image_1 = __importDefault(require("../../icons/Image"));
|
|
@@ -137,5 +137,5 @@ var UploadArea = function (props) {
|
|
|
137
137
|
};
|
|
138
138
|
exports.UploadArea = UploadArea;
|
|
139
139
|
exports.UploadArea.componentName = 'upload-area';
|
|
140
|
-
exports.UploadArea.compatibleAttributes = new Set([
|
|
140
|
+
exports.UploadArea.compatibleAttributes = new Set([types_1.ATTRIBUTE_TYPES.ASSET]);
|
|
141
141
|
exports.default = (0, formInputContainer_1.default)(exports.UploadArea);
|
|
@@ -8,5 +8,17 @@ export declare const formComponents: {
|
|
|
8
8
|
} | {
|
|
9
9
|
[x: string]: (props: import("./Upload").IUpload) => JSX.Element | null;
|
|
10
10
|
};
|
|
11
|
+
Asset: {
|
|
12
|
+
[x: string]: ((props: import("./Cards").ICards) => JSX.Element | null) | ((props: import("./Tiles").ITiles) => JSX.Element | null);
|
|
13
|
+
};
|
|
14
|
+
String: {
|
|
15
|
+
[x: string]: ((props: import("./Cards").ICards) => JSX.Element | null) | ((props: import("./Tiles").ITiles) => JSX.Element | null) | ((props: import("./TextInput").ITextInput) => JSX.Element | null);
|
|
16
|
+
};
|
|
17
|
+
upload: {
|
|
18
|
+
[x: string]: (props: import("./Upload").IUpload) => JSX.Element | null;
|
|
19
|
+
};
|
|
20
|
+
Boolean: {
|
|
21
|
+
[x: string]: (props: import("./Switch").ISwitch) => JSX.Element | null;
|
|
22
|
+
};
|
|
11
23
|
};
|
|
12
24
|
export default formComponents;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
var _a, _b, _c, _d, _e, _f;
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.formComponents = exports.FORM_COMPONENT_TYPES = void 0;
|
|
28
|
-
var
|
|
28
|
+
var types_1 = require("../types");
|
|
29
29
|
var Cards_1 = __importStar(require("./Cards"));
|
|
30
30
|
var Dropdown_1 = __importStar(require("./Dropdown"));
|
|
31
31
|
var Strips_1 = __importStar(require("./Strips"));
|
|
@@ -39,7 +39,7 @@ exports.FORM_COMPONENT_TYPES = {
|
|
|
39
39
|
stringInput: 'string-input',
|
|
40
40
|
};
|
|
41
41
|
exports.formComponents = (_a = {},
|
|
42
|
-
_a[
|
|
42
|
+
_a[types_1.ATTRIBUTE_TYPES.ASSET] = (_b = {},
|
|
43
43
|
_b[Strips_1.Strips.componentName] = Strips_1.default,
|
|
44
44
|
_b[Cards_1.Cards.componentName] = Cards_1.default,
|
|
45
45
|
_b[Dropdown_1.Dropdown.componentName] = Dropdown_1.default,
|
|
@@ -47,7 +47,7 @@ exports.formComponents = (_a = {},
|
|
|
47
47
|
_b[Tiles_1.Tiles.componentName] = Tiles_1.default,
|
|
48
48
|
_b[TilesGroup_1.TilesGroup.componentName] = TilesGroup_1.default,
|
|
49
49
|
_b),
|
|
50
|
-
_a[
|
|
50
|
+
_a[types_1.ATTRIBUTE_TYPES.STRING] = (_c = {},
|
|
51
51
|
_c[Tiles_1.Tiles.componentName] = Tiles_1.default,
|
|
52
52
|
_c[Dropdown_1.Dropdown.componentName] = Dropdown_1.default,
|
|
53
53
|
_c[Cards_1.Cards.componentName] = Cards_1.default,
|
|
@@ -59,10 +59,10 @@ exports.formComponents = (_a = {},
|
|
|
59
59
|
_a[exports.FORM_COMPONENT_TYPES.stringInput] = (_d = {},
|
|
60
60
|
_d[TextInput_1.TextInput.componentName] = TextInput_1.default,
|
|
61
61
|
_d),
|
|
62
|
-
_a[
|
|
62
|
+
_a[types_1.ASSET_TYPES.UPLOAD] = (_e = {},
|
|
63
63
|
_e[Upload_1.Upload.componentName] = Upload_1.default,
|
|
64
64
|
_e),
|
|
65
|
-
_a[
|
|
65
|
+
_a[types_1.ATTRIBUTE_TYPES.BOOLEAN] = (_f = {},
|
|
66
66
|
_f[Switch_1.Switch.componentName] = Switch_1.default,
|
|
67
67
|
_f),
|
|
68
68
|
_a);
|
package/dist/constants.d.ts
CHANGED
|
@@ -20,17 +20,6 @@ export declare const DEFAULT_PLAYER_CONFIG: {
|
|
|
20
20
|
showShare: boolean;
|
|
21
21
|
allowMobileVerticalOrbit: boolean;
|
|
22
22
|
};
|
|
23
|
-
export declare const ATTRIBUTE_TYPES: {
|
|
24
|
-
asset: string;
|
|
25
|
-
string: string;
|
|
26
|
-
number: string;
|
|
27
|
-
color: string;
|
|
28
|
-
boolean: string;
|
|
29
|
-
};
|
|
30
|
-
export declare const ASSET_TYPES: {
|
|
31
|
-
item: string;
|
|
32
|
-
upload: string;
|
|
33
|
-
};
|
|
34
23
|
export declare const SORT_OPTIONS: {
|
|
35
24
|
ascending: string;
|
|
36
25
|
descending: string;
|
|
@@ -49,17 +38,6 @@ export declare const METADATA_RESERVED: {
|
|
|
49
38
|
rotate: string;
|
|
50
39
|
scale: string;
|
|
51
40
|
};
|
|
52
|
-
export declare const SNAPSHOT_FORMATS: {
|
|
53
|
-
png: string;
|
|
54
|
-
jpeg: string;
|
|
55
|
-
};
|
|
56
|
-
export declare const SNAPSHOT_OUTPUTS: {
|
|
57
|
-
url: string;
|
|
58
|
-
download: string;
|
|
59
|
-
dataUrl: string;
|
|
60
|
-
blob: string;
|
|
61
|
-
file: string;
|
|
62
|
-
};
|
|
63
41
|
export declare const WISHLIST_LOCALSTORAGE_KEY = "tk_wishlist";
|
|
64
42
|
export declare const DATATABLE_FORMATS: {
|
|
65
43
|
csv: string;
|
package/dist/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DATATABLE_FORMATS = exports.WISHLIST_LOCALSTORAGE_KEY = exports.
|
|
4
|
+
exports.DATATABLE_FORMATS = exports.WISHLIST_LOCALSTORAGE_KEY = exports.METADATA_RESERVED = exports.ATTRIBUTES_RESERVED = exports.SORT_OPTIONS = exports.DEFAULT_PLAYER_CONFIG = exports.TK_PLAYER_ROOT_DIV = exports.TK_PLAYER_LOADER_DIV = exports.TK_SAVED_CONFIG_PARAM_KEY = exports.TK_PRODUCT_ID_PARAM_KEY = exports.IS_TREBLE_SCRIPTS = exports.FORM_CLASS_NAME = exports.DISPLAY_CLASS_NAME = exports.TOOL_CLASS_NAME = exports.LAYOUT_CLASS_NAME = exports.WIDGET_CLASS_NAME = exports.INPUT_COMPONENT_CLASS_NAME = exports.CLASS_NAME_PREFIX = exports.DEFAULT_CLASS_NAME = exports.TREBLE_DEBUG = void 0;
|
|
5
5
|
exports.TREBLE_DEBUG = !!process.env.TREBLE_DEBUG;
|
|
6
6
|
exports.DEFAULT_CLASS_NAME = 'threekit-react';
|
|
7
7
|
exports.CLASS_NAME_PREFIX = 'tk';
|
|
@@ -24,17 +24,6 @@ exports.DEFAULT_PLAYER_CONFIG = {
|
|
|
24
24
|
showShare: false,
|
|
25
25
|
allowMobileVerticalOrbit: false,
|
|
26
26
|
};
|
|
27
|
-
exports.ATTRIBUTE_TYPES = {
|
|
28
|
-
asset: 'Asset',
|
|
29
|
-
string: 'String',
|
|
30
|
-
number: 'Number',
|
|
31
|
-
color: 'Color',
|
|
32
|
-
boolean: 'Boolean',
|
|
33
|
-
};
|
|
34
|
-
exports.ASSET_TYPES = {
|
|
35
|
-
item: 'item',
|
|
36
|
-
upload: 'upload',
|
|
37
|
-
};
|
|
38
27
|
exports.SORT_OPTIONS = {
|
|
39
28
|
ascending: 'ascending',
|
|
40
29
|
descending: 'descending',
|
|
@@ -53,17 +42,6 @@ exports.METADATA_RESERVED = {
|
|
|
53
42
|
rotate: '_rotate',
|
|
54
43
|
scale: '_scale',
|
|
55
44
|
};
|
|
56
|
-
exports.SNAPSHOT_FORMATS = {
|
|
57
|
-
png: 'png',
|
|
58
|
-
jpeg: 'jpeg',
|
|
59
|
-
};
|
|
60
|
-
exports.SNAPSHOT_OUTPUTS = {
|
|
61
|
-
url: 'url',
|
|
62
|
-
download: 'download',
|
|
63
|
-
dataUrl: 'dataUrl',
|
|
64
|
-
blob: 'blob',
|
|
65
|
-
file: 'file',
|
|
66
|
-
};
|
|
67
45
|
exports.WISHLIST_LOCALSTORAGE_KEY = 'tk_wishlist';
|
|
68
46
|
exports.DATATABLE_FORMATS = {
|
|
69
47
|
csv: 'csv',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var store_1 = require("../../store");
|
|
4
|
+
var treble_1 = require("../../store/treble");
|
|
5
|
+
var useFirstPlayerInteraction = function () {
|
|
6
|
+
var awaitingFirstInteraction = (0, store_1.useThreekitSelector)(treble_1.getPlayerInteraction);
|
|
7
|
+
return awaitingFirstInteraction;
|
|
8
|
+
};
|
|
9
|
+
exports.default = useFirstPlayerInteraction;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useLoadingProgress: () => number;
|
|
1
|
+
declare const useLoadingProgress: () => number | undefined;
|
|
2
2
|
export default useLoadingProgress;
|
|
@@ -53,6 +53,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
53
53
|
var react_1 = require("react");
|
|
54
54
|
var useThreekitInitStatus_1 = __importDefault(require("../useThreekitInitStatus"));
|
|
55
55
|
var utils_1 = require("../../utils");
|
|
56
|
+
var types_1 = require("../../types");
|
|
56
57
|
var prepAnimateConfig = function (config) {
|
|
57
58
|
return new Promise(function (resolve) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
59
|
var totalDuration, player, assetId, nodesRaw, nodes;
|
|
@@ -60,10 +61,10 @@ var prepAnimateConfig = function (config) {
|
|
|
60
61
|
switch (_a.label) {
|
|
61
62
|
case 0:
|
|
62
63
|
totalDuration = config.duration * 1000 || 0;
|
|
63
|
-
player = window.threekit.player.enableApi(
|
|
64
|
+
player = window.threekit.player.enableApi(types_1.PRIVATE_APIS.PLAYER);
|
|
64
65
|
return [4, player.getAssetInstance(window.threekit.player.scene.find({
|
|
65
66
|
id: window.threekit.player.instanceId,
|
|
66
|
-
plug:
|
|
67
|
+
plug: types_1.PLUG_TYPES.PROXY,
|
|
67
68
|
property: 'asset',
|
|
68
69
|
}))];
|
|
69
70
|
case 1:
|
|
@@ -81,8 +82,8 @@ var prepAnimateConfig = function (config) {
|
|
|
81
82
|
window.threekit.player.scene.get({
|
|
82
83
|
from: assetId,
|
|
83
84
|
id: nodeId,
|
|
84
|
-
plug:
|
|
85
|
-
property:
|
|
85
|
+
plug: types_1.PLUG_TYPES.TRANSFORM,
|
|
86
|
+
property: types_1.TRANSFORM_PROPERTY_TYPES.TRANSLATION,
|
|
86
87
|
}),
|
|
87
88
|
Object.assign({ x: 0, y: 0, z: 0 }, nodeData.translation),
|
|
88
89
|
],
|
|
@@ -93,8 +94,8 @@ var prepAnimateConfig = function (config) {
|
|
|
93
94
|
window.threekit.player.scene.get({
|
|
94
95
|
from: assetId,
|
|
95
96
|
id: nodeId,
|
|
96
|
-
plug:
|
|
97
|
-
property:
|
|
97
|
+
plug: types_1.PLUG_TYPES.TRANSFORM,
|
|
98
|
+
property: types_1.TRANSFORM_PROPERTY_TYPES.ROTATION,
|
|
98
99
|
}),
|
|
99
100
|
Object.assign({ x: 0, y: 0, z: 0 }, nodeData.rotation),
|
|
100
101
|
],
|
|
@@ -105,8 +106,8 @@ var prepAnimateConfig = function (config) {
|
|
|
105
106
|
window.threekit.player.scene.get({
|
|
106
107
|
from: assetId,
|
|
107
108
|
id: nodeId,
|
|
108
|
-
plug:
|
|
109
|
-
property:
|
|
109
|
+
plug: types_1.PLUG_TYPES.TRANSFORM,
|
|
110
|
+
property: types_1.TRANSFORM_PROPERTY_TYPES.SCALE,
|
|
110
111
|
}),
|
|
111
112
|
Object.assign({ x: 0, y: 0, z: 0 }, nodeData.scale),
|
|
112
113
|
],
|
|
@@ -184,8 +185,8 @@ var useAnimation = function (animationConfig) {
|
|
|
184
185
|
window.threekit.player.scene.set({
|
|
185
186
|
from: ref.current.assetId,
|
|
186
187
|
id: nodeConfig.nodeId,
|
|
187
|
-
plug:
|
|
188
|
-
property:
|
|
188
|
+
plug: types_1.PLUG_TYPES.TRANSFORM,
|
|
189
|
+
property: types_1.TRANSFORM_PROPERTY_TYPES.TRANSLATION,
|
|
189
190
|
}, translation);
|
|
190
191
|
}
|
|
191
192
|
if ('rotation' in nodeConfig) {
|
|
@@ -202,8 +203,8 @@ var useAnimation = function (animationConfig) {
|
|
|
202
203
|
window.threekit.player.scene.set({
|
|
203
204
|
from: ref.current.assetId,
|
|
204
205
|
id: nodeConfig.nodeId,
|
|
205
|
-
plug:
|
|
206
|
-
property:
|
|
206
|
+
plug: types_1.PLUG_TYPES.TRANSFORM,
|
|
207
|
+
property: types_1.TRANSFORM_PROPERTY_TYPES.ROTATION,
|
|
207
208
|
}, rotation);
|
|
208
209
|
}
|
|
209
210
|
if ('scale' in nodeConfig) {
|
|
@@ -220,8 +221,8 @@ var useAnimation = function (animationConfig) {
|
|
|
220
221
|
window.threekit.player.scene.set({
|
|
221
222
|
from: ref.current.assetId,
|
|
222
223
|
id: nodeConfig.nodeId,
|
|
223
|
-
plug:
|
|
224
|
-
property:
|
|
224
|
+
plug: types_1.PLUG_TYPES.TRANSFORM,
|
|
225
|
+
property: types_1.TRANSFORM_PROPERTY_TYPES.SCALE,
|
|
225
226
|
}, scale);
|
|
226
227
|
}
|
|
227
228
|
});
|