@fabriktor/fx 0.0.190 → 0.0.191
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.
|
@@ -89,10 +89,13 @@ export function bannerCrop(width, height, frame) {
|
|
|
89
89
|
export function moveBannerFrame(width, height, frame, dx, dy, viewportWidth) {
|
|
90
90
|
const crop = bannerCrop(width, height, frame);
|
|
91
91
|
const scale = crop.width / Math.max(1, viewportWidth);
|
|
92
|
+
const travelX = width - crop.width;
|
|
93
|
+
const travelY = height - crop.height;
|
|
92
94
|
const clamp = (value) => Math.min(1, Math.max(0, value));
|
|
95
|
+
// A fitted axis (including subpixel overflow) has no visible travel.
|
|
93
96
|
return {
|
|
94
97
|
...frame,
|
|
95
|
-
x: clamp(frame.x - (dx * scale) /
|
|
96
|
-
y: clamp(frame.y - (dy * scale) /
|
|
98
|
+
x: travelX > scale ? clamp(frame.x - (dx * scale) / travelX) : frame.x,
|
|
99
|
+
y: travelY > scale ? clamp(frame.y - (dy * scale) / travelY) : frame.y,
|
|
97
100
|
};
|
|
98
101
|
}
|
package/dist/src/users/users.js
CHANGED
|
@@ -8,9 +8,9 @@ import { normalizeEmail, isValidEmail } from "./email.js";
|
|
|
8
8
|
import { validUserPicturePreview } from "./picture.js";
|
|
9
9
|
import { normalizeUsername, validateUsernameFormat } from "./username.js";
|
|
10
10
|
import { userCardInput, normalizeUserCardInput, validateUserCardInput, } from "./profile.js";
|
|
11
|
-
const msgProfileRequired = "A valid account is required to update the public
|
|
11
|
+
const msgProfileRequired = "A valid account is required to update the public card.";
|
|
12
12
|
const msgPublicUserRequired = "A valid user is required.";
|
|
13
|
-
const msgPublicUserMissing = "Public
|
|
13
|
+
const msgPublicUserMissing = "Public card could not be resolved.";
|
|
14
14
|
const msgPictureRequired = "A valid account and profile preview are required.";
|
|
15
15
|
const msgUnableToResolveUsername = "Unable to resolve username.";
|
|
16
16
|
const msgPhoneRequired = "Phone number is required.";
|