@3dsource/metabox-front-api 0.0.19-beta.4 → 0.0.19-beta.6

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/index.d.ts CHANGED
@@ -12,10 +12,10 @@ export type { MimeType } from './actions/GetFastRender';
12
12
  export { CommandBase } from './actions/CommandBase';
13
13
  export * from './lib/integrateMetaBox';
14
14
  export * from './lib/Communicator';
15
+ export * from './lib/fromCommunicatorEvent';
15
16
  export * from './lib/saveImage';
16
17
  export * from './lib/sleep';
17
18
  export * from './lib/UrlUtils';
18
19
  export type * from './interfaces/UniversalConfigurator';
19
20
  export type * from './interfaces/ToMetaboxMessagePayloads';
20
21
  export type * from './interfaces/FromMetaboxMessagePayloads';
21
- export * from './interfaces/application-device-types';
package/dist/index.esm.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { fromEvent } from 'rxjs';
2
+
1
3
  /**
2
4
  * Base class for commands sent to the MetaBox.
3
5
  */
@@ -357,7 +359,6 @@ class EventDispatcher {
357
359
  *
358
360
  * @remarks
359
361
  * This class sets up a communication channel with the embedded content via window messages.
360
- * @hidden
361
362
  */
362
363
  class Communicator extends EventDispatcher {
363
364
  /**
@@ -510,6 +511,10 @@ function integrateMetaBox(iframeSrc, containerId = 'embed3DSource', apiReadyCall
510
511
  container.appendChild(iframe);
511
512
  }
512
513
 
514
+ function fromCommunicatorEvent(target, eventName) {
515
+ return fromEvent(target, eventName);
516
+ }
517
+
513
518
  /**
514
519
  * Saves an image by triggering a download.
515
520
  *
@@ -575,5 +580,5 @@ function getUrlParams() {
575
580
  return selections;
576
581
  }
577
582
 
578
- export { CommandBase, Communicator, GetFastRender, GetPdf, SendCommandToUnreal, SetEnvironment, SetEnvironmentMaterial, SetMaterial, SetProduct, ShowEmbeddedMenu, ShowOverlayInterface, WatchCallbacks, getUrlParams, integrateMetaBox, saveImage, setUrlParams, sleep };
583
+ export { CommandBase, Communicator, GetFastRender, GetPdf, SendCommandToUnreal, SetEnvironment, SetEnvironmentMaterial, SetMaterial, SetProduct, ShowEmbeddedMenu, ShowOverlayInterface, WatchCallbacks, fromCommunicatorEvent, getUrlParams, integrateMetaBox, saveImage, setUrlParams, sleep };
579
584
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["metabox-front-api"] = {}));
5
- })(this, (function (exports) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'rxjs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["metabox-front-api"] = {}, global.rxjs));
5
+ })(this, (function (exports, rxjs) { 'use strict';
6
6
 
7
7
  /**
8
8
  * Base class for commands sent to the MetaBox.
@@ -363,7 +363,6 @@
363
363
  *
364
364
  * @remarks
365
365
  * This class sets up a communication channel with the embedded content via window messages.
366
- * @hidden
367
366
  */
368
367
  class Communicator extends EventDispatcher {
369
368
  /**
@@ -516,6 +515,10 @@
516
515
  container.appendChild(iframe);
517
516
  }
518
517
 
518
+ function fromCommunicatorEvent(target, eventName) {
519
+ return rxjs.fromEvent(target, eventName);
520
+ }
521
+
519
522
  /**
520
523
  * Saves an image by triggering a download.
521
524
  *
@@ -593,6 +596,7 @@
593
596
  exports.ShowEmbeddedMenu = ShowEmbeddedMenu;
594
597
  exports.ShowOverlayInterface = ShowOverlayInterface;
595
598
  exports.WatchCallbacks = WatchCallbacks;
599
+ exports.fromCommunicatorEvent = fromCommunicatorEvent;
596
600
  exports.getUrlParams = getUrlParams;
597
601
  exports.integrateMetaBox = integrateMetaBox;
598
602
  exports.saveImage = saveImage;
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,7 +8,6 @@ import type { FromMetaBoxApiEvents, FromMetaboxMessagePayloads } from '../interf
8
8
  *
9
9
  * @remarks
10
10
  * This class sets up a communication channel with the embedded content via window messages.
11
- * @hidden
12
11
  */
13
12
  export declare class Communicator extends EventDispatcher {
14
13
  /**
@@ -0,0 +1,4 @@
1
+ import type { Communicator } from './Communicator';
2
+ import type { FromMetaBoxApiEvents, FromMetaboxMessagePayloads } from '../interfaces/FromMetaboxMessagePayloads';
3
+ import type { Observable } from 'rxjs';
4
+ export declare function fromCommunicatorEvent<T extends FromMetaBoxApiEvents>(target: Communicator, eventName: T): Observable<FromMetaboxMessagePayloads[T]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dsource/metabox-front-api",
3
- "version": "0.0.19-beta.4",
3
+ "version": "0.0.19-beta.6",
4
4
  "description": "API for MetaBox BASIC configurator",
5
5
  "keywords": [
6
6
  "metabox",
@@ -40,6 +40,7 @@
40
40
  "bump:dev": "npm version prerelease --preid=beta && npm run publish:dev"
41
41
  },
42
42
  "peerDependencies": {
43
+ "@3dsource/angular-unreal-module": "^0.0.29",
43
44
  "rimraf": ">=6.0.0",
44
45
  "rollup": ">=4.0.0",
45
46
  "rollup-plugin-typescript2": ">=0.36.0",