@plasmicapp/react-web 0.2.100 → 0.2.103
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/README.md +13 -0
- package/dist/all.d.ts +29 -2
- package/dist/index.d.ts +2 -0
- package/dist/react-web.cjs.development.js +479 -94
- 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 +477 -95
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/PlasmicImg/index.d.ts +6 -1
- package/dist/states/helpers.d.ts +9 -0
- package/dist/states/index.d.ts +13 -0
- package/dist/stories/PlasmicImg.stories.d.ts +2 -2
- package/dist/stories/UseDollarState.stories.d.ts +33 -0
- package/package.json +13 -5
- package/skinny/dist/index.d.ts +2 -0
- package/skinny/dist/index.js +5 -2
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/render/PlasmicImg/index.d.ts +6 -1
- package/skinny/dist/render/PlasmicImg/index.js +11 -3
- package/skinny/dist/render/PlasmicImg/index.js.map +1 -1
- package/skinny/dist/states/helpers.d.ts +9 -0
- package/skinny/dist/states/index.d.ts +13 -0
- package/skinny/dist/stories/UseDollarState.stories.d.ts +34 -0
- package/README +0 -8
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @plasmicapp/react-web
|
|
2
|
+
|
|
3
|
+
This is the runtime for code generated by Plasmic, the visual builder for React.
|
|
4
|
+
This package contains functions
|
|
5
|
+
and type definitions used by generated presentational code.
|
|
6
|
+
|
|
7
|
+
Learn more about Plasmic:
|
|
8
|
+
|
|
9
|
+
https://www.plasmic.app
|
|
10
|
+
|
|
11
|
+
Learn more about Plasmic codegen:
|
|
12
|
+
|
|
13
|
+
https://docs.plasmic.app/learn/codegen-guide/
|
package/dist/all.d.ts
CHANGED
|
@@ -106,7 +106,12 @@ interface PlasmicImgProps extends ImgTagProps {
|
|
|
106
106
|
* or just a src string with unknown intrinsic dimensions.
|
|
107
107
|
*/
|
|
108
108
|
src?: string | {
|
|
109
|
-
src: string
|
|
109
|
+
src: string | {
|
|
110
|
+
src: string;
|
|
111
|
+
height: number;
|
|
112
|
+
width: number;
|
|
113
|
+
blurDataURL?: string;
|
|
114
|
+
};
|
|
110
115
|
fullHeight: number;
|
|
111
116
|
fullWidth: number;
|
|
112
117
|
aspectRatio?: number;
|
|
@@ -1177,4 +1182,26 @@ declare function useTriggeredOverlay<P extends BaseTriggeredOverlayProps, C exte
|
|
|
1177
1182
|
};
|
|
1178
1183
|
};
|
|
1179
1184
|
|
|
1180
|
-
|
|
1185
|
+
interface $State {
|
|
1186
|
+
[key: string]: any;
|
|
1187
|
+
}
|
|
1188
|
+
interface $StateSpec<T> {
|
|
1189
|
+
path: string;
|
|
1190
|
+
initFunc?: ($props: Record<string, any>, $state: $State) => T;
|
|
1191
|
+
initVal?: T;
|
|
1192
|
+
type: "private" | "readonly" | "writable";
|
|
1193
|
+
valueProp?: string;
|
|
1194
|
+
onChangeProp?: string;
|
|
1195
|
+
}
|
|
1196
|
+
declare function useVanillaDollarState(_specs: $StateSpec<any>[], props: Record<string, any>): $State;
|
|
1197
|
+
|
|
1198
|
+
declare function generateStateOnChangeProp($state: $State, stateName: string, dataReps: number[]): (val: any, path: (string | number)[]) => void;
|
|
1199
|
+
/**
|
|
1200
|
+
* This function generate the state value prop for repeated states
|
|
1201
|
+
* Example:
|
|
1202
|
+
* - parent[][].counter[].count
|
|
1203
|
+
* We need to pass `parent[index1][index2].counter to the child component
|
|
1204
|
+
*/
|
|
1205
|
+
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
1206
|
+
|
|
1207
|
+
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, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicRootProvider, PlasmicSlot, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, getDataProps, hasVariant, makeFragment, omit, pick, renderPlasmicSlot, setPlumeStrictMode, useButton, useCheckbox, useVanillaDollarState as useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
package/dist/index.d.ts
CHANGED