@plasmicapp/host
Advanced tools
Comparing version 1.0.24 to 1.0.25
@@ -27,6 +27,14 @@ /// <reference types="react" /> | ||
} | ||
interface StringTypeBase<P> extends PropTypeBase<P> { | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
} | ||
declare type DefaultValueOrExpr<T> = { | ||
defaultExpr?: undefined; | ||
defaultExprHint?: undefined; | ||
defaultValue?: T; | ||
defaultValueHint?: T; | ||
} | { | ||
defaultValue?: undefined; | ||
defaultValueHint?: undefined; | ||
defaultExpr?: string; | ||
defaultExprHint?: string; | ||
}; | ||
declare type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<string>; | ||
export declare type StringType<P> = "string" | (({ | ||
@@ -41,10 +49,6 @@ type: "string"; | ||
type: "boolean"; | ||
defaultValue?: boolean; | ||
defaultValueHint?: boolean; | ||
} & PropTypeBase<P>); | ||
interface NumberTypeBase<P> extends PropTypeBase<P> { | ||
} & DefaultValueOrExpr<boolean> & PropTypeBase<P>); | ||
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<number> & { | ||
type: "number"; | ||
defaultValue?: number; | ||
defaultValueHint?: number; | ||
} | ||
}; | ||
export declare type NumberType<P> = "number" | (({ | ||
@@ -60,10 +64,10 @@ control?: "default"; | ||
}) & NumberTypeBase<P>); | ||
/** | ||
* Expects defaultValue to be a JSON-compatible value | ||
*/ | ||
export declare type JSONLikeType<P> = "object" | ({ | ||
type: "object"; | ||
/** | ||
* Expects a JSON-compatible value | ||
*/ | ||
defaultValue?: any; | ||
defaultValueHint?: any; | ||
} & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<any> & PropTypeBase<P>) | ({ | ||
type: "array"; | ||
} & DefaultValueOrExpr<any[]> & PropTypeBase<P>); | ||
interface ChoiceTypeBase<P> extends PropTypeBase<P> { | ||
@@ -79,11 +83,7 @@ type: "choice"; | ||
} | ||
export declare type ChoiceType<P> = ({ | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
export declare type ChoiceType<P> = (({ | ||
multiSelect?: false; | ||
} | { | ||
defaultValue?: string[]; | ||
defaultValueHint?: string[]; | ||
} & DefaultValueOrExpr<string>) | ({ | ||
multiSelect: true; | ||
}) & ChoiceTypeBase<P>; | ||
} & DefaultValueOrExpr<string[]>)) & ChoiceTypeBase<P>; | ||
export interface ModalProps { | ||
@@ -118,11 +118,10 @@ show?: boolean; | ||
export declare type CustomControl<P> = React.ComponentType<CustomControlProps<P>>; | ||
/** | ||
* Expects defaultValue to be a JSON-compatible value | ||
*/ | ||
export declare type CustomType<P> = CustomControl<P> | ({ | ||
type: "custom"; | ||
control: CustomControl<P>; | ||
/** | ||
* Expects a JSON-compatible value | ||
*/ | ||
defaultValue?: any; | ||
} & PropTypeBase<P>); | ||
declare type SlotType = "slot" | { | ||
} & PropTypeBase<P> & DefaultValueOrExpr<any>); | ||
declare type SlotType = "slot" | ({ | ||
type: "slot"; | ||
@@ -133,3 +132,2 @@ /** | ||
allowedComponents?: string[]; | ||
defaultValue?: PlasmicElement | PlasmicElement[]; | ||
/** | ||
@@ -139,8 +137,11 @@ * 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; | ||
} & Omit<DefaultValueOrExpr<PlasmicElement | PlasmicElement[]>, "defaultValueHint" | "defaultExpr" | "defaultExprHint">); | ||
declare type ImageUrlType<P> = "imageUrl" | ({ | ||
type: "imageUrl"; | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
} & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<string> & PropTypeBase<P>); | ||
export declare type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>; | ||
@@ -147,0 +148,0 @@ declare type ControlTypeBase = { |
{ | ||
"name": "@plasmicapp/host", | ||
"version": "1.0.24", | ||
"version": "1.0.25", | ||
"description": "plasmic library for app hosting", | ||
@@ -33,3 +33,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@plasmicapp/preamble": "0.0.56", | ||
"@plasmicapp/preamble": "0.0.57", | ||
"window-or-global": "^1.0.1" | ||
@@ -36,0 +36,0 @@ }, |
@@ -27,6 +27,14 @@ /// <reference types="react" /> | ||
} | ||
interface StringTypeBase<P> extends PropTypeBase<P> { | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
} | ||
declare type DefaultValueOrExpr<T> = { | ||
defaultExpr?: undefined; | ||
defaultExprHint?: undefined; | ||
defaultValue?: T; | ||
defaultValueHint?: T; | ||
} | { | ||
defaultValue?: undefined; | ||
defaultValueHint?: undefined; | ||
defaultExpr?: string; | ||
defaultExprHint?: string; | ||
}; | ||
declare type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<string>; | ||
export declare type StringType<P> = "string" | (({ | ||
@@ -41,10 +49,6 @@ type: "string"; | ||
type: "boolean"; | ||
defaultValue?: boolean; | ||
defaultValueHint?: boolean; | ||
} & PropTypeBase<P>); | ||
interface NumberTypeBase<P> extends PropTypeBase<P> { | ||
} & DefaultValueOrExpr<boolean> & PropTypeBase<P>); | ||
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<number> & { | ||
type: "number"; | ||
defaultValue?: number; | ||
defaultValueHint?: number; | ||
} | ||
}; | ||
export declare type NumberType<P> = "number" | (({ | ||
@@ -60,10 +64,10 @@ control?: "default"; | ||
}) & NumberTypeBase<P>); | ||
/** | ||
* Expects defaultValue to be a JSON-compatible value | ||
*/ | ||
export declare type JSONLikeType<P> = "object" | ({ | ||
type: "object"; | ||
/** | ||
* Expects a JSON-compatible value | ||
*/ | ||
defaultValue?: any; | ||
defaultValueHint?: any; | ||
} & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<any> & PropTypeBase<P>) | ({ | ||
type: "array"; | ||
} & DefaultValueOrExpr<any[]> & PropTypeBase<P>); | ||
interface ChoiceTypeBase<P> extends PropTypeBase<P> { | ||
@@ -79,11 +83,7 @@ type: "choice"; | ||
} | ||
export declare type ChoiceType<P> = ({ | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
export declare type ChoiceType<P> = (({ | ||
multiSelect?: false; | ||
} | { | ||
defaultValue?: string[]; | ||
defaultValueHint?: string[]; | ||
} & DefaultValueOrExpr<string>) | ({ | ||
multiSelect: true; | ||
}) & ChoiceTypeBase<P>; | ||
} & DefaultValueOrExpr<string[]>)) & ChoiceTypeBase<P>; | ||
export interface ModalProps { | ||
@@ -118,11 +118,10 @@ show?: boolean; | ||
export declare type CustomControl<P> = React.ComponentType<CustomControlProps<P>>; | ||
/** | ||
* Expects defaultValue to be a JSON-compatible value | ||
*/ | ||
export declare type CustomType<P> = CustomControl<P> | ({ | ||
type: "custom"; | ||
control: CustomControl<P>; | ||
/** | ||
* Expects a JSON-compatible value | ||
*/ | ||
defaultValue?: any; | ||
} & PropTypeBase<P>); | ||
declare type SlotType = "slot" | { | ||
} & PropTypeBase<P> & DefaultValueOrExpr<any>); | ||
declare type SlotType = "slot" | ({ | ||
type: "slot"; | ||
@@ -133,3 +132,2 @@ /** | ||
allowedComponents?: string[]; | ||
defaultValue?: PlasmicElement | PlasmicElement[]; | ||
/** | ||
@@ -139,8 +137,11 @@ * 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; | ||
} & Omit<DefaultValueOrExpr<PlasmicElement | PlasmicElement[]>, "defaultValueHint" | "defaultExpr" | "defaultExprHint">); | ||
declare type ImageUrlType<P> = "imageUrl" | ({ | ||
type: "imageUrl"; | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
} & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<string> & PropTypeBase<P>); | ||
export declare type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>; | ||
@@ -147,0 +148,0 @@ declare type ControlTypeBase = { |
@@ -27,6 +27,14 @@ /// <reference types="react" /> | ||
} | ||
interface StringTypeBase<P> extends PropTypeBase<P> { | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
} | ||
declare type DefaultValueOrExpr<T> = { | ||
defaultExpr?: undefined; | ||
defaultExprHint?: undefined; | ||
defaultValue?: T; | ||
defaultValueHint?: T; | ||
} | { | ||
defaultValue?: undefined; | ||
defaultValueHint?: undefined; | ||
defaultExpr?: string; | ||
defaultExprHint?: string; | ||
}; | ||
declare type StringTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<string>; | ||
export declare type StringType<P> = "string" | (({ | ||
@@ -41,10 +49,6 @@ type: "string"; | ||
type: "boolean"; | ||
defaultValue?: boolean; | ||
defaultValueHint?: boolean; | ||
} & PropTypeBase<P>); | ||
interface NumberTypeBase<P> extends PropTypeBase<P> { | ||
} & DefaultValueOrExpr<boolean> & PropTypeBase<P>); | ||
declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<number> & { | ||
type: "number"; | ||
defaultValue?: number; | ||
defaultValueHint?: number; | ||
} | ||
}; | ||
export declare type NumberType<P> = "number" | (({ | ||
@@ -60,10 +64,10 @@ control?: "default"; | ||
}) & NumberTypeBase<P>); | ||
/** | ||
* Expects defaultValue to be a JSON-compatible value | ||
*/ | ||
export declare type JSONLikeType<P> = "object" | ({ | ||
type: "object"; | ||
/** | ||
* Expects a JSON-compatible value | ||
*/ | ||
defaultValue?: any; | ||
defaultValueHint?: any; | ||
} & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<any> & PropTypeBase<P>) | ({ | ||
type: "array"; | ||
} & DefaultValueOrExpr<any[]> & PropTypeBase<P>); | ||
interface ChoiceTypeBase<P> extends PropTypeBase<P> { | ||
@@ -79,11 +83,7 @@ type: "choice"; | ||
} | ||
export declare type ChoiceType<P> = ({ | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
export declare type ChoiceType<P> = (({ | ||
multiSelect?: false; | ||
} | { | ||
defaultValue?: string[]; | ||
defaultValueHint?: string[]; | ||
} & DefaultValueOrExpr<string>) | ({ | ||
multiSelect: true; | ||
}) & ChoiceTypeBase<P>; | ||
} & DefaultValueOrExpr<string[]>)) & ChoiceTypeBase<P>; | ||
export interface ModalProps { | ||
@@ -118,11 +118,10 @@ show?: boolean; | ||
export declare type CustomControl<P> = React.ComponentType<CustomControlProps<P>>; | ||
/** | ||
* Expects defaultValue to be a JSON-compatible value | ||
*/ | ||
export declare type CustomType<P> = CustomControl<P> | ({ | ||
type: "custom"; | ||
control: CustomControl<P>; | ||
/** | ||
* Expects a JSON-compatible value | ||
*/ | ||
defaultValue?: any; | ||
} & PropTypeBase<P>); | ||
declare type SlotType = "slot" | { | ||
} & PropTypeBase<P> & DefaultValueOrExpr<any>); | ||
declare type SlotType = "slot" | ({ | ||
type: "slot"; | ||
@@ -133,3 +132,2 @@ /** | ||
allowedComponents?: string[]; | ||
defaultValue?: PlasmicElement | PlasmicElement[]; | ||
/** | ||
@@ -139,8 +137,11 @@ * 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; | ||
} & Omit<DefaultValueOrExpr<PlasmicElement | PlasmicElement[]>, "defaultValueHint" | "defaultExpr" | "defaultExprHint">); | ||
declare type ImageUrlType<P> = "imageUrl" | ({ | ||
type: "imageUrl"; | ||
defaultValue?: string; | ||
defaultValueHint?: string; | ||
} & PropTypeBase<P>); | ||
} & DefaultValueOrExpr<string> & PropTypeBase<P>); | ||
export declare type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, String>; | ||
@@ -147,0 +148,0 @@ declare type ControlTypeBase = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
226671
2200
+ Added@plasmicapp/preamble@0.0.57(transitive)
- Removed@plasmicapp/preamble@0.0.56(transitive)
Updated@plasmicapp/preamble@0.0.57