@plasmicapp/react-web
Advanced tools
Comparing version 0.2.21 to 0.2.22
@@ -1,3 +0,21 @@ | ||
/// <reference types="react" /> | ||
import { ComponentType } from "react"; | ||
export interface ComponentMeta { | ||
name: string; | ||
props: { | ||
[prop: string]: "string" | "boolean" | "number" | "slot"; | ||
}; | ||
} | ||
interface Registration { | ||
component: ComponentType; | ||
meta: ComponentMeta; | ||
} | ||
declare global { | ||
interface Window { | ||
__PlasmicHostVersion: string; | ||
__PlasmicComponentRegistry: Registration[]; | ||
} | ||
} | ||
export declare function registerComponent(component: ComponentType<any>, meta: ComponentMeta): void; | ||
export declare function renderStudioIntoIframe(): void; | ||
export declare function PlasmicCanvasHost(): JSX.Element; | ||
export {}; |
@@ -22,4 +22,10 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PlasmicCanvasHost = exports.renderStudioIntoIframe = void 0; | ||
exports.PlasmicCanvasHost = exports.renderStudioIntoIframe = exports.registerComponent = void 0; | ||
var react_1 = __importStar(require("react")); | ||
self.__PlasmicHostVersion = "1"; | ||
self.__PlasmicComponentRegistry = []; | ||
function registerComponent(component, meta) { | ||
self.__PlasmicComponentRegistry.push({ component: component, meta: meta }); | ||
} | ||
exports.registerComponent = registerComponent; | ||
function ensure(x) { | ||
@@ -26,0 +32,0 @@ if (x === null || x === undefined) { |
{ | ||
"name": "@plasmicapp/react-web", | ||
"version": "0.2.21", | ||
"version": "0.2.22", | ||
"description": "plasmic library for rendering in the presentational style", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
50327
1144