@threekit-tools/treble 0.0.90-next-01 → 0.0.90-next-02
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/hooks/useAnimationStart/index.d.ts +2 -0
- package/dist/hooks/useAnimationStart/index.js +8 -0
- package/dist/hooks/usePlayerLoadingStatus/index.d.ts +2 -0
- package/dist/hooks/usePlayerLoadingStatus/index.js +8 -0
- package/dist/icons/types.d.ts +1 -1
- package/dist/store/treble.js +4 -3
- package/dist/types.d.ts +1 -0
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
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 useAnimationStart = function () {
|
|
6
|
+
return (0, store_1.useThreekitSelector)(treble_1.isFirstRenderComplete);
|
|
7
|
+
};
|
|
8
|
+
exports.default = useAnimationStart;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 usePlayerLoadingStatus = function () {
|
|
6
|
+
return (0, store_1.useThreekitSelector)(treble_1.isPlayerLoading);
|
|
7
|
+
};
|
|
8
|
+
exports.default = usePlayerLoadingStatus;
|
package/dist/icons/types.d.ts
CHANGED
package/dist/store/treble.js
CHANGED
|
@@ -260,7 +260,7 @@ var initPlayer = function (config) {
|
|
|
260
260
|
exports.initPlayer = initPlayer;
|
|
261
261
|
var launch = function (launchConfig) {
|
|
262
262
|
return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
|
|
263
|
-
var config, productId, credentials, productsRaw, products, threekitEnv, serverUrl, playerConfig, envCredentials, _a, assetIdRaw, stageId, configurationId, initialConfigurationRaw, assetId, threekitDomainRaw, authToken, el, threekitDomain, initialConfiguration, updatedAssetId, params, configId, configuration;
|
|
263
|
+
var config, productId, credentials, productsRaw, products, threekitEnv, serverUrl, playerConfig, envCredentials, _a, assetIdRaw, stageId, configurationId, initialConfigurationRaw, assetId, threekitDomainRaw, authToken, playerScriptUrl, el, threekitDomain, initialConfiguration, updatedAssetId, params, configId, configuration;
|
|
264
264
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
265
265
|
return __generator(this, function (_j) {
|
|
266
266
|
switch (_j.label) {
|
|
@@ -324,7 +324,7 @@ var launch = function (launchConfig) {
|
|
|
324
324
|
_a = products[productId][threekitEnv] || {}, assetIdRaw = _a.assetId, stageId = _a.stageId, configurationId = _a.configurationId, initialConfigurationRaw = _a.initialConfiguration;
|
|
325
325
|
assetId = (launchConfig === null || launchConfig === void 0 ? void 0 : launchConfig.assetId) || assetIdRaw;
|
|
326
326
|
threekitDomainRaw = envCredentials.threekitDomain || "".concat(threekitEnv, ".threekit.com");
|
|
327
|
-
authToken = envCredentials.publicToken;
|
|
327
|
+
authToken = envCredentials.publicToken, playerScriptUrl = envCredentials.playerScriptUrl;
|
|
328
328
|
if (playerConfig.elementId) {
|
|
329
329
|
el = document.getElementById(playerConfig.elementId);
|
|
330
330
|
if (el)
|
|
@@ -362,7 +362,8 @@ var launch = function (launchConfig) {
|
|
|
362
362
|
return [2, console.error('missing assetId')];
|
|
363
363
|
return [4, new Promise(function (resolve) {
|
|
364
364
|
var script = document.createElement('script');
|
|
365
|
-
script.src =
|
|
365
|
+
script.src =
|
|
366
|
+
playerScriptUrl || "".concat(threekitDomain, "/app/js/threekit-player-bundle.js");
|
|
366
367
|
script.id = 'threekit-player-bundle';
|
|
367
368
|
script.onload = function () { return resolve(); };
|
|
368
369
|
document.head.appendChild(script);
|
package/dist/types.d.ts
CHANGED
package/dist/utils.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare const hydrateAttribute: (data: [
|
|
|
53
53
|
undefined | ITranslationMap,
|
|
54
54
|
undefined | string
|
|
55
55
|
], optionSelectionHandler: (config: ISetConfiguration) => Promise<void>) => Record<string, IHydratedAttribute>;
|
|
56
|
-
export declare const selectionToConfiguration: (value: RawAttributeValue, attributeType: ATTRIBUTE_TYPES) => string | number | boolean |
|
|
56
|
+
export declare const selectionToConfiguration: (value: RawAttributeValue, attributeType: ATTRIBUTE_TYPES) => string | number | boolean | IConfigurationColor | File | {
|
|
57
57
|
assetId: RawAttributeValue;
|
|
58
58
|
} | undefined;
|
|
59
59
|
export declare const filterFormAttributes: (attributes: Record<string, IThreekitDisplayAttribute>, attributeComponentProps: IAttributesComponentProps, includeReservedAttributes: boolean) => IThreekitDisplayAttribute[];
|