@wix/himalaya-cli 0.1743.0 → 0.1745.0

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.
Files changed (41) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +21 -0
  3. package/dist/browser-plane/assets.json +5 -5
  4. package/dist/browser-plane/preview-deferred/{d13ef703cc8f4d7eaa9b12967b618314b75002b5d4441dedbcc65e3601c4750d.bin → d432d189310d8d819b56251c53dd82a9e166a4a73936749f08c355c11083e8e0.bin} +1 -1
  5. package/dist/browser-plane/sw.js +5 -5
  6. package/dist/cli.mjs +2288 -1959
  7. package/dist/preview-assets.generated.bin +0 -0
  8. package/guides/android-ux.md +1 -1
  9. package/guides/designing-himi-screens.md +23 -14
  10. package/guides/getting-started.md +28 -28
  11. package/guides/headless-loop.md +1 -1
  12. package/guides/himi-skill.md +31 -31
  13. package/guides/himi-test.md +6 -0
  14. package/guides/ios-ux.md +1 -1
  15. package/guides/tier-5-add-a-screen.md +12 -0
  16. package/package.json +2 -2
  17. package/templates/beauty-salon/l10n/fr.json +100 -0
  18. package/templates/beauty-salon/tier5-src/_shared/himi-account.ts +37 -8
  19. package/templates/branded-lite/l10n/fr.json +100 -0
  20. package/templates/branded-lite/tier5-src/_shared/himi-account.ts +37 -8
  21. package/templates/community-club/l10n/fr.json +100 -0
  22. package/templates/community-club/tier5-src/_shared/himi-account.ts +37 -8
  23. package/templates/conference/tier5-src/_shared/himi-account.ts +37 -8
  24. package/templates/events-meetups/l10n/fr.json +100 -0
  25. package/templates/events-meetups/tier5-src/_shared/himi-account.ts +37 -8
  26. package/templates/gym-fitness/l10n/fr.json +100 -0
  27. package/templates/gym-fitness/tier5-src/_shared/himi-account.ts +37 -8
  28. package/templates/nonprofit-cause/l10n/fr.json +100 -0
  29. package/templates/nonprofit-cause/tier5-src/_shared/himi-account.ts +37 -8
  30. package/templates/podcast-creator/l10n/fr.json +100 -0
  31. package/templates/podcast-creator/tier5-src/_shared/himi-account.ts +37 -8
  32. package/templates/portfolio-creative/l10n/fr.json +100 -0
  33. package/templates/portfolio-creative/tier5-src/_shared/himi-account.ts +37 -8
  34. package/templates/restaurant/l10n/fr.json +100 -0
  35. package/templates/restaurant/tier5-src/_shared/himi-account.ts +37 -8
  36. package/templates/retail-store/l10n/fr.json +100 -0
  37. package/templates/retail-store/tier5-src/_shared/himi-account.ts +37 -8
  38. package/templates/salon-spa/tier5-src/_shared/himi-account.ts +37 -8
  39. package/templates/wholesale-store/tier5-src/_shared/himi-account.ts +37 -8
  40. package/templates/yoga-studio/l10n/fr.json +100 -0
  41. package/templates/yoga-studio/tier5-src/_shared/himi-account.ts +37 -8
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
124
124
  };
125
125
  }
126
126
 
127
- export async function signedInEmail(): Promise<string> {
127
+ /** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
128
+ * signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
129
+ * for a member whose email is not known yet (an injected or hosted session before `members/my`
130
+ * answers); hosts that predate it answer the email alone. */
131
+ export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
128
132
  try {
129
133
  const identity = await dispatch("himi.wix.memberIdentity") as unknown;
130
- const direct = identity as { email?: unknown } | null;
131
- const wrapped = identity as { payload?: { email?: unknown } } | null;
132
- const email = direct?.email ?? wrapped?.payload?.email;
133
- return typeof email === "string" ? email : "";
134
+ const direct = identity as { email?: unknown; signedIn?: unknown } | null;
135
+ const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
136
+ const raw = direct?.email ?? wrapped?.payload?.email;
137
+ const email = typeof raw === "string" ? raw : "";
138
+ const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
139
+ return { email, signedIn: signedIn || !!email };
134
140
  } catch {
135
- return "";
141
+ return { email: "", signedIn: false };
136
142
  }
137
143
  }
