@plasmicapp/react-web 0.2.140 → 0.2.142
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 +29 -30
- package/dist/auth/PlasmicPageGuard.d.ts +6 -4
- package/dist/react-web.cjs.development.js +952 -114
- package/dist/react-web.cjs.development.js.map +1 -1
- package/dist/react-web.cjs.production.min.js +1 -1
- package/dist/react-web.cjs.production.min.js.map +1 -1
- package/dist/react-web.esm.js +952 -114
- package/dist/react-web.esm.js.map +1 -1
- package/dist/states/graph.d.ts +10 -4
- package/dist/states/helpers.d.ts +7 -9
- package/dist/states/valtio.d.ts +3 -1
- package/dist/stories/UseDollarState.stories.d.ts +7 -0
- package/package.json +2 -2
- package/skinny/dist/auth/PlasmicPageGuard.d.ts +6 -4
- package/skinny/dist/{collection-utils-43f97262.js → collection-utils-b5d4be02.js} +4 -4
- package/skinny/dist/{collection-utils-43f97262.js.map → collection-utils-b5d4be02.js.map} +1 -1
- package/skinny/dist/{common-9ebe374e.js → common-c2744215.js} +40 -2
- package/skinny/dist/{common-9ebe374e.js.map → common-c2744215.js.map} +1 -1
- package/skinny/dist/index.js +219 -90
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/button/index.js +2 -2
- package/skinny/dist/plume/checkbox/index.js +4 -4
- package/skinny/dist/plume/menu/index.js +5 -5
- package/skinny/dist/plume/menu-button/index.js +4 -4
- package/skinny/dist/plume/select/index.js +5 -5
- package/skinny/dist/plume/switch/index.js +4 -4
- package/skinny/dist/plume/text-input/index.js +2 -2
- package/skinny/dist/plume/triggered-overlay/index.js +4 -4
- package/skinny/dist/{plume-utils-d9811bf3.js → plume-utils-653f4b8a.js} +2 -2
- package/skinny/dist/{plume-utils-d9811bf3.js.map → plume-utils-653f4b8a.js.map} +1 -1
- package/skinny/dist/{props-utils-228208e6.js → props-utils-70c2d02a.js} +2 -2
- package/skinny/dist/{props-utils-228208e6.js.map → props-utils-70c2d02a.js.map} +1 -1
- package/skinny/dist/{react-utils-7bc53870.js → react-utils-76d05959.js} +2 -2
- package/skinny/dist/{react-utils-7bc53870.js.map → react-utils-76d05959.js.map} +1 -1
- package/skinny/dist/render/PlasmicImg/index.js +2 -2
- package/skinny/dist/states/graph.d.ts +10 -4
- package/skinny/dist/states/helpers.d.ts +7 -9
- package/skinny/dist/states/valtio.d.ts +3 -1
- package/skinny/dist/stories/UseDollarState.stories.d.ts +7 -0
package/dist/all.d.ts
CHANGED
|
@@ -17,29 +17,13 @@ type Argument = Value | Mapping | Argument[];
|
|
|
17
17
|
|
|
18
18
|
declare function classNames$1(...args: Argument[]): string;
|
|
19
19
|
|
|
20
|
-
interface
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
user?: {
|
|
24
|
-
id: string;
|
|
25
|
-
email: string;
|
|
26
|
-
roleId: string;
|
|
27
|
-
properties: Record<string, unknown> | null;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
declare function useCurrentUser(): {
|
|
31
|
-
id: string;
|
|
32
|
-
email: string;
|
|
33
|
-
roleId: string;
|
|
34
|
-
properties: Record<string, unknown> | null;
|
|
35
|
-
} | undefined;
|
|
36
|
-
declare const PlasmicDataSourceContextProvider: React__default.Provider<PlasmicDataSourceContextValue | undefined>;
|
|
37
|
-
|
|
38
|
-
declare function PlasmicPageGuard(props: {
|
|
20
|
+
interface PlasmicPageGuardProps {
|
|
21
|
+
appId: string;
|
|
22
|
+
authorizeEndpoint: string;
|
|
39
23
|
children: React__default.ReactNode;
|
|
40
|
-
dataSourceCtxValue: PlasmicDataSourceContextValue | undefined;
|
|
41
24
|
validRoles: string[];
|
|
42
|
-
}
|
|
25
|
+
}
|
|
26
|
+
declare function PlasmicPageGuard(props: PlasmicPageGuardProps): {} | null | undefined;
|
|
43
27
|
|
|
44
28
|
declare function pick<T extends {}>(obj: T, ...keys: (string | number | symbol)[]): Partial<T>;
|
|
45
29
|
declare function omit<T extends {}>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
@@ -52,6 +36,7 @@ declare type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<R
|
|
|
52
36
|
declare function dlv(object: object, key: string | Array<string | number>, defaultValue?: any): any;
|
|
53
37
|
|
|
54
38
|
declare type InitFunc<T> = ($props: Record<string, any>, $state: $State, $ctx: Record<string, any>, indexes?: number[]) => T;
|
|
39
|
+
declare type ObjectPath = (string | number)[];
|
|
55
40
|
interface $StateSpec<T> {
|
|
56
41
|
path: string;
|
|
57
42
|
initFunc?: InitFunc<T>;
|
|
@@ -66,14 +51,8 @@ interface $State {
|
|
|
66
51
|
registerInitFunc?: (path: string, f: InitFunc<any>, repetitonIndex?: number[]) => any;
|
|
67
52
|
}
|
|
68
53
|
|
|
69
|
-
declare function generateStateOnChangeProp($state: $State,
|
|
70
|
-
|
|
71
|
-
* This function generate the state value prop for repeated states
|
|
72
|
-
* Example:
|
|
73
|
-
* - parent[][].counter[].count
|
|
74
|
-
* We need to pass `parent[index1][index2].counter to the child component
|
|
75
|
-
*/
|
|
76
|
-
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
54
|
+
declare function generateStateOnChangeProp($state: $State, path: ObjectPath): (val: any) => void;
|
|
55
|
+
declare function generateStateValueProp($state: $State, path: ObjectPath): any;
|
|
77
56
|
declare function isPlasmicStateProxy(obj: any): any;
|
|
78
57
|
/**
|
|
79
58
|
* Forked from https://github.com/lukeed/dset
|
|
@@ -81,7 +60,9 @@ declare function isPlasmicStateProxy(obj: any): any;
|
|
|
81
60
|
*/
|
|
82
61
|
declare function set(obj: any, keys: any, val: any): void;
|
|
83
62
|
|
|
84
|
-
declare function useDollarState(specs: $StateSpec<any>[], props: Record<string, any>, $ctx?: Record<string, any
|
|
63
|
+
declare function useDollarState(specs: $StateSpec<any>[], props: Record<string, any>, $ctx?: Record<string, any>, opts?: {
|
|
64
|
+
inCanvas: boolean;
|
|
65
|
+
}): $State;
|
|
85
66
|
|
|
86
67
|
interface Variants {
|
|
87
68
|
[vg: string]: any;
|
|
@@ -311,6 +292,24 @@ declare function genTranslatableString(elt: React__default.ReactNode): {
|
|
|
311
292
|
};
|
|
312
293
|
declare function Trans({ transKey, children }: TransProps): React__default.ReactNode;
|
|
313
294
|
|
|
295
|
+
interface PlasmicDataSourceContextValue {
|
|
296
|
+
userAuthToken?: string;
|
|
297
|
+
isUserLoading?: boolean;
|
|
298
|
+
user?: {
|
|
299
|
+
id: string;
|
|
300
|
+
email: string;
|
|
301
|
+
roleId: string;
|
|
302
|
+
properties: Record<string, unknown> | null;
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
declare function useCurrentUser(): {
|
|
306
|
+
id: string;
|
|
307
|
+
email: string;
|
|
308
|
+
roleId: string;
|
|
309
|
+
properties: Record<string, unknown> | null;
|
|
310
|
+
} | undefined;
|
|
311
|
+
declare const PlasmicDataSourceContextProvider: React__default.Provider<PlasmicDataSourceContextValue | undefined>;
|
|
312
|
+
|
|
314
313
|
interface PlasmicRootProviderProps {
|
|
315
314
|
platform?: "nextjs" | "gatsby";
|
|
316
315
|
children?: React.ReactNode;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { PlasmicDataSourceContextValue } from "@plasmicapp/data-sources-context";
|
|
2
1
|
import React from "react";
|
|
3
|
-
|
|
2
|
+
interface PlasmicPageGuardProps {
|
|
3
|
+
appId: string;
|
|
4
|
+
authorizeEndpoint: string;
|
|
4
5
|
children: React.ReactNode;
|
|
5
|
-
dataSourceCtxValue: PlasmicDataSourceContextValue | undefined;
|
|
6
6
|
validRoles: string[];
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
|
+
export declare function PlasmicPageGuard(props: PlasmicPageGuardProps): {} | null | undefined;
|
|
9
|
+
export {};
|