piral-svelte 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 +1 -1
- package/convert.js +1 -1
- package/lib/converter.js +3 -7
- package/lib/converter.js.map +1 -1
- package/lib/create.js +3 -7
- package/lib/create.js.map +1 -1
- package/lib/extension.js +1 -5
- package/lib/extension.js.map +1 -1
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -1
- package/lib/types.js +1 -2
- package/package.json +11 -26
- package/esm/converter.d.ts +0 -13
- package/esm/converter.js +0 -30
- package/esm/converter.js.map +0 -1
- package/esm/create.d.ts +0 -12
- package/esm/create.js +0 -21
- package/esm/create.js.map +0 -1
- package/esm/extension.d.ts +0 -1
- package/esm/extension.js +0 -11
- package/esm/extension.js.map +0 -1
- package/esm/index.d.ts +0 -2
- package/esm/index.js +0 -3
- package/esm/index.js.map +0 -1
- package/esm/types.d.ts +0 -48
- package/esm/types.js +0 -2
- package/esm/types.js.map +0 -1
package/convert.d.ts
CHANGED
package/convert.js
CHANGED
package/lib/converter.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 = 'svelte-extension' } = config;
|
|
7
|
-
const Extension =
|
|
4
|
+
const Extension = createExtension(selector);
|
|
8
5
|
const convert = (Component, captured) => ({
|
|
9
6
|
mount(parent, data, ctx, locals) {
|
|
10
7
|
locals.instance = new Component({
|
|
@@ -30,5 +27,4 @@ function createConverter(config = {}) {
|
|
|
30
27
|
convert.Extension = Extension;
|
|
31
28
|
return convert;
|
|
32
29
|
}
|
|
33
|
-
exports.createConverter = createConverter;
|
|
34
30
|
//# sourceMappingURL=converter.js.map
|
package/lib/converter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"
|
|
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,SAAiC,EAAE;IACjE,MAAM,EAAE,QAAQ,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACjD,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CACd,SAA+B,EAC/B,QAA8B,EACJ,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAmB;YAC1C,MAAM,CAAC,QAAQ,GAAG,IAAI,SAAS,CAAC;gBAC9B,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE;oBACL,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,IAAI;iBACR;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAmB;YACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAChC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAmB;YAC7B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5B,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/lib/create.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSvelteApi = void 0;
|
|
4
|
-
const converter_1 = require("./converter");
|
|
1
|
+
import { createConverter } from './converter';
|
|
5
2
|
/**
|
|
6
3
|
* Creates new Pilet API extensions for integration of Svelte.
|
|
7
4
|
*/
|
|
8
|
-
function createSvelteApi(config = {}) {
|
|
5
|
+
export function createSvelteApi(config = {}) {
|
|
9
6
|
return (context) => {
|
|
10
|
-
const convert =
|
|
7
|
+
const convert = createConverter(config);
|
|
11
8
|
context.converters.svelte = ({ Component, captured }) => convert(Component, captured);
|
|
12
9
|
return {
|
|
13
10
|
fromSvelte(Component, captured) {
|
|
@@ -21,5 +18,4 @@ function createSvelteApi(config = {}) {
|
|
|
21
18
|
};
|
|
22
19
|
};
|
|
23
20
|
}
|
|
24
|
-
exports.createSvelteApi = createSvelteApi;
|
|
25
21
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAA0B,MAAM,aAAa,CAAC;AAQtE;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,SAAuB,EAAE;IACvD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEtF,OAAO;YACL,UAAU,CAAC,SAAS,EAAE,QAAQ;gBAC5B,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,SAAS;oBACT,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,eAAe,EAAE,OAAO,CAAC,SAAS;SACnC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/extension.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
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
|
package/lib/extension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"
|
|
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
|
-
|
|
2
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
package/lib/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-svelte",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.7244",
|
|
4
4
|
"description": "Plugin for integrating Svelte components in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -16,35 +16,21 @@
|
|
|
16
16
|
"author": "smapiot",
|
|
17
17
|
"homepage": "https://piral.io",
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"module": "
|
|
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
|
-
"./extend-webpack": {
|
|
31
|
-
"require": "./extend-webpack.js"
|
|
32
|
-
},
|
|
33
|
-
"./esm/*": {
|
|
34
|
-
"import": "./esm/*"
|
|
35
|
-
},
|
|
23
|
+
".": "./lib/index.js",
|
|
36
24
|
"./lib/*": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"./_/*": {
|
|
40
|
-
"import": "./esm/*.js",
|
|
41
|
-
"require": "./lib/*.js"
|
|
25
|
+
"import": "./lib/*",
|
|
26
|
+
"types": "./lib/*.d.ts"
|
|
42
27
|
},
|
|
28
|
+
"./convert": "./convert.js",
|
|
29
|
+
"./extend-webpack": "./extend-webpack.js",
|
|
43
30
|
"./package.json": "./package.json"
|
|
44
31
|
},
|
|
45
32
|
"sideEffects": false,
|
|
46
33
|
"files": [
|
|
47
|
-
"esm",
|
|
48
34
|
"lib",
|
|
49
35
|
"src",
|
|
50
36
|
"convert.d.ts",
|
|
@@ -60,15 +46,14 @@
|
|
|
60
46
|
},
|
|
61
47
|
"scripts": {
|
|
62
48
|
"cleanup": "rimraf esm lib convert.d.ts convert.js",
|
|
63
|
-
"build": "yarn build:
|
|
49
|
+
"build": "yarn build:esnext && yarn build:convert",
|
|
64
50
|
"build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
|
|
65
|
-
"build:
|
|
66
|
-
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
51
|
+
"build:esnext": "tsc --project tsconfig.json --outDir lib --module esnext",
|
|
67
52
|
"typedoc": "typedoc --json ../../../docs/types/piral-svelte.json src --exclude \"src/**/*.test.*\"",
|
|
68
53
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
69
54
|
},
|
|
70
55
|
"devDependencies": {
|
|
71
|
-
"piral-core": "1.6.0-beta.
|
|
56
|
+
"piral-core": "1.6.0-beta.7244"
|
|
72
57
|
},
|
|
73
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "65ac1291c3429dbf16079b4deb6138b24c5719f7"
|
|
74
59
|
}
|
package/esm/converter.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
2
|
-
import type { SvelteModule } from './types';
|
|
3
|
-
export interface SvelteConverterOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Defines the name of the extension component.
|
|
6
|
-
* @default svelte-extension
|
|
7
|
-
*/
|
|
8
|
-
selector?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createConverter(config?: SvelteConverterOptions): {
|
|
11
|
-
<TProps extends BaseComponentProps>(Component: SvelteModule<TProps>, captured?: Record<string, any>): ForeignComponent<TProps>;
|
|
12
|
-
Extension: string;
|
|
13
|
-
};
|
package/esm/converter.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createExtension } from './extension';
|
|
2
|
-
export function createConverter(config = {}) {
|
|
3
|
-
const { selector = 'svelte-extension' } = config;
|
|
4
|
-
const Extension = createExtension(selector);
|
|
5
|
-
const convert = (Component, captured) => ({
|
|
6
|
-
mount(parent, data, ctx, locals) {
|
|
7
|
-
locals.instance = new Component({
|
|
8
|
-
target: parent,
|
|
9
|
-
props: {
|
|
10
|
-
...captured,
|
|
11
|
-
...ctx,
|
|
12
|
-
...data,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
update(el, data, ctx, locals) {
|
|
17
|
-
Object.keys(data).forEach((key) => {
|
|
18
|
-
locals.instance[key] = data[key];
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
unmount(el, locals) {
|
|
22
|
-
locals.instance.$destroy();
|
|
23
|
-
locals.instance = undefined;
|
|
24
|
-
el.innerHTML = '';
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
convert.Extension = Extension;
|
|
28
|
-
return convert;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=converter.js.map
|
package/esm/converter.js.map
DELETED
|
@@ -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,SAAiC,EAAE;IACjE,MAAM,EAAE,QAAQ,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACjD,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CACd,SAA+B,EAC/B,QAA8B,EACJ,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAmB;YAC1C,MAAM,CAAC,QAAQ,GAAG,IAAI,SAAS,CAAC;gBAC9B,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE;oBACL,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,IAAI;iBACR;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAmB;YACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAChC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAmB;YAC7B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5B,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,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 { SvelteConverterOptions } from './converter';
|
|
3
|
-
import type { PiletSvelteApi } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Available configuration options for the Svelte plugin.
|
|
6
|
-
*/
|
|
7
|
-
export interface SvelteConfig extends SvelteConverterOptions {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Creates new Pilet API extensions for integration of Svelte.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createSvelteApi(config?: SvelteConfig): PiralPlugin<PiletSvelteApi>;
|
package/esm/create.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createConverter } from './converter';
|
|
2
|
-
/**
|
|
3
|
-
* Creates new Pilet API extensions for integration of Svelte.
|
|
4
|
-
*/
|
|
5
|
-
export function createSvelteApi(config = {}) {
|
|
6
|
-
return (context) => {
|
|
7
|
-
const convert = createConverter(config);
|
|
8
|
-
context.converters.svelte = ({ Component, captured }) => convert(Component, captured);
|
|
9
|
-
return {
|
|
10
|
-
fromSvelte(Component, captured) {
|
|
11
|
-
return {
|
|
12
|
-
type: 'svelte',
|
|
13
|
-
Component,
|
|
14
|
-
captured,
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
SvelteExtension: convert.Extension,
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
//# 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,eAAe,EAA0B,MAAM,aAAa,CAAC;AAQtE;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,SAAuB,EAAE;IACvD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEtF,OAAO;YACL,UAAU,CAAC,SAAS,EAAE,QAAQ;gBAC5B,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,SAAS;oBACT,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,eAAe,EAAE,OAAO,CAAC,SAAS;SACnC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/esm/extension.d.ts
DELETED
|
@@ -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
|
package/esm/extension.js.map
DELETED
|
@@ -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
package/esm/index.js
DELETED
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/types.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent } from 'piral-core';
|
|
2
|
-
declare module 'piral-core/lib/types/custom' {
|
|
3
|
-
interface PiletCustomApi extends PiletSvelteApi {
|
|
4
|
-
}
|
|
5
|
-
interface PiralCustomComponentConverters<TProps> {
|
|
6
|
-
svelte(component: SvelteComponent<TProps>): ForeignComponent<TProps>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export interface SvelteOptions<TProps> {
|
|
10
|
-
target: Element;
|
|
11
|
-
props: TProps;
|
|
12
|
-
}
|
|
13
|
-
export type SvelteComponentInstance<TProps> = TProps & {
|
|
14
|
-
$destroy(): void;
|
|
15
|
-
};
|
|
16
|
-
export interface SvelteModule<TProps> {
|
|
17
|
-
new (opts: SvelteOptions<TProps>): SvelteComponentInstance<TProps>;
|
|
18
|
-
}
|
|
19
|
-
export interface SvelteComponent<TProps> {
|
|
20
|
-
/**
|
|
21
|
-
* The name of the Svelte main module to render.
|
|
22
|
-
*/
|
|
23
|
-
Component: SvelteModule<TProps>;
|
|
24
|
-
/**
|
|
25
|
-
* Captures props for transport into the Svelte component.
|
|
26
|
-
*/
|
|
27
|
-
captured?: Record<string, any>;
|
|
28
|
-
/**
|
|
29
|
-
* The type of the Svelte component.
|
|
30
|
-
*/
|
|
31
|
-
type: 'svelte';
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Defines the provided set of Svelte Pilet API extensions.
|
|
35
|
-
*/
|
|
36
|
-
export interface PiletSvelteApi {
|
|
37
|
-
/**
|
|
38
|
-
* Wraps a Svelte module for use in Piral.
|
|
39
|
-
* @param Component The name of the root component.
|
|
40
|
-
* @param captured The optionally captured props.
|
|
41
|
-
* @returns The Piral Svelte component.
|
|
42
|
-
*/
|
|
43
|
-
fromSvelte<TProps>(Component: SvelteModule<TProps>, captured?: Record<string, any>): SvelteComponent<TProps>;
|
|
44
|
-
/**
|
|
45
|
-
* Gets the name of the Svelte extension.
|
|
46
|
-
*/
|
|
47
|
-
SvelteExtension: string;
|
|
48
|
-
}
|
package/esm/types.js
DELETED
package/esm/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|