@plasmicapp/react-web 0.2.129 → 0.2.131
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 +3 -1
- package/dist/react-web.cjs.development.js +2 -2
- 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 +2 -2
- package/dist/react-web.esm.js.map +1 -1
- package/package.json +4 -4
- package/skinny/dist/index.js +2 -2
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/button/index.d.ts +4 -4
- package/skinny/dist/plume/checkbox/index.d.ts +1 -1
- package/skinny/dist/plume/collection-utils.d.ts +2 -2
- package/skinny/dist/plume/menu/menu.d.ts +1 -1
- package/skinny/dist/plume/menu-button/menu-button.d.ts +1 -1
- package/skinny/dist/plume/plume-utils.d.ts +13 -13
- package/skinny/dist/plume/select/select-option.d.ts +1 -1
- package/skinny/dist/plume/select/select.d.ts +1 -1
- package/skinny/dist/plume/switch/index.d.ts +1 -1
- package/skinny/dist/plume/text-input/index.d.ts +1 -1
- package/skinny/dist/plume/triggered-overlay/triggered-overlay.d.ts +1 -1
- package/skinny/dist/react-utils.d.ts +2 -2
- package/skinny/dist/render/PlasmicHead/index.d.ts +1 -1
- package/skinny/dist/render/PlasmicImg/index.d.ts +1 -1
- package/skinny/dist/render/elements.d.ts +10 -10
- package/skinny/dist/render/screen-variants.d.ts +1 -1
- package/skinny/dist/render/translation.d.ts +1 -1
- package/skinny/dist/render/triggers.d.ts +1 -1
- package/skinny/dist/states/index.d.ts +1 -1
- package/skinny/dist/states/valtio.d.ts +1 -1
|
@@ -14,7 +14,7 @@ export interface TriggeredOverlayConfig<C extends AnyPlasmicClass> {
|
|
|
14
14
|
root: keyof PlasmicClassOverrides<C>;
|
|
15
15
|
contentContainer: keyof PlasmicClassOverrides<C>;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type TriggeredOverlayRef = React.Ref<HTMLElement>;
|
|
18
18
|
export declare function useTriggeredOverlay<P extends BaseTriggeredOverlayProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: TriggeredOverlayConfig<C>, outerRef?: TriggeredOverlayRef, isDismissable?: boolean): {
|
|
19
19
|
plasmicProps: {
|
|
20
20
|
variants: PlasmicClassVariants<C>;
|
|
@@ -13,8 +13,8 @@ export declare function isReactText(child: React.ReactNode): child is React.Reac
|
|
|
13
13
|
export declare function isReactChild(child: React.ReactNode): child is React.ReactChild;
|
|
14
14
|
export declare function isReactFragment(child: React.ReactNode): child is React.ReactElement;
|
|
15
15
|
export declare function isReactNode(x: any): boolean;
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
|
|
17
|
+
export type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React.ComponentProps<T>["ref"], string>;
|
|
18
18
|
export declare function mergeProps(props: Record<string, any>, ...restProps: Record<string, any>[]): Record<string, any>;
|
|
19
19
|
export declare function mergeRefs<T>(...refs: (React.Ref<T> | undefined)[]): (value: T) => void;
|
|
20
20
|
export declare function mergePropVals(name: string, val1: any, val2: any): any;
|
|
@@ -11,7 +11,7 @@ export interface ImageLoader {
|
|
|
11
11
|
format?: "webp";
|
|
12
12
|
}) => string;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
type ImgTagProps = Omit<React.ComponentProps<"img">, "src" | "srcSet" | "ref" | "style">;
|
|
15
15
|
export interface PlasmicImgProps extends ImgTagProps {
|
|
16
16
|
/**
|
|
17
17
|
* Either an object with the src string, and its full width and height,
|
|
@@ -3,33 +3,33 @@ import { $State } from "../states/valtio";
|
|
|
3
3
|
interface Variants {
|
|
4
4
|
[vg: string]: any;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type MultiChoiceArg<M extends string> = M | M[] | {
|
|
7
7
|
[v in M]?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type SingleChoiceArg<M extends string> = M;
|
|
10
|
+
export type SingleBooleanChoiceArg<M extends string> = M | boolean;
|
|
11
11
|
interface OverrideTwiddle {
|
|
12
12
|
wrapChildren?: (children: React.ReactNode) => React.ReactNode;
|
|
13
13
|
wrap?: (node: React.ReactNode) => React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type DefaultOverride<C extends React.ElementType> = {
|
|
16
16
|
type: "default";
|
|
17
17
|
props?: Partial<React.ComponentProps<C>>;
|
|
18
18
|
} & OverrideTwiddle;
|
|
19
|
-
export
|
|
19
|
+
export type AsOverride<C extends React.ElementType> = {
|
|
20
20
|
type: "as";
|
|
21
21
|
as: C;
|
|
22
22
|
props?: Partial<React.ComponentProps<C>>;
|
|
23
23
|
} & OverrideTwiddle;
|
|
24
|
-
export
|
|
24
|
+
export type RenderOverride<C extends React.ElementType> = {
|
|
25
25
|
type: "render";
|
|
26
26
|
render: (props: React.ComponentProps<C>, Comp: C) => React.ReactNode;
|
|
27
27
|
props?: Partial<React.ComponentProps<C>>;
|
|
28
28
|
} & OverrideTwiddle;
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
29
|
+
export type Override<DefaultElementType extends React.ElementType> = DefaultOverride<DefaultElementType> | AsOverride<any> | RenderOverride<DefaultElementType>;
|
|
30
|
+
export type Overrides = Record<string, Flex<any>>;
|
|
31
|
+
export type Args = Record<string, any>;
|
|
32
|
+
export type Flex<DefaultElementType extends React.ElementType> = (Omit<DefaultOverride<DefaultElementType>, "type"> & {
|
|
33
33
|
as?: never;
|
|
34
34
|
render?: never;
|
|
35
35
|
}) | Omit<AsOverride<any>, "type"> | (Omit<RenderOverride<DefaultElementType>, "type"> & {
|
|
@@ -27,7 +27,7 @@ declare const TRIGGER_TO_HOOK: {
|
|
|
27
27
|
readonly useFocusVisibleWithin: typeof useFocusVisibleWithin;
|
|
28
28
|
readonly usePressed: typeof usePressed;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
type TriggerType = keyof typeof TRIGGER_TO_HOOK;
|
|
31
31
|
interface TriggerOpts {
|
|
32
32
|
isTextInput?: boolean;
|
|
33
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type InitFunc<T> = ($props: Record<string, any>, $state: $State, $ctx: Record<string, any>, indexes: number[]) => T;
|
|
2
2
|
export interface $State {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
registerInitFunc?: (path: string, f: InitFunc<any>) => any;
|