138
144
 
145
+ export async function signedInEmail(): Promise<string> {
146
+ return (await memberIdentity()).email;
147
+ }
148
+
149
+ /** A signed-in member nothing names yet: signed in, with a neutral label rather than another
150
+ * member's name or the sign-in form. */
151
+ function neutralMemberProfile(): AccountProfile {
152
+ const name = copyParam("account.member", "Member");
153
+ return {
154
+ isMember: true,
155
+ identityLine: copyParam("account.signedIn", "Signed in"),
156
+ detailLine: name,
157
+ memberName: name,
158
+ memberEmail: "",
159
+ memberImage: "",
160
+ memberInitials: "M",
161
+ hasMemberImage: false,
162
+ noMemberImage: true,
163
+ };
164
+ }
165
+
139
166
  export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
140
167
  // `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
141
168
  // getMyData can still return a site/account nickname (e.g. apptestercoowner)
142
169
  // after sign-out or for anonymous — never treat that as a signed-in member.
143
- const storedEmail = await signedInEmail();
144
- if (!storedEmail) return guestProfile(guestDetailLine);
170
+ const identity = await memberIdentity();
171
+ if (!identity.signedIn) return guestProfile(guestDetailLine);
172
+ const storedEmail = identity.email;
173
+ if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
145
174
  try {
146
175
  const data = await getMyData();
147
176
  return profileFromData(data, storedEmail);
@@ -3840,6 +3840,106 @@
3840
3840
  "source": "Unpaid",
3841
3841
  "translation": "Non payée",
3842
3842
  "origin": "one-app:wix-one-app-ecom-platform:merchant.dashboard.orderWidget.filter.unpaid"
3843
+ },
3844
+ "h_14ed0860418c": {
3845
+ "source": "No Time Limit",
3846
+ "translation": "Sans limite de durée",
3847
+ "origin": "machine"
3848
+ },
3849
+ "h_e830e1381ba6": {
3850
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
3851
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
3852
+ "origin": "machine"
3853
+ },
3854
+ "h_a7ccfb719652": {
3855
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
3856
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
3857
+ "origin": "machine"
3858
+ },
3859
+ "h_5e4247c32900": {
3860
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
3861
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
3862
+ "origin": "machine"
3863
+ },
3864
+ "h_51d1d606ee9b": {
3865
+ "source": "Members couldn't be loaded.",
3866
+ "translation": "Impossible de charger les membres.",
3867
+ "origin": "machine"
3868
+ },
3869
+ "h_8f615630c7a8": {
3870
+ "source": "Search {count} members",
3871
+ "translation": "Rechercher des membres ({count})",
3872
+ "origin": "machine"
3873
+ },
3874
+ "h_bbeb7a9f223c": {
3875
+ "source": "Sign in to follow members.",
3876
+ "translation": "Connectez-vous pour suivre des membres.",
3877
+ "origin": "machine"
3878
+ },
3879
+ "h_4e520e13547e": {
3880
+ "source": "Couldn't update. Try again.",
3881
+ "translation": "Mise à jour impossible. Réessayez.",
3882
+ "origin": "machine"
3883
+ },
3884
+ "h_1b1e1de382f6": {
3885
+ "source": "You can cancel this plan yourself.",
3886
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
3887
+ "origin": "machine"
3888
+ },
3889
+ "h_af9f9729838a": {
3890
+ "source": "Limit: {n} per member.",
3891
+ "translation": "Limite : {n} par membre.",
3892
+ "origin": "machine"
3893
+ },
3894
+ "h_03df3dddc156": {
3895
+ "source": "You can choose a later start date.",
3896
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
3897
+ "origin": "machine"
3898
+ },
3899
+ "h_cb7c8c83bd90": {
3900
+ "source": "No upcoming events.",
3901
+ "translation": "Aucun événement à venir.",
3902
+ "origin": "machine"
3903
+ },
3904
+ "h_e84d8431b504": {
3905
+ "source": "{n, plural, one {for # day} other {for # days}}",
3906
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
3907
+ "origin": "machine"
3908
+ },
3909
+ "h_6c3b1b0caef6": {
3910
+ "source": "{n, plural, one {per day} other {every # days}}",
3911
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
3912
+ "origin": "machine"
3913
+ },
3914
+ "h_0e9096b5e692": {
3915
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
3916
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
3917
+ "origin": "machine"
3918
+ },
3919
+ "h_318d1043dc09": {
3920
+ "source": "{n, plural, one {per week} other {every # weeks}}",
3921
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
3922
+ "origin": "machine"
3923
+ },
3924
+ "h_f01e3692c61a": {
3925
+ "source": "{n, plural, one {for # month} other {for # months}}",
3926
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
3927
+ "origin": "machine"
3928
+ },
3929
+ "h_c8b9ca77129d": {
3930
+ "source": "{n, plural, one {per month} other {every # months}}",
3931
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
3932
+ "origin": "machine"
3933
+ },
3934
+ "h_bddf6b6e5d29": {
3935
+ "source": "{n, plural, one {for # year} other {for # years}}",
3936
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
3937
+ "origin": "machine"
3938
+ },
3939
+ "h_55db55f1bd29": {
3940
+ "source": "{n, plural, one {per year} other {every # years}}",
3941
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
3942
+ "origin": "machine"
3843
3943
  }
