@plasmicapp/react-web 0.2.231 → 0.2.234
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 +2 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/index-common.d.ts +1 -1
- package/dist/index.cjs.js +15 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +15 -2
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/translation.d.ts +1 -0
- package/lib/auth/PlasmicPageGuard.d.ts +12 -0
- package/lib/auth/index.cjs.js +17 -0
- package/lib/auth/index.cjs.js.map +1 -0
- package/lib/auth/index.d.ts +1 -0
- package/lib/auth/index.js +2 -0
- package/lib/auth/index.js.map +1 -0
- package/lib/auth/package.json +8 -0
- package/package.json +9 -3
- package/skinny/dist/auth/index.d.ts +1 -0
- package/skinny/dist/index-common.d.ts +1 -1
- package/skinny/dist/index.js +2 -2
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/checkbox/index.js +1 -1
- package/skinny/dist/plume/menu/index.js +1 -1
- package/skinny/dist/plume/menu-button/index.js +1 -1
- package/skinny/dist/plume/select/index.js +1 -1
- package/skinny/dist/plume/switch/index.js +1 -1
- package/skinny/dist/render/translation.d.ts +1 -0
- package/skinny/dist/{ssr-b32a66e3.js → ssr-d19c2950.js} +16 -3
- package/skinny/dist/ssr-d19c2950.js.map +1 -0
- package/skinny/dist/ssr-b32a66e3.js.map +0 -1
package/dist/react-web.esm.js
CHANGED
|
@@ -1393,6 +1393,7 @@ var PlasmicLink = React__default.forwardRef(function PlasmicLink(props, ref) {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
});
|
|
1395
1395
|
var PlasmicLinkInternal = React__default.forwardRef(function PlasmicLinkInternal(props, ref) {
|
|
1396
|
+
var _a;
|
|
1396
1397
|
// props.href is required for nextjs; if no props.href,
|
|
1397
1398
|
// then we just render the default anchor element
|
|
1398
1399
|
if (props.platform === "nextjs" && props.href) {
|
|
@@ -1405,7 +1406,10 @@ var PlasmicLinkInternal = React__default.forwardRef(function PlasmicLinkInternal
|
|
|
1405
1406
|
"prefetch",
|
|
1406
1407
|
"locale",
|
|
1407
1408
|
];
|
|
1408
|
-
|
|
1409
|
+
// If this is a fragment identifier link, then we set
|
|
1410
|
+
// scroll={false} so that smooth scrolling works
|
|
1411
|
+
var isFragment = (_a = props.href) === null || _a === void 0 ? void 0 : _a.startsWith("#");
|
|
1412
|
+
return React__default.createElement(props.component, __assign(__assign({ scroll: !isFragment }, pick.apply(void 0, __spreadArray([props], __read(nextjsProps), false))), { legacyBehavior: true }), React__default.createElement("a", __assign({}, omit.apply(void 0, __spreadArray([props, "component", "platform"], __read(nextjsProps), false)), { ref: ref })));
|
|
1409
1413
|
}
|
|
1410
1414
|
if (props.platform === "gatsby" && isInternalHref(props.href)) {
|
|
1411
1415
|
return React__default.createElement(props.component, __assign(__assign({}, omit(props, "component", "platform", "href")), { to: props.href, ref: ref }));
|
|
@@ -1420,6 +1424,15 @@ var PlasmicTranslatorContext = React__default.createContext(undefined);
|
|
|
1420
1424
|
function isIterable(val) {
|
|
1421
1425
|
return val != null && typeof val[Symbol.iterator] === "function";
|
|
1422
1426
|
}
|
|
1427
|
+
function usePlasmicTranslator() {
|
|
1428
|
+
var _t = React__default.useContext(PlasmicTranslatorContext);
|
|
1429
|
+
var translator = _t
|
|
1430
|
+
? typeof _t === "function"
|
|
1431
|
+
? _t
|
|
1432
|
+
: _t.translator
|
|
1433
|
+
: undefined;
|
|
1434
|
+
return translator;
|
|
1435
|
+
}
|
|
1423
1436
|
function genTranslatableString(elt, opts) {
|
|
1424
1437
|
var components = {};
|
|
1425
1438
|
var componentsCount = 0;
|
|
@@ -3806,5 +3819,5 @@ function useTriggeredOverlay(plasmicClass, props, config, outerRef, isDismissabl
|
|
|
3806
3819
|
};
|
|
3807
3820
|
}
|
|
3808
3821
|
|
|
3809
|
-
export { DropdownMenu, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicPageGuard, PlasmicRootProvider, PlasmicSlot, SelectContext, Stack, Trans, TriggeredOverlayContext, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateOnChangePropForCodeComponents, generateStateValueProp, getCurrentInitialValue, getDataProps, getStateCellsInPlasmicProxy, getStateSpecInPlasmicProxy, hasVariant, initializeCodeComponentStates, initializePlasmicStates, is$StateProxy, isPlasmicStateProxy, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, resetToInitialValue, set, setPlumeStrictMode, useButton, useCheckbox, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, withPlasmicPageGuard, wrapWithClassName };
|
|
3822
|
+
export { DropdownMenu, PlasmicHead, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicPageGuard, PlasmicRootProvider, PlasmicSlot, SelectContext, Stack, Trans, TriggeredOverlayContext, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateOnChangePropForCodeComponents, generateStateValueProp, getCurrentInitialValue, getDataProps, getStateCellsInPlasmicProxy, getStateSpecInPlasmicProxy, hasVariant, initializeCodeComponentStates, initializePlasmicStates, is$StateProxy, isPlasmicStateProxy, makeFragment, mergeVariantsWithStates, omit, pick, plasmicHeadMeta, renderPlasmicSlot, resetToInitialValue, set, setPlumeStrictMode, useButton, useCheckbox, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, usePlasmicTranslator, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, withPlasmicPageGuard, wrapWithClassName };
|
|
3810
3823
|
//# sourceMappingURL=react-web.esm.js.map
|