@ecopages/react 0.2.0-alpha.37 → 0.2.0-alpha.39
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 +9 -1
- package/src/eco-embed.d.ts +11 -0
- package/src/eco-embed.js +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecopages/react",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.39",
|
|
4
4
|
"description": "React integration for Ecopages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ecopages",
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"default": "./src/react.plugin.js",
|
|
17
17
|
"types": "./src/react.plugin.d.ts"
|
|
18
18
|
},
|
|
19
|
+
"./eco-embed": {
|
|
20
|
+
"default": "./src/eco-embed.js",
|
|
21
|
+
"types": "./src/eco-embed.d.ts"
|
|
22
|
+
},
|
|
19
23
|
"./declarations": {
|
|
20
24
|
"types": "./src/declarations.d.ts"
|
|
21
25
|
},
|
|
@@ -31,6 +35,10 @@
|
|
|
31
35
|
"types": "./src/router-adapter.d.ts",
|
|
32
36
|
"default": "./src/router-adapter.js"
|
|
33
37
|
},
|
|
38
|
+
"./eco-embed.ts": {
|
|
39
|
+
"default": "./src/eco-embed.js",
|
|
40
|
+
"types": "./src/eco-embed.d.ts"
|
|
41
|
+
},
|
|
34
42
|
"./declarations.ts": {
|
|
35
43
|
"types": "./src/declarations.d.ts"
|
|
36
44
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EcoComponent, EcoEmbedProps as CoreEcoEmbedProps } from '@ecopages/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the React-owned `EcoEmbed` adapter.
|
|
5
|
+
*/
|
|
6
|
+
export type EcoEmbedProps<TComponent extends EcoComponent> = CoreEcoEmbedProps<TComponent>;
|
|
7
|
+
/**
|
|
8
|
+
* Renders a foreign or same-integration eco component from a React JSX file
|
|
9
|
+
* without forcing inline mixed-JSX authoring.
|
|
10
|
+
*/
|
|
11
|
+
export declare function EcoEmbed<TComponent extends EcoComponent>({ component, props, children, }: EcoEmbedProps<TComponent>): ReactNode;
|