3844
3944
  }
3845
3945
  }
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
124
124
  };
125
125
  }
126
126
 
127
- export async function signedInEmail(): Promise<string> {
127
+ /** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
128
+ * signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
129
+ * for a member whose email is not known yet (an injected or hosted session before `members/my`
130
+ * answers); hosts that predate it answer the email alone. */
131
+ export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
128
132
  try {
129
133
  const identity = await dispatch("himi.wix.memberIdentity") as unknown;
130
- const direct = identity as { email?: unknown } | null;
131
- const wrapped = identity as { payload?: { email?: unknown } } | null;
132
- const email = direct?.email ?? wrapped?.payload?.email;
133
- return typeof email === "string" ? email : "";
134
+ const direct = identity as { email?: unknown; signedIn?: unknown } | null;
135
+ const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
136
+ const raw = direct?.email ?? wrapped?.payload?.email;
137
+ const email = typeof raw === "string" ? raw : "";
138
+ const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
139
+ return { email, signedIn: signedIn || !!email };
134
140
  } catch {
135
- return "";
141
+ return { email: "", signedIn: false };
136
142
  }
137
143
  }
138
144
 
145
+ export async function signedInEmail(): Promise<string> {
146
+ return (await memberIdentity()).email;
147
+ }
148
+
149
+ /** A signed-in member nothing names yet: signed in, with a neutral label rather than another
150
+ * member's name or the sign-in form. */
151
+ function neutralMemberProfile(): AccountProfile {
152
+ const name = copyParam("account.member", "Member");
153
+ return {
154
+ isMember: true,
155
+ identityLine: copyParam("account.signedIn", "Signed in"),
156
+ detailLine: name,
157
+ memberName: name,
158
+ memberEmail: "",
159
+ memberImage: "",
160
+ memberInitials: "M",
161
+ hasMemberImage: false,
162
+ noMemberImage: true,
163
+ };
164
+ }
165
+
139
166
  export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
140
167
  // `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
141
168
  // getMyData can still return a site/account nickname (e.g. apptestercoowner)
142
169
  // after sign-out or for anonymous — never treat that as a signed-in member.
