@plasmicapp/react-web 0.2.137 → 0.2.138
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 +23 -28
- package/dist/index-common.d.ts +1 -3
- package/dist/react-web.cjs.development.js +337 -306
- 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 +339 -304
- package/dist/react-web.esm.js.map +1 -1
- package/dist/states/graph.d.ts +23 -2
- package/dist/states/helpers.d.ts +7 -6
- package/dist/states/index.d.ts +4 -24
- package/dist/states/types.d.ts +24 -0
- package/dist/states/valtio.d.ts +2 -3
- package/dist/stories/UseDollarState.stories.d.ts +1 -0
- package/package.json +2 -3
- package/skinny/dist/index-common.d.ts +1 -3
- package/skinny/dist/index.js +366 -315
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/states/graph.d.ts +23 -2
- package/skinny/dist/states/helpers.d.ts +7 -6
- package/skinny/dist/states/index.d.ts +4 -24
- package/skinny/dist/states/types.d.ts +24 -0
- package/skinny/dist/states/valtio.d.ts +2 -3
- package/skinny/dist/stories/UseDollarState.stories.d.ts +1 -0
package/dist/all.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent
|
|
2
|
+
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
|
|
3
3
|
|
|
4
4
|
// LICENSE is MIT
|
|
5
5
|
//
|
|
@@ -47,6 +47,10 @@ declare function omit<T extends {}>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
|
47
47
|
declare type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
|
|
48
48
|
declare type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React__default.ComponentProps<T>["ref"], string>;
|
|
49
49
|
|
|
50
|
+
// Type definitions for dlv 1.1
|
|
51
|
+
|
|
52
|
+
declare function dlv(object: object, key: string | Array<string | number>, defaultValue?: any): any;
|
|
53
|
+
|
|
50
54
|
declare type InitFunc<T> = ($props: Record<string, any>, $state: $State, $ctx: Record<string, any>, indexes?: number[]) => T;
|
|
51
55
|
interface $StateSpec<T> {
|
|
52
56
|
path: string;
|
|
@@ -59,9 +63,25 @@ interface $StateSpec<T> {
|
|
|
59
63
|
}
|
|
60
64
|
interface $State {
|
|
61
65
|
[key: string]: any;
|
|
62
|
-
registerInitFunc?: (path: string, f: InitFunc<any
|
|
66
|
+
registerInitFunc?: (path: string, f: InitFunc<any>, repetitonIndex?: number[]) => any;
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
declare function generateStateOnChangeProp($state: $State, stateName: string, dataReps: number[]): (val: any, path: (string | number)[]) => void;
|
|
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;
|
|
77
|
+
/**
|
|
78
|
+
* Forked from https://github.com/lukeed/dset
|
|
79
|
+
* Changes: fixed setting a deep value to a proxy object
|
|
80
|
+
*/
|
|
81
|
+
declare function set(obj: any, keys: any, val: any): void;
|
|
82
|
+
|
|
83
|
+
declare function useDollarState(specs: $StateSpec<any>[], props: Record<string, any>, $ctx?: Record<string, any>): $State;
|
|
84
|
+
|
|
65
85
|
interface Variants {
|
|
66
86
|
[vg: string]: any;
|
|
67
87
|
}
|
|
@@ -660,31 +680,6 @@ interface TriggerOpts {
|
|
|
660
680
|
*/
|
|
661
681
|
declare function useTrigger(trigger: TriggerType, opts: TriggerOpts): [boolean, React.HTMLAttributes<HTMLElement>];
|
|
662
682
|
|
|
663
|
-
// Type definitions for dlv 1.1
|
|
664
|
-
|
|
665
|
-
declare function dlv(object: object, key: string | Array<string | number>, defaultValue?: any): any;
|
|
666
|
-
|
|
667
|
-
declare function generateStateOnChangeProp($state: $State, stateName: string, dataReps: number[]): (val: any, path: (string | number)[]) => void;
|
|
668
|
-
/**
|
|
669
|
-
* This function generate the state value prop for repeated states
|
|
670
|
-
* Example:
|
|
671
|
-
* - parent[][].counter[].count
|
|
672
|
-
* We need to pass `parent[index1][index2].counter to the child component
|
|
673
|
-
*/
|
|
674
|
-
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
675
|
-
/**
|
|
676
|
-
* Forked from https://github.com/lukeed/dset
|
|
677
|
-
* Changes: fixed setting a deep value to a proxy object
|
|
678
|
-
*/
|
|
679
|
-
declare function set(obj: any, keys: any, val: any): void;
|
|
680
|
-
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
681
|
-
declare function shallowEqual<T>(a1: T[], a2: T[]): boolean;
|
|
682
|
-
declare function isNum(value: string | number | symbol): value is number;
|
|
683
|
-
|
|
684
|
-
declare function useDollarState(specs: $StateSpec<any>[], props: Record<string, any>, $ctx?: Record<string, any>): any;
|
|
685
|
-
|
|
686
|
-
declare function useCanvasDollarState(specs: $StateSpec<any>[], props: Record<string, any>, $ctx?: Record<string, any>): {};
|
|
687
|
-
|
|
688
683
|
declare const classNames: typeof classNames$1;
|
|
689
684
|
|
|
690
685
|
declare function setPlumeStrictMode(mode: boolean): void;
|
|
@@ -1643,4 +1638,4 @@ interface TriggeredOverlayContextValue {
|
|
|
1643
1638
|
}
|
|
1644
1639
|
declare const TriggeredOverlayContext: React.Context<TriggeredOverlayContextValue | undefined>;
|
|
1645
1640
|
|
|
1646
|
-
export { $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicDataSourceContextProvider, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicPageGuard, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, dlv as get, getDataProps, hasVariant,
|
|
1641
|
+
export { $State, BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicDataSourceContextProvider, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicPageGuard, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, dlv as get, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
package/dist/index-common.d.ts
CHANGED
|
@@ -14,7 +14,5 @@ export { PlasmicDataSourceContextProvider, PlasmicRootProvider, useCurrentUser,
|
|
|
14
14
|
export { Stack } from "./render/Stack";
|
|
15
15
|
export { genTranslatableString, Trans } from "./render/translation";
|
|
16
16
|
export { useTrigger } from "./render/triggers";
|
|
17
|
-
export
|
|
18
|
-
export * from "./states/helpers";
|
|
19
|
-
export { default as useDollarState, useCanvasDollarState, } from "./states/valtio";
|
|
17
|
+
export * from "./states";
|
|
20
18
|
export declare const classNames: typeof _classNames;
|