@plasmicapp/react-web 0.2.130 → 0.2.132

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 CHANGED
@@ -565,7 +565,9 @@ interface Node<T> {
565
565
  // Event bubbling can be problematic in real-world applications, so the default for React Spectrum components
566
566
  // is not to propagate. This can be overridden by calling continuePropagation() on the event.
567
567
  type BaseEvent<T extends SyntheticEvent> = T & {
568
- /** @deprecated Use continuePropagation. */
568
+ /**
569
+ * Use continuePropagation.
570
+ * @deprecated */
569
571
  stopPropagation(): void,
570
572
  continuePropagation(): void
571
573
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.130",
3
+ "version": "0.2.132",
4
4
  "description": "plasmic library for rendering in the presentational style",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,10 +40,10 @@
40
40
  },
41
41
  "prettier": {},
42
42
  "dependencies": {
43
- "@plasmicapp/data-sources": "0.1.18",
43
+ "@plasmicapp/data-sources": "0.1.20",
44
44
  "@plasmicapp/data-sources-context": "0.1.2",
45
- "@plasmicapp/host": "1.0.88",
46
- "@plasmicapp/query": "0.1.56",
45
+ "@plasmicapp/host": "1.0.90",
46
+ "@plasmicapp/query": "0.1.57",
47
47
  "@react-aria/checkbox": "^3.5.0",
48
48
  "@react-aria/focus": "^3.7.0",
49
49
  "@react-aria/interactions": "^3.10.0",
@@ -108,5 +108,5 @@
108
108
  "react": ">=16.8.0",
109
109
  "react-dom": ">=16.8.0"
110
110
  },
111
- "gitHead": "a9822920199e1809d0e15008515dea8e23aaf676"
111
+ "gitHead": "df0ded844646a73a3a779b3f5aac5ee72f5e056a"
112
112
  }
@@ -13,10 +13,10 @@ interface HtmlButtonProps extends Omit<React.ComponentProps<"button">, "ref" | "
13
13
  interface HtmlAnchorProps extends Omit<React.ComponentProps<"a">, "ref" | "href"> {
14
14
  link?: string;
15
15
  }
