piral-hyperapp 0.15.0-alpha.3809 → 0.15.0-alpha.3933

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # [Piral Hyperapp](https://piral.io) · [![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/smapiot/piral/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/piral-hyperapp.svg?style=flat)](https://www.npmjs.com/package/piral-hyperapp) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://jestjs.io) [![Gitter Chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/piral-io/community)
4
4
 
5
- This is a plugin that only has a peer dependency to `piral-core`. What `piral-hyperapp` brings to the table is a set of Pilet API extensions that can be used with `piral` or `piral-core`.
5
+ This is a plugin that only has a peer dependency to `hyperapp`. What `piral-hyperapp` brings to the table is a set of Pilet API extensions that can be used with `piral` or `piral-core`.
6
6
 
7
7
  The set includes a Hyperapp converter for any component registration, as well as a `fromHyperapp` shortcut and a `HyperappExtension` component.
8
8
 
package/esm/converter.js CHANGED
@@ -3,16 +3,14 @@ import { createExtension } from './extension';
3
3
  export function createConverter(config = {}) {
4
4
  const { rootName = 'slot' } = config;
5
5
  const Extension = createExtension(rootName);
6
- const convert = (root, state, actions) => {
7
- return {
8
- mount(el, props, ctx) {
9
- mountHyperapp(el, root, props, ctx, state, actions);
10
- },
11
- unmount(el) {
12
- el.innerHTML = '';
13
- },
14
- };
15
- };
6
+ const convert = (root, state, actions) => ({
7
+ mount(el, props, ctx) {
8
+ mountHyperapp(el, root, props, ctx, state, actions);
9
+ },
10
+ unmount(el) {
11
+ el.innerHTML = '';
12
+ },
13
+ });
16
14
  convert.Extension = Extension;
17
15
  return convert;
18
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"AACA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D,CAAC;QACD,OAAO,CAAC,EAAE;YACR,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/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ForeignComponent, ExtensionSlotProps } from 'piral-core';
1
+ import type { ForeignComponent, ExtensionSlotProps } from 'piral-core';
2
2
  declare module 'piral-core/lib/types/custom' {
3
3
  interface PiletCustomApi extends PiletHyperappApi {
4
4
  }
package/lib/converter.js CHANGED
@@ -6,16 +6,14 @@ const extension_1 = require("./extension");
6
6
  function createConverter(config = {}) {
7
7
  const { rootName = 'slot' } = config;
8
8
  const Extension = (0, extension_1.createExtension)(rootName);
9
- const convert = (root, state, actions) => {
10
- return {
11
- mount(el, props, ctx) {
12
- (0, mount_1.mountHyperapp)(el, root, props, ctx, state, actions);
13
- },
14
- unmount(el) {
15
- el.innerHTML = '';
16
- },
17
- };
18
- };
9
+ const convert = (root, state, actions) => ({
10
+ mount(el, props, ctx) {
11
+ (0, mount_1.mountHyperapp)(el, root, props, ctx, state, actions);
12
+ },
13
+ unmount(el) {
14
+ el.innerHTML = '';
15
+ },
16
+ });
19
17
  convert.Extension = Extension;
20
18
  return convert;
21
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":";;;AACA,mCAAwC;AACxC,2CAA8C;AAW9C,SAAgB,eAAe,CAAC,SAAmC,EAAE;IACnE,MAAM,EAAE,QAAQ,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACrC,MAAM,SAAS,GAAG,IAAA,2BAAe,EAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CACd,IAAuB,EACvB,KAAU,EACV,OAAY,EACc,EAAE;QAC5B,OAAO;YACL,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG;gBAClB,IAAA,qBAAa,EAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;YACD,OAAO,CAAC,EAAE;gBACR,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;YACpB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC;AAnBD,0CAmBC"}
1
+ {"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":";;;AACA,mCAAwC;AACxC,2CAA8C;AAW9C,SAAgB,eAAe,CAAC,SAAmC,EAAE;IACnE,MAAM,EAAE,QAAQ,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACrC,MAAM,SAAS,GAAG,IAAA,2BAAe,EAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CACd,IAAuB,EACvB,KAAU,EACV,OAAY,EACc,EAAE,CAAC,CAAC;QAC9B,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG;YAClB,IAAA,qBAAa,EAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,CAAC,EAAE;YACR,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC;AAjBD,0CAiBC"}
package/lib/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ForeignComponent, ExtensionSlotProps } from 'piral-core';
1
+ import type { ForeignComponent, ExtensionSlotProps } from 'piral-core';
2
2
  declare module 'piral-core/lib/types/custom' {
3
3
  interface PiletCustomApi extends PiletHyperappApi {
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-hyperapp",
3
- "version": "0.15.0-alpha.3809",
3
+ "version": "0.15.0-alpha.3933",
4
4
  "description": "Plugin for integrating hyperapp components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -45,11 +45,10 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "hyperapp": "^1.2.10",
48
- "piral-core": "0.15.0-alpha.3809"
48
+ "piral-core": "0.15.0-alpha.3933"
49
49
  },
50
50
  "peerDependencies": {
51
- "hyperapp": "^1.0.0",
52
- "piral-core": "0.14.x"
51
+ "hyperapp": "^1.0.0"
53
52
  },
54
- "gitHead": "e26067cdcbbe90ff72d1d0815929655c05126e3a"
53
+ "gitHead": "520a272d09f02543153f1d8b2ae23a3ae10acd6f"
55
54
  }
package/src/converter.ts CHANGED
@@ -18,16 +18,14 @@ export function createConverter(config: HyperappConverterOptions = {}) {
18
18
  root: Component<TProps>,
19
19
  state: any,
20
20
  actions: any,
21
- ): ForeignComponent<TProps> => {
22
- return {
23
- mount(el, props, ctx) {
24
- mountHyperapp(el, root, props, ctx, state, actions);
25
- },
26
- unmount(el) {
27
- el.innerHTML = '';
28
- },
29
- };
30
- };
21
+ ): ForeignComponent<TProps> => ({
22
+ mount(el, props, ctx) {
23
+ mountHyperapp(el, root, props, ctx, state, actions);
24
+ },
25
+ unmount(el) {
26
+ el.innerHTML = '';
27
+ },
28
+ });
31
29
  convert.Extension = Extension;
32
30
  return convert;
33
31
  }
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ForeignComponent, ExtensionSlotProps } from 'piral-core';
1
+ import type { ForeignComponent, ExtensionSlotProps } from 'piral-core';
2
2
 
3
3
  declare module 'piral-core/lib/types/custom' {
4
4
  interface PiletCustomApi extends PiletHyperappApi {}