piral-riot 1.6.0-beta.7216 → 1.6.0-beta.7243
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 +4 -8
- 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 +9 -25
- package/esm/converter.d.ts +0 -13
- package/esm/converter.js +0 -26
- package/esm/converter.js.map +0 -1
- package/esm/create.d.ts +0 -11
- package/esm/create.js +0 -21
- package/esm/create.js.map +0 -1
- package/esm/extension.d.ts +0 -3
- package/esm/extension.js +0 -33
- 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 -39
- 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,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const Riot = require("riot");
|
|
5
|
-
const extension_1 = require("./extension");
|
|
6
|
-
function createConverter(config = {}) {
|
|
1
|
+
import * as Riot from 'riot';
|
|
2
|
+
import { createExtension } from './extension';
|
|
3
|
+
export function createConverter(config = {}) {
|
|
7
4
|
const { extensionName = 'riot-extension' } = config;
|
|
8
|
-
const Extension =
|
|
5
|
+
const Extension = createExtension(extensionName);
|
|
9
6
|
const convert = (component, captured) => {
|
|
10
7
|
const mountApp = Riot.component(component);
|
|
11
8
|
return {
|
|
@@ -26,5 +23,4 @@ function createConverter(config = {}) {
|
|
|
26
23
|
convert.Extension = Extension;
|
|
27
24
|
return convert;
|
|
28
25
|
}
|
|
29
|
-
exports.createConverter = createConverter;
|
|
30
26
|
//# 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":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,UAAU,eAAe,CAAC,SAA+B,EAAE;IAC/D,MAAM,EAAE,aAAa,GAAG,gBAAgB,EAAE,GAAG,MAAM,CAAC;IACpD,MAAM,SAAS,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,CACd,SAA0C,EAC1C,QAA8B,EACJ,EAAE;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAE3C,OAAO;YACL,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAyB;gBAC7C,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAC,EAAE,EAAE;oBACxB,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,KAAK;iBACT,CAAC,CAAC;YACL,CAAC;YACD,OAAO,CAAC,EAAE,EAAE,MAAyB;gBACnC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACzB,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;gBAClB,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC;YACzB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;IACF,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.createRiotApi = void 0;
|
|
4
|
-
const converter_1 = require("./converter");
|
|
1
|
+
import { createConverter } from './converter';
|
|
5
2
|
/**
|
|
6
3
|
* Creates new Pilet API extensions for integrating Riot.js.
|
|
7
4
|
*/
|
|
8
|
-
function createRiotApi(config = {}) {
|
|
5
|
+
export function createRiotApi(config = {}) {
|
|
9
6
|
return (context) => {
|
|
10
|
-
const convert =
|
|
7
|
+
const convert = createConverter(config);
|
|
11
8
|
context.converters.riot = ({ component, captured }) => convert(component, captured);
|
|
12
9
|
return {
|
|
13
10
|
fromRiot(component, captured) {
|
|
@@ -21,5 +18,4 @@ function createRiotApi(config = {}) {
|
|
|
21
18
|
};
|
|
22
19
|
};
|
|
23
20
|
}
|
|
24
|
-
exports.createRiotApi = createRiotApi;
|
|
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,EAAE,MAAM,aAAa,CAAC;AAQ9C;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAqB,EAAE;IACnD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEpF,OAAO;YACL,QAAQ,CAAC,SAAS,EAAE,QAAQ;gBAC1B,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,SAAS;oBACT,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,aAAa,EAAE,OAAO,CAAC,SAAS;SACjC,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(extensionName) {
|
|
1
|
+
export function createExtension(extensionName) {
|
|
5
2
|
return {
|
|
6
3
|
name: extensionName,
|
|
7
4
|
template() {
|
|
@@ -33,5 +30,4 @@ function createExtension(extensionName) {
|
|
|
33
30
|
},
|
|
34
31
|
};
|
|
35
32
|
}
|
|
36
|
-
exports.createExtension = createExtension;
|
|
37
33
|
//# 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":"AAIA,MAAM,UAAU,eAAe,CAAC,aAAqB;IACnD,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,QAAQ;YACN,MAAM,aAAa,GAAkB;gBACnC,KAAK,CAAC,OAAO,EAAE,KAAK;oBAClB,OAAO,CAAC,aAAa,CACnB,IAAI,WAAW,CAAC,aAAa,EAAE;wBAC7B,OAAO,EAAE,IAAI;wBACb,MAAM,EAAE;4BACN,MAAM,EAAE,OAAO;4BACf,KAAK,EAAE,KAAK,CAAC,KAAK;yBACnB;qBACF,CAAC,CACH,CAAC;oBACF,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,MAAM;oBACJ,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,OAAO;oBACL,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,SAAS;oBACP,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,KAAK;oBACH,OAAO,aAAa,CAAC;gBACvB,CAAC;aACF,CAAC;YACF,OAAO,aAAa,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,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-riot",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.7243",
|
|
4
4
|
"description": "Plugin for integrating Riot.js components in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -16,32 +16,17 @@
|
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
"./convert": {
|
|
28
|
-
"import": "./convert.js"
|
|
29
|
-
},
|
|
30
|
-
"./esm/*": {
|
|
31
|
-
"import": "./esm/*"
|
|
32
|
-
},
|
|
33
|
-
"./lib/*": {
|
|
34
|
-
"require": "./lib/*"
|
|
35
|
-
},
|
|
36
|
-
"./_/*": {
|
|
37
|
-
"import": "./esm/*.js",
|
|
38
|
-
"require": "./lib/*.js"
|
|
39
|
-
},
|
|
23
|
+
".": "./lib/index.js",
|
|
24
|
+
"./convert": "./convert.js",
|
|
25
|
+
"./lib/*": "./lib/*",
|
|
40
26
|
"./package.json": "./package.json"
|
|
41
27
|
},
|
|
42
28
|
"sideEffects": false,
|
|
43
29
|
"files": [
|
|
44
|
-
"esm",
|
|
45
30
|
"lib",
|
|
46
31
|
"src",
|
|
47
32
|
"convert.d.ts",
|
|
@@ -56,16 +41,15 @@
|
|
|
56
41
|
},
|
|
57
42
|
"scripts": {
|
|
58
43
|
"cleanup": "rimraf esm lib convert.d.ts convert.js",
|
|
59
|
-
"build": "yarn build:
|
|
44
|
+
"build": "yarn build:esnext && yarn build:convert",
|
|
60
45
|
"build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
|
|
61
|
-
"build:
|
|
62
|
-
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
46
|
+
"build:esnext": "tsc --project tsconfig.json --outDir lib --module esnext",
|
|
63
47
|
"typedoc": "typedoc --json ../../../docs/types/piral-riot.json src --exclude \"src/**/*.test.*\"",
|
|
64
48
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
65
49
|
},
|
|
66
50
|
"devDependencies": {
|
|
67
|
-
"piral-core": "1.6.0-beta.
|
|
51
|
+
"piral-core": "1.6.0-beta.7243",
|
|
68
52
|
"riot": "^4.7.2"
|
|
69
53
|
},
|
|
70
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bbb6e4f78c61b6ef753099a5b378ad2708565ce3"
|
|
71
55
|
}
|
package/esm/converter.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as Riot from 'riot';
|
|
2
|
-
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
3
|
-
export interface RiotConverterOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Defines the name of the Riot extension element.
|
|
6
|
-
* @default riot-extension
|
|
7
|
-
*/
|
|
8
|
-
extensionName?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createConverter(config?: RiotConverterOptions): {
|
|
11
|
-
<TProps extends BaseComponentProps>(component: Riot.RiotComponentShell<TProps, object>, captured?: Record<string, any>): ForeignComponent<TProps>;
|
|
12
|
-
Extension: Riot.RiotComponentShell<import("piral-core").ExtensionSlotProps, object>;
|
|
13
|
-
};
|
package/esm/converter.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as Riot from 'riot';
|
|
2
|
-
import { createExtension } from './extension';
|
|
3
|
-
export function createConverter(config = {}) {
|
|
4
|
-
const { extensionName = 'riot-extension' } = config;
|
|
5
|
-
const Extension = createExtension(extensionName);
|
|
6
|
-
const convert = (component, captured) => {
|
|
7
|
-
const mountApp = Riot.component(component);
|
|
8
|
-
return {
|
|
9
|
-
mount(el, props, ctx, locals) {
|
|
10
|
-
locals.app = mountApp(el, {
|
|
11
|
-
...captured,
|
|
12
|
-
...ctx,
|
|
13
|
-
...props,
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
unmount(el, locals) {
|
|
17
|
-
locals.app.unmount(true);
|
|
18
|
-
el.innerHTML = '';
|
|
19
|
-
locals.app = undefined;
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
convert.Extension = Extension;
|
|
24
|
-
return convert;
|
|
25
|
-
}
|
|
26
|
-
//# 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":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,UAAU,eAAe,CAAC,SAA+B,EAAE;IAC/D,MAAM,EAAE,aAAa,GAAG,gBAAgB,EAAE,GAAG,MAAM,CAAC;IACpD,MAAM,SAAS,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,CACd,SAA0C,EAC1C,QAA8B,EACJ,EAAE;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAE3C,OAAO;YACL,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAyB;gBAC7C,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAC,EAAE,EAAE;oBACxB,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,KAAK;iBACT,CAAC,CAAC;YACL,CAAC;YACD,OAAO,CAAC,EAAE,EAAE,MAAyB;gBACnC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACzB,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;gBAClB,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC;YACzB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/esm/create.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PiralPlugin } from 'piral-core';
|
|
2
|
-
import type { PiletRiotApi } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Available configuration options for the Riot.js plugin.
|
|
5
|
-
*/
|
|
6
|
-
export interface RiotConfig {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates new Pilet API extensions for integrating Riot.js.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createRiotApi(config?: RiotConfig): PiralPlugin<PiletRiotApi>;
|
package/esm/create.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createConverter } from './converter';
|
|
2
|
-
/**
|
|
3
|
-
* Creates new Pilet API extensions for integrating Riot.js.
|
|
4
|
-
*/
|
|
5
|
-
export function createRiotApi(config = {}) {
|
|
6
|
-
return (context) => {
|
|
7
|
-
const convert = createConverter(config);
|
|
8
|
-
context.converters.riot = ({ component, captured }) => convert(component, captured);
|
|
9
|
-
return {
|
|
10
|
-
fromRiot(component, captured) {
|
|
11
|
-
return {
|
|
12
|
-
type: 'riot',
|
|
13
|
-
component,
|
|
14
|
-
captured,
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
RiotExtension: 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,EAAE,MAAM,aAAa,CAAC;AAQ9C;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAqB,EAAE;IACnD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEpF,OAAO;YACL,QAAQ,CAAC,SAAS,EAAE,QAAQ;gBAC1B,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,SAAS;oBACT,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,aAAa,EAAE,OAAO,CAAC,SAAS;SACjC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/esm/extension.d.ts
DELETED
package/esm/extension.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export function createExtension(extensionName) {
|
|
2
|
-
return {
|
|
3
|
-
name: extensionName,
|
|
4
|
-
template() {
|
|
5
|
-
const templateChunk = {
|
|
6
|
-
mount(element, scope) {
|
|
7
|
-
element.dispatchEvent(new CustomEvent('render-html', {
|
|
8
|
-
bubbles: true,
|
|
9
|
-
detail: {
|
|
10
|
-
target: element,
|
|
11
|
-
props: scope.props,
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
return templateChunk;
|
|
15
|
-
},
|
|
16
|
-
update() {
|
|
17
|
-
return templateChunk;
|
|
18
|
-
},
|
|
19
|
-
unmount() {
|
|
20
|
-
return templateChunk;
|
|
21
|
-
},
|
|
22
|
-
createDOM() {
|
|
23
|
-
return templateChunk;
|
|
24
|
-
},
|
|
25
|
-
clone() {
|
|
26
|
-
return templateChunk;
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
return templateChunk;
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
//# 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":"AAIA,MAAM,UAAU,eAAe,CAAC,aAAqB;IACnD,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,QAAQ;YACN,MAAM,aAAa,GAAkB;gBACnC,KAAK,CAAC,OAAO,EAAE,KAAK;oBAClB,OAAO,CAAC,aAAa,CACnB,IAAI,WAAW,CAAC,aAAa,EAAE;wBAC7B,OAAO,EAAE,IAAI;wBACb,MAAM,EAAE;4BACN,MAAM,EAAE,OAAO;4BACf,KAAK,EAAE,KAAK,CAAC,KAAK;yBACnB;qBACF,CAAC,CACH,CAAC;oBACF,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,MAAM;oBACJ,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,OAAO;oBACL,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,SAAS;oBACP,OAAO,aAAa,CAAC;gBACvB,CAAC;gBACD,KAAK;oBACH,OAAO,aAAa,CAAC;gBACvB,CAAC;aACF,CAAC;YACF,OAAO,aAAa,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,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,39 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, ExtensionSlotProps } from 'piral-core';
|
|
2
|
-
import type { RiotComponentShell } from 'riot';
|
|
3
|
-
declare module 'piral-core/lib/types/custom' {
|
|
4
|
-
interface PiletCustomApi extends PiletRiotApi {
|
|
5
|
-
}
|
|
6
|
-
interface PiralCustomComponentConverters<TProps> {
|
|
7
|
-
riot(component: RiotComponent<TProps>): ForeignComponent<TProps>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export interface RiotComponent<TProps> {
|
|
11
|
-
/**
|
|
12
|
-
* The component.
|
|
13
|
-
*/
|
|
14
|
-
component: RiotComponentShell<TProps>;
|
|
15
|
-
/**
|
|
16
|
-
* Captures props for transport into the Riot.js component.
|
|
17
|
-
*/
|
|
18
|
-
captured?: Record<string, any>;
|
|
19
|
-
/**
|
|
20
|
-
* The type of the Riot.js component.
|
|
21
|
-
*/
|
|
22
|
-
type: 'riot';
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Defines the provided set of Riot.js Pilet API extensions.
|
|
26
|
-
*/
|
|
27
|
-
export interface PiletRiotApi {
|
|
28
|
-
/**
|
|
29
|
-
* Wraps an Riot.js component for use in Piral.
|
|
30
|
-
* @param component The component root.
|
|
31
|
-
* @param captured The optionally captured props.
|
|
32
|
-
* @returns The Piral Riot.js component.
|
|
33
|
-
*/
|
|
34
|
-
fromRiot<TProps>(component: RiotComponentShell<TProps>, captured?: Record<string, any>): RiotComponent<TProps>;
|
|
35
|
-
/**
|
|
36
|
-
* Riot.js component for displaying extensions of the given name.
|
|
37
|
-
*/
|
|
38
|
-
RiotExtension: RiotComponentShell<ExtensionSlotProps>;
|
|
39
|
-
}
|
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":""}
|