///
= GenericContext
| null, // Canvas data
ControlExtras>;
export type ComponentContextConfig = PropTypeBase = PropTypeBaseDefault & PlainStringCore;
export type CodeStringType = PropTypeBaseDefault & CodeStringCore;
export type RichTextType = PropTypeBaseDefault & RichTextCore;
export type HrefType = PropTypeBaseDefault & HrefCore;
export type ColorType = PropTypeBaseDefault & ColorCore;
export type DateStringType = PropTypeBaseDefault & DateStringCore;
export type DateRangeStringsType = PropTypeBaseDefault & DateRangeStringsCore;
export type ClassType = PropTypeBase = PropTypeBase = PropTypeBaseDefault & CardPickerCore = PlainStringType | CodeStringType | RichTextType | ColorType | ClassType | ThemeResetClassType | CardPickerType | HrefType ;
export type StringType = "string" | "href" | RichStringType ;
export type RichBooleanType = PropTypeBaseDefault & RichBooleanCore;
export type BooleanType = "boolean" | RichBooleanType ;
export type GraphQLType = PropTypeBaseDefault & GraphQLCore = PropTypeBaseDefault & NumberTypeBaseCore = NumberTypeBase & PlainNumberCore = NumberTypeBase & SliderNumberCore = PlainNumberType | SliderNumberType ;
export type NumberType = "number" | RichNumberType ;
export type ObjectType = PropTypeBaseDefault > & ObjectTypeBaseCore >;
export type ArrayType = PropTypeBaseDefault & ArrayTypeBaseCore >;
export type JSONLikeType = "object" | ObjectType | ArrayType ;
export type DataSourceType = PropTypeBase = PropTypeBaseDefault & RichDataPickerCore = "dataPicker" | RichDataPickerType ;
export type RichExprEditorType = PropTypeBaseDefault & RichExprEditorCore = "exprEditor" | RichExprEditorType ;
export type ComponentChoiceType = PropTypeBaseDefault & ChoiceCore extends ComponentChoiceType {
multiSelect?: false;
}
export interface MultiChoiceType extends ComponentChoiceType {
multiSelect: true;
}
export interface CustomChoiceType extends ComponentChoiceType {
multiSelect: ComponentContextConfig ;
}
export type ChoiceType = SingleChoiceType | MultiChoiceType | CustomChoiceType ;
export interface FormValidationRulesType extends PropTypeBaseDefault {
type: "formValidationRules";
}
export interface EventHandlerType extends PropTypeBase {
type: "slot";
description?: string;
/**
* The unique names of all code components that can be placed in the slot
*/
allowedComponents?: string[];
/**
* Wheter Plasmic Components with a root component included in the
* "allowedComponents" list are valid or not.
* Only used if the "allowedComponents" list is set.
*/
allowRootWrapper?: boolean;
/**
* Whether the "empty slot" placeholder should be hidden in the canvas.
*/
hidePlaceholder?: boolean;
/**
* Whether the slot is repeated, i.e., is rendered multiple times using
* repeatedElement().
*/
isRepeated?: boolean;
/**
* A nicer, human-readable display name for your slot prop
*/
displayName?: string;
/**
* Function for whether this slot should be hidden from the left tree,
* given the current props for this component
*/
hidden?: ComponentContextConfig ;
/**
* If slot is a render prop (accepts a function that takes in some
* arguments and returns some JSX), then specify the names of the
* arguments expected by the render prop function.
*/
renderPropParams?: string[];
/**
* When inserting top-level "page sections", should this slot be the default target?
*/
unstable__isMainContentSlot?: boolean;
defaultValue?: PlasmicElement | PlasmicElement[];
/**
* When true, when you click for the first time in this slot and the component was not selected, the component itself
* is selected, making it easier to select the component instead of slot contents. So for
* instance, setting this on a Button slot ensures that clicking on the Button’s text will still select the Button and not
* the text element in its slot. Clicking again will deep-select the slot content. Similar in this regard to trapsFocus on components.
*
* Furthermore, the component further shows the props of whatever is in the slot on
* the parent component for the user's convenience. Handy for various “wrapper" components, form fields, and so on.
*/
mergeWithParent?: boolean | ComponentContextConfig ;
/**
* A function that returns true to hide the merged props conditionally.
*/
hiddenMergedProps?: ComponentContextConfig ;
}
export type SlotType = "slot" | RichSlotType ;
export interface RichImageUrlType extends PropTypeBaseDefault {
type: "imageUrl";
}
export type ImageUrlType = "imageUrl" | RichImageUrlType ;
export interface ModalProps {
show?: boolean;
children?: React.ReactNode;
onClose: () => void;
style?: CSSProperties;
}
export interface StudioOps {
showModal: (modalProps: Omit {
componentProps: 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`)
*/
contextData: InferDataType | null;
/**
* Operations available to the editor that allow modifying the entire component.
* Can be null if the custom prop is used in a global context.
*/
studioOps: StudioOps | null;
/**
* Metadata from the studio project.
*/
projectData: ProjectData;
value: any;
/**
* Sets the value to be passed to the prop. Expects a JSON-compatible value.
*/
updateValue: (newVal: any) => void;
/**
* Full screen modal component
*/
FullscreenModal: React.ComponentType = React.ComponentType extends PropTypeBaseDefault {
type: "custom";
control: CustomControl ;
}
export type CustomType = RichCustomType | CustomControl ;
export interface DynamicType extends PropTypeBase > {
}
export type PrimitiveType = Extract | NumberType | JSONLikeType , string>;
export type PropType = StringType | BooleanType | GraphQLType | NumberType | JSONLikeType | DataSourceType | DataPickerType | ExprEditorType | FormValidationRulesType | EventHandlerType | ChoiceType | CustomType | DynamicType | ImageUrlType | SlotType | DateStringType | DateRangeStringsType ;
export type ArgType = Exclude | EventHandlerType >;
export type StringCompatType = DateStringType | StringType | ChoiceType | JSONLikeType | ImageUrlType | CustomType | DataPickerType ;
export type BoolCompatType = BooleanType | CustomType | DataPickerType ;
export type NumberCompatType = NumberType | CustomType | DataPickerType ;
export type RestrictPropType : T extends boolean ? BoolCompatType : T extends number ? NumberCompatType : PropType ;
export {};