143
- const storedEmail = await signedInEmail();
144
- if (!storedEmail) return guestProfile(guestDetailLine);
170
+ const identity = await memberIdentity();
171
+ if (!identity.signedIn) return guestProfile(guestDetailLine);
172
+ const storedEmail = identity.email;
173
+ if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
145
174
  try {
146
175
  const data = await getMyData();
147
176
  return profileFromData(data, storedEmail);
@@ -3616,6 +3616,106 @@
3616
3616
  "source": "Unpaid",
3617
3617
  "translation": "Non payée",
3618
3618
  "origin": "one-app:wix-one-app-ecom-platform:merchant.dashboard.orderWidget.filter.unpaid"
3619
+ },
3620
+ "h_14ed0860418c": {
3621
+ "source": "No Time Limit",
3622
+ "translation": "Sans limite de durée",
3623
+ "origin": "machine"
3624
+ },
3625
+ "h_e830e1381ba6": {
3626
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
3627
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
3628
+ "origin": "machine"
3629
+ },
3630
+ "h_a7ccfb719652": {
3631
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
3632
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
3633
+ "origin": "machine"
3634
+ },
3635
+ "h_5e4247c32900": {
3636
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
3637
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
3638
+ "origin": "machine"
3639
+ },
3640
+ "h_51d1d606ee9b": {
3641
+ "source": "Members couldn't be loaded.",
3642
+ "translation": "Impossible de charger les membres.",
3643
+ "origin": "machine"
3644
+ },
3645
+ "h_8f615630c7a8": {
3646
+ "source": "Search {count} members",
3647
+ "translation": "Rechercher des membres ({count})",
3648
+ "origin": "machine"
3649
+ },
3650
+ "h_bbeb7a9f223c": {
3651
+ "source": "Sign in to follow members.",
3652
+ "translation": "Connectez-vous pour suivre des membres.",
3653
+ "origin": "machine"
3654
+ },
3655
+ "h_4e520e13547e": {
3656
+ "source": "Couldn't update. Try again.",
3657
+ "translation": "Mise à jour impossible. Réessayez.",
3658
+ "origin": "machine"
3659
+ },
3660
+ "h_1b1e1de382f6": {
3661
+ "source": "You can cancel this plan yourself.",
3662
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
3663
+ "origin": "machine"
3664
+ },
3665
+ "h_af9f9729838a": {
3666
+ "source": "Limit: {n} per member.",
3667
+ "translation": "Limite : {n} par membre.",
3668
+ "origin": "machine"
3669
+ },
3670
+ "h_03df3dddc156": {
3671
+ "source": "You can choose a later start date.",
3672
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
3673
+ "origin": "machine"
3674
+ },
3675
+ "h_cb7c8c83bd90": {
3676
+ "source": "No upcoming events.",
3677
+ "translation": "Aucun événement à venir.",
3678
+ "origin": "machine"
3679
+ },
3680
+ "h_e84d8431b504": {
3681
+ "source": "{n, plural, one {for # day} other {for # days}}",
3682
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
3683
+ "origin": "machine"
3684
+ },
3685
+ "h_6c3b1b0caef6": {
3686
+ "source": "{n, plural, one {per day} other {every # days}}",
3687
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
3688
+ "origin": "machine"
3689
+ },
3690
+ "h_0e9096b5e692": {
3691
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
3692
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
3693
+ "origin": "machine"
3694
+ },
3695
+ "h_318d1043dc09": {
3696
+ "source": "{n, plural, one {per week} other {every # weeks}}",
3697
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
3698
+ "origin": "machine"
3699
+ },
3700
+ "h_f01e3692c61a": {
3701
+ "source": "{n, plural, one {for # month} other {for # months}}",
3702
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
3703
+ "origin": "machine"
3704
+ },
3705
+ "h_c8b9ca77129d": {
3706
+ "source": "{n, plural, one {per month} other {every # months}}",
3707
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
3708
+ "origin": "machine"
3709
+ },
3710
+ "h_bddf6b6e5d29": {
3711
+ "source": "{n, plural, one {for # year} other {for # years}}",
3712
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
3713
+ "origin": "machine"
3714
+ },
3715
+ "h_55db55f1bd29": {
3716
+ "source": "{n, plural, one {per year} other {every # years}}",
3717
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
3718
+ "origin": "machine"
3619
3719
  }
