Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@plasmicapp/host

Package Overview
Dependencies
Maintainers
1
Versions
248
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasmicapp/host - npm Package Compare versions

Comparing version 1.0.130 to 1.0.131

2

dist/canvas-host.d.ts

@@ -39,4 +39,4 @@ import * as React from "react";

export declare const PlasmicCanvasHost: React.FunctionComponent<PlasmicCanvasHostProps>;
declare type RenderErrorListener = (err: Error) => void;
type RenderErrorListener = (err: Error) => void;
export declare function registerRenderErrorListener(listener: RenderErrorListener): () => void;
export {};
export declare const tuple: <T extends any[]>(...args: T) => T;
import React, { ReactNode } from "react";
export declare type DataDict = Record<string, any>;
export declare const DataContext: React.Context<Record<string, any> | undefined>;
export declare type DataMeta = {
export type DataDict = Record<string, any>;
export declare const DataContext: React.Context<DataDict | undefined>;
export type DataMeta = {
hidden?: boolean;

@@ -11,6 +11,6 @@ label?: string;

export declare function applySelector(rawData: DataDict | undefined, selector: string | undefined): any;
export declare type SelectorDict = Record<string, string | undefined>;
export type SelectorDict = Record<string, string | undefined>;
export declare function useSelector(selector: string | undefined): any;
export declare function useSelectors(selectors?: SelectorDict): any;
export declare function useDataEnv(): Record<string, any> | undefined;
export declare function useDataEnv(): DataDict | undefined;
export interface DataProviderProps {

@@ -44,2 +44,2 @@ /**

children: ($ctx: DataDict | undefined) => ReactNode;
}): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | null;
}): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
import type { Properties } from "csstype";
export declare type CSSProperties = Properties<string | number> & {
export type CSSProperties = Properties<string | number> & {
layout?: "vbox" | "hbox" | "box" | "page-section";
};
declare type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
declare type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";
declare type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;
declare type LinkAttrKeys = "href" | "target" | CommonAttrKeys;
declare type TextAreaAttrKeys = "disabled" | "value" | "cols" | "rows" | "placeholder" | CommonAttrKeys;
declare type InputAttrKeys = "disabled" | "value" | "defaultValue" | "name" | "autoComplete" | "checked" | "placeholder" | CommonAttrKeys;
declare type ButtonAttrKeys = "disabled" | CommonAttrKeys;
declare type Attrs<Keys extends string> = Partial<Record<Keys, string>>;
type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";
type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;
type LinkAttrKeys = "href" | "target" | CommonAttrKeys;
type TextAreaAttrKeys = "disabled" | "value" | "cols" | "rows" | "placeholder" | CommonAttrKeys;
type InputAttrKeys = "disabled" | "value" | "defaultValue" | "name" | "autoComplete" | "checked" | "placeholder" | CommonAttrKeys;
type ButtonAttrKeys = "disabled" | CommonAttrKeys;
type Attrs<Keys extends string> = Partial<Record<Keys, string>>;
export interface PictureElement {

@@ -19,3 +19,3 @@ type: "img";

}
export declare type ImageElement = PictureElement;
export type ImageElement = PictureElement;
interface LinkTextElement {

@@ -45,3 +45,3 @@ type: "text";

}
export declare type TextElement = string | LinkTextElement | ButtonTextElement | GenericTextElement;
export type TextElement = string | LinkTextElement | ButtonTextElement | GenericTextElement;
interface LinkContainerElement {

@@ -71,3 +71,3 @@ type: "box" | "vbox" | "hbox";

}
export declare type ContainerElement = LinkContainerElement | ButtonContainerElement | GenericContainerElement;
export type ContainerElement = LinkContainerElement | ButtonContainerElement | GenericContainerElement;
export interface ButtonElement {

@@ -89,3 +89,3 @@ type: "button";

}
export declare type TextInputElement = InputElement | TextAreaElement;
export type TextInputElement = InputElement | TextAreaElement;
interface JsonElement {

@@ -118,3 +118,3 @@ type: "json";

}
export declare type PlasmicElement = ImageElement | TextElement | ContainerElement | ButtonElement | TextInputElement | CodeComponentElement<{}> | DefaultComponentElement<{}>;
export type PlasmicElement = ImageElement | TextElement | ContainerElement | ButtonElement | TextInputElement | CodeComponentElement<{}> | DefaultComponentElement<{}>;
export {};

@@ -0,0 +0,0 @@ export { PlasmicCanvasContext, PlasmicCanvasHost, usePlasmicCanvasContext, } from "./canvas-host";

import { PrimitiveType } from "./registerComponent";
export declare type Fetcher = (...args: any[]) => Promise<any>;
export type Fetcher = (...args: any[]) => Promise<any>;
export interface FetcherMeta {

@@ -4,0 +4,0 @@ /**

import React from "react";
export declare type GlobalActionDict = Record<string, Function>;
export declare const GlobalActionsContext: React.Context<Record<string, Function> | undefined>;
export type GlobalActionDict = Record<string, Function>;
export declare const GlobalActionsContext: React.Context<GlobalActionDict | undefined>;
export declare function GlobalActionsProvider(props: {

@@ -9,2 +9,2 @@ contextName: string;

}): JSX.Element;
export declare function useGlobalActions(): Record<string, Function>;
export declare function useGlobalActions(): GlobalActionDict;

@@ -57,3 +57,3 @@ 'use client';

msg = (isString(msg) ? msg : msg()) || "";
throw new Error("Value must not be undefined or null" + (msg ? "- " + msg : ""));
throw new Error("Value must not be undefined or null".concat(msg ? "- ".concat(msg) : ""));
}

@@ -106,3 +106,3 @@ else {

var hash = getStudioHash();
script.src = plasmicOrigin + "/static/js/studio" + (hash ? "." + hash + ".js" : ".js");
script.src = "".concat(plasmicOrigin, "/static/js/studio").concat(hash ? ".".concat(hash, ".js") : ".js");
document.body.appendChild(script);

@@ -191,7 +191,7 @@ }

}
return ReactDOM.createPortal(React.createElement(ErrorBoundary, { key: "" + renderCount },
return ReactDOM.createPortal(React.createElement(ErrorBoundary, { key: "".concat(renderCount) },
React.createElement(PlasmicCanvasContext.Provider, { value: canvasContextValue }, plasmicRootNode.get())), appDiv, "plasmic-app");
}
if (shouldRenderStudio && window.parent === window) {
return (React.createElement("iframe", { src: "https://docs.plasmic.app/app-content/app-host-ready#appHostUrl=" + encodeURIComponent(location.href), style: {
return (React.createElement("iframe", { src: "https://docs.plasmic.app/app-content/app-host-ready#appHostUrl=".concat(encodeURIComponent(location.href)), style: {
width: "100vw",

@@ -244,3 +244,3 @@ height: "100vh",

return React.createElement("div", null,
"Error: ", "" + this.state.error.message);
"Error: ", "".concat(this.state.error.message));
}

@@ -289,3 +289,3 @@ else {

function mkMetaName(name) {
return "__plasmic_meta_" + name;
return "__plasmic_meta_".concat(name);
}

@@ -363,3 +363,3 @@ function mkMetaValue(meta) {

return [
contextName + "." + key,
"".concat(contextName, ".").concat(key),
val,

@@ -467,3 +467,3 @@ ];

var hostVersion = "1.0.130";
var hostVersion = "1.0.131";

@@ -477,7 +477,3 @@ var root = globalThis;

// console.log("Plasmic: Setting up app host dependencies");
root.__Sub = __assign({ React: React,
ReactDOM: ReactDOM,
PlasmicQuery: PlasmicQuery,
hostModule: hostModule,
hostVersion: hostVersion, hostUtils: {
root.__Sub = __assign({ React: React, ReactDOM: ReactDOM, PlasmicQuery: PlasmicQuery, hostModule: hostModule, hostVersion: hostVersion, hostUtils: {
setPlasmicRootNode: setPlasmicRootNode,

@@ -488,5 +484,3 @@ registerRenderErrorListener: registerRenderErrorListener,

// For backwards compatibility:
setPlasmicRootNode: setPlasmicRootNode,
registerRenderErrorListener: registerRenderErrorListener,
setRepeatedElementFn: setRepeatedElementFn }, hostModule);
setPlasmicRootNode: setPlasmicRootNode, registerRenderErrorListener: registerRenderErrorListener, setRepeatedElementFn: setRepeatedElementFn }, hostModule);
}

@@ -493,0 +487,0 @@

@@ -87,3 +87,3 @@ 'use client';

msg = (isString(msg) ? msg : msg()) || "";
throw new Error("Value must not be undefined or null" + (msg ? "- " + msg : ""));
throw new Error("Value must not be undefined or null".concat(msg ? "- ".concat(msg) : ""));
}

@@ -136,3 +136,3 @@ else {

var hash = getStudioHash();
script.src = plasmicOrigin + "/static/js/studio" + (hash ? "." + hash + ".js" : ".js");
script.src = "".concat(plasmicOrigin, "/static/js/studio").concat(hash ? ".".concat(hash, ".js") : ".js");
document.body.appendChild(script);

@@ -221,7 +221,7 @@ }

}
return ReactDOM__namespace.createPortal(React__namespace.createElement(ErrorBoundary, { key: "" + renderCount },
return ReactDOM__namespace.createPortal(React__namespace.createElement(ErrorBoundary, { key: "".concat(renderCount) },
React__namespace.createElement(PlasmicCanvasContext.Provider, { value: canvasContextValue }, plasmicRootNode.get())), appDiv, "plasmic-app");
}
if (shouldRenderStudio && window.parent === window) {
return (React__namespace.createElement("iframe", { src: "https://docs.plasmic.app/app-content/app-host-ready#appHostUrl=" + encodeURIComponent(location.href), style: {
return (React__namespace.createElement("iframe", { src: "https://docs.plasmic.app/app-content/app-host-ready#appHostUrl=".concat(encodeURIComponent(location.href)), style: {
width: "100vw",

@@ -274,3 +274,3 @@ height: "100vh",

return React__namespace.createElement("div", null,
"Error: ", "" + this.state.error.message);
"Error: ", "".concat(this.state.error.message));
}

@@ -319,3 +319,3 @@ else {

function mkMetaName(name) {
return "__plasmic_meta_" + name;
return "__plasmic_meta_".concat(name);
}

@@ -393,3 +393,3 @@ function mkMetaValue(meta) {

return [
contextName + "." + key,
"".concat(contextName, ".").concat(key),
val,

@@ -497,3 +497,3 @@ ];

var hostVersion = "1.0.130";
var hostVersion = "1.0.131";

@@ -507,7 +507,3 @@ var root = globalThis;

// console.log("Plasmic: Setting up app host dependencies");
root.__Sub = __assign({ React: React__namespace,
ReactDOM: ReactDOM__namespace,
PlasmicQuery: PlasmicQuery__namespace,
hostModule: hostModule,
hostVersion: hostVersion, hostUtils: {
root.__Sub = __assign({ React: React__namespace, ReactDOM: ReactDOM__namespace, PlasmicQuery: PlasmicQuery__namespace, hostModule: hostModule, hostVersion: hostVersion, hostUtils: {
setPlasmicRootNode: setPlasmicRootNode,

@@ -518,5 +514,3 @@ registerRenderErrorListener: registerRenderErrorListener,

// For backwards compatibility:
setPlasmicRootNode: setPlasmicRootNode,
registerRenderErrorListener: registerRenderErrorListener,
setRepeatedElementFn: setRepeatedElementFn }, hostModule);
setPlasmicRootNode: setPlasmicRootNode, registerRenderErrorListener: registerRenderErrorListener, setRepeatedElementFn: setRepeatedElementFn }, hostModule);
}

@@ -523,0 +517,0 @@

export * from "./exports";

@@ -1,3 +0,3 @@

declare type StringGen = string | (() => string);
type StringGen = string | (() => string);
export declare function ensure<T>(x: T | null | undefined, msg?: StringGen): T;
export {};

@@ -10,4 +10,4 @@ /// <reference types="react" />

}
declare type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
export declare type ControlExtras = {
type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
export type ControlExtras = {
path: (string | number)[];

@@ -18,22 +18,23 @@ };

*/
export declare type ControlContext<P> = [
export type ControlContext<P> = [
/**
* props
*/
P,
/**
* `contextData` can be `null` if the prop controls are rendering before
* the component instance itself (it will re-render once the component
* calls `setControlContextData`)
*/
InferDataType<P> | null,
/**
* Extra information for the control to use
*/
ControlExtras
];
/**
* props
*/
P,
/**
* `contextData` can be `null` if the prop controls are rendering before
* the component instance itself (it will re-render once the component
* calls `setControlContextData`)
*/
InferDataType<P> | null,
/**
* Extra information for the control to use
*/
ControlExtras];
/**
* Config option that takes the context (e.g., props) of the component instance
* to dynamically set its value.
*/
export declare type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
export type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
export interface PropTypeBase<P> {

@@ -71,3 +72,3 @@ displayName?: string;

}
export declare type DefaultValueOrExpr<P, T> = {
export type DefaultValueOrExpr<P, T> = {
defaultExpr?: undefined;

@@ -83,4 +84,4 @@ defaultExprHint?: undefined;

};
declare type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, string>;
export declare type StringType<P> = "string" | (({
type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, string>;
export type StringType<P> = "string" | (({
type: "string";

@@ -161,10 +162,10 @@ control?: "default" | "large";

}) & StringTypeBase<P>);
export declare type BooleanType<P> = "boolean" | ({
export type BooleanType<P> = "boolean" | ({
type: "boolean";
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>);
declare type GraphQLValue = {
type GraphQLValue = {
query: string;
variables?: Record<string, any>;
};
export declare type GraphQLType<P> = {
export type GraphQLType<P> = {
type: "code";

@@ -176,6 +177,6 @@ lang: "graphql";

} & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>;
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
type: "number";
};
export declare type NumberType<P> = "number" | (({
export type NumberType<P> = "number" | (({
control?: "default";

@@ -193,3 +194,3 @@ min?: number | ContextDependentConfig<P, number>;

*/
export declare type JSONLikeType<P> = "object" | ({
export type JSONLikeType<P> = "object" | ({
type: "object";

@@ -244,4 +245,4 @@ fields?: {

} & PropTypeBase<P>);
declare type DataPickerValueType = string | number | (string | number)[];
export declare type DataPickerType<P> = ({
type DataPickerValueType = string | number | (string | number)[];
export type DataPickerType<P> = ({
type: "dataSelector";

@@ -254,6 +255,6 @@ data: Record<string, any> | ContextDependentConfig<P, Record<string, any>>;

} & DefaultValueOrExpr<P, DataPickerValueType> & PropTypeBase<P>);
export declare type FormValidationRulesType<P> = {
export type FormValidationRulesType<P> = {
type: "formValidationRules";
} & DefaultValueOrExpr<P, any> & PropTypeBase<P>;
export declare type EventHandlerType<P> = {
export type EventHandlerType<P> = {
type: "eventHandler";

@@ -278,3 +279,3 @@ argTypes: {

}
export declare type ChoiceType<P> = (({
export type ChoiceType<P> = (({
multiSelect?: false;

@@ -320,11 +321,11 @@ } & DefaultValueOrExpr<P, string | number | boolean>) | ({

}
export declare type CustomControl<P> = React.ComponentType<CustomControlProps<P>>;
export type CustomControl<P> = React.ComponentType<CustomControlProps<P>>;
/**
* Expects defaultValue to be a JSON-compatible value
*/
export declare type CustomType<P> = CustomControl<P> | ({
export type CustomType<P> = CustomControl<P> | ({
type: "custom";
control: CustomControl<P>;
} & PropTypeBase<P> & DefaultValueOrExpr<P, any>);
declare type SlotType<P> = "slot" | ({
type SlotType<P> = "slot" | ({
type: "slot";

@@ -360,7 +361,7 @@ /**

} & Omit<DefaultValueOrExpr<P, PlasmicElement | PlasmicElement[]>, "defaultValueHint" | "defaultExpr" | "defaultExprHint">);
declare type ImageUrlType<P> = "imageUrl" | ({
type ImageUrlType<P> = "imageUrl" | ({
type: "imageUrl";
} & DefaultValueOrExpr<P, string> & PropTypeBase<P>);
export declare type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>;
declare type ControlTypeBase = {
export type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>;
type ControlTypeBase = {
editOnly?: false;

@@ -374,5 +375,5 @@ } | {

};
export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P> | DataPickerType<P> | FormValidationRulesType<P> | EventHandlerType<P>> | SlotType<P>;
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : PropType<P>;
export type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
export type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P> | DataPickerType<P> | FormValidationRulesType<P> | EventHandlerType<P>> | SlotType<P>;
type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : PropType<P>;
export interface ActionProps<P> {

@@ -402,3 +403,3 @@ componentProps: P;

}
export declare type Action<P> = {
export type Action<P> = {
type: "button-action";

@@ -411,3 +412,3 @@ label: string;

};
declare type DistributedKeyOf<T> = T extends any ? keyof T : never;
type DistributedKeyOf<T> = T extends any ? keyof T : never;
interface ComponentTemplate<P> extends Omit<CodeComponentElement<P>, "type" | "name"> {

@@ -422,3 +423,3 @@ /**

}
export declare type StateSpec = {
export type StateSpec = {
onChangeProp: string;

@@ -454,6 +455,6 @@ } & ({

}
export declare type ComponentHelpers<P> = {
export type ComponentHelpers<P> = {
states: Record<string, StateHelpers<P, any>>;
};
export declare type ExternalComponentHelpers<P> = {
export type ExternalComponentHelpers<P> = {
helpers: ComponentHelpers<P>;

@@ -466,3 +467,3 @@ importPath: string;

});
export declare type StyleSection = "visibility" | "typography" | "sizing" | "spacing" | "background" | "transform" | "transitions" | "layout" | "overflow" | "border" | "shadows" | "effects";
export type StyleSection = "visibility" | "typography" | "sizing" | "spacing" | "background" | "transform" | "transitions" | "layout" | "overflow" | "border" | "shadows" | "effects";
export interface CodeComponentMeta<P> {

@@ -586,3 +587,3 @@ /**

*/
export declare type ComponentMeta<P> = CodeComponentMeta<P>;
export type ComponentMeta<P> = CodeComponentMeta<P>;
export interface FunctionParam<P> {

@@ -589,0 +590,0 @@ name: string;

/// <reference types="react" />
import { BooleanType, ChoiceType, CustomType, FunctionParam, JSONLikeType, NumberType, StringType, SupportControlled } from "./registerComponent";
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | CustomType<P>>;
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>;
declare type DistributedKeyOf<T> = T extends any ? keyof T : never;
export type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | CustomType<P>>;
type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>;
type DistributedKeyOf<T> = T extends any ? keyof T : never;
export interface GlobalContextMeta<P> {

@@ -7,0 +7,0 @@ /**

@@ -1,2 +0,2 @@

export declare type TokenType = "color" | "spacing" | "font-family" | "font-size" | "line-height" | "opacity";
export type TokenType = "color" | "spacing" | "font-family" | "font-size" | "line-height" | "opacity";
export interface TokenRegistration {

@@ -3,0 +3,0 @@ name: string;

@@ -10,3 +10,3 @@ export interface BasicTrait {

}
export declare type TraitMeta = BasicTrait | ChoiceTrait;
export type TraitMeta = BasicTrait | ChoiceTrait;
export interface TraitRegistration {

@@ -13,0 +13,0 @@ trait: string;

@@ -0,0 +0,0 @@ /**

export default function useForceUpdate(): () => void;

@@ -1,1 +0,1 @@

export declare const hostVersion = "1.0.130";
export declare const hostVersion = "1.0.131";
{
"name": "@plasmicapp/host",
"version": "1.0.130",
"version": "1.0.131",
"description": "plasmic library for app hosting",

@@ -49,3 +49,3 @@ "main": "dist/index.cjs.js",

"start": "tsdx watch",
"test": "tsdx test --passWithNoTests",
"test": "yarn --cwd=../.. test --passWithNoTests",
"lint": "tsdx lint",

@@ -57,3 +57,3 @@ "prepare": "if-env PREPARE_NO_BUILD=true || yarn build",

"dependencies": {
"@plasmicapp/query": "0.1.62",
"@plasmicapp/query": "0.1.63",
"window-or-global": "^1.0.1"

@@ -79,4 +79,3 @@ },

"tsdx": "^0.14.1",
"tslib": "^2.2.0",
"typescript": "^3.9.7"
"tslib": "^2.2.0"
},

@@ -87,3 +86,3 @@ "peerDependencies": {

},
"gitHead": "1d9faacaaac15e87767697dbdc4215504a358d02"
"gitHead": "aed79bb7319dc8f42c185c212f9ba23f26591fd4"
}
import type { Properties } from "csstype";
export declare type CSSProperties = Properties<string | number> & {
export type CSSProperties = Properties<string | number> & {
layout?: "vbox" | "hbox" | "box" | "page-section";
};
declare type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
declare type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";
declare type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;
declare type LinkAttrKeys = "href" | "target" | CommonAttrKeys;
declare type TextAreaAttrKeys = "disabled" | "value" | "cols" | "rows" | "placeholder" | CommonAttrKeys;
declare type InputAttrKeys = "disabled" | "value" | "defaultValue" | "name" | "autoComplete" | "checked" | "placeholder" | CommonAttrKeys;
declare type ButtonAttrKeys = "disabled" | CommonAttrKeys;
declare type Attrs<Keys extends string> = Partial<Record<Keys, string>>;
type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";
type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;
type LinkAttrKeys = "href" | "target" | CommonAttrKeys;
type TextAreaAttrKeys = "disabled" | "value" | "cols" | "rows" | "placeholder" | CommonAttrKeys;
type InputAttrKeys = "disabled" | "value" | "defaultValue" | "name" | "autoComplete" | "checked" | "placeholder" | CommonAttrKeys;
type ButtonAttrKeys = "disabled" | CommonAttrKeys;
type Attrs<Keys extends string> = Partial<Record<Keys, string>>;
export interface PictureElement {

@@ -19,3 +19,3 @@ type: "img";

}
export declare type ImageElement = PictureElement;
export type ImageElement = PictureElement;
interface LinkTextElement {

@@ -45,3 +45,3 @@ type: "text";

}
export declare type TextElement = string | LinkTextElement | ButtonTextElement | GenericTextElement;
export type TextElement = string | LinkTextElement | ButtonTextElement | GenericTextElement;
interface LinkContainerElement {

@@ -71,3 +71,3 @@ type: "box" | "vbox" | "hbox";

}
export declare type ContainerElement = LinkContainerElement | ButtonContainerElement | GenericContainerElement;
export type ContainerElement = LinkContainerElement | ButtonContainerElement | GenericContainerElement;
export interface ButtonElement {

@@ -89,3 +89,3 @@ type: "button";

}
export declare type TextInputElement = InputElement | TextAreaElement;
export type TextInputElement = InputElement | TextAreaElement;
interface JsonElement {

@@ -118,3 +118,3 @@ type: "json";

}
export declare type PlasmicElement = ImageElement | TextElement | ContainerElement | ButtonElement | TextInputElement | CodeComponentElement<{}> | DefaultComponentElement<{}>;
export type PlasmicElement = ImageElement | TextElement | ContainerElement | ButtonElement | TextInputElement | CodeComponentElement<{}> | DefaultComponentElement<{}>;
export {};

@@ -0,0 +0,0 @@ 'use client';

@@ -0,0 +0,0 @@ 'use client';

@@ -10,4 +10,4 @@ /// <reference types="react" />

}
declare type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
export declare type ControlExtras = {
type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
export type ControlExtras = {
path: (string | number)[];

@@ -18,22 +18,23 @@ };

*/
export declare type ControlContext<P> = [
export type ControlContext<P> = [
/**
* props
*/
P,
/**
* `contextData` can be `null` if the prop controls are rendering before
* the component instance itself (it will re-render once the component
* calls `setControlContextData`)
*/
InferDataType<P> | null,
/**
* Extra information for the control to use
*/
ControlExtras
];
/**
* props
*/
P,
/**
* `contextData` can be `null` if the prop controls are rendering before
* the component instance itself (it will re-render once the component
* calls `setControlContextData`)
*/
InferDataType<P> | null,
/**
* Extra information for the control to use
*/
ControlExtras];
/**
* Config option that takes the context (e.g., props) of the component instance
* to dynamically set its value.
*/
export declare type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
export type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
export interface PropTypeBase<P> {

@@ -71,3 +72,3 @@ displayName?: string;

}
export declare type DefaultValueOrExpr<P, T> = {
export type DefaultValueOrExpr<P, T> = {
defaultExpr?: undefined;

@@ -83,4 +84,4 @@ defaultExprHint?: undefined;

};
declare type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, string>;
export declare type StringType<P> = "string" | (({
type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, string>;
export type StringType<P> = "string" | (({
type: "string";

@@ -161,10 +162,10 @@ control?: "default" | "large";

}) & StringTypeBase<P>);
export declare type BooleanType<P> = "boolean" | ({
export type BooleanType<P> = "boolean" | ({
type: "boolean";
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>);
declare type GraphQLValue = {
type GraphQLValue = {
query: string;
variables?: Record<string, any>;
};
export declare type GraphQLType<P> = {
export type GraphQLType<P> = {
type: "code";

@@ -176,6 +177,6 @@ lang: "graphql";

} & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>;
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
type: "number";
};
export declare type NumberType<P> = "number" | (({
export type NumberType<P> = "number" | (({
control?: "default";

@@ -193,3 +194,3 @@ min?: number | ContextDependentConfig<P, number>;

*/
export declare type JSONLikeType<P> = "object" | ({
export type JSONLikeType<P> = "object" | ({
type: "object";

@@ -244,4 +245,4 @@ fields?: {

} & PropTypeBase<P>);
declare type DataPickerValueType = string | number | (string | number)[];
export declare type DataPickerType<P> = ({
type DataPickerValueType = string | number | (string | number)[];
export type DataPickerType<P> = ({
type: "dataSelector";

@@ -254,6 +255,6 @@ data: Record<string, any> | ContextDependentConfig<P, Record<string, any>>;

} & DefaultValueOrExpr<P, DataPickerValueType> & PropTypeBase<P>);
export declare type FormValidationRulesType<P> = {
export type FormValidationRulesType<P> = {
type: "formValidationRules";
} & DefaultValueOrExpr<P, any> & PropTypeBase<P>;
export declare type EventHandlerType<P> = {
export type EventHandlerType<P> = {
type: "eventHandler";

@@ -278,3 +279,3 @@ argTypes: {

}
export declare type ChoiceType<P> = (({
export type ChoiceType<P> = (({
multiSelect?: false;

@@ -320,11 +321,11 @@ } & DefaultValueOrExpr<P, string | number | boolean>) | ({

}
export declare type CustomControl<P> = React.ComponentType<CustomControlProps<P>>;
export type CustomControl<P> = React.ComponentType<CustomControlProps<P>>;
/**
* Expects defaultValue to be a JSON-compatible value
*/
export declare type CustomType<P> = CustomControl<P> | ({
export type CustomType<P> = CustomControl<P> | ({
type: "custom";
control: CustomControl<P>;
} & PropTypeBase<P> & DefaultValueOrExpr<P, any>);
declare type SlotType<P> = "slot" | ({
type SlotType<P> = "slot" | ({
type: "slot";

@@ -360,7 +361,7 @@ /**

} & Omit<DefaultValueOrExpr<P, PlasmicElement | PlasmicElement[]>, "defaultValueHint" | "defaultExpr" | "defaultExprHint">);
declare type ImageUrlType<P> = "imageUrl" | ({
type ImageUrlType<P> = "imageUrl" | ({
type: "imageUrl";
} & DefaultValueOrExpr<P, string> & PropTypeBase<P>);
export declare type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>;
declare type ControlTypeBase = {
export type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>;
type ControlTypeBase = {
editOnly?: false;

@@ -374,5 +375,5 @@ } | {

};
export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P> | DataPickerType<P> | FormValidationRulesType<P> | EventHandlerType<P>> | SlotType<P>;
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : PropType<P>;
export type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
export type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P> | DataPickerType<P> | FormValidationRulesType<P> | EventHandlerType<P>> | SlotType<P>;
type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : PropType<P>;
export interface ActionProps<P> {

@@ -402,3 +403,3 @@ componentProps: P;

}
export declare type Action<P> = {
export type Action<P> = {
type: "button-action";

@@ -411,3 +412,3 @@ label: string;

};
declare type DistributedKeyOf<T> = T extends any ? keyof T : never;
type DistributedKeyOf<T> = T extends any ? keyof T : never;
interface ComponentTemplate<P> extends Omit<CodeComponentElement<P>, "type" | "name"> {

@@ -422,3 +423,3 @@ /**

}
export declare type StateSpec = {
export type StateSpec = {
onChangeProp: string;

@@ -454,6 +455,6 @@ } & ({

}
export declare type ComponentHelpers<P> = {
export type ComponentHelpers<P> = {
states: Record<string, StateHelpers<P, any>>;
};
export declare type ExternalComponentHelpers<P> = {
export type ExternalComponentHelpers<P> = {
helpers: ComponentHelpers<P>;

@@ -466,3 +467,3 @@ importPath: string;

});
export declare type StyleSection = "visibility" | "typography" | "sizing" | "spacing" | "background" | "transform" | "transitions" | "layout" | "overflow" | "border" | "shadows" | "effects";
export type StyleSection = "visibility" | "typography" | "sizing" | "spacing" | "background" | "transform" | "transitions" | "layout" | "overflow" | "border" | "shadows" | "effects";
export interface CodeComponentMeta<P> {

@@ -586,3 +587,3 @@ /**

*/
export declare type ComponentMeta<P> = CodeComponentMeta<P>;
export type ComponentMeta<P> = CodeComponentMeta<P>;
export interface FunctionParam<P> {

@@ -589,0 +590,0 @@ name: string;

import type { Properties } from "csstype";
export declare type CSSProperties = Properties<string | number> & {
export type CSSProperties = Properties<string | number> & {
layout?: "vbox" | "hbox" | "box" | "page-section";
};
declare type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
declare type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";
declare type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;
declare type LinkAttrKeys = "href" | "target" | CommonAttrKeys;
declare type TextAreaAttrKeys = "disabled" | "value" | "cols" | "rows" | "placeholder" | CommonAttrKeys;
declare type InputAttrKeys = "disabled" | "value" | "defaultValue" | "name" | "autoComplete" | "checked" | "placeholder" | CommonAttrKeys;
declare type ButtonAttrKeys = "disabled" | CommonAttrKeys;
declare type Attrs<Keys extends string> = Partial<Record<Keys, string>>;
type ContainerTags = "a" | "address" | "article" | "aside" | "blockquote" | "button" | "code" | "dd" | "div" | "dl" | "dt" | "form" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "label" | "li" | "main" | "nav" | "ol" | "p" | "pre" | "section" | "span" | "ul";
type CommonAttrKeys = "title" | "tabIndex" | "className" | "id" | "aria-label" | "aria-hidden" | "aria-labelledby" | "aria-describedby" | "role";
type PictureAttrKeys = "alt" | "loading" | CommonAttrKeys;
type LinkAttrKeys = "href" | "target" | CommonAttrKeys;
type TextAreaAttrKeys = "disabled" | "value" | "cols" | "rows" | "placeholder" | CommonAttrKeys;
type InputAttrKeys = "disabled" | "value" | "defaultValue" | "name" | "autoComplete" | "checked" | "placeholder" | CommonAttrKeys;
type ButtonAttrKeys = "disabled" | CommonAttrKeys;
type Attrs<Keys extends string> = Partial<Record<Keys, string>>;
export interface PictureElement {

@@ -19,3 +19,3 @@ type: "img";

}
export declare type ImageElement = PictureElement;
export type ImageElement = PictureElement;
interface LinkTextElement {

@@ -45,3 +45,3 @@ type: "text";

}
export declare type TextElement = string | LinkTextElement | ButtonTextElement | GenericTextElement;
export type TextElement = string | LinkTextElement | ButtonTextElement | GenericTextElement;
interface LinkContainerElement {

@@ -71,3 +71,3 @@ type: "box" | "vbox" | "hbox";

}
export declare type ContainerElement = LinkContainerElement | ButtonContainerElement | GenericContainerElement;
export type ContainerElement = LinkContainerElement | ButtonContainerElement | GenericContainerElement;
export interface ButtonElement {

@@ -89,3 +89,3 @@ type: "button";

}
export declare type TextInputElement = InputElement | TextAreaElement;
export type TextInputElement = InputElement | TextAreaElement;
interface JsonElement {

@@ -118,3 +118,3 @@ type: "json";

}
export declare type PlasmicElement = ImageElement | TextElement | ContainerElement | ButtonElement | TextInputElement | CodeComponentElement<{}> | DefaultComponentElement<{}>;
export type PlasmicElement = ImageElement | TextElement | ContainerElement | ButtonElement | TextInputElement | CodeComponentElement<{}> | DefaultComponentElement<{}>;
export {};

@@ -0,0 +0,0 @@ 'use client';

@@ -0,0 +0,0 @@ 'use client';

@@ -10,4 +10,4 @@ /// <reference types="react" />

}
declare type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
export declare type ControlExtras = {
type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
export type ControlExtras = {
path: (string | number)[];

@@ -18,22 +18,23 @@ };

*/
export declare type ControlContext<P> = [
export type ControlContext<P> = [
/**
* props
*/
P,
/**
* `contextData` can be `null` if the prop controls are rendering before
* the component instance itself (it will re-render once the component
* calls `setControlContextData`)
*/
InferDataType<P> | null,
/**
* Extra information for the control to use
*/
ControlExtras
];
/**
* props
*/
P,
/**
* `contextData` can be `null` if the prop controls are rendering before
* the component instance itself (it will re-render once the component
* calls `setControlContextData`)
*/
InferDataType<P> | null,
/**
* Extra information for the control to use
*/
ControlExtras];
/**
* Config option that takes the context (e.g., props) of the component instance
* to dynamically set its value.
*/
export declare type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
export type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
export interface PropTypeBase<P> {

@@ -71,3 +72,3 @@ displayName?: string;

}
export declare type DefaultValueOrExpr<P, T> = {
export type DefaultValueOrExpr<P, T> = {
defaultExpr?: undefined;

@@ -83,4 +84,4 @@ defaultExprHint?: undefined;

};
declare type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, string>;
export declare type StringType<P> = "string" | (({
type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, string>;
export type StringType<P> = "string" | (({
type: "string";

@@ -161,10 +162,10 @@ control?: "default" | "large";

}) & StringTypeBase<P>);
export declare type BooleanType<P> = "boolean" | ({
export type BooleanType<P> = "boolean" | ({
type: "boolean";
} & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>);
declare type GraphQLValue = {
type GraphQLValue = {
query: string;
variables?: Record<string, any>;
};
export declare type GraphQLType<P> = {
export type GraphQLType<P> = {
type: "code";

@@ -176,6 +177,6 @@ lang: "graphql";

} & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>;
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
type: "number";
};
export declare type NumberType<P> = "number" | (({
export type NumberType<P> = "number" | (({
control?: "default";

@@ -193,3 +194,3 @@ min?: number | ContextDependentConfig<P, number>;

*/
export declare type JSONLikeType<P> = "object" | ({
export type JSONLikeType<P> = "object" | ({
type: "object";

@@ -244,4 +245,4 @@ fields?: {

} & PropTypeBase<P>);
declare type DataPickerValueType = string | number | (string | number)[];
export declare type DataPickerType<P> = ({
type DataPickerValueType = string | number | (string | number)[];
export type DataPickerType<P> = ({
type: "dataSelector";

@@ -254,6 +255,6 @@ data: Record<string, any> | ContextDependentConfig<P, Record<string, any>>;

} & DefaultValueOrExpr<P, DataPickerValueType> & PropTypeBase<P>);
export declare type FormValidationRulesType<P> = {
export type FormValidationRulesType<P> = {
type: "formValidationRules";
} & DefaultValueOrExpr<P, any> & PropTypeBase<P>;
export declare type EventHandlerType<P> = {
export type EventHandlerType<P> = {
type: "eventHandler";

@@ -278,3 +279,3 @@ argTypes: {

}
export declare type ChoiceType<P> = (({
export type ChoiceType<P> = (({
multiSelect?: false;

@@ -320,11 +321,11 @@ } & DefaultValueOrExpr<P, string | number | boolean>) | ({

}
export declare type CustomControl<P> = React.ComponentType<CustomControlProps<P>>;
export type CustomControl<P> = React.ComponentType<CustomControlProps<P>>;
/**
* Expects defaultValue to be a JSON-compatible value
*/
export declare type CustomType<P> = CustomControl<P> | ({
export type CustomType<P> = CustomControl<P> | ({
type: "custom";
control: CustomControl<P>;
} & PropTypeBase<P> & DefaultValueOrExpr<P, any>);
declare type SlotType<P> = "slot" | ({
type SlotType<P> = "slot" | ({
type: "slot";

@@ -360,7 +361,7 @@ /**

} & Omit<DefaultValueOrExpr<P, PlasmicElement | PlasmicElement[]>, "defaultValueHint" | "defaultExpr" | "defaultExprHint">);
declare type ImageUrlType<P> = "imageUrl" | ({
type ImageUrlType<P> = "imageUrl" | ({
type: "imageUrl";
} & DefaultValueOrExpr<P, string> & PropTypeBase<P>);
export declare type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>;
declare type ControlTypeBase = {
export type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>;
type ControlTypeBase = {
editOnly?: false;

@@ -374,5 +375,5 @@ } | {

};
export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P> | DataPickerType<P> | FormValidationRulesType<P> | EventHandlerType<P>> | SlotType<P>;
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : PropType<P>;
export type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
export type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P> | DataPickerType<P> | FormValidationRulesType<P> | EventHandlerType<P>> | SlotType<P>;
type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P> | DataPickerType<P>> : PropType<P>;
export interface ActionProps<P> {

@@ -402,3 +403,3 @@ componentProps: P;

}
export declare type Action<P> = {
export type Action<P> = {
type: "button-action";

@@ -411,3 +412,3 @@ label: string;

};
declare type DistributedKeyOf<T> = T extends any ? keyof T : never;
type DistributedKeyOf<T> = T extends any ? keyof T : never;
interface ComponentTemplate<P> extends Omit<CodeComponentElement<P>, "type" | "name"> {

@@ -422,3 +423,3 @@ /**

}
export declare type StateSpec = {
export type StateSpec = {
onChangeProp: string;

@@ -454,6 +455,6 @@ } & ({

}
export declare type ComponentHelpers<P> = {
export type ComponentHelpers<P> = {
states: Record<string, StateHelpers<P, any>>;
};
export declare type ExternalComponentHelpers<P> = {
export type ExternalComponentHelpers<P> = {
helpers: ComponentHelpers<P>;

@@ -466,3 +467,3 @@ importPath: string;

});
export declare type StyleSection = "visibility" | "typography" | "sizing" | "spacing" | "background" | "transform" | "transitions" | "layout" | "overflow" | "border" | "shadows" | "effects";
export type StyleSection = "visibility" | "typography" | "sizing" | "spacing" | "background" | "transform" | "transitions" | "layout" | "overflow" | "border" | "shadows" | "effects";
export interface CodeComponentMeta<P> {

@@ -586,3 +587,3 @@ /**

*/
export declare type ComponentMeta<P> = CodeComponentMeta<P>;
export type ComponentMeta<P> = CodeComponentMeta<P>;
export interface FunctionParam<P> {

@@ -589,0 +590,0 @@ name: string;

/// <reference types="react" />
import { BooleanType, ChoiceType, CustomType, FunctionParam, JSONLikeType, NumberType, StringType, SupportControlled } from "./registerComponent";
export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | CustomType<P>>;
declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>;
declare type DistributedKeyOf<T> = T extends any ? keyof T : never;
export type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | CustomType<P>>;
type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | CustomType<P>> : T extends boolean ? SupportControlled<BooleanType<P> | JSONLikeType<P> | CustomType<P>> : T extends number ? SupportControlled<NumberType<P> | JSONLikeType<P> | CustomType<P>> : PropType<P>;
type DistributedKeyOf<T> = T extends any ? keyof T : never;
export interface GlobalContextMeta<P> {

@@ -7,0 +7,0 @@ /**

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ var root = globalThis;

@@ -1,2 +0,2 @@

export declare type TokenType = "color" | "spacing" | "font-family" | "font-size" | "line-height" | "opacity";
export type TokenType = "color" | "spacing" | "font-family" | "font-size" | "line-height" | "opacity";
export interface TokenRegistration {

@@ -3,0 +3,0 @@ name: string;

@@ -0,0 +0,0 @@ 'use client';

@@ -0,0 +0,0 @@ 'use client';

@@ -10,3 +10,3 @@ export interface BasicTrait {

}
export declare type TraitMeta = BasicTrait | ChoiceTrait;
export type TraitMeta = BasicTrait | ChoiceTrait;
export interface TraitRegistration {

@@ -13,0 +13,0 @@ trait: string;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc