@ecopages/kitajs 0.2.0-beta.31 → 0.2.0-beta.32
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/package.json +2 -2
- package/src/eco-embed.js +8 -10
- package/src/kitajs-renderer.js +12 -7
- package/src/kitajs.constants.js +1 -4
- package/src/kitajs.plugin.js +14 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecopages/kitajs",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.32",
|
|
4
4
|
"description": "Kitajs plugin for Ecopages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ecopages",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"directory": "packages/integrations/kitajs"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@ecopages/core": "0.2.0-beta.
|
|
34
|
+
"@ecopages/core": "0.2.0-beta.32",
|
|
35
35
|
"@kitajs/html": "^4.1.0",
|
|
36
36
|
"@kitajs/ts-html-plugin": "^4.0.1"
|
|
37
37
|
}
|
package/src/eco-embed.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/** @jsxImportSource @kitajs/html */
|
|
2
|
+
import { eco } from '@ecopages/core';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a foreign or same-integration eco component from a Kita JSX file
|
|
5
|
+
* without forcing inline mixed-JSX authoring.
|
|
6
|
+
*/
|
|
7
|
+
export function EcoEmbed({ component, props, children, }) {
|
|
8
|
+
return eco.embed(component, props, children);
|
|
8
9
|
}
|
|
9
|
-
export {
|
|
10
|
-
EcoEmbed
|
|
11
|
-
};
|
package/src/kitajs-renderer.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This module contains the Kita.js renderer
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import { StringMarkupRenderer } from '@ecopages/core/route-renderer/orchestration/string-markup-renderer';
|
|
6
|
+
import { KITAJS_PLUGIN_NAME } from './kitajs.constants.js';
|
|
7
|
+
/**
|
|
8
|
+
* A renderer for the Kita.js integration.
|
|
9
|
+
* It renders a page using the HtmlTemplate and Page components.
|
|
10
|
+
*/
|
|
11
|
+
export class KitaRenderer extends StringMarkupRenderer {
|
|
12
|
+
name = KITAJS_PLUGIN_NAME;
|
|
5
13
|
}
|
|
6
|
-
export {
|
|
7
|
-
KitaRenderer
|
|
8
|
-
};
|
package/src/kitajs.constants.js
CHANGED
package/src/kitajs.plugin.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { defineIntegration } from
|
|
2
|
-
import { KitaRenderer } from
|
|
3
|
-
import { KITAJS_PLUGIN_NAME } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { defineIntegration } from '@ecopages/core/plugins/define-integration';
|
|
2
|
+
import { KitaRenderer } from './kitajs-renderer.js';
|
|
3
|
+
import { KITAJS_PLUGIN_NAME } from './kitajs.constants.js';
|
|
4
|
+
/**
|
|
5
|
+
* The name of the Kita.js plugin
|
|
6
|
+
*/
|
|
7
|
+
export const PLUGIN_NAME = KITAJS_PLUGIN_NAME;
|
|
8
|
+
export const kitajsPlugin = defineIntegration({
|
|
9
|
+
name: PLUGIN_NAME,
|
|
10
|
+
extensions: ['.kita.tsx'],
|
|
11
|
+
jsxImportSource: '@kitajs/html',
|
|
12
|
+
renderer: KitaRenderer,
|
|
10
13
|
});
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
KitaHtmlPlugin,
|
|
14
|
-
PLUGIN_NAME,
|
|
15
|
-
kitajsPlugin
|
|
16
|
-
};
|
|
14
|
+
/** @deprecated Use {@link kitajsPlugin.Plugin} or {@link kitajsPlugin} instead. */
|
|
15
|
+
export const KitaHtmlPlugin = kitajsPlugin.Plugin;
|