@plasmicapp/react-web 0.2.258 → 0.2.263

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 +120 -15
  2. package/package.json +8 -8
package/dist/all.d.ts CHANGED
@@ -11609,11 +11609,11 @@ interface CardPickerType<P> extends PropTypeBaseDefault<P, string> {
11609
11609
  onSearch?: ContextDependentConfig<P, ((value: string) => void) | undefined>;
11610
11610
  }
11611
11611
  type RichStringType<P> = PlainStringType<P> | CodeStringType<P> | RichTextType<P> | ColorType<P> | ClassType<P> | ThemeResetClassType<P> | CardPickerType<P> | HrefType<P>;
11612
- type StringType<P> = "string" | "href" | RichStringType<P>;
11612
+ type StringType$1<P> = "string" | "href" | RichStringType<P>;
11613
11613
  interface RichBooleanType<P> extends PropTypeBaseDefault<P, boolean> {
11614
11614
  type: "boolean";
11615
11615
  }
11616
- type BooleanType<P> = "boolean" | RichBooleanType<P>;
11616
+ type BooleanType$1<P> = "boolean" | RichBooleanType<P>;
11617
11617
  type GraphQLValue = {
11618
11618
  query: string;
11619
11619
  variables?: Record<string, any>;
@@ -11638,15 +11638,15 @@ interface SliderNumberType<P> extends NumberTypeBase<P> {
11638
11638
  step?: number | ContextDependentConfig<P, number>;
11639
11639
  }
11640
11640
  type RichNumberType<P> = PlainNumberType<P> | SliderNumberType<P>;
11641
- type NumberType<P> = "number" | RichNumberType<P>;
11642
- interface ObjectType<P> extends PropTypeBaseDefault<P, Record<string, any>> {
11641
+ type NumberType$1<P> = "number" | RichNumberType<P>;
11642
+ interface ObjectType$1<P> extends PropTypeBaseDefault<P, Record<string, any>> {
11643
11643
  type: "object";
11644
11644
  fields?: Record<string, PropType$1<P>>;
11645
11645
  nameFunc?: (item: any, ...args: ControlContext<P>) => string | undefined;
11646
11646
  }
11647
- interface ArrayType<P> extends PropTypeBaseDefault<P, any[]> {
11647
+ interface ArrayType$1<P> extends PropTypeBaseDefault<P, any[]> {
11648
11648
  type: "array";
11649
- itemType?: ObjectType<P>;
11649
+ itemType?: ObjectType$1<P>;
11650
11650
  /**
11651
11651
  * Optional function that determines whether the user can delete a given item.
11652
11652
  */
@@ -11673,7 +11673,7 @@ interface ArrayType<P> extends PropTypeBaseDefault<P, any[]> {
11673
11673
  */
11674
11674
  unstable__minimalValue?: ContextDependentConfig<P, any>;
11675
11675
  }
11676
- type JSONLikeType<P> = "object" | ObjectType<P> | ArrayType<P>;
11676
+ type JSONLikeType<P> = "object" | ObjectType$1<P> | ArrayType$1<P>;
11677
11677
  interface DataSourceType<P> extends PropTypeBase<P> {
11678
11678
  type: "dataSource";
11679
11679
  dataSource: "airtable" | "cms";
@@ -11699,7 +11699,7 @@ interface EventHandlerType<P> extends PropTypeBase<P> {
11699
11699
  type: "eventHandler";
11700
11700
  argTypes: {
11701
11701
  name: string;
11702
- type: PropType$1<any>;
11702
+ type: ArgType<any>;
11703
11703
  }[];
11704
11704
  }
11705
11705
  interface ChoiceTypeBase<P, T> extends PropTypeBaseDefault<P, T> {
@@ -11820,11 +11820,12 @@ interface RichCustomType<P> extends PropTypeBaseDefault<P, any> {
11820
11820
  control: CustomControl<P>;
11821
11821
  }
11822
11822
  type CustomType<P> = RichCustomType<P> | CustomControl<P>;
11823
- type PrimitiveType<P = any> = Extract<StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P>, string>;
11824
- type PropType$1<P> = StringType<P> | BooleanType<P> | GraphQLType<P> | NumberType<P> | JSONLikeType<P> | DataSourceType<P> | DataPickerType<P> | ExprEditorType<P> | FormValidationRulesType<P> | EventHandlerType<P> | ChoiceType<P> | CustomType<P> | ImageUrlType<P> | SlotType<P> | DateStringType<P> | DateRangeStringsType<P>;
11825
- type StringCompatType<P> = DateStringType<P> | StringType<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>;
11826
- type BoolCompatType<P> = BooleanType<P> | CustomType<P> | DataPickerType<P>;
11827
- type NumberCompatType<P> = NumberType<P> | CustomType<P> | DataPickerType<P>;
11823
+ type PrimitiveType<P = any> = Extract<StringType$1<P> | BooleanType$1<P> | NumberType$1<P> | JSONLikeType<P>, string>;
11824
+ type PropType$1<P> = StringType$1<P> | BooleanType$1<P> | GraphQLType<P> | NumberType$1<P> | JSONLikeType<P> | DataSourceType<P> | DataPickerType<P> | ExprEditorType<P> | FormValidationRulesType<P> | EventHandlerType<P> | ChoiceType<P> | CustomType<P> | ImageUrlType<P> | SlotType<P> | DateStringType<P> | DateRangeStringsType<P>;
11825
+ type ArgType<P> = Exclude<PropType$1<P>, SlotType<P> | EventHandlerType<P>>;
11826
+ type StringCompatType<P> = DateStringType<P> | StringType$1<P> | ChoiceType<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>;
11827
+ type BoolCompatType<P> = BooleanType$1<P> | CustomType<P> | DataPickerType<P>;
11828
+ type NumberCompatType<P> = NumberType$1<P> | CustomType<P> | DataPickerType<P>;
11828
11829
  type RestrictPropType$1<T, P> = T extends string ? StringCompatType<P> : T extends boolean ? BoolCompatType<P> : T extends number ? NumberCompatType<P> : PropType$1<P>;
11829
11830
 
11830
11831
  type Fetcher = (...args: any[]) => Promise<any>;
@@ -11866,8 +11867,112 @@ declare global {
11866
11867
  }
11867
11868
  }
11868
11869
 
11869
- type PropType<P> = StringType<P> | BooleanType<P> | NumberType<P> | JSONLikeType<P> | ChoiceType<P> | CustomType<P> | DataSourceType<P>;
11870
- type RestrictPropType<T, P> = T extends string ? StringType<P> | ChoiceType<P> | JSONLikeType<P> | CustomType<P> : T extends boolean ? BooleanType<P> | JSONLikeType<P> | CustomType<P> : T extends number ? NumberType<P> | JSONLikeType<P> | CustomType<P> : PropType<P>;
11870
+ type StringType<T extends string = string> = "string" | `'${T}'`;
11871
+ type NumberType<T extends number = number> = "number" | `${number extends T ? number : T}`;
11872
+ type BooleanType<T extends boolean = boolean> = "boolean" | `${boolean extends T ? boolean : T}`;
11873
+ type NullType = "null";
11874
+ type UndefinedType = "undefined";
11875
+ type ArrayType = "array";
11876
+ type ObjectType = "object";
11877
+ type AnyType = "any";
11878
+ type VoidType = "void";
11879
+ type RestrictedType<T> = T extends string ? StringType<T> : T extends number ? NumberType<T> : T extends boolean ? BooleanType<T> : T extends null ? NullType : T extends undefined ? UndefinedType : T extends Array<any> ? ArrayType : T extends object ? ObjectType : AnyType;
11880
+ type OrType<T> = RestrictedType<T>[];
11881
+ type ParamType<T> = AnyType | RestrictedType<T> | OrType<T>;
11882
+ interface BaseParam<T> {
11883
+ name: string;
11884
+ type?: ParamType<T>;
11885
+ description?: string;
11886
+ isOptional?: boolean;
11887
+ isRestParam?: boolean;
11888
+ }
11889
+ interface RequiredParam<T> extends BaseParam<T> {
11890
+ isOptional?: false;
11891
+ isRestParameter?: false;
11892
+ }
11893
+ interface OptionalParam<T> extends BaseParam<T | undefined> {
11894
+ isRestParameter?: false;
11895
+ }
11896
+ interface RestParam<T> extends BaseParam<T> {
11897
+ isOptional?: false;
11898
+ isRestParameter: true;
11899
+ }
11900
+ type RequiredParams<T extends any[], U extends any[] = []> = Partial<T> extends T ? U : T extends [infer F, ...infer R] ? RequiredParams<R, [...U, F]> : U;
11901
+ type OptionalParams<T extends any[]> = T extends [
11902
+ ...RequiredParams<T>,
11903
+ ...infer R
11904
+ ] ? [...R] : [];
11905
+ type HandleRequiredParams<P extends any[]> = P extends [infer H, ...infer T] ? [string | RequiredParam<H>, ...HandleRequiredParams<T>] : [];
11906
+ type HandleOptionalParams<P extends any[]> = P extends [infer H, ...infer T] ? [] | [string | OptionalParam<H | undefined>, ...HandleOptionalParams<T>] : P extends [] ? [] : P extends Array<infer T> ? [] | [RestParam<T[]>] : [];
11907
+ type HandleParams<P extends any[]> = [
11908
+ ...HandleRequiredParams<RequiredParams<P>>,
11909
+ ...HandleOptionalParams<Required<OptionalParams<P>>>
11910
+ ];
11911
+ type HandleReturnType<T> = VoidType | ParamType<T>;
11912
+ interface CustomFunctionMeta<F extends (...args: any[]) => any> {
11913
+ /**
11914
+ * The javascript name of the function. Notice it must be unique across all
11915
+ * other functions and function namespaces. If two functions have the same
11916
+ * name, they should be registered with different `meta.namespace`.
11917
+ */
11918
+ name: string;
11919
+ /**
11920
+ * A namespace for organizing groups of functions. It's also used to handle
11921
+ * function name collisions. If a function has a namespace, it will be used
11922
+ * whenever accessing the function.
11923
+ */
11924
+ namespace?: string;
11925
+ /**
11926
+ * Documentation for the registered function.
11927
+ */
11928
+ description?: string;
11929
+ /**
11930
+ * An array containing the list of parameters names the function takes.
11931
+ * Optionally they can also be registered with the expected param types.
11932
+ */
11933
+ params?: HandleParams<Parameters<F>>;
11934
+ /**
11935
+ * Return value information.
11936
+ */
11937
+ returnValue?: {
11938
+ /**
11939
+ * The function return type.
11940
+ */
11941
+ type?: HandleReturnType<ReturnType<F>>;
11942
+ /**
11943
+ * The function return value description.
11944
+ */
11945
+ description?: string;
11946
+ };
11947
+ /**
11948
+ * Typescript function declaration. If specified, it ignores the types
11949
+ * provided by `params` and `returnValue`.
11950
+ */
11951
+ typescriptDeclaration?: string;
11952
+ /**
11953
+ * The path to be used when importing the function in the generated code.
11954
+ * It can be the name of the package that contains the function, or the path
11955
+ * to the file in the project (relative to the root directory).
11956
+ */
11957
+ importPath: string;
11958
+ /**
11959
+ * Whether the function is the default export from that path. Optional: if
11960
+ * not specified, it's considered `false`.
11961
+ */
11962
+ isDefaultExport?: boolean;
11963
+ }
11964
+ interface CustomFunctionRegistration {
11965
+ function: (...args: any[]) => any;
11966
+ meta: CustomFunctionMeta<any>;
11967
+ }
11968
+ declare global {
11969
+ interface Window {
11970
+ __PlasmicFunctionsRegistry: CustomFunctionRegistration[];
11971
+ }
11972
+ }
11973
+
11974
+ type PropType<P> = StringType$1<P> | BooleanType$1<P> | NumberType$1<P> | JSONLikeType<P> | ChoiceType<P> | CustomType<P> | DataSourceType<P>;
11975
+ type RestrictPropType<T, P> = T extends string ? StringType$1<P> | ChoiceType<P> | JSONLikeType<P> | CustomType<P> : T extends boolean ? BooleanType$1<P> | JSONLikeType<P> | CustomType<P> : T extends number ? NumberType$1<P> | JSONLikeType<P> | CustomType<P> : PropType<P>;
11871
11976
  type DistributedKeyOf<T> = T extends any ? keyof T : never;
11872
11977
  interface GlobalContextMeta<P> {
11873
11978
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.258",
3
+ "version": "0.2.263",
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",
@@ -88,12 +88,12 @@
88
88
  },
89
89
  "prettier": {},
90
90
  "dependencies": {
91
- "@plasmicapp/auth-react": "0.0.7",
92
- "@plasmicapp/data-sources": "0.1.115",
93
- "@plasmicapp/data-sources-context": "0.1.11",
94
- "@plasmicapp/host": "1.0.165",
95
- "@plasmicapp/prepass": "1.0.3",
96
- "@plasmicapp/query": "0.1.68",
91
+ "@plasmicapp/auth-react": "0.0.10",
92
+ "@plasmicapp/data-sources": "0.1.119",
93
+ "@plasmicapp/data-sources-context": "0.1.13",
94
+ "@plasmicapp/host": "1.0.168",
95
+ "@plasmicapp/prepass": "1.0.5",
96
+ "@plasmicapp/query": "0.1.70",
97
97
  "@react-aria/checkbox": "^3.5.0",
98
98
  "@react-aria/focus": "^3.7.0",
99
99
  "@react-aria/interactions": "^3.10.0",
@@ -165,5 +165,5 @@
165
165
  "react": ">=16.8.0",
166
166
  "react-dom": ">=16.8.0"
167
167
  },
168
- "gitHead": "7fcbeeb029e7a41aaa58fa554034e21886517bbe"
168
+ "gitHead": "388b5829f67de3782fe8afdad0d153b5c6d0aac0"
169
169
  }