@thetechfossil/auth2 1.2.18 → 1.2.19

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.
@@ -4199,34 +4199,6 @@ var injectModalStyles = () => {
4199
4199
  `;
4200
4200
  document.head.appendChild(styleElement);
4201
4201
  };
4202
-
4203
- // src/react/components/utils/getAnonymousUserId.ts
4204
- var ANONYMOUS_USER_ID_KEY = "ttf_auth_anonymous_user_id";
4205
- function generateUUID() {
4206
- if (typeof crypto !== "undefined" && crypto.randomUUID) {
4207
- return crypto.randomUUID();
4208
- }
4209
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
4210
- const r = Math.random() * 16 | 0;
4211
- const v = c === "x" ? r : r & 3 | 8;
4212
- return v.toString(16);
4213
- });
4214
- }
4215
- function getAnonymousUserId() {
4216
- if (typeof window === "undefined" || typeof localStorage === "undefined") {
4217
- return null;
4218
- }
4219
- try {
4220
- let anonymousId = localStorage.getItem(ANONYMOUS_USER_ID_KEY);
4221
- if (!anonymousId) {
4222
- anonymousId = generateUUID();
4223
- localStorage.setItem(ANONYMOUS_USER_ID_KEY, anonymousId);
4224
- }
4225
- return anonymousId;
4226
- } catch {
4227
- return generateUUID();
4228
- }
4229
- }
4230
4202
  var AvatarUploader = ({
4231
4203
  onUploadComplete,
4232
4204
  onError,
@@ -4247,10 +4219,6 @@ var AvatarUploader = ({
4247
4219
  if (user?.id) {
4248
4220
  return `users/${user.id}/`;
4249
4221
  }
4250
- const anonymousId = getAnonymousUserId();
4251
- if (anonymousId) {
4252
- return `anonymous/${anonymousId}/`;
4253
- }
4254
4222
  return upfilesConfig.folderPath || "/";
4255
4223
  }, [user?.id, upfilesConfig.folderPath]);
4256
4224
  const handleSelect = async (image) => {
@@ -4630,10 +4598,6 @@ var AvatarManager = ({
4630
4598
  if (user?.id) {
4631
4599
  return `users/${user.id}/`;
4632
4600
  }
4633
- const anonymousId = getAnonymousUserId();
4634
- if (anonymousId) {
4635
- return `anonymous/${anonymousId}/`;
4636
- }
4637
4601
  return upfilesConfig.folderPath || "/";
4638
4602
  }, [user?.id, upfilesConfig.folderPath]);
4639
4603
  const handleSelect = async (image) => {