@plasmicapp/react-web 0.2.220 → 0.2.221
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 +22 -9
- package/dist/index.cjs.js +13 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/plume/button/index.d.ts +13 -6
- package/dist/plume/text-input/index.d.ts +6 -2
- package/dist/react-web.esm.js +13 -7
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/ssr.d.ts +2 -0
- package/package.json +5 -5
- package/skinny/dist/index.js +3 -2
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/button/index.d.ts +13 -6
- package/skinny/dist/plume/button/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 +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/text-input/index.d.ts +6 -2
- package/skinny/dist/plume/text-input/index.js.map +1 -1
- package/skinny/dist/render/ssr.d.ts +2 -0
- package/skinny/dist/{ssr-73c750f9.js → ssr-bfa9ff63.js} +14 -7
- package/skinny/dist/ssr-bfa9ff63.js.map +1 -0
- package/skinny/dist/ssr-73c750f9.js.map +0 -1
package/dist/all.d.ts
CHANGED
|
@@ -12037,6 +12037,8 @@ interface PlasmicRootProviderProps extends PlasmicDataSourceContextValue {
|
|
|
12037
12037
|
children?: React$1.ReactNode;
|
|
12038
12038
|
translator?: PlasmicTranslator;
|
|
12039
12039
|
Head?: React$1.ComponentType<any>;
|
|
12040
|
+
disableLoadingBoundary?: boolean;
|
|
12041
|
+
suspenseFallback?: React$1.ReactNode;
|
|
12040
12042
|
}
|
|
12041
12043
|
declare function PlasmicRootProvider(props: PlasmicRootProviderProps): JSX.Element;
|
|
12042
12044
|
declare const useIsSSR: typeof useIsSSR$1;
|
|
@@ -12433,7 +12435,7 @@ type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<in
|
|
|
12433
12435
|
type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
|
|
12434
12436
|
type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
|
|
12435
12437
|
|
|
12436
|
-
interface
|
|
12438
|
+
interface PlumeCommonProps {
|
|
12437
12439
|
showStartIcon?: boolean;
|
|
12438
12440
|
showEndIcon?: boolean;
|
|
12439
12441
|
startIcon?: React$1.ReactNode;
|
|
@@ -12442,15 +12444,22 @@ interface CommonProps {
|
|
|
12442
12444
|
isDisabled?: boolean;
|
|
12443
12445
|
}
|
|
12444
12446
|
interface HtmlButtonProps extends Omit<React$1.ComponentProps<"button">, "ref" | "disabled"> {
|
|
12445
|
-
submitsForm?: boolean;
|
|
12446
12447
|
}
|
|
12447
12448
|
interface HtmlAnchorProps extends Omit<React$1.ComponentProps<"a">, "ref" | "href" | "target"> {
|
|
12449
|
+
}
|
|
12450
|
+
interface PlumeActualButtonProps {
|
|
12451
|
+
submitsForm?: boolean;
|
|
12452
|
+
}
|
|
12453
|
+
interface PlumeAnchorProps {
|
|
12448
12454
|
link?: string;
|
|
12449
12455
|
target?: React$1.ComponentProps<"a">["target"] | boolean;
|
|
12450
12456
|
}
|
|
12451
|
-
type
|
|
12452
|
-
type
|
|
12453
|
-
type
|
|
12457
|
+
type PlumeButtonProps = PlumeCommonProps & PlumeActualButtonProps & PlumeAnchorProps;
|
|
12458
|
+
type BaseButtonProps = PlumeButtonProps & HtmlButtonProps & HtmlAnchorProps;
|
|
12459
|
+
type AllButtonProps = PlumeCommonProps & PlumeActualButtonProps & HtmlButtonProps;
|
|
12460
|
+
type AllAnchorProps = PlumeCommonProps & PlumeAnchorProps & HtmlAnchorProps;
|
|
12461
|
+
type HtmlAnchorOnlyProps = Exclude<keyof AllAnchorProps, keyof AllButtonProps>;
|
|
12462
|
+
type HtmlButtonOnlyProps = Exclude<keyof AllButtonProps, keyof AllAnchorProps>;
|
|
12454
12463
|
type ButtonRef = React$1.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
12455
12464
|
interface ButtonConfig<C extends AnyPlasmicClass> {
|
|
12456
12465
|
showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
|
|
@@ -12461,7 +12470,7 @@ interface ButtonConfig<C extends AnyPlasmicClass> {
|
|
|
12461
12470
|
contentSlot: keyof PlasmicClassArgs<C>;
|
|
12462
12471
|
root: keyof PlasmicClassOverrides<C>;
|
|
12463
12472
|
}
|
|
12464
|
-
declare function useButton<P extends
|
|
12473
|
+
declare function useButton<P extends PlumeButtonProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: ButtonConfig<C>, ref?: ButtonRef): {
|
|
12465
12474
|
plasmicProps: {
|
|
12466
12475
|
variants: PlasmicClassVariants<C>;
|
|
12467
12476
|
args: PlasmicClassArgs<C>;
|
|
@@ -13305,7 +13314,9 @@ declare function useSwitch<P extends SwitchProps, C extends AnyPlasmicClass>(pla
|
|
|
13305
13314
|
state: SwitchState;
|
|
13306
13315
|
};
|
|
13307
13316
|
|
|
13308
|
-
interface BaseTextInputProps extends Omit<React$1.ComponentProps<"input">, "type" | "disabled"
|
|
13317
|
+
interface BaseTextInputProps extends Omit<React$1.ComponentProps<"input">, "type" | "disabled">, PlumeTextInputProps {
|
|
13318
|
+
}
|
|
13319
|
+
interface PlumeTextInputProps {
|
|
13309
13320
|
showStartIcon?: boolean;
|
|
13310
13321
|
showEndIcon?: boolean;
|
|
13311
13322
|
startIcon?: React$1.ReactNode;
|
|
@@ -13314,6 +13325,8 @@ interface BaseTextInputProps extends Omit<React$1.ComponentProps<"input">, "type
|
|
|
13314
13325
|
type?: "text" | "password" | "email" | "url" | string;
|
|
13315
13326
|
inputClassName?: string;
|
|
13316
13327
|
inputStyle?: React$1.CSSProperties;
|
|
13328
|
+
className?: string;
|
|
13329
|
+
style?: React$1.CSSProperties;
|
|
13317
13330
|
}
|
|
13318
13331
|
interface TextInputRefValue {
|
|
13319
13332
|
focus: () => void;
|
|
@@ -13331,7 +13344,7 @@ interface TextInputConfig<C extends AnyPlasmicClass> {
|
|
|
13331
13344
|
root: keyof PlasmicClassOverrides<C>;
|
|
13332
13345
|
input: keyof PlasmicClassOverrides<C>;
|
|
13333
13346
|
}
|
|
13334
|
-
declare function useTextInput<P extends
|
|
13347
|
+
declare function useTextInput<P extends PlumeTextInputProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: TextInputConfig<C>, ref?: TextInputRef): {
|
|
13335
13348
|
plasmicProps: {
|
|
13336
13349
|
variants: PlasmicClassVariants<C>;
|
|
13337
13350
|
args: PlasmicClassArgs<C>;
|
|
@@ -13384,4 +13397,4 @@ interface TriggeredOverlayContextValue {
|
|
|
13384
13397
|
}
|
|
13385
13398
|
declare const TriggeredOverlayContext: React$1.Context<TriggeredOverlayContextValue | undefined>;
|
|
13386
13399
|
|
|
13387
|
-
export { $State, $StateSpec, 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, generateStateOnChangePropForCodeComponents, generateStateValueProp, dlv as get, getCurrentInitialValue, getDataProps, getStateCellsInPlasmicProxy, getStateSpecInPlasmicProxy, hasVariant, initializeCodeComponentStates, initializePlasmicStates, is$StateProxy, isPlasmicStateProxy, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, resetToInitialValue, set, setPlumeStrictMode, useButton, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, withPlasmicPageGuard, wrapWithClassName };
|
|
13400
|
+
export { $State, $StateSpec, 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, PlumeButtonProps, PlumeTextInputProps, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateOnChangePropForCodeComponents, generateStateValueProp, dlv as get, getCurrentInitialValue, getDataProps, getStateCellsInPlasmicProxy, getStateSpecInPlasmicProxy, hasVariant, initializeCodeComponentStates, initializePlasmicStates, is$StateProxy, isPlasmicStateProxy, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, resetToInitialValue, set, setPlumeStrictMode, useButton, useCheckbox, useCurrentUser, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, withPlasmicPageGuard, wrapWithClassName };
|
package/dist/index.cjs.js
CHANGED
|
@@ -9,6 +9,7 @@ var React = require('react');
|
|
|
9
9
|
var get = require('dlv');
|
|
10
10
|
var ReactDOM = require('react-dom');
|
|
11
11
|
var ssr = require('@react-aria/ssr');
|
|
12
|
+
var host = require('@plasmicapp/host');
|
|
12
13
|
var focus = require('@react-aria/focus');
|
|
13
14
|
var valtio = require('valtio');
|
|
14
15
|
var clone = require('clone');
|
|
@@ -22,7 +23,6 @@ var collections = require('@react-stately/collections');
|
|
|
22
23
|
var separator = require('@react-aria/separator');
|
|
23
24
|
var menu$1 = require('@react-stately/menu');
|
|
24
25
|
var interactions = require('@react-aria/interactions');
|
|
25
|
-
var host = require('@plasmicapp/host');
|
|
26
26
|
var listbox = require('@react-aria/listbox');
|
|
27
27
|
var select$1 = require('@react-aria/select');
|
|
28
28
|
var select = require('@react-stately/select');
|
|
@@ -1634,7 +1634,7 @@ function createUseScreenVariants(isMulti, screenQueries) {
|
|
|
1634
1634
|
|
|
1635
1635
|
var PlasmicRootContext = React__namespace.createContext(undefined);
|
|
1636
1636
|
function PlasmicRootProvider(props) {
|
|
1637
|
-
var platform = props.platform, children = props.children, userAuthToken = props.userAuthToken, isUserLoading = props.isUserLoading, authRedirectUri = props.authRedirectUri, user = props.user;
|
|
1637
|
+
var platform = props.platform, children = props.children, userAuthToken = props.userAuthToken, isUserLoading = props.isUserLoading, authRedirectUri = props.authRedirectUri, user = props.user, disableLoadingBoundary = props.disableLoadingBoundary, suspenseFallback = props.suspenseFallback;
|
|
1638
1638
|
var context = React__namespace.useMemo(function () { return ({
|
|
1639
1639
|
platform: platform,
|
|
1640
1640
|
}); }, [platform]);
|
|
@@ -1644,11 +1644,14 @@ function PlasmicRootProvider(props) {
|
|
|
1644
1644
|
isUserLoading: isUserLoading,
|
|
1645
1645
|
authRedirectUri: authRedirectUri,
|
|
1646
1646
|
}); }, [userAuthToken, isUserLoading, user, authRedirectUri]);
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
React__namespace.createElement(
|
|
1650
|
-
|
|
1651
|
-
|
|
1647
|
+
var reactMajorVersion = +React__namespace.version.split(".")[0];
|
|
1648
|
+
return (React__namespace.createElement(MaybeWrap, { cond: !disableLoadingBoundary && reactMajorVersion >= 18, wrapper: function (children) { return (React__namespace.createElement(host.DataProvider, { name: "plasmicInternalEnableLoadingBoundary", hidden: true, data: true },
|
|
1649
|
+
React__namespace.createElement(React__namespace.Suspense, { fallback: suspenseFallback !== null && suspenseFallback !== void 0 ? suspenseFallback : "Loading..." }, children))); } },
|
|
1650
|
+
React__namespace.createElement(PlasmicRootContext.Provider, { value: context },
|
|
1651
|
+
React__namespace.createElement(ssr.SSRProvider, null,
|
|
1652
|
+
React__namespace.createElement(dataSourcesContext.PlasmicDataSourceContextProvider, { value: dataSourceContextValue },
|
|
1653
|
+
React__namespace.createElement(PlasmicTranslatorContext.Provider, { value: props.translator },
|
|
1654
|
+
React__namespace.createElement(PlasmicHeadContext.Provider, { value: props.Head }, children)))))));
|
|
1652
1655
|
}
|
|
1653
1656
|
var useIsSSR = ssr.useIsSSR;
|
|
1654
1657
|
function useHasPlasmicRoot() {
|
|
@@ -1666,6 +1669,9 @@ function useEnsureSSRProvider() {
|
|
|
1666
1669
|
hasWarnedSSR = true;
|
|
1667
1670
|
console.warn("Plasmic: To ensure your components work correctly with server-side rendering, please use PlasmicRootProvider at the root of your application. See https://docs.plasmic.app/learn/ssr");
|
|
1668
1671
|
}
|
|
1672
|
+
function MaybeWrap(props) {
|
|
1673
|
+
return props.cond ? props.wrapper(props.children) : props.children;
|
|
1674
|
+
}
|
|
1669
1675
|
|
|
1670
1676
|
function useFocused(opts) {
|
|
1671
1677
|
var _a = focus.useFocusRing({
|