16
- export declare type BaseButtonProps = CommonProps & HtmlButtonProps & HtmlAnchorProps;
17
- export declare type HtmlAnchorOnlyProps = Exclude<keyof HtmlAnchorProps, keyof HtmlButtonProps>;
18
- export declare type HtmlButtonOnlyProps = Exclude<keyof HtmlButtonProps, keyof HtmlAnchorProps>;
19
- export declare type ButtonRef = React.Ref<HTMLButtonElement | HTMLAnchorElement>;
16
+ export type BaseButtonProps = CommonProps & HtmlButtonProps & HtmlAnchorProps;
17
+ export type HtmlAnchorOnlyProps = Exclude<keyof HtmlAnchorProps, keyof HtmlButtonProps>;
18
+ export type HtmlButtonOnlyProps = Exclude<keyof HtmlButtonProps, keyof HtmlAnchorProps>;
19
+ export type ButtonRef = React.Ref<HTMLButtonElement | HTMLAnchorElement>;
20
20
  interface ButtonConfig<C extends AnyPlasmicClass> {
21
21
  showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
22
22
  showEndIconVariant?: VariantDef<PlasmicClassVariants<C>>;
@@ -2,7 +2,7 @@ import { AriaCheckboxProps } from "@react-types/checkbox";
2
2
  import * as React from "react";
3
3
  import { AnyPlasmicClass, PlasmicClassArgs, PlasmicClassOverrides, PlasmicClassVariants, VariantDef } from "../plume-utils";
4
4
  import { StyleProps } from "../props-utils";
5
- export declare type CheckboxRef = React.Ref<CheckboxRefValue>;
5
+ export type CheckboxRef = React.Ref<CheckboxRefValue>;
6
6
  export interface CheckboxRefValue extends CheckboxState {
7
7
  getRoot: () => HTMLElement | null;
8
8
  focus: () => void;
@@ -88,7 +88,7 @@ export interface ItemLikeProps {
88
88
  */
89
89
  isDisabled?: boolean;
90
90
  }
91
- declare type LoaderAwareItemLikeProps = ItemLikeProps | PlasmicLoaderProps<ItemLikeProps>;
91
+ type LoaderAwareItemLikeProps = ItemLikeProps | PlasmicLoaderProps<ItemLikeProps>;
92
92
  /**
93
93
  * Props for a Plume component that corresponds to a Section
94
94
  */
@@ -106,7 +106,7 @@ export interface SectionLikeProps {
106
106
  */
107
107
  children?: React.ReactNode;
108
108
  }
109
- declare type LoaderAwareSectionLikeProps = SectionLikeProps | PlasmicLoaderProps<SectionLikeProps>;
109
+ type LoaderAwareSectionLikeProps = SectionLikeProps | PlasmicLoaderProps<SectionLikeProps>;
110
110
  /**
111
111
  * Given children of a component like Select or Menu, derive the items
112
112
  * that we will pass into the Collections API. These will be
@@ -12,7 +12,7 @@ export interface BaseMenuProps extends DOMProps, AriaLabelingProps, StyleProps {
12
12
  */
13
13
  onAction?: (value: string) => void;
14
14
  }
15
- export declare type MenuRef = React.Ref<MenuRefValue>;
15
+ export type MenuRef = React.Ref<MenuRefValue>;
16
16
  export interface MenuRefValue extends MenuState {
17
17
  getRoot: () => HTMLElement | null;
18
18
  }
@@ -54,7 +54,7 @@ interface MenuButtonState {
54
54
  close: () => void;
55
55
  isOpen: () => boolean;
56
56
  }
57
- export declare type MenuButtonRef = React.Ref<MenuButtonRefValue>;
57
+ export type MenuButtonRef = React.Ref<MenuButtonRefValue>;
58
58
  export interface MenuButtonRefValue extends MenuButtonState {
59
59
  getRoot: () => HTMLElement | null;
60
60
  getTrigger: () => HTMLElement | null;
@@ -2,21 +2,21 @@ import * as React from "react";
2
2
  import { SingleChoiceArg } from "../render/elements";
3
3
  export declare let PLUME_STRICT_MODE: boolean;
4
4
  export declare function setPlumeStrictMode(mode: boolean): void;
5
- declare type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
6
- declare type VariantArgsChoices<V> = {
5
+ type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
6
+ type VariantArgsChoices<V> = {
7
7
  [k in keyof V]-?: VariantArgChoices<V[k]>;
8
8
  };
9
- declare type DictValues<V extends Record<string, any>> = V[keyof V];
10
- declare type DictTuples<V extends Record<string, any>> = DictValues<{
9
+ type DictValues<V extends Record<string, any>> = V[keyof V];
10
+ type DictTuples<V extends Record<string, any>> = DictValues<{
11
11
  [K in keyof V]: [K, V[K]];
12
12
  }>;
13
- export declare type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;
14
- declare type DistributeTuple<T> = T extends [infer T1, infer T2] ? {
13
+ export type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;
14
+ type DistributeTuple<T> = T extends [infer T1, infer T2] ? {
15
15
  group: T1;
16
16
  variant: T2;
17
17
  } : never;
18
- export declare type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;
19
- export declare type PlasmicClass<V extends Record<string, any>, A extends Record<string, any>, O extends Record<string, any>> = {
18
+ export type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;
19
+ export type PlasmicClass<V extends Record<string, any>, A extends Record<string, any>, O extends Record<string, any>> = {
20
20
  (props: {
21
21
  variants?: V;
22
22
  args?: A;
@@ -25,11 +25,11 @@ export declare type PlasmicClass<V extends Record<string, any>, A extends Record
25
25
  internalVariantProps: (keyof V)[];
26
26
  internalArgProps: (keyof A)[];
27
27
  };
28
- export declare type AnyPlasmicClass = PlasmicClass<any, any, any>;
29
- export declare type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<infer V, any, any> ? V : unknown;
30
- export declare type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
31
- export declare type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
32
- declare type BooleanLike = boolean | undefined | null;
28
+ export type AnyPlasmicClass = PlasmicClass<any, any, any>;
29
+ export type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<infer V, any, any> ? V : unknown;
30
+ export type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
31
+ export type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
32
+ type BooleanLike = boolean | undefined | null;
33
33
  export declare function mergeVariantToggles<V>(...toggles: {
34
34
  def?: VariantDef<V>;
35
35
  active: BooleanLike;
@@ -12,7 +12,7 @@ interface SelectOptionConfig<C extends AnyPlasmicClass> {
12
12
  root: keyof PlasmicClassOverrides<C>;
13
13
  labelContainer: keyof PlasmicClassOverrides<C>;
14
14
  }
15
- export declare type SelectOptionRef = React.Ref<HTMLElement>;
15
+ export type SelectOptionRef = React.Ref<HTMLElement>;
16
16
  export declare function useSelectOption<P extends BaseSelectOptionProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: SelectOptionConfig<C>, outerRef?: SelectOptionRef): {
17
17
  plasmicProps: {
18
18
  variants: PlasmicClassVariants<C>;
@@ -62,7 +62,7 @@ export interface BaseSelectProps extends DOMProps, AriaLabelingProps, FocusableD
62
62
  */
63
63
  placeholder?: React.ReactNode;
64
64
  }
65
- export declare type SelectRef = React.Ref<SelectRefValue>;
65
+ export type SelectRef = React.Ref<SelectRefValue>;
66
66
  export interface SelectRefValue extends SelectState {
67
67
  getTrigger: () => HTMLElement | null;
68
68
  getRoot: () => HTMLElement | null;
@@ -2,7 +2,7 @@ import { AriaSwitchProps } from "@react-types/switch";
2
2
  import * as React from "react";
3
3
  import { AnyPlasmicClass, PlasmicClassArgs, PlasmicClassOverrides, PlasmicClassVariants, VariantDef } from "../plume-utils";
4
4
  import { StyleProps } from "../props-utils";
5
- export declare type SwitchRef = React.Ref<SwitchRefValue>;
5
+ export type SwitchRef = React.Ref<SwitchRefValue>;
6
6
  export interface SwitchRefValue extends SwitchState {
7
7
  getRoot: () => HTMLElement | null;
8
8
  focus: () => void;
@@ -16,7 +16,7 @@ export interface TextInputRefValue {
16
16
  getRoot: () => HTMLElement | null;
17
17
  getInput: () => HTMLInputElement | null;
18
18
  }
19
- export declare type TextInputRef = React.Ref<TextInputRefValue>;
19
+ export type TextInputRef = React.Ref<TextInputRefValue>;
20
20
  interface TextInputConfig<C extends AnyPlasmicClass> {
21
21
  showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
22
22
  showEndIconVariant?: VariantDef<PlasmicClassVariants<C>>;
@@ -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 declare type TriggeredOverlayRef = React.Ref<HTMLElement>;
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 declare type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
17
- export declare type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React.ComponentProps<T>["ref"], string>;
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;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  export declare const PlasmicHeadContext: React.Context<React.ComponentType<any> | undefined>;
3
- declare type PlasmicHeadProps = {
3
+ type PlasmicHeadProps = {
4
4
  title?: string;
5
5
  description?: string;
6
6
  image?: string;
@@ -11,7 +11,7 @@ export interface ImageLoader {
11
11
  format?: "webp";
12
12
  }) => string;
13
13
  }
14
- declare type ImgTagProps = Omit<React.ComponentProps<"img">, "src" | "srcSet" | "ref" | "style">;
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 declare type MultiChoiceArg<M extends string> = M | M[] | {
6
+ export type MultiChoiceArg<M extends string> = M | M[] | {
7
7
  [v in M]?: boolean;
8
8
  };
9
- export declare type SingleChoiceArg<M extends string> = M;
10
- export declare type SingleBooleanChoiceArg<M extends string> = M | boolean;
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 declare type DefaultOverride<C extends React.ElementType> = {
15
+ export type DefaultOverride<C extends React.ElementType> = {
16
16
  type: "default";
17
17
  props?: Partial<React.ComponentProps<C>>;
18
18
  } & OverrideTwiddle;
19
- export declare type AsOverride<C extends React.ElementType> = {
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 declare type RenderOverride<C extends React.ElementType> = {
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 declare type Override<DefaultElementType extends React.ElementType> = DefaultOverride<DefaultElementType> | AsOverride<any> | RenderOverride<DefaultElementType>;
30
- export declare type Overrides = Record<string, Flex<any>>;
31
- export declare type Args = Record<string, any>;
32
- export declare type Flex<DefaultElementType extends React.ElementType> = (Omit<DefaultOverride<DefaultElementType>, "type"> & {
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"> & {
@@ -1,4 +1,4 @@
1
- declare type Queries = {
1
+ type Queries = {
2
2
  [name: string]: string;
3
3
  };
4
4
  export declare function createUseScreenVariants(isMulti: boolean, screenQueries: Queries): () => string | string[] | undefined;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- export declare type PlasmicTranslator = (str: string, opts?: {
2
+ export type PlasmicTranslator = (str: string, opts?: {
3
3
  components?: {
4
4
  [key: string]: React.ReactElement;
5
5
  };
@@ -27,7 +27,7 @@ declare const TRIGGER_TO_HOOK: {
27
27
  readonly useFocusVisibleWithin: typeof useFocusVisibleWithin;
28
28
  readonly usePressed: typeof usePressed;
29
29
  };
30
- declare type TriggerType = keyof typeof TRIGGER_TO_HOOK;
30
+ type TriggerType = keyof typeof TRIGGER_TO_HOOK;
31
31
  interface TriggerOpts {
32
32
  isTextInput?: boolean;
33
33
  }
@@ -1,4 +1,4 @@
1
- declare type InitFunc<T> = ($props: Record<string, any>, $state: $State) => T;
1
+ type InitFunc<T> = ($props: Record<string, any>, $state: $State) => T;
2
2
  export interface $State {
3
3
  [key: string]: any;
4
4
  registerInitFunc?: (path: string, f: InitFunc<any>) => any;
@@ -1,4 +1,4 @@
1
- declare type InitFunc<T> = ($props: Record<string, any>, $state: $State, $ctx: Record<string, any>, indexes: number[]) => T;
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;