3620
3720
  }
3621
3721
  }
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
124
124
  };
125
125
  }
126
126
 
127
- export async function signedInEmail(): Promise<string> {
127
+ /** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
128
+ * signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
129
+ * for a member whose email is not known yet (an injected or hosted session before `members/my`
130
+ * answers); hosts that predate it answer the email alone. */
131
+ export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
128
132
  try {
129
133
  const identity = await dispatch("himi.wix.memberIdentity") as unknown;
130
- const direct = identity as { email?: unknown } | null;
131
- const wrapped = identity as { payload?: { email?: unknown } } | null;
132
- const email = direct?.email ?? wrapped?.payload?.email;
133
- return typeof email === "string" ? email : "";
134
+ const direct = identity as { email?: unknown; signedIn?: unknown } | null;
135
+ const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
136
+ const raw = direct?.email ?? wrapped?.payload?.email;
137
+ const email = typeof raw === "string" ? raw : "";
138
+ const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
139
+ return { email, signedIn: signedIn || !!email };
134
140
  } catch {
135
- return "";
141
+ return { email: "", signedIn: false };
136
142
  }
137
143
  }
138
144
 
145
+ export async function signedInEmail(): Promise<string> {
146
+ return (await memberIdentity()).email;
147
+ }
148
+
149
+ /** A signed-in member nothing names yet: signed in, with a neutral label rather than another
150
+ * member's name or the sign-in form. */
151
+ function neutralMemberProfile(): AccountProfile {
152
+ const name = copyParam("account.member", "Member");
153
+ return {
154
+ isMember: true,
155
+ identityLine: copyParam("account.signedIn", "Signed in"),
156
+ detailLine: name,
157
+ memberName: name,
158
+ memberEmail: "",
159
+ memberImage: "",
160
+ memberInitials: "M",
161
+ hasMemberImage: false,
162
+ noMemberImage: true,
163
+ };
164
+ }
165
+
139
166
  export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
140
167
  // `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
141
168
  // getMyData can still return a site/account nickname (e.g. apptestercoowner)
142
169
  // after sign-out or for anonymous — never treat that as a signed-in member.
143
- const storedEmail = await signedInEmail();
144
- if (!storedEmail) return guestProfile(guestDetailLine);
170
+ const identity = await memberIdentity();
171
+ if (!identity.signedIn) return guestProfile(guestDetailLine);
172
+ const storedEmail = identity.email;
173
+ if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
145
174
  try {
146
175
  const data = await getMyData();
147
176
  return profileFromData(data, storedEmail);
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
124
124
  };
125
125
  }
126
126
 
127
- export async function signedInEmail(): Promise<string> {
127
+ /** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
128
+ * signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
129
+ * for a member whose email is not known yet (an injected or hosted session before `members/my`
130
+ * answers); hosts that predate it answer the email alone. */
131
+ export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
128
132
  try {
129
133
  const identity = await dispatch("himi.wix.memberIdentity") as unknown;
130
- const direct = identity as { email?: unknown } | null;
131
- const wrapped = identity as { payload?: { email?: unknown } } | null;
132
- const email = direct?.email ?? wrapped?.payload?.email;
133
- return typeof email === "string" ? email : "";
134
+ const direct = identity as { email?: unknown; signedIn?: unknown } | null;
135
+ const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
136
+ const raw = direct?.email ?? wrapped?.payload?.email;
137
+ const email = typeof raw === "string" ? raw : "";
138
+ const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
139
+ return { email, signedIn: signedIn || !!email };
134
140
  } catch {
135
- return "";
141
+ return { email: "", signedIn: false };
136
142
  }
137
143
  }
