@ecopages/kitajs 0.2.0-beta.31 → 0.2.0-beta.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecopages/kitajs",
3
- "version": "0.2.0-beta.31",
3
+ "version": "0.2.0-beta.33",
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.31",
34
+ "@ecopages/core": "0.2.0-beta.33",
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
- import { eco } from "@ecopages/core";
2
- function EcoEmbed({
3
- component,
4
- props,
5
- children
6
- }) {
7
- return eco.embed(component, props, children);
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
- };
@@ -1,8 +1,13 @@
1
- import { StringMarkupRenderer } from "@ecopages/core/route-renderer/orchestration/string-markup-renderer";
2
- import { KITAJS_PLUGIN_NAME } from "./kitajs.constants.js";
3
- class KitaRenderer extends StringMarkupRenderer {
4
- name = KITAJS_PLUGIN_NAME;
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
- };
@@ -1,4 +1 @@
1
- const KITAJS_PLUGIN_NAME = "kitajs";
2
- export {
3
- KITAJS_PLUGIN_NAME
4
- };
1
+ export const KITAJS_PLUGIN_NAME = 'kitajs';
@@ -1,16 +1,15 @@
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
- const PLUGIN_NAME = KITAJS_PLUGIN_NAME;
5
- const kitajsPlugin = defineIntegration({
6
- name: PLUGIN_NAME,
7
- extensions: [".kita.tsx"],
8
- jsxImportSource: "@kitajs/html",
9
- renderer: KitaRenderer
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
- const KitaHtmlPlugin = kitajsPlugin.Plugin;
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;