@amplifyup/sdk 0.1.41 → 0.1.42
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/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/react.js +9 -4
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +9 -4
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -3267,6 +3267,9 @@ function isReactNodeFallback(fallback) {
|
|
|
3267
3267
|
if (fallback == null || fallback === false) return false;
|
|
3268
3268
|
return !isPlainTextValue(fallback);
|
|
3269
3269
|
}
|
|
3270
|
+
function classNameIsBlock(className) {
|
|
3271
|
+
return /(?:^|\s)block(?:\s|$)/.test(className || "");
|
|
3272
|
+
}
|
|
3270
3273
|
function htmlHasVisualChrome(html) {
|
|
3271
3274
|
return /<(input|button|select|textarea|form|svg|iframe|video|audio|img)\b/i.test(
|
|
3272
3275
|
html
|
|
@@ -3443,7 +3446,8 @@ function ComposerInlineField({
|
|
|
3443
3446
|
outlineOffset: "2px",
|
|
3444
3447
|
minWidth: "1ch",
|
|
3445
3448
|
minHeight: "1em",
|
|
3446
|
-
|
|
3449
|
+
// Do not force `inline` — that overrides Tailwind `block` and parks
|
|
3450
|
+
// an empty-field hint on the same line as a sibling that has a value.
|
|
3447
3451
|
opacity: showHint ? 0.5 : void 0
|
|
3448
3452
|
},
|
|
3449
3453
|
children: showRendered ? value != null && value !== "" && !storedEmpty ? render(value) : fallback ?? idleDisplay : isReactNodeFallback(fallback) && !idleDisplay ? fallback : null
|
|
@@ -3567,7 +3571,8 @@ function Field({
|
|
|
3567
3571
|
}
|
|
3568
3572
|
const text = formatFieldValue(fieldValue);
|
|
3569
3573
|
const showVisualFallback = !text && isReactNodeFallback(fallback);
|
|
3570
|
-
|
|
3574
|
+
const emptyBlockField = isComposerEmptyText(fieldValue) && classNameIsBlock(className);
|
|
3575
|
+
if (composerEdit && canInlineEdit(name, fieldValue) && !showVisualFallback && !emptyBlockField) {
|
|
3571
3576
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3572
3577
|
ComposerInlineField,
|
|
3573
3578
|
{
|
|
@@ -3580,7 +3585,7 @@ function Field({
|
|
|
3580
3585
|
}
|
|
3581
3586
|
);
|
|
3582
3587
|
}
|
|
3583
|
-
if (fieldValue === void 0 || fieldValue === null) {
|
|
3588
|
+
if (fieldValue === void 0 || fieldValue === null || isComposerEmptyText(fieldValue)) {
|
|
3584
3589
|
return fallback ? /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: fallback }) : null;
|
|
3585
3590
|
}
|
|
3586
3591
|
if (!text) {
|
|
@@ -3614,7 +3619,7 @@ function RichText({
|
|
|
3614
3619
|
return fallback ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback }) : null;
|
|
3615
3620
|
}
|
|
3616
3621
|
if (isComposerEmptyText(fieldValue)) {
|
|
3617
|
-
if (composerEdit && canInlineEdit(name, fieldValue) && !isReactNodeFallback(fallback)) {
|
|
3622
|
+
if (composerEdit && canInlineEdit(name, fieldValue) && !isReactNodeFallback(fallback) && !classNameIsBlock(className)) {
|
|
3618
3623
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3619
3624
|
ComposerInlineField,
|
|
3620
3625
|
{
|