138
144
 
145
+ export async function signedInEmail(): Promise<string> {
146
+ return (await memberIdentity()).email;
147
+ }
148
+
149
+ /** A signed-in member nothing names yet: signed in, with a neutral label rather than another
150
+ * member's name or the sign-in form. */
151
+ function neutralMemberProfile(): AccountProfile {
152
+ const name = copyParam("account.member", "Member");
153
+ return {
154
+ isMember: true,
155
+ identityLine: copyParam("account.signedIn", "Signed in"),
156
+ detailLine: name,
157
+ memberName: name,
158
+ memberEmail: "",
159
+ memberImage: "",
160
+ memberInitials: "M",
161
+ hasMemberImage: false,
162
+ noMemberImage: true,
163
+ };
164
+ }
165
+
139
166
  export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
140
167
  // `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
141
168
  // getMyData can still return a site/account nickname (e.g. apptestercoowner)
142
169
  // after sign-out or for anonymous — never treat that as a signed-in member.
143
- const storedEmail = await signedInEmail();
144
- if (!storedEmail) return guestProfile(guestDetailLine);
170
+ const identity = await memberIdentity();
171
+ if (!identity.signedIn) return guestProfile(guestDetailLine);
172
+ const storedEmail = identity.email;
173
+ if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
145
174
  try {
146
175
  const data = await getMyData();
147
176
  return profileFromData(data, storedEmail);
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
124
124
  };
125
125
  }
126
126
 
127
- export async function signedInEmail(): Promise<string> {
127
+ /** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
128
+ * signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
129
+ * for a member whose email is not known yet (an injected or hosted session before `members/my`
130
+ * answers); hosts that predate it answer the email alone. */
131
+ export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
128
132
  try {
129
133
  const identity = await dispatch("himi.wix.memberIdentity") as unknown;
130
- const direct = identity as { email?: unknown } | null;
131
- const wrapped = identity as { payload?: { email?: unknown } } | null;
132
- const email = direct?.email ?? wrapped?.payload?.email;
133
- return typeof email === "string" ? email : "";
134
+ const direct = identity as { email?: unknown; signedIn?: unknown } | null;
135
+ const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
136
+ const raw = direct?.email ?? wrapped?.payload?.email;
137
+ const email = typeof raw === "string" ? raw : "";
138
+ const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
139
+ return { email, signedIn: signedIn || !!email };
134
140
  } catch {
135
- return "";
141
+ return { email: "", signedIn: false };
136
142
  }
137
143
  }
138
144
 
145
+ export async function signedInEmail(): Promise<string> {
146
+ return (await memberIdentity()).email;
147
+ }
148
+
149
+ /** A signed-in member nothing names yet: signed in, with a neutral label rather than another
150
+ * member's name or the sign-in form. */
151
+ function neutralMemberProfile(): AccountProfile {
152
+ const name = copyParam("account.member", "Member");
153
+ return {
154
+ isMember: true,
155
+ identityLine: copyParam("account.signedIn", "Signed in"),
156
+ detailLine: name,
157
+ memberName: name,
158
+ memberEmail: "",
159
+ memberImage: "",
160
+ memberInitials: "M",
161
+ hasMemberImage: false,
162
+ noMemberImage: true,
163
+ };
164
+ }
165
+
139
166
  export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
140
167
  // `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
141
168
  // getMyData can still return a site/account nickname (e.g. apptestercoowner)
142
169
  // after sign-out or for anonymous — never treat that as a signed-in member.
