@plasmicapp/host 1.0.74 → 1.0.77

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.
@@ -24,6 +24,7 @@ interface PropTypeBase<P> {
24
24
  description?: string;
25
25
  hidden?: ContextDependentConfig<P, boolean>;
26
26
  readOnly?: boolean | ContextDependentConfig<P, boolean>;
27
+ advanced?: boolean;
27
28
  }
28
29
  declare type DefaultValueOrExpr<P, T> = {
29
30
  defaultExpr?: undefined;
@@ -59,17 +60,21 @@ export declare type StringType<P> = "string" | (({
59
60
  }[]>;
60
61
  showInput?: boolean | ContextDependentConfig<P, boolean>;
61
62
  onSearch?: ContextDependentConfig<P, ((value: string) => void) | undefined>;
62
- } | {
63
+ }) & StringTypeBase<P>);
64
+ export declare type BooleanType<P> = "boolean" | ({
65
+ type: "boolean";
66
+ } & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>);
67
+ declare type GraphQLValue = {
68
+ query: string;
69
+ variables?: Record<string, any>;
70
+ };
71
+ export declare type GraphQLType<P> = {
63
72
  type: "code";
64
73
  lang: "graphql";
65
74
  endpoint: string | ContextDependentConfig<P, string>;
66
75
  method?: string | ContextDependentConfig<P, string>;
67
76
  headers?: object | ContextDependentConfig<P, object>;
68
- variables?: object | ContextDependentConfig<P, object>;
69
- }) & StringTypeBase<P>);
70
- export declare type BooleanType<P> = "boolean" | ({
71
- type: "boolean";
72
- } & DefaultValueOrExpr<P, boolean> & PropTypeBase<P>);
77
+ } & DefaultValueOrExpr<P, GraphQLValue> & PropTypeBase<P>;
73
78
  declare type NumberTypeBase<P> = PropTypeBase<P> & DefaultValueOrExpr<P, number> & {
74
79
  type: "number";
75
80
  };
@@ -182,7 +187,7 @@ declare type ControlTypeBase = {
182
187
  uncontrolledProp?: string;
183
188
  };
184
189
  export declare type SupportControlled<T> = Extract<T, String | CustomControl<any>> | (Exclude<T, String | CustomControl<any>> & ControlTypeBase);
185
- export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P>> | SlotType<P>;
190
+ export declare type PropType<P> = SupportControlled<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | ImageUrlType<P> | CustomType<P> | GraphQLType<P>> | SlotType<P>;
186
191
  declare type RestrictPropType<T, P> = T extends string ? SupportControlled<StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<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>;
187
192
  export interface ActionProps<P> {
188
193
  componentProps: P;