@plasmicapp/react-web 0.2.410 → 0.2.411

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.
Files changed (2) hide show
  1. package/dist/all.d.ts +35 -40
  2. package/package.json +4 -4
package/dist/all.d.ts CHANGED
@@ -11439,16 +11439,15 @@ interface ChoiceCore<Ctx extends any[], T extends ChoiceValue> {
11439
11439
  onSearch?: MaybeContextDependentConfig<Ctx, ((v: string) => void) | undefined>;
11440
11440
  }
11441
11441
 
11442
- interface ObjectTypeBaseCore<Ctx extends any[], Fields> {
11442
+ interface ObjectTypeBaseCore<Ctx extends any[], Values, Keys extends string = string> {
11443
11443
  type: "object";
11444
- fields?: Record<string, Fields>;
11444
+ fields?: Record<Keys, Values>;
11445
11445
  nameFunc?: (item: any, ...args: Ctx) => string | undefined;
11446
11446
  /**
11447
- * Controls how the object editor is displayed in the UI.
11448
- * - "popup": Displays the object in a popup (default)
11447
+ * Controls how the object editor is displayed in the UI. If not specified, Plasmic will choose the appropriate display mode.
11448
+ * - "popup": Displays the object in a popup
11449
11449
  * - "inline": Displays the object fields inline
11450
11450
  * - "flatten": Displays the object fields inline at the parent level. The parent label is not displayed.
11451
- * @default "popup"
11452
11451
  */
11453
11452
  display?: "inline" | "popup" | "flatten";
11454
11453
  }
@@ -12269,82 +12268,78 @@ interface SimplifiedField {
12269
12268
  type FunctionControlContext<P> = GenericContext<Partial<P>, // Partial function props
12270
12269
  any>;
12271
12270
  type FunctionContextConfig<Args extends any[], R> = ContextDependentConfig<FunctionControlContext<Args>, R>;
12272
- interface ParamTypeBase extends CommonTypeBase {
12273
- name: string;
12274
- isOptional?: boolean;
12275
- isRestParameter?: boolean;
12276
- }
12277
- type ParamTypeBaseDefault<Ctx extends any[], T> = ParamTypeBase & Defaultable<Ctx, T>;
12278
- interface FunctionMeta extends CommonTypeBase {
12279
- name: string;
12280
- rest?: boolean;
12281
- }
12282
- interface PlainStringType<T extends Nullish<string> = string> extends ParamTypeBaseDefault<any[], T> {
12271
+ type TypeBaseDefault<Ctx extends any[], T> = CommonTypeBase & Defaultable<Ctx, T>;
12272
+ interface PlainStringType<T extends Nullish<string> = string> extends TypeBaseDefault<any[], T> {
12283
12273
  type: "string" | `'${T}'`;
12284
12274
  }
12285
12275
  type StringType<P, T extends string = string> = "string" | PlainStringType<T> | ChoiceType<P, T> | DateStringType | DateRangeStringsType | AnyType;
12286
- interface PlainNumberType<T extends Nullish<number> = number> extends ParamTypeBaseDefault<any[], T> {
12276
+ interface PlainNumberType<T extends Nullish<number> = number> extends TypeBaseDefault<any[], T> {
12287
12277
  type: "number" | `${number extends T ? number : T}`;
12288
12278
  }
12289
- type NumberType<P, T extends number = number> = PlainNumberType<T> | (ParamTypeBaseDefault<FunctionControlContext<P>, T> & NumberTypeBaseCore<FunctionControlContext<P>>) | ChoiceType<P, T> | AnyType;
12290
- interface PlainBooleanType<T extends Nullish<boolean> = boolean> extends ParamTypeBaseDefault<any[], T> {
12279
+ type NumberType<P, T extends number = number> = PlainNumberType<T> | (TypeBaseDefault<FunctionControlContext<P>, T> & NumberTypeBaseCore<FunctionControlContext<P>>) | ChoiceType<P, T> | AnyType;
12280
+ interface PlainBooleanType<T extends Nullish<boolean> = boolean> extends TypeBaseDefault<any[], T> {
12291
12281
  type: "boolean" | `${boolean extends T ? boolean : T}`;
12292
12282
  }
12293
- type BooleanType<P, T extends boolean = boolean> = PlainBooleanType<T> | (ParamTypeBaseDefault<FunctionControlContext<P>, T> & RichBooleanCore) | ChoiceType<P, T> | AnyType;
12294
- type GraphQLType<P> = ParamTypeBaseDefault<FunctionControlContext<P>, any> & GraphQLCore<FunctionControlContext<P>>;
12295
- interface PlainNullType extends ParamTypeBaseDefault<any[], null> {
12283
+ type BooleanType<P, T extends boolean = boolean> = PlainBooleanType<T> | (TypeBaseDefault<FunctionControlContext<P>, T> & RichBooleanCore) | ChoiceType<P, T> | AnyType;
12284
+ type GraphQLType<P> = TypeBaseDefault<FunctionControlContext<P>, any> & GraphQLCore<FunctionControlContext<P>>;
12285
+ interface PlainNullType extends TypeBaseDefault<any[], null> {
12296
12286
  type: "null";
12297
12287
  }
12298
12288
  type NullType = PlainNullType | AnyType;
12299
- interface PlainUndefinedType extends ParamTypeBaseDefault<any[], undefined> {
12289
+ interface PlainUndefinedType extends TypeBaseDefault<any[], undefined> {
12300
12290
  type: "undefined";
12301
12291
  }
12302
12292
  type UndefinedType = PlainUndefinedType | AnyType;
12303
- type ObjectType<P> = ParamTypeBaseDefault<FunctionControlContext<P>, Record<string, any>> & ObjectTypeBaseCore<FunctionControlContext<P>, AnyTyping<P, any>>;
12304
- type ArrayType<P> = ParamTypeBaseDefault<FunctionControlContext<P>, any[]> & ArrayTypeBaseCore<FunctionControlContext<P>, AnyTyping<P, any>>;
12305
- type QueryBuilderType<P> = ParamTypeBaseDefault<FunctionControlContext<P>, any> & QueryBuilderCore<FunctionControlContext<P>>;
12306
- interface PlainAnyType extends ParamTypeBaseDefault<FunctionControlContext<any>, any> {
12293
+ type ExtractObjectKeys<T extends object> = keyof T & string;
12294
+ type ObjectType<P, T extends object> = TypeBaseDefault<FunctionControlContext<P>, T> & ObjectTypeBaseCore<FunctionControlContext<P>, GenericType<P, any>, ExtractObjectKeys<T>>;
12295
+ type ArrayType<P> = TypeBaseDefault<FunctionControlContext<P>, any[]> & ArrayTypeBaseCore<FunctionControlContext<P>, GenericType<P, any>>;
12296
+ type QueryBuilderType<P> = TypeBaseDefault<FunctionControlContext<P>, any> & QueryBuilderCore<FunctionControlContext<P>>;
12297
+ interface PlainAnyType extends TypeBaseDefault<FunctionControlContext<any>, any> {
12307
12298
  type: "any";
12308
12299
  }
12309
12300
  type AnyType = PlainAnyType;
12310
- interface PlainVoidType extends ParamTypeBase {
12301
+ interface PlainVoidType extends CommonTypeBase {
12311
12302
  type: "void";
12312
12303
  }
12313
12304
  type VoidType = PlainVoidType | AnyType;
12314
12305
  type IsAny<T> = 0 extends 1 & T ? true : false;
12315
- type CommonType<P, T> = T extends GraphQLValue ? GraphQLType<P> : T extends null ? NullType : T extends undefined ? UndefinedType : T extends Array<any> ? ArrayType<P> : T extends object ? ObjectType<P> : AnyType;
12306
+ type CommonType<P, T> = T extends GraphQLValue ? GraphQLType<P> : T extends null ? NullType : T extends undefined ? UndefinedType : T extends Array<any> ? ArrayType<P> : T extends object ? ObjectType<P, T> : AnyType;
12316
12307
  type AnyTyping<P, T> = T extends string ? StringType<P, T> : T extends number ? NumberType<P, T> : T extends boolean ? BooleanType<P, T> : CommonType<P, T>;
12317
12308
  type ToTuple<T> = T extends any[] ? T : never;
12318
- type FunctionChoiceType<Args, Opt extends ChoiceValue = ChoiceValue> = FunctionMeta & Defaultable<FunctionControlContext<ToTuple<Args>>, Opt | Opt[]> & ChoiceCore<FunctionControlContext<ToTuple<Args>>, Opt>;
12319
- interface SingleChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends FunctionChoiceType<P, Opt> {
12309
+ type ChoiceTypeBase<Args, Opt extends ChoiceValue = ChoiceValue> = TypeBaseDefault<FunctionControlContext<ToTuple<Args>>, Opt | Opt[]> & ChoiceCore<FunctionControlContext<ToTuple<Args>>, Opt>;
12310
+ interface SingleChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends ChoiceTypeBase<P, Opt> {
12320
12311
  multiSelect?: false;
12321
12312
  }
12322
- interface MultiChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends FunctionChoiceType<P, Opt> {
12313
+ interface MultiChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends ChoiceTypeBase<P, Opt> {
12323
12314
  multiSelect: true;
12324
12315
  }
12325
- interface CustomChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends FunctionChoiceType<P, Opt> {
12316
+ interface CustomChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends ChoiceTypeBase<P, Opt> {
12326
12317
  multiSelect: FunctionContextConfig<ToTuple<P>, boolean>;
12327
12318
  }
12328
12319
  type ChoiceType<P, T extends ChoiceValue = ChoiceValue> = SingleChoiceType<P, T> | MultiChoiceType<P, T> | CustomChoiceType<P, T>;
12329
- type DateStringType = ParamTypeBaseDefault<FunctionControlContext<string>, string> & DateStringCore;
12330
- type DateRangeStringsType = ParamTypeBaseDefault<FunctionControlContext<[string, string]>, [
12320
+ type DateStringType = TypeBaseDefault<FunctionControlContext<string>, string> & DateStringCore;
12321
+ type DateRangeStringsType = TypeBaseDefault<FunctionControlContext<[string, string]>, [
12331
12322
  string,
12332
12323
  string
12333
12324
  ]> & DateRangeStringsCore;
12334
- interface DynamicType<P> extends ParamTypeBase, DynamicCore<FunctionControlContext<ToTuple<P>>, ParamType<P, any>> {
12325
+ interface DynamicType<P> extends CommonTypeBase, DynamicCore<FunctionControlContext<ToTuple<P>>, GenericType<P, any>> {
12335
12326
  }
12336
12327
  type RestrictedType<P, T> = IsAny<T> extends true ? AnyTyping<P, T> : [
12337
12328
  T
12338
12329
  ] extends [string] ? StringType<P, T> : [T] extends [number] ? NumberType<P, T> : [T] extends [boolean] ? BooleanType<P, T> : T extends string | null | undefined ? Exclude<T, null | undefined> extends string ? StringType<P, T extends string ? T : string> : CommonType<P, T> : T extends number | null | undefined ? Exclude<T, null | undefined> extends number ? NumberType<P, T extends number ? T : number> : CommonType<P, T> : T extends boolean | null | undefined ? Exclude<T, null | undefined> extends boolean ? BooleanType<P, T extends boolean ? T : boolean> : CommonType<P, T> : CommonType<P, T>;
12339
- type ParamType<P, T> = RestrictedType<P, T> | DynamicType<P> | QueryBuilderType<P>;
12340
- type RequiredParam<P, T> = ParamType<P, T> & {
12330
+ type GenericType<P, T> = RestrictedType<P, T> | DynamicType<P> | QueryBuilderType<P>;
12331
+ interface ParamTypeBase {
12332
+ name: string;
12333
+ }
12334
+ type ParamType<P, T> = ParamTypeBase & GenericType<P, T>;
12335
+ type RequiredParam<P, T> = ParamTypeBase & ParamType<P, T> & {
12341
12336
  isOptional?: false;
12342
12337
  isRestParameter?: false;
12343
12338
  };
12344
- type OptionalParam<P, T> = ParamType<P, T> & {
12339
+ type OptionalParam<P, T> = ParamTypeBase & ParamType<P, T> & {
12345
12340
  isRestParameter?: false;
12346
12341
  };
12347
- type RestParam<P, T> = ParamType<P, T> & {
12342
+ type RestParam<P, T> = ParamTypeBase & ParamType<P, T> & {
12348
12343
  isOptional?: false;
12349
12344
  isRestParameter: true;
12350
12345
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.410",
3
+ "version": "0.2.411",
4
4
  "description": "plasmic library for rendering in the presentational style",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
@@ -96,9 +96,9 @@
96
96
  },
97
97
  "dependencies": {
98
98
  "@plasmicapp/auth-react": "0.0.24",
99
- "@plasmicapp/data-sources": "0.1.195",
99
+ "@plasmicapp/data-sources": "0.1.196",
100
100
  "@plasmicapp/data-sources-context": "0.1.22",
101
- "@plasmicapp/host": "1.0.231",
101
+ "@plasmicapp/host": "1.0.232",
102
102
  "@plasmicapp/loader-splits": "1.0.66",
103
103
  "@plasmicapp/nextjs-app-router": "1.0.19",
104
104
  "@plasmicapp/prepass": "1.0.21",
@@ -153,5 +153,5 @@
153
153
  "react": ">=16.8.0",
154
154
  "react-dom": ">=16.8.0"
155
155
  },
156
- "gitHead": "6b9428c7b4f35d9b84241981523e746e18e2abb7"
156
+ "gitHead": "b6552bed8840c583a74ba7e1c724fa2850c6c2ed"
157
157
  }