143
- const storedEmail = await signedInEmail();
144
- if (!storedEmail) return guestProfile(guestDetailLine);
170
+ const identity = await memberIdentity();
171
+ if (!identity.signedIn) return guestProfile(guestDetailLine);
172
+ const storedEmail = identity.email;
173
+ if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
145
174
  try {
146
175
  const data = await getMyData();
147
176
  return profileFromData(data, storedEmail);
@@ -4590,6 +4590,106 @@
4590
4590
  "source": "One-time payment",
4591
4591
  "translation": "Paiement unique",
4592
4592
  "origin": "one-app:payment-links-mobile:pay-links.mob.select-payment-link-type.single-use.title"
4593
+ },
4594
+ "h_14ed0860418c": {
4595
+ "source": "No Time Limit",
4596
+ "translation": "Sans limite de durée",
4597
+ "origin": "machine"
4598
+ },
4599
+ "h_e830e1381ba6": {
4600
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
4601
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
4602
+ "origin": "machine"
4603
+ },
4604
+ "h_a7ccfb719652": {
4605
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
4606
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
4607
+ "origin": "machine"
4608
+ },
4609
+ "h_5e4247c32900": {
4610
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
4611
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
4612
+ "origin": "machine"
4613
+ },
4614
+ "h_51d1d606ee9b": {
4615
+ "source": "Members couldn't be loaded.",
4616
+ "translation": "Impossible de charger les membres.",
4617
+ "origin": "machine"
4618
+ },
4619
+ "h_8f615630c7a8": {
4620
+ "source": "Search {count} members",
4621
+ "translation": "Rechercher des membres ({count})",
4622
+ "origin": "machine"
4623
+ },
4624
+ "h_bbeb7a9f223c": {
4625
+ "source": "Sign in to follow members.",
4626
+ "translation": "Connectez-vous pour suivre des membres.",
4627
+ "origin": "machine"
4628
+ },
4629
+ "h_4e520e13547e": {
4630
+ "source": "Couldn't update. Try again.",
4631
+ "translation": "Mise à jour impossible. Réessayez.",
4632
+ "origin": "machine"
4633
+ },
4634
+ "h_1b1e1de382f6": {
4635
+ "source": "You can cancel this plan yourself.",
4636
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
4637
+ "origin": "machine"
4638
+ },
4639
+ "h_af9f9729838a": {
4640
+ "source": "Limit: {n} per member.",
4641
+ "translation": "Limite : {n} par membre.",
4642
+ "origin": "machine"
4643
+ },
4644
+ "h_03df3dddc156": {
4645
+ "source": "You can choose a later start date.",
4646
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
4647
+ "origin": "machine"
4648
+ },
4649
+ "h_cb7c8c83bd90": {
4650
+ "source": "No upcoming events.",
4651
+ "translation": "Aucun événement à venir.",
4652
+ "origin": "machine"
4653
+ },
4654
+ "h_e84d8431b504": {
4655
+ "source": "{n, plural, one {for # day} other {for # days}}",
4656
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
4657
+ "origin": "machine"
4658
+ },
4659
+ "h_6c3b1b0caef6": {
4660
+ "source": "{n, plural, one {per day} other {every # days}}",
4661
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
4662
+ "origin": "machine"
4663
+ },
4664
+ "h_0e9096b5e692": {
4665
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
4666
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
4667
+ "origin": "machine"
4668
+ },
4669
+ "h_318d1043dc09": {
4670
+ "source": "{n, plural, one {per week} other {every # weeks}}",
4671
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
4672
+ "origin": "machine"
4673
+ },
4674
+ "h_f01e3692c61a": {
4675
+ "source": "{n, plural, one {for # month} other {for # months}}",
4676
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
4677
+ "origin": "machine"
4678
+ },
4679
+ "h_c8b9ca77129d": {
4680
+ "source": "{n, plural, one {per month} other {every # months}}",
4681
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
4682
+ "origin": "machine"
4683
+ },
4684
+ "h_bddf6b6e5d29": {
4685
+ "source": "{n, plural, one {for # year} other {for # years}}",
4686
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
4687
+ "origin": "machine"
4688
+ },
4689
+ "h_55db55f1bd29": {
4690
+ "source": "{n, plural, one {per year} other {every # years}}",
4691
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
4692
+ "origin": "machine"
4593
4693
  }
4594
4694
  }
4595
4695
  }