piral-mithril 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 +3 -7
- 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 -16
- package/esm/converter.js +0 -33
- 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 -4
- package/esm/extension.js +0 -18
- 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 -44
- 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 mithril = require("mithril");
|
|
5
|
-
const extension_1 = require("./extension");
|
|
6
|
-
function createConverter(config = {}) {
|
|
1
|
+
import * as mithril from 'mithril';
|
|
2
|
+
import { createExtension } from './extension';
|
|
3
|
+
export function createConverter(config = {}) {
|
|
7
4
|
const { rootName = 'piral-slot' } = config;
|
|
8
|
-
const Extension =
|
|
5
|
+
const Extension = createExtension(rootName);
|
|
9
6
|
const convert = (component, captured) => ({
|
|
10
7
|
mount(el, props, ctx) {
|
|
11
8
|
mithril.mount(el, {
|
|
@@ -33,5 +30,4 @@ function createConverter(config = {}) {
|
|
|
33
30
|
convert.Extension = Extension;
|
|
34
31
|
return convert;
|
|
35
32
|
}
|
|
36
|
-
exports.createConverter = createConverter;
|
|
37
33
|
//# 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,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAW9C,MAAM,UAAU,eAAe,CAAC,SAAkC,EAAE;IAClE,MAAM,EAAE,QAAQ,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CACd,SAA4B,EAC5B,QAA8B,EACJ,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG;YAClB,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE;gBAChB,IAAI,EAAE,GAAG,EAAE,CACT,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE;oBACnB,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,KAAK;iBACT,CAAC;aACL,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG;YACnB,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE;gBAChB,IAAI,EAAE,GAAG,EAAE,CACT,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE;oBACnB,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,KAAK;iBACT,CAAC;aACL,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,EAAE;YACR,2CAA2C;YAC3C,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1B,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.createMithrilApi = void 0;
|
|
4
|
-
const converter_1 = require("./converter");
|
|
1
|
+
import { createConverter } from './converter';
|
|
5
2
|
/**
|
|
6
3
|
* Creates new Pilet API extensions for integrating Mithril.js.
|
|
7
4
|
*/
|
|
8
|
-
function createMithrilApi(config = {}) {
|
|
5
|
+
export function createMithrilApi(config = {}) {
|
|
9
6
|
return (context) => {
|
|
10
|
-
const convert =
|
|
7
|
+
const convert = createConverter(config);
|
|
11
8
|
context.converters.mithril = ({ component, captured }) => convert(component, captured);
|
|
12
9
|
return {
|
|
13
10
|
fromMithril(component, captured) {
|
|
@@ -21,5 +18,4 @@ function createMithrilApi(config = {}) {
|
|
|
21
18
|
};
|
|
22
19
|
};
|
|
23
20
|
}
|
|
24
|
-
exports.createMithrilApi = createMithrilApi;
|
|
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,gBAAgB,CAAC,SAAwB,EAAE;IACzD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEvF,OAAO;YACL,WAAW,CAAC,SAAS,EAAE,QAAQ;gBAC7B,OAAO;oBACL,IAAI,EAAE,SAAS;oBACf,SAAS;oBACT,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,gBAAgB,EAAE,OAAO,CAAC,SAAS;SACpC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/extension.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.createExtension = void 0;
|
|
4
|
-
const mithril_1 = require("mithril");
|
|
5
|
-
function createExtension(rootName) {
|
|
1
|
+
import { m } from 'mithril';
|
|
2
|
+
export function createExtension(rootName) {
|
|
6
3
|
return {
|
|
7
4
|
oncreate(vnode) {
|
|
8
5
|
vnode.dom.dispatchEvent(new CustomEvent('render-html', {
|
|
@@ -14,9 +11,8 @@ function createExtension(rootName) {
|
|
|
14
11
|
}));
|
|
15
12
|
},
|
|
16
13
|
view() {
|
|
17
|
-
return
|
|
14
|
+
return m(rootName);
|
|
18
15
|
},
|
|
19
16
|
};
|
|
20
17
|
}
|
|
21
|
-
exports.createExtension = createExtension;
|
|
22
18
|
//# 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,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAE5B,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO;QACL,QAAQ,CAAC,KAAK;YACZ,KAAK,CAAC,GAAG,CAAC,aAAa,CACrB,IAAI,WAAW,CAAC,aAAa,EAAE;gBAC7B,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,MAAM,EAAE,KAAK,CAAC,GAAG;oBACjB,KAAK,EAAE,KAAK,CAAC,KAAK;iBACnB;aACF,CAAC,CACH,CAAC;QACJ,CAAC;QACD,IAAI;YACF,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;QACrB,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-mithril",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.7243",
|
|
4
4
|
"description": "Plugin for integrating Mithril.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-mithril.json src --exclude \"src/**/*.test.*\"",
|
|
64
48
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
65
49
|
},
|
|
66
50
|
"devDependencies": {
|
|
67
51
|
"mithril": "2.0.4",
|
|
68
|
-
"piral-core": "1.6.0-beta.
|
|
52
|
+
"piral-core": "1.6.0-beta.7243"
|
|
69
53
|
},
|
|
70
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bbb6e4f78c61b6ef753099a5b378ad2708565ce3"
|
|
71
55
|
}
|
package/esm/converter.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
2
|
-
import type { Component } from './types';
|
|
3
|
-
export interface MithrilConverterOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Defines the name of the root element.
|
|
6
|
-
* @default piral-slot
|
|
7
|
-
*/
|
|
8
|
-
rootName?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createConverter(config?: MithrilConverterOptions): {
|
|
11
|
-
<TProps extends BaseComponentProps>(component: Component<TProps>, captured?: Record<string, any>): ForeignComponent<TProps>;
|
|
12
|
-
Extension: {
|
|
13
|
-
oncreate(vnode: any): void;
|
|
14
|
-
view(): any;
|
|
15
|
-
};
|
|
16
|
-
};
|
package/esm/converter.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as mithril from 'mithril';
|
|
2
|
-
import { createExtension } from './extension';
|
|
3
|
-
export function createConverter(config = {}) {
|
|
4
|
-
const { rootName = 'piral-slot' } = config;
|
|
5
|
-
const Extension = createExtension(rootName);
|
|
6
|
-
const convert = (component, captured) => ({
|
|
7
|
-
mount(el, props, ctx) {
|
|
8
|
-
mithril.mount(el, {
|
|
9
|
-
view: () => mithril.m(component, {
|
|
10
|
-
...captured,
|
|
11
|
-
...ctx,
|
|
12
|
-
...props,
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
update(el, props, ctx) {
|
|
17
|
-
mithril.mount(el, {
|
|
18
|
-
view: () => mithril.m(component, {
|
|
19
|
-
...captured,
|
|
20
|
-
...ctx,
|
|
21
|
-
...props,
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
unmount(el) {
|
|
26
|
-
// tslint:disable-next-line:no-null-keyword
|
|
27
|
-
mithril.mount(el, null);
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
convert.Extension = Extension;
|
|
31
|
-
return convert;
|
|
32
|
-
}
|
|
33
|
-
//# 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,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAW9C,MAAM,UAAU,eAAe,CAAC,SAAkC,EAAE;IAClE,MAAM,EAAE,QAAQ,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CACd,SAA4B,EAC5B,QAA8B,EACJ,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG;YAClB,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE;gBAChB,IAAI,EAAE,GAAG,EAAE,CACT,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE;oBACnB,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,KAAK;iBACT,CAAC;aACL,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG;YACnB,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE;gBAChB,IAAI,EAAE,GAAG,EAAE,CACT,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE;oBACnB,GAAG,QAAQ;oBACX,GAAG,GAAG;oBACN,GAAG,KAAK;iBACT,CAAC;aACL,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,EAAE;YACR,2CAA2C;YAC3C,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;IACH,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 { PiletMithrilApi } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Available configuration options for the Mithril.js plugin.
|
|
5
|
-
*/
|
|
6
|
-
export interface MithrilConfig {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates new Pilet API extensions for integrating Mithril.js.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createMithrilApi(config?: MithrilConfig): PiralPlugin<PiletMithrilApi>;
|
package/esm/create.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createConverter } from './converter';
|
|
2
|
-
/**
|
|
3
|
-
* Creates new Pilet API extensions for integrating Mithril.js.
|
|
4
|
-
*/
|
|
5
|
-
export function createMithrilApi(config = {}) {
|
|
6
|
-
return (context) => {
|
|
7
|
-
const convert = createConverter(config);
|
|
8
|
-
context.converters.mithril = ({ component, captured }) => convert(component, captured);
|
|
9
|
-
return {
|
|
10
|
-
fromMithril(component, captured) {
|
|
11
|
-
return {
|
|
12
|
-
type: 'mithril',
|
|
13
|
-
component,
|
|
14
|
-
captured,
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
MithrilExtension: 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,gBAAgB,CAAC,SAAwB,EAAE;IACzD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEvF,OAAO;YACL,WAAW,CAAC,SAAS,EAAE,QAAQ;gBAC7B,OAAO;oBACL,IAAI,EAAE,SAAS;oBACf,SAAS;oBACT,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,gBAAgB,EAAE,OAAO,CAAC,SAAS;SACpC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/esm/extension.d.ts
DELETED
package/esm/extension.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { m } from 'mithril';
|
|
2
|
-
export function createExtension(rootName) {
|
|
3
|
-
return {
|
|
4
|
-
oncreate(vnode) {
|
|
5
|
-
vnode.dom.dispatchEvent(new CustomEvent('render-html', {
|
|
6
|
-
bubbles: true,
|
|
7
|
-
detail: {
|
|
8
|
-
target: vnode.dom,
|
|
9
|
-
props: vnode.attrs,
|
|
10
|
-
},
|
|
11
|
-
}));
|
|
12
|
-
},
|
|
13
|
-
view() {
|
|
14
|
-
return m(rootName);
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
//# 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,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAE5B,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO;QACL,QAAQ,CAAC,KAAK;YACZ,KAAK,CAAC,GAAG,CAAC,aAAa,CACrB,IAAI,WAAW,CAAC,aAAa,EAAE;gBAC7B,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,MAAM,EAAE,KAAK,CAAC,GAAG;oBACjB,KAAK,EAAE,KAAK,CAAC,KAAK;iBACnB;aACF,CAAC,CACH,CAAC;QACJ,CAAC;QACD,IAAI;YACF,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;QACrB,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,44 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, ExtensionSlotProps } from 'piral-core';
|
|
2
|
-
declare module 'piral-core/lib/types/custom' {
|
|
3
|
-
interface PiletCustomApi extends PiletMithrilApi {
|
|
4
|
-
}
|
|
5
|
-
interface PiralCustomComponentConverters<TProps> {
|
|
6
|
-
mithril(component: MithrilComponent<TProps>): ForeignComponent<TProps>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export interface ComponentProps<TProps> {
|
|
10
|
-
attrs: TProps;
|
|
11
|
-
}
|
|
12
|
-
export interface Component<TProps> {
|
|
13
|
-
view(vnode: ComponentProps<TProps>): any;
|
|
14
|
-
}
|
|
15
|
-
export interface MithrilComponent<TProps> {
|
|
16
|
-
/**
|
|
17
|
-
* The component.
|
|
18
|
-
*/
|
|
19
|
-
component: Component<TProps>;
|
|
20
|
-
/**
|
|
21
|
-
* Captures props for transport into the Mithril.js component.
|
|
22
|
-
*/
|
|
23
|
-
captured?: Record<string, any>;
|
|
24
|
-
/**
|
|
25
|
-
* The type of the Mithril.js component.
|
|
26
|
-
*/
|
|
27
|
-
type: 'mithril';
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Defines the provided set of Mithril.js Pilet API extensions.
|
|
31
|
-
*/
|
|
32
|
-
export interface PiletMithrilApi {
|
|
33
|
-
/**
|
|
34
|
-
* Wraps an Mithril.js component for use in Piral.
|
|
35
|
-
* @param component The component root.
|
|
36
|
-
* @param captured The optionally captured props.
|
|
37
|
-
* @returns The Piral Mithril.js component.
|
|
38
|
-
*/
|
|
39
|
-
fromMithril<TProps>(component: Component<TProps>, captured?: Record<string, any>): MithrilComponent<TProps>;
|
|
40
|
-
/**
|
|
41
|
-
* Mithril.js component for displaying extensions of the given name.
|
|
42
|
-
*/
|
|
43
|
-
MithrilExtension: Component<ExtensionSlotProps>;
|
|
44
|
-
}
|
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":""}
|