@plasmicapp/react-web 0.2.188 → 0.2.189
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.
- package/dist/all.d.ts +68 -32
- package/dist/react-web.cjs.development.js.map +1 -1
- package/dist/react-web.cjs.production.min.js.map +1 -1
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/ssr.d.ts +2 -1
- package/package.json +4 -4
- package/skinny/dist/index.js +2 -2
- package/skinny/dist/plume/checkbox/index.js +1 -1
- package/skinny/dist/plume/menu/index.js +1 -1
- package/skinny/dist/plume/menu-button/index.js +1 -1
- package/skinny/dist/plume/select/index.js +1 -1
- package/skinny/dist/plume/switch/index.js +1 -1
- package/skinny/dist/render/ssr.d.ts +2 -1
- package/skinny/dist/{ssr-08aff522.js → ssr-c9834f50.js} +2 -2
- package/skinny/dist/ssr-c9834f50.js.map +1 -0
- package/skinny/dist/ssr-08aff522.js.map +0 -1
package/dist/all.d.ts
CHANGED
|
@@ -10998,17 +10998,32 @@ interface CanvasComponentProps<Data = any> {
|
|
|
10998
10998
|
setControlContextData?: (data: Data) => void;
|
|
10999
10999
|
}
|
|
11000
11000
|
declare type InferDataType<P> = P extends CanvasComponentProps<infer Data> ? Data : any;
|
|
11001
|
+
declare type ControlExtras = {
|
|
11002
|
+
path: (string | number)[];
|
|
11003
|
+
};
|
|
11001
11004
|
/**
|
|
11002
|
-
*
|
|
11003
|
-
|
|
11005
|
+
* Context that we pass back to control functions.
|
|
11006
|
+
*/
|
|
11007
|
+
declare type ControlContext<P> = [
|
|
11008
|
+
/**
|
|
11009
|
+
* props
|
|
11004
11010
|
*/
|
|
11005
|
-
|
|
11011
|
+
P,
|
|
11006
11012
|
/**
|
|
11007
11013
|
* `contextData` can be `null` if the prop controls are rendering before
|
|
11008
11014
|
* the component instance itself (it will re-render once the component
|
|
11009
11015
|
* calls `setControlContextData`)
|
|
11010
11016
|
*/
|
|
11011
|
-
|
|
11017
|
+
InferDataType<P> | null,
|
|
11018
|
+
/**
|
|
11019
|
+
* Extra information for the control to use
|
|
11020
|
+
*/
|
|
11021
|
+
ControlExtras];
|
|
11022
|
+
/**
|
|
11023
|
+
* Config option that takes the context (e.g., props) of the component instance
|
|
11024
|
+
* to dynamically set its value.
|
|
11025
|
+
*/
|
|
11026
|
+
declare type ContextDependentConfig<P, R> = (...args: ControlContext<P>) => R;
|
|
11012
11027
|
interface PropTypeBase<P> {
|
|
11013
11028
|
displayName?: string;
|
|
11014
11029
|
description?: string;
|
|
@@ -11162,7 +11177,7 @@ declare type JSONLikeType<P> = "object" | ({
|
|
|
11162
11177
|
/**
|
|
11163
11178
|
* Optional function that generates a name for this item in the array
|
|
11164
11179
|
*/
|
|
11165
|
-
nameFunc?: (item: any) => string | undefined;
|
|
11180
|
+
nameFunc?: (item: any, ...args: ControlContext<P>) => string | undefined;
|
|
11166
11181
|
} & DefaultValueOrExpr<P, any> & PropTypeBase<P>) | ({
|
|
11167
11182
|
type: "array";
|
|
11168
11183
|
itemType?: {
|
|
@@ -11173,8 +11188,29 @@ declare type JSONLikeType<P> = "object" | ({
|
|
|
11173
11188
|
/**
|
|
11174
11189
|
* Optional function that generates a name for this item in the array
|
|
11175
11190
|
*/
|
|
11176
|
-
nameFunc?: (item: any) => string | undefined;
|
|
11191
|
+
nameFunc?: (item: any, ...args: ControlContext<P>) => string | undefined;
|
|
11177
11192
|
};
|
|
11193
|
+
/**
|
|
11194
|
+
* Specify how to let Plasmic know how to update its own internal representation of the data when the value has
|
|
11195
|
+
* changed, or when issuing a minimalValue or shownValue that is different.
|
|
11196
|
+
*
|
|
11197
|
+
* Important to specify this if you are expecting any nested expression values in this data type!
|
|
11198
|
+
*/
|
|
11199
|
+
unstable__keyFunc?: (item: any) => any;
|
|
11200
|
+
/**
|
|
11201
|
+
* Specify what would be the tentative new value that is set if the user makes any changes.
|
|
11202
|
+
*
|
|
11203
|
+
* Useful for field mappings.
|
|
11204
|
+
*
|
|
11205
|
+
* For instance, consider a Table where we have a `fields` prop:
|
|
11206
|
+
*
|
|
11207
|
+
* - Initially, the value is undefined. But if the user makes any changes, we would want to save an array of at
|
|
11208
|
+
* least three items (corresponding to, say, three columns inferred from a schema).
|
|
11209
|
+
*
|
|
11210
|
+
* - Let's say there are 5 columns in the value. The data schema changes, removing a column and adding two new
|
|
11211
|
+
* ones. Now we would want a different minimal value, containing 6 items.
|
|
11212
|
+
*/
|
|
11213
|
+
unstable__minimalValue?: ContextDependentConfig<P, any>;
|
|
11178
11214
|
} & DefaultValueOrExpr<P, any[]> & PropTypeBase<P>) | ({
|
|
11179
11215
|
type: "dataSource";
|
|
11180
11216
|
dataSource: "airtable" | "cms";
|
|
@@ -11903,31 +11939,6 @@ declare type Queries = {
|
|
|
11903
11939
|
};
|
|
11904
11940
|
declare function createUseScreenVariants(isMulti: boolean, screenQueries: Queries): () => string | string[] | undefined;
|
|
11905
11941
|
|
|
11906
|
-
/**
|
|
11907
|
-
* Returns whether the component is currently being server side rendered or
|
|
11908
|
-
* hydrated on the client. Can be used to delay browser-specific rendering
|
|
11909
|
-
* until after hydration.
|
|
11910
|
-
*/
|
|
11911
|
-
declare function useIsSSR$1(): boolean;
|
|
11912
|
-
|
|
11913
|
-
declare type PlasmicTranslator = (str: string, opts?: {
|
|
11914
|
-
components?: {
|
|
11915
|
-
[key: string]: React__default.ReactElement;
|
|
11916
|
-
};
|
|
11917
|
-
}) => React__default.ReactNode;
|
|
11918
|
-
interface TransProps {
|
|
11919
|
-
transKey?: string;
|
|
11920
|
-
children?: React__default.ReactNode;
|
|
11921
|
-
}
|
|
11922
|
-
declare function genTranslatableString(elt: React__default.ReactNode): {
|
|
11923
|
-
str: string;
|
|
11924
|
-
components: {
|
|
11925
|
-
[key: string]: React__default.ReactElement<any, string | ((props: any) => React__default.ReactElement<any, any> | null) | (new (props: any) => React__default.Component<any, any, any>)>;
|
|
11926
|
-
};
|
|
11927
|
-
componentsCount: number;
|
|
11928
|
-
};
|
|
11929
|
-
declare function Trans({ transKey, children }: TransProps): React__default.ReactNode;
|
|
11930
|
-
|
|
11931
11942
|
interface PlasmicDataSourceContextValue {
|
|
11932
11943
|
userAuthToken?: string | null;
|
|
11933
11944
|
isUserLoading?: boolean;
|
|
@@ -11953,7 +11964,32 @@ declare function useCurrentUser(): {
|
|
|
11953
11964
|
};
|
|
11954
11965
|
declare const PlasmicDataSourceContextProvider: React__default.Provider<PlasmicDataSourceContextValue | undefined>;
|
|
11955
11966
|
|
|
11956
|
-
|
|
11967
|
+
/**
|
|
11968
|
+
* Returns whether the component is currently being server side rendered or
|
|
11969
|
+
* hydrated on the client. Can be used to delay browser-specific rendering
|
|
11970
|
+
* until after hydration.
|
|
11971
|
+
*/
|
|
11972
|
+
declare function useIsSSR$1(): boolean;
|
|
11973
|
+
|
|
11974
|
+
declare type PlasmicTranslator = (str: string, opts?: {
|
|
11975
|
+
components?: {
|
|
11976
|
+
[key: string]: React__default.ReactElement;
|
|
11977
|
+
};
|
|
11978
|
+
}) => React__default.ReactNode;
|
|
11979
|
+
interface TransProps {
|
|
11980
|
+
transKey?: string;
|
|
11981
|
+
children?: React__default.ReactNode;
|
|
11982
|
+
}
|
|
11983
|
+
declare function genTranslatableString(elt: React__default.ReactNode): {
|
|
11984
|
+
str: string;
|
|
11985
|
+
components: {
|
|
11986
|
+
[key: string]: React__default.ReactElement<any, string | ((props: any) => React__default.ReactElement<any, any> | null) | (new (props: any) => React__default.Component<any, any, any>)>;
|
|
11987
|
+
};
|
|
11988
|
+
componentsCount: number;
|
|
11989
|
+
};
|
|
11990
|
+
declare function Trans({ transKey, children }: TransProps): React__default.ReactNode;
|
|
11991
|
+
|
|
11992
|
+
interface PlasmicRootProviderProps extends PlasmicDataSourceContextValue {
|
|
11957
11993
|
platform?: "nextjs" | "gatsby";
|
|
11958
11994
|
children?: React$1.ReactNode;
|
|
11959
11995
|
translator?: PlasmicTranslator;
|