@plasmicapp/react-web 0.2.110 → 0.2.112
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 +30 -13
- package/dist/index-common.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react-web.cjs.development.js +366 -342
- 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 +363 -342
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/elements.d.ts +5 -0
- package/dist/states/helpers.d.ts +5 -0
- package/dist/states/index.d.ts +1 -1
- package/dist/states/valtio.d.ts +16 -0
- package/dist/stories/UseDollarState.stories.d.ts +11 -0
- package/package.json +6 -2
- package/skinny/dist/collection-utils-42de4441.js +244 -0
- package/skinny/dist/collection-utils-42de4441.js.map +1 -0
- package/skinny/dist/{collection-utils-3487dd27.js → collection-utils-bf37b8fb.js} +5 -5
- package/skinny/dist/collection-utils-bf37b8fb.js.map +1 -0
- package/skinny/dist/common-98719219.js +68 -0
- package/skinny/dist/common-98719219.js.map +1 -0
- package/skinny/dist/common-9efbae57.js +201 -0
- package/skinny/dist/common-9efbae57.js.map +1 -0
- package/skinny/dist/context-4ca6f5cd.js +6 -0
- package/skinny/dist/context-4ca6f5cd.js.map +1 -0
- package/skinny/dist/index-common.d.ts +1 -1
- package/skinny/dist/index.d.ts +1 -1
- package/skinny/dist/index.js +17 -4
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/checkbox/index.js +2 -1
- package/skinny/dist/plume/checkbox/index.js.map +1 -1
- package/skinny/dist/plume/menu/index.js +2 -1
- package/skinny/dist/plume/menu/index.js.map +1 -1
- package/skinny/dist/plume/menu-button/index.js +2 -1
- package/skinny/dist/plume/menu-button/index.js.map +1 -1
- package/skinny/dist/plume/select/index.js +2 -1
- package/skinny/dist/plume/select/index.js.map +1 -1
- package/skinny/dist/plume/switch/index.js +2 -1
- package/skinny/dist/plume/switch/index.js.map +1 -1
- package/skinny/dist/plume-utils-1e225de5.js +25 -0
- package/skinny/dist/plume-utils-1e225de5.js.map +1 -0
- package/skinny/dist/plume-utils-d2476af1.js +35 -0
- package/skinny/dist/plume-utils-d2476af1.js.map +1 -0
- package/skinny/dist/props-utils-c60d3105.js +8 -0
- package/skinny/dist/props-utils-c60d3105.js.map +1 -0
- package/skinny/dist/props-utils-cac0cccf.js +8 -0
- package/skinny/dist/props-utils-cac0cccf.js.map +1 -0
- package/skinny/dist/react-utils-6050fadc.js +201 -0
- package/skinny/dist/react-utils-6050fadc.js.map +1 -0
- package/skinny/dist/react-utils-b5dc6320.js +155 -0
- package/skinny/dist/react-utils-b5dc6320.js.map +1 -0
- package/skinny/dist/render/elements.d.ts +5 -0
- package/skinny/dist/{ssr-84e27ffb.js → ssr-68913b60.js} +34 -37
- package/skinny/dist/ssr-68913b60.js.map +1 -0
- package/skinny/dist/{ssr-b1615b80.js → ssr-d3321868.js} +9 -4
- package/skinny/dist/ssr-d3321868.js.map +1 -0
- package/skinny/dist/states/helpers.d.ts +5 -0
- package/skinny/dist/states/index.d.ts +1 -1
- package/skinny/dist/states/valtio copy.d.ts +15 -0
- package/skinny/dist/states/valtio.d.ts +16 -0
- package/skinny/dist/stories/UseDollarState.stories.d.ts +11 -0
- package/skinny/dist/stories/UseDollarState.test.d.ts +11 -0
- package/skinny/dist/stories/UseDollarState2.stories.d.ts +7 -0
- package/skinny/dist/collection-utils-3487dd27.js.map +0 -1
- package/skinny/dist/ssr-14264281.js +0 -158
- package/skinny/dist/ssr-14264281.js.map +0 -1
- package/skinny/dist/ssr-5141fc77.js +0 -158
- package/skinny/dist/ssr-5141fc77.js.map +0 -1
- package/skinny/dist/ssr-579df58f.js +0 -158
- package/skinny/dist/ssr-579df58f.js.map +0 -1
- package/skinny/dist/ssr-84e27ffb.js.map +0 -1
- package/skinny/dist/ssr-b1615b80.js.map +0 -1
- package/skinny/dist/ssr-d2fd94f2.js +0 -31
- package/skinny/dist/ssr-d2fd94f2.js.map +0 -1
package/dist/all.d.ts
CHANGED
|
@@ -21,6 +21,23 @@ declare function omit<T>(obj: T, ...keys: (keyof T)[]): Partial<T>;
|
|
|
21
21
|
declare type StrictProps<T, TExpected> = Exclude<keyof T, keyof TExpected> extends never ? {} : Partial<"Unexpected extraneous props">;
|
|
22
22
|
declare type HTMLElementRefOf<T extends keyof JSX.IntrinsicElements> = Exclude<React__default.ComponentProps<T>["ref"], string>;
|
|
23
23
|
|
|
24
|
+
declare type InitFunc$1<T> = ($props: Record<string, any>, $state: $State$1, indexes: number[]) => T;
|
|
25
|
+
interface $State$1 {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
registerInitFunc?: (path: string, f: InitFunc$1<any>) => any;
|
|
28
|
+
}
|
|
29
|
+
interface $StateSpec<T> {
|
|
30
|
+
path: string;
|
|
31
|
+
initFunc?: InitFunc$1<T>;
|
|
32
|
+
initVal?: T;
|
|
33
|
+
type: "private" | "readonly" | "writable";
|
|
34
|
+
valueProp?: string;
|
|
35
|
+
onChangeProp?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function useDollarState(specs: $StateSpec<any>[], props: Record<string, any>): any;
|
|
38
|
+
|
|
39
|
+
declare function useCanvasDollarState(specs: $StateSpec<any>[], props: Record<string, any>): any;
|
|
40
|
+
|
|
24
41
|
interface Variants {
|
|
25
42
|
[vg: string]: any;
|
|
26
43
|
}
|
|
@@ -69,6 +86,10 @@ declare function wrapWithClassName(element: React.ReactNode, className: string):
|
|
|
69
86
|
display: "grid";
|
|
70
87
|
};
|
|
71
88
|
}, HTMLElement>;
|
|
89
|
+
declare function mergeVariantsWithStates(variants: Variants, $state: $State$1, linkedStates: {
|
|
90
|
+
variantGroup: string;
|
|
91
|
+
statePath: (string | number)[];
|
|
92
|
+
}[]): Variants;
|
|
72
93
|
declare function deriveRenderOpts(props: Record<string, any>, config: {
|
|
73
94
|
name: string;
|
|
74
95
|
descendantNames: string[];
|
|
@@ -1574,17 +1595,8 @@ declare const TriggeredOverlayContext: React.Context<TriggeredOverlayContextValu
|
|
|
1574
1595
|
declare type InitFunc<T> = ($props: Record<string, any>, $state: $State) => T;
|
|
1575
1596
|
interface $State {
|
|
1576
1597
|
[key: string]: any;
|
|
1577
|
-
registerInitFunc
|
|
1578
|
-
}
|
|
1579
|
-
interface $StateSpec<T> {
|
|
1580
|
-
path: string;
|
|
1581
|
-
initFunc?: InitFunc<T>;
|
|
1582
|
-
initVal?: T;
|
|
1583
|
-
type: "private" | "readonly" | "writable";
|
|
1584
|
-
valueProp?: string;
|
|
1585
|
-
onChangeProp?: string;
|
|
1586
|
-
}
|
|
1587
|
-
declare function useVanillaDollarState(_specs: $StateSpec<any>[], props: Record<string, any>): $State;
|
|
1598
|
+
registerInitFunc?: (path: string, f: InitFunc<any>) => any;
|
|
1599
|
+
}
|
|
1588
1600
|
|
|
1589
1601
|
declare function generateStateOnChangeProp($state: $State, stateName: string, dataReps: number[]): (val: any, path: (string | number)[]) => void;
|
|
1590
1602
|
/**
|
|
@@ -1593,6 +1605,11 @@ declare function generateStateOnChangeProp($state: $State, stateName: string, da
|
|
|
1593
1605
|
* - parent[][].counter[].count
|
|
1594
1606
|
* We need to pass `parent[index1][index2].counter to the child component
|
|
1595
1607
|
*/
|
|
1596
|
-
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
1608
|
+
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
1609
|
+
/**
|
|
1610
|
+
* Forked from https://github.com/lukeed/dset
|
|
1611
|
+
* Changes: fixed setting a deep value to a proxy object
|
|
1612
|
+
*/
|
|
1613
|
+
declare function set(obj: any, keys: any, val: any): void;
|
|
1597
1614
|
|
|
1598
|
-
export { BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, 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, getDataProps, hasVariant, makeFragment, omit, pick, plasmicHeadMeta, renderPlasmicSlot, setPlumeStrictMode, useButton, useCheckbox,
|
|
1615
|
+
export { $State$1 as $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, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, 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, getDataProps, hasVariant, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, set, setPlumeStrictMode, useButton, useCanvasDollarState, useCheckbox, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
package/dist/index-common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const classNames: import("classnames/types").ClassNamesExport;
|
|
2
2
|
export { omit, pick } from "./common";
|
|
3
3
|
export { HTMLElementRefOf, StrictProps } from "./react-utils";
|
|
4
|
-
export { createPlasmicElementProxy, deriveRenderOpts, Flex, hasVariant, makeFragment, MultiChoiceArg, SingleBooleanChoiceArg, SingleChoiceArg, wrapWithClassName, } from "./render/elements";
|
|
4
|
+
export { createPlasmicElementProxy, deriveRenderOpts, Flex, hasVariant, makeFragment, mergeVariantsWithStates, MultiChoiceArg, SingleBooleanChoiceArg, SingleChoiceArg, wrapWithClassName, } from "./render/elements";
|
|
5
5
|
export { ensureGlobalVariants } from "./render/global-variants";
|
|
6
6
|
export { PlasmicHead, plasmicHeadMeta } from "./render/PlasmicHead";
|
|
7
7
|
export { PlasmicIcon } from "./render/PlasmicIcon";
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export * from "./plume/switch";
|
|
|
10
10
|
export * from "./plume/text-input";
|
|
11
11
|
export * from "./plume/triggered-overlay";
|
|
12
12
|
export * from "./states/helpers";
|
|
13
|
-
export { default as useDollarState } from "./states/
|
|
13
|
+
export { $State, default as useDollarState, useCanvasDollarState, } from "./states/valtio";
|