@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.
@@ -0,0 +1,2 @@
1
+ declare const useAnimationStart: () => boolean;
2
+ export 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 useAnimationStart = function () {
6
+ return (0, store_1.useThreekitSelector)(treble_1.isFirstRenderComplete);
7
+ };
8
+ exports.default = useAnimationStart;
@@ -0,0 +1,2 @@
1
+ declare const usePlayerLoadingStatus: () => boolean;
2
+ export default usePlayerLoadingStatus;
@@ -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;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export interface IIconProps {
3
3
  color?: string;
4
4
  }
@@ -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 = "".concat(threekitDomain, "/app/js/threekit-player-bundle.js");
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
@@ -386,6 +386,7 @@ export interface ICredential {
386
386
  publicToken: string;
387
387
  publishStage?: string;
388
388
  threekitDomain?: string;
389
+ playerScriptUrl?: string;
389
390
  }
390
391
  export interface ICredentials extends Record<string, ICredential> {
391
392
  }
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 | File | IConfigurationColor | {
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[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.90-next-01",
3
+ "version": "0.0.90-next-02",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [