piral-ember 1.6.0-beta.7240 → 1.6.0-beta.7244

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/convert.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { createConverter } from './esm/converter';
1
+ import { createConverter } from './lib/converter';
2
2
  export interface HtmlComponent<TProps> {
3
3
  component: {
4
4
  mount(element: HTMLElement, props: TProps, ctx: any, locals: any): void;
package/convert.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createConverter } from './esm/converter';
1
+ import { createConverter } from './lib/converter';
2
2
  export function createEmberConverter() {
3
3
  var params = [];
4
4
  for (var _i = 0; _i < arguments.length; _i++) {
package/lib/converter.js CHANGED
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createConverter = void 0;
4
- const extension_1 = require("./extension");
5
- function createConverter(config = {}) {
1
+ import { createExtension } from './extension';
2
+ export function createConverter(config = {}) {
6
3
  const { selector = 'ember-extension' } = config;
7
- const Extension = (0, extension_1.createExtension)(selector);
4
+ const Extension = createExtension(selector);
8
5
  const convert = (App, opts) => ({
9
6
  mount(rootElement, props, ctx, locals) {
10
7
  locals.app = App.create({
@@ -29,5 +26,4 @@ function createConverter(config = {}) {
29
26
  convert.Extension = Extension;
30
27
  return convert;
31
28
  }
32
- exports.createConverter = createConverter;
33
29
  //# sourceMappingURL=converter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":";;;AACA,2CAA8C;AAe9C,SAAgB,eAAe,CAAC,SAAgC,EAAE;IAChE,MAAM,EAAE,QAAQ,GAAG,iBAAiB,EAAE,GAAG,MAAM,CAAC;IAEhD,MAAM,SAAS,GAAG,IAAA,2BAAe,EAAC,QAAQ,CAAC,CAAC;IAE5C,MAAM,OAAO,GAAG,CACd,GAAwB,EACxB,IAAS,EACiB,EAAE,CAAC,CAAC;QAC9B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EAAE,GAAG,EAAE,MAA0B;YACxD,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;gBACvB,KAAK;gBACL,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,WAAW,EAAE,MAA0B;YAC7C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC;YACvB,WAAW,CAAC,SAAS,GAAG,EAAE,CAAC;QAC7B,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/lib/create.js CHANGED
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createEmberApi = void 0;
4
- const load_1 = require("./load");
5
- const converter_1 = require("./converter");
1
+ import { loadEmberApp } from './load';
2
+ import { createConverter } from './converter';
6
3
  /**
7
4
  * Creates Pilet API extensions for integrating Ember.js.
8
5
  */
9
- function createEmberApi(config = {}) {
6
+ export function createEmberApi(config = {}) {
10
7
  return (context) => {
11
- const convert = (0, converter_1.createConverter)(config);
8
+ const convert = createConverter(config);
12
9
  context.converters.ember = ({ App, opts }) => convert(App, opts);
13
10
  return {
14
11
  fromEmber(App, opts) {
@@ -18,10 +15,9 @@ function createEmberApi(config = {}) {
18
15
  opts,
19
16
  };
20
17
  },
21
- loadEmberApp: load_1.loadEmberApp,
18
+ loadEmberApp,
22
19
  EmberExtension: convert.Extension,
23
20
  };
24
21
  };
25
22
  }
26
- exports.createEmberApi = createEmberApi;
27
23
  //# sourceMappingURL=create.js.map
package/lib/create.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":";;;AACA,iCAAsC;AACtC,2CAAqE;AAQrE;;GAEG;AACH,SAAgB,cAAc,CAAC,SAAsB,EAAE;IACrD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,IAAA,2BAAe,EAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAEjE,OAAO;YACL,SAAS,CAAC,GAAG,EAAE,IAAI;gBACjB,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,GAAG;oBACH,IAAI;iBACL,CAAC;YACJ,CAAC;YACD,YAAY,EAAZ,mBAAY;YACZ,cAAc,EAAE,OAAO,CAAC,SAAS;SAClC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAjBD,wCAiBC"}
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AAQrE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,SAAsB,EAAE;IACrD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAEjE,OAAO;YACL,SAAS,CAAC,GAAG,EAAE,IAAI;gBACjB,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,GAAG;oBACH,IAAI;iBACL,CAAC;YACJ,CAAC;YACD,YAAY;YACZ,cAAc,EAAE,OAAO,CAAC,SAAS;SAClC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
package/lib/extension.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createExtension = void 0;
4
- function createExtension(selector) {
1
+ export function createExtension(selector) {
5
2
  const defaultExtensionSelector = 'piral-extension';
6
3
  if ('customElements' in window && selector && selector !== defaultExtensionSelector) {
7
4
  const ExtensionBase = customElements.get(defaultExtensionSelector);
@@ -11,5 +8,4 @@ function createExtension(selector) {
11
8
  }
12
9
  return selector || defaultExtensionSelector;
13
10
  }
14
- exports.createExtension = createExtension;
15
11
  //# sourceMappingURL=extension.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,QAAgB;IAC9C,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IAEnD,IAAI,gBAAgB,IAAI,MAAM,IAAI,QAAQ,IAAI,QAAQ,KAAK,wBAAwB,EAAE;QACnF,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACnE,MAAM,cAAe,SAAQ,aAAa;SAAG;QAC7C,cAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;KACjD;IAED,OAAO,QAAQ,IAAI,wBAAwB,CAAC;AAC9C,CAAC;AAVD,0CAUC"}
1
+ {"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IAEnD,IAAI,gBAAgB,IAAI,MAAM,IAAI,QAAQ,IAAI,QAAQ,KAAK,wBAAwB,EAAE;QACnF,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACnE,MAAM,cAAe,SAAQ,aAAa;SAAG;QAC7C,cAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;KACjD;IAED,OAAO,QAAQ,IAAI,wBAAwB,CAAC;AAC9C,CAAC"}
package/lib/index.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./create"), exports);
5
- tslib_1.__exportStar(require("./types"), exports);
1
+ export * from './create';
2
+ export * from './types';
6
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,kDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
package/lib/load.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadEmberApp = void 0;
4
- function loadEmberApp(appName, appUrl, vendorUrl) {
1
+ export function loadEmberApp(appName, appUrl, vendorUrl) {
5
2
  return new Promise((resolve, reject) => {
6
3
  if (vendorUrl) {
7
4
  const scriptVendor = document.createElement('script');
@@ -26,5 +23,4 @@ function loadEmberApp(appName, appUrl, vendorUrl) {
26
23
  }
27
24
  });
28
25
  }
29
- exports.loadEmberApp = loadEmberApp;
30
26
  //# sourceMappingURL=load.js.map
package/lib/load.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,OAAe,EAAE,MAAc,EAAE,SAAkB;IAC9E,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,IAAI,SAAS,EAAE;YACb,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACtD,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC;YAC7B,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC;YAC1B,YAAY,CAAC,MAAM,GAAG,OAAO,CAA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AQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAClD,QAAQ,CAAC,GAAG,GAAG,MAAM,CAAC;YACtB,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;YACtB,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE;gBACrB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;YAC5C,CAAC,CAAC;YACF,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC;YAC1B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
package/lib/types.js CHANGED
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-ember",
3
- "version": "1.6.0-beta.7240",
3
+ "version": "1.6.0-beta.7244",
4
4
  "description": "Plugin for integrating Ember.js components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -16,32 +16,20 @@
16
16
  "author": "smapiot",
17
17
  "homepage": "https://piral.io",
18
18
  "license": "MIT",
19
- "module": "esm/index.js",
19
+ "module": "lib/index.js",
20
20
  "main": "lib/index.js",
21
21
  "typings": "lib/index.d.ts",
22
22
  "exports": {
23
- ".": {
24
- "import": "./esm/index.js",
25
- "require": "./lib/index.js"
26
- },
27
- "./convert": {
28
- "import": "./convert.js"
29
- },
30
- "./esm/*": {
31
- "import": "./esm/*"
32
- },
23
+ ".": "./lib/index.js",
24
+ "./convert": "./convert.js",
33
25
  "./lib/*": {
34
- "require": "./lib/*"
35
- },
36
- "./_/*": {
37
- "import": "./esm/*.js",
38
- "require": "./lib/*.js"
26
+ "import": "./lib/*",
27
+ "types": "./lib/*.d.ts"
39
28
  },
40
29
  "./package.json": "./package.json"
41
30
  },
42
31
  "sideEffects": false,
43
32
  "files": [
44
- "esm",
45
33
  "lib",
46
34
  "src",
47
35
  "convert.d.ts",
@@ -56,17 +44,16 @@
56
44
  },
57
45
  "scripts": {
58
46
  "cleanup": "rimraf esm lib convert.d.ts convert.js",
59
- "build": "yarn build:commonjs && yarn build:esnext && yarn build:convert",
47
+ "build": "yarn build:esnext && yarn build:convert",
60
48
  "build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
61
- "build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs",
62
- "build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
49
+ "build:esnext": "tsc --project tsconfig.json --outDir lib --module esnext",
63
50
  "typedoc": "typedoc --json ../../../docs/types/piral-ember.json src --exclude \"src/**/*.test.*\"",
64
51
  "test": "echo \"Error: run tests from root\" && exit 1"
65
52
  },
66
53
  "devDependencies": {
67
54
  "@types/ember": "^3.1.1",
68
55
  "ember-source": "^3.15.0",
69
- "piral-core": "1.6.0-beta.7240"
56
+ "piral-core": "1.6.0-beta.7244"
70
57
  },
71
- "gitHead": "2fd8ff47d9a7e0666e4e6bc1dc5a7ef45e8e9f39"
58
+ "gitHead": "65ac1291c3429dbf16079b4deb6138b24c5719f7"
72
59
  }
@@ -1,13 +0,0 @@
1
- import type { ForeignComponent, BaseComponentProps } from 'piral-core';
2
- import type { EmberModule } from './types';
3
- export interface EmberConverterOptions {
4
- /**
5
- * Defines the name of the extension component.
6
- * @default ember-extension
7
- */
8
- selector?: string;
9
- }
10
- export declare function createConverter(config?: EmberConverterOptions): {
11
- <TProps extends BaseComponentProps>(App: EmberModule<TProps>, opts: any): ForeignComponent<TProps>;
12
- Extension: string;
13
- };
package/esm/converter.js DELETED
@@ -1,29 +0,0 @@
1
- import { createExtension } from './extension';
2
- export function createConverter(config = {}) {
3
- const { selector = 'ember-extension' } = config;
4
- const Extension = createExtension(selector);
5
- const convert = (App, opts) => ({
6
- mount(rootElement, props, ctx, locals) {
7
- locals.app = App.create({
8
- ...opts,
9
- rootElement,
10
- props,
11
- ctx,
12
- });
13
- },
14
- update(rootElement, props, ctx, locals) {
15
- locals.app.setProperties({
16
- props,
17
- ctx,
18
- });
19
- },
20
- unmount(rootElement, locals) {
21
- locals.app.destroy();
22
- locals.app = undefined;
23
- rootElement.innerHTML = '';
24
- },
25
- });
26
- convert.Extension = Extension;
27
- return convert;
28
- }
29
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAe9C,MAAM,UAAU,eAAe,CAAC,SAAgC,EAAE;IAChE,MAAM,EAAE,QAAQ,GAAG,iBAAiB,EAAE,GAAG,MAAM,CAAC;IAEhD,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAE5C,MAAM,OAAO,GAAG,CACd,GAAwB,EACxB,IAAS,EACiB,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,MAA0B;YACvD,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;gBACtB,GAAG,IAAI;gBACP,WAAW;gBACX,KAAK;gBACL,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,MAA0B;YACxD,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;gBACvB,KAAK;gBACL,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,WAAW,EAAE,MAA0B;YAC7C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC;YACvB,WAAW,CAAC,SAAS,GAAG,EAAE,CAAC;QAC7B,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/esm/create.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { PiralPlugin } from 'piral-core';
2
- import { EmberConverterOptions } from './converter';
3
- import type { PiletEmberApi } from './types';
4
- /**
5
- * Available configuration options for the Ember.js plugin.
6
- */
7
- export interface EmberConfig extends EmberConverterOptions {
8
- }
9
- /**
10
- * Creates Pilet API extensions for integrating Ember.js.
11
- */
12
- export declare function createEmberApi(config?: EmberConfig): PiralPlugin<PiletEmberApi>;
package/esm/create.js DELETED
@@ -1,23 +0,0 @@
1
- import { loadEmberApp } from './load';
2
- import { createConverter } from './converter';
3
- /**
4
- * Creates Pilet API extensions for integrating Ember.js.
5
- */
6
- export function createEmberApi(config = {}) {
7
- return (context) => {
8
- const convert = createConverter(config);
9
- context.converters.ember = ({ App, opts }) => convert(App, opts);
10
- return {
11
- fromEmber(App, opts) {
12
- return {
13
- type: 'ember',
14
- App,
15
- opts,
16
- };
17
- },
18
- loadEmberApp,
19
- EmberExtension: convert.Extension,
20
- };
21
- };
22
- }
23
- //# sourceMappingURL=create.js.map
package/esm/create.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AAQrE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,SAAsB,EAAE;IACrD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAEjE,OAAO;YACL,SAAS,CAAC,GAAG,EAAE,IAAI;gBACjB,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,GAAG;oBACH,IAAI;iBACL,CAAC;YACJ,CAAC;YACD,YAAY;YACZ,cAAc,EAAE,OAAO,CAAC,SAAS;SAClC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- export declare function createExtension(selector: string): string;
package/esm/extension.js DELETED
@@ -1,11 +0,0 @@
1
- export function createExtension(selector) {
2
- const defaultExtensionSelector = 'piral-extension';
3
- if ('customElements' in window && selector && selector !== defaultExtensionSelector) {
4
- const ExtensionBase = customElements.get(defaultExtensionSelector);
5
- class AliasExtension extends ExtensionBase {
6
- }
7
- customElements.define(selector, AliasExtension);
8
- }
9
- return selector || defaultExtensionSelector;
10
- }
11
- //# sourceMappingURL=extension.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IAEnD,IAAI,gBAAgB,IAAI,MAAM,IAAI,QAAQ,IAAI,QAAQ,KAAK,wBAAwB,EAAE;QACnF,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACnE,MAAM,cAAe,SAAQ,aAAa;SAAG;QAC7C,cAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;KACjD;IAED,OAAO,QAAQ,IAAI,wBAAwB,CAAC;AAC9C,CAAC"}
package/esm/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './create';
2
- export * from './types';
package/esm/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './create';
2
- export * from './types';
3
- //# sourceMappingURL=index.js.map
package/esm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
package/esm/load.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function loadEmberApp(appName: string, appUrl: string, vendorUrl?: string): Promise<any>;
package/esm/load.js DELETED
@@ -1,26 +0,0 @@
1
- export function loadEmberApp(appName, appUrl, vendorUrl) {
2
- return new Promise((resolve, reject) => {
3
- if (vendorUrl) {
4
- const scriptVendor = document.createElement('script');
5
- scriptVendor.src = vendorUrl;
6
- scriptVendor.async = true;
7
- scriptVendor.onload = loadApp;
8
- scriptVendor.onerror = reject;
9
- document.head.appendChild(scriptVendor);
10
- }
11
- else {
12
- loadApp();
13
- }
14
- function loadApp() {
15
- const scriptEl = document.createElement('script');
16
- scriptEl.src = appUrl;
17
- scriptEl.async = true;
18
- scriptEl.onload = () => {
19
- resolve(window.require(appName + '/app'));
20
- };
21
- scriptEl.onerror = reject;
22
- document.head.appendChild(scriptEl);
23
- }
24
- });
25
- }
26
- //# sourceMappingURL=load.js.map
package/esm/load.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,MAAc,EAAE,SAAkB;IAC9E,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,IAAI,SAAS,EAAE;YACb,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACtD,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC;YAC7B,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC;YAC1B,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC;YAC9B,YAAY,CAAC,OAAO,GAAG,MAAM,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;SACzC;aAAM;YACL,OAAO,EAAE,CAAC;SACX;QAED,SAAS,OAAO;YACd,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAClD,QAAQ,CAAC,GAAG,GAAG,MAAM,CAAC;YACtB,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;YACtB,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE;gBACrB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;YAC5C,CAAC,CAAC;YACF,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC;YAC1B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
package/esm/types.d.ts DELETED
@@ -1,57 +0,0 @@
1
- import type { ForeignComponent } from 'piral-core';
2
- declare module 'piral-core/lib/types/custom' {
3
- interface PiletCustomApi extends PiletEmberApi {
4
- }
5
- interface PiralCustomComponentConverters<TProps> {
6
- ember(component: PiralEmberComponent<TProps>): ForeignComponent<TProps>;
7
- }
8
- }
9
- export interface EmberOptions<TProps> {
10
- props: TProps;
11
- ctx: any;
12
- }
13
- export interface EmberInstance<TProps> {
14
- setProperties(opts: EmberOptions<TProps>): void;
15
- destroy(): void;
16
- }
17
- export interface EmberModule<TProps> {
18
- create(opts: EmberOptions<TProps>): EmberInstance<TProps>;
19
- }
20
- export interface PiralEmberComponent<TProps> {
21
- /**
22
- * The Ember.js component App.
23
- */
24
- App: EmberModule<TProps>;
25
- /**
26
- * The Ember.js component options.
27
- */
28
- opts: any;
29
- /**
30
- * The type of the Ember.js component.
31
- */
32
- type: 'ember';
33
- }
34
- /**
35
- * Defines the provided set of Pilet API extensions from the Ember.js plugin.
36
- */
37
- export interface PiletEmberApi {
38
- /**
39
- * Loads an ember application via it's URLs.
40
- * @param appName The name of the ember application.
41
- * @param appUrl The URL of the main ember application.
42
- * @param vendorUrl The optional URL of the (shared) ember vendor bundle.
43
- * @returns The promise resolving to the loaded ember application.
44
- */
45
- loadEmberApp<T = any>(appName: string, appUrl: string, vendorUrl?: string): Promise<T>;
46
- /**
47
- * Wraps an Emberjs component for use in Piral.
48
- * @param App The component root.
49
- * @param opts The component options.
50
- * @returns The Piral Ember.js component.
51
- */
52
- fromEmber<TProps>(App: EmberModule<TProps>, opts: any): PiralEmberComponent<TProps>;
53
- /**
54
- * Gets the name of the Ember.js extension.
55
- */
56
- EmberExtension: string;
57
- }
package/esm/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
package/esm/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}