piral-solid 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 +8 -12
- 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 -13
- package/esm/converter.js +0 -30
- package/esm/converter.js.map +0 -1
- package/esm/create.d.ts +0 -11
- package/esm/create.js +0 -20
- package/esm/create.js.map +0 -1
- package/esm/extension.d.ts +0 -3
- package/esm/extension.js +0 -27
- 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 -34
- 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,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const web_1 = require("solid-js/web");
|
|
6
|
-
const extension_1 = require("./extension");
|
|
7
|
-
function createConverter(config = {}) {
|
|
1
|
+
import { onCleanup } from 'solid-js';
|
|
2
|
+
import { render, createComponent } from 'solid-js/web';
|
|
3
|
+
import { createExtension } from './extension';
|
|
4
|
+
export function createConverter(config = {}) {
|
|
8
5
|
const { rootName = 'piral-slot' } = config;
|
|
9
|
-
const Extension =
|
|
6
|
+
const Extension = createExtension(rootName);
|
|
10
7
|
const convert = (root) => ({
|
|
11
8
|
mount(el, props, context, locals) {
|
|
12
9
|
locals.update = (props, context) => {
|
|
13
|
-
locals.destroy =
|
|
14
|
-
|
|
10
|
+
locals.destroy = render(() => {
|
|
11
|
+
onCleanup(() => {
|
|
15
12
|
el.innerHTML = '';
|
|
16
13
|
});
|
|
17
|
-
return
|
|
14
|
+
return createComponent(root, { context, ...props });
|
|
18
15
|
}, el);
|
|
19
16
|
};
|
|
20
17
|
locals.update(props, context);
|
|
@@ -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,EAAa,SAAS,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAU9C,MAAM,UAAU,eAAe,CAAC,SAAgC,EAAE;IAChE,MAAM,EAAE,QAAQ,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CAAoC,IAAuB,EAA4B,EAAE,CAAC,CAAC;QACzG,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;YAC9B,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE;oBAC3B,SAAS,CAAC,GAAG,EAAE;wBACb,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;oBACpB,CAAC,CAAC,CAAC;oBACH,OAAO,eAAe,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;gBACtD,CAAC,EAAE,EAAE,CAAC,CAAC;YACT,CAAC,CAAC;YAEF,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;YAC/B,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAM;YAChB,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,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.createSolidApi = 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 Solid.
|
|
7
4
|
*/
|
|
8
|
-
function createSolidApi(config = {}) {
|
|
5
|
+
export function createSolidApi(config = {}) {
|
|
9
6
|
return (context) => {
|
|
10
|
-
const convert =
|
|
7
|
+
const convert = createConverter(config);
|
|
11
8
|
context.converters.solid = ({ root }) => convert(root);
|
|
12
9
|
return {
|
|
13
10
|
fromSolid(root) {
|
|
@@ -20,5 +17,4 @@ function createSolidApi(config = {}) {
|
|
|
20
17
|
};
|
|
21
18
|
};
|
|
22
19
|
}
|
|
23
|
-
exports.createSolidApi = createSolidApi;
|
|
24
20
|
//# 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,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,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvD,OAAO;YACL,SAAS,CAAC,IAAI;gBACZ,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,IAAI;iBACL,CAAC;YACJ,CAAC;YACD,cAAc,EAAE,OAAO,CAAC,SAAS;SAClC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/extension.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.createExtension = void 0;
|
|
4
|
-
const solid_js_1 = require("solid-js");
|
|
5
|
-
function createExtension(rootName) {
|
|
1
|
+
import { createEffect } from 'solid-js';
|
|
2
|
+
export function createExtension(rootName) {
|
|
6
3
|
return (props) => {
|
|
7
4
|
const element = document.createElement(rootName);
|
|
8
5
|
setTimeout(() => {
|
|
@@ -14,7 +11,7 @@ function createExtension(rootName) {
|
|
|
14
11
|
},
|
|
15
12
|
}));
|
|
16
13
|
}, 0);
|
|
17
|
-
|
|
14
|
+
createEffect(() => {
|
|
18
15
|
element.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
19
16
|
detail: {
|
|
20
17
|
name: props.name,
|
|
@@ -27,5 +24,4 @@ function createExtension(rootName) {
|
|
|
27
24
|
return element;
|
|
28
25
|
};
|
|
29
26
|
}
|
|
30
|
-
exports.createExtension = createExtension;
|
|
31
27
|
//# 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":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjD,UAAU,CAAC,GAAG,EAAE;YACd,OAAO,CAAC,aAAa,CACnB,IAAI,WAAW,CAAC,aAAa,EAAE;gBAC7B,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,MAAM,EAAE,OAAO;oBACf,KAAK;iBACN;aACF,CAAC,CACH,CAAC;QACJ,CAAC,EAAE,CAAC,CAAC,CAAC;QAEN,YAAY,CAAC,GAAG,EAAE;YAChB,OAAO,CAAC,aAAa,CACnB,IAAI,WAAW,CAAC,yBAAyB,EAAE;gBACzC,MAAM,EAAE;oBACN,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,MAAM,EAAE,KAAK,CAAC,MAAM;iBACrB;aACF,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,OAAc,CAAC;IACxB,CAAC,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-solid",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.7243",
|
|
4
4
|
"description": "Plugin for integrating Solid 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-solid.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
|
"solid-js": "^1.7.3"
|
|
69
53
|
},
|
|
70
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bbb6e4f78c61b6ef753099a5b378ad2708565ce3"
|
|
71
55
|
}
|
package/esm/converter.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
2
|
-
import { Component } from 'solid-js';
|
|
3
|
-
export interface SolidConverterOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Defines the name of the root element.
|
|
6
|
-
* @default piral-slot
|
|
7
|
-
*/
|
|
8
|
-
rootName?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createConverter(config?: SolidConverterOptions): {
|
|
11
|
-
<TProps extends BaseComponentProps>(root: Component<TProps>): ForeignComponent<TProps>;
|
|
12
|
-
Extension: Component<import("piral-core").ExtensionSlotProps>;
|
|
13
|
-
};
|
package/esm/converter.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { onCleanup } from 'solid-js';
|
|
2
|
-
import { render, createComponent } from 'solid-js/web';
|
|
3
|
-
import { createExtension } from './extension';
|
|
4
|
-
export function createConverter(config = {}) {
|
|
5
|
-
const { rootName = 'piral-slot' } = config;
|
|
6
|
-
const Extension = createExtension(rootName);
|
|
7
|
-
const convert = (root) => ({
|
|
8
|
-
mount(el, props, context, locals) {
|
|
9
|
-
locals.update = (props, context) => {
|
|
10
|
-
locals.destroy = render(() => {
|
|
11
|
-
onCleanup(() => {
|
|
12
|
-
el.innerHTML = '';
|
|
13
|
-
});
|
|
14
|
-
return createComponent(root, { context, ...props });
|
|
15
|
-
}, el);
|
|
16
|
-
};
|
|
17
|
-
locals.update(props, context);
|
|
18
|
-
},
|
|
19
|
-
update(el, props, context, locals) {
|
|
20
|
-
locals.destroy();
|
|
21
|
-
locals.update(props, context);
|
|
22
|
-
},
|
|
23
|
-
unmount(el, locals) {
|
|
24
|
-
locals.destroy();
|
|
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,EAAa,SAAS,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAU9C,MAAM,UAAU,eAAe,CAAC,SAAgC,EAAE;IAChE,MAAM,EAAE,QAAQ,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CAAoC,IAAuB,EAA4B,EAAE,CAAC,CAAC;QACzG,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;YAC9B,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE;oBAC3B,SAAS,CAAC,GAAG,EAAE;wBACb,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;oBACpB,CAAC,CAAC,CAAC;oBACH,OAAO,eAAe,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;gBACtD,CAAC,EAAE,EAAE,CAAC,CAAC;YACT,CAAC,CAAC;YAEF,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;YAC/B,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAM;YAChB,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,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 { PiletSolidApi } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Available configuration options for the Solid plugin.
|
|
5
|
-
*/
|
|
6
|
-
export interface SolidConfig {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates new Pilet API extensions for integration of Solid.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createSolidApi(config?: SolidConfig): PiralPlugin<PiletSolidApi>;
|
package/esm/create.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { createConverter } from './converter';
|
|
2
|
-
/**
|
|
3
|
-
* Creates new Pilet API extensions for integration of Solid.
|
|
4
|
-
*/
|
|
5
|
-
export function createSolidApi(config = {}) {
|
|
6
|
-
return (context) => {
|
|
7
|
-
const convert = createConverter(config);
|
|
8
|
-
context.converters.solid = ({ root }) => convert(root);
|
|
9
|
-
return {
|
|
10
|
-
fromSolid(root) {
|
|
11
|
-
return {
|
|
12
|
-
type: 'solid',
|
|
13
|
-
root,
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
SolidExtension: convert.Extension,
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
//# 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,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,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvD,OAAO;YACL,SAAS,CAAC,IAAI;gBACZ,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,IAAI;iBACL,CAAC;YACJ,CAAC;YACD,cAAc,EAAE,OAAO,CAAC,SAAS;SAClC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/esm/extension.d.ts
DELETED
package/esm/extension.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createEffect } from 'solid-js';
|
|
2
|
-
export function createExtension(rootName) {
|
|
3
|
-
return (props) => {
|
|
4
|
-
const element = document.createElement(rootName);
|
|
5
|
-
setTimeout(() => {
|
|
6
|
-
element.dispatchEvent(new CustomEvent('render-html', {
|
|
7
|
-
bubbles: true,
|
|
8
|
-
detail: {
|
|
9
|
-
target: element,
|
|
10
|
-
props,
|
|
11
|
-
},
|
|
12
|
-
}));
|
|
13
|
-
}, 0);
|
|
14
|
-
createEffect(() => {
|
|
15
|
-
element.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
16
|
-
detail: {
|
|
17
|
-
name: props.name,
|
|
18
|
-
empty: props.empty,
|
|
19
|
-
params: props.params,
|
|
20
|
-
render: props.render,
|
|
21
|
-
},
|
|
22
|
-
}));
|
|
23
|
-
});
|
|
24
|
-
return element;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//# 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":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjD,UAAU,CAAC,GAAG,EAAE;YACd,OAAO,CAAC,aAAa,CACnB,IAAI,WAAW,CAAC,aAAa,EAAE;gBAC7B,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,MAAM,EAAE,OAAO;oBACf,KAAK;iBACN;aACF,CAAC,CACH,CAAC;QACJ,CAAC,EAAE,CAAC,CAAC,CAAC;QAEN,YAAY,CAAC,GAAG,EAAE;YAChB,OAAO,CAAC,aAAa,CACnB,IAAI,WAAW,CAAC,yBAAyB,EAAE;gBACzC,MAAM,EAAE;oBACN,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,MAAM,EAAE,KAAK,CAAC,MAAM;iBACrB;aACF,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,OAAc,CAAC;IACxB,CAAC,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,34 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, ExtensionSlotProps } from 'piral-core';
|
|
2
|
-
import type { Component } from 'solid-js';
|
|
3
|
-
declare module 'piral-core/lib/types/custom' {
|
|
4
|
-
interface PiletCustomApi extends PiletSolidApi {
|
|
5
|
-
}
|
|
6
|
-
interface PiralCustomComponentConverters<TProps> {
|
|
7
|
-
solid(component: SolidComponent<TProps>): ForeignComponent<TProps>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export interface SolidComponent<TProps> {
|
|
11
|
-
/**
|
|
12
|
-
* The component root.
|
|
13
|
-
*/
|
|
14
|
-
root: Component<TProps>;
|
|
15
|
-
/**
|
|
16
|
-
* The type of the Solid component.
|
|
17
|
-
*/
|
|
18
|
-
type: 'solid';
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Defines the provided set of Solid Pilet API extensions.
|
|
22
|
-
*/
|
|
23
|
-
export interface PiletSolidApi {
|
|
24
|
-
/**
|
|
25
|
-
* Wraps a Solid component for use in Piral.
|
|
26
|
-
* @param component The name of the root component.
|
|
27
|
-
* @returns The Piral Solid component.
|
|
28
|
-
*/
|
|
29
|
-
fromSolid<TProps>(root: Component<TProps>): SolidComponent<TProps>;
|
|
30
|
-
/**
|
|
31
|
-
* Gets the name of the Solid extension.
|
|
32
|
-
*/
|
|
33
|
-
SolidExtension: Component<ExtensionSlotProps>;
|
|
34
|
-
}
|
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":""}
|