@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
@@ -5689,6 +5689,106 @@
5689
5689
  "source": "One-time payment",
5690
5690
  "translation": "Paiement unique",
5691
5691
  "origin": "one-app:payment-links-mobile:pay-links.mob.select-payment-link-type.single-use.title"
5692
+ },
5693
+ "h_14ed0860418c": {
5694
+ "source": "No Time Limit",
5695
+ "translation": "Sans limite de durée",
5696
+ "origin": "machine"
5697
+ },
5698
+ "h_e830e1381ba6": {
5699
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
5700
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
5701
+ "origin": "machine"
5702
+ },
5703
+ "h_a7ccfb719652": {
5704
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
5705
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
5706
+ "origin": "machine"
5707
+ },
5708
+ "h_5e4247c32900": {
5709
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
5710
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
5711
+ "origin": "machine"
5712
+ },
5713
+ "h_51d1d606ee9b": {
5714
+ "source": "Members couldn't be loaded.",
5715
+ "translation": "Impossible de charger les membres.",
5716
+ "origin": "machine"
5717
+ },
5718
+ "h_8f615630c7a8": {
5719
+ "source": "Search {count} members",
5720
+ "translation": "Rechercher des membres ({count})",
5721
+ "origin": "machine"
5722
+ },
5723
+ "h_bbeb7a9f223c": {
5724
+ "source": "Sign in to follow members.",
5725
+ "translation": "Connectez-vous pour suivre des membres.",
5726
+ "origin": "machine"
5727
+ },
5728
+ "h_4e520e13547e": {
5729
+ "source": "Couldn't update. Try again.",
5730
+ "translation": "Mise à jour impossible. Réessayez.",
5731
+ "origin": "machine"
5732
+ },
5733
+ "h_1b1e1de382f6": {
5734
+ "source": "You can cancel this plan yourself.",
5735
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
5736
+ "origin": "machine"
5737
+ },
5738
+ "h_af9f9729838a": {
5739
+ "source": "Limit: {n} per member.",
5740
+ "translation": "Limite : {n} par membre.",
5741
+ "origin": "machine"
5742
+ },
5743
+ "h_03df3dddc156": {
5744
+ "source": "You can choose a later start date.",
5745
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
5746
+ "origin": "machine"
5747
+ },
5748
+ "h_cb7c8c83bd90": {
5749
+ "source": "No upcoming events.",
5750
+ "translation": "Aucun événement à venir.",
5751
+ "origin": "machine"
5752
+ },
5753
+ "h_e84d8431b504": {
5754
+ "source": "{n, plural, one {for # day} other {for # days}}",
5755
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
5756
+ "origin": "machine"
5757
+ },
5758
+ "h_6c3b1b0caef6": {
5759
+ "source": "{n, plural, one {per day} other {every # days}}",
5760
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
5761
+ "origin": "machine"
5762
+ },
5763
+ "h_0e9096b5e692": {
5764
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
5765
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
5766
+ "origin": "machine"
5767
+ },
5768
+ "h_318d1043dc09": {
5769
+ "source": "{n, plural, one {per week} other {every # weeks}}",
5770
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
5771
+ "origin": "machine"
5772
+ },
5773
+ "h_f01e3692c61a": {
5774
+ "source": "{n, plural, one {for # month} other {for # months}}",
5775
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
5776
+ "origin": "machine"
5777
+ },
5778
+ "h_c8b9ca77129d": {
5779
+ "source": "{n, plural, one {per month} other {every # months}}",
5780
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
5781
+ "origin": "machine"
5782
+ },
5783
+ "h_bddf6b6e5d29": {
5784
+ "source": "{n, plural, one {for # year} other {for # years}}",
5785
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
5786
+ "origin": "machine"
5787
+ },
5788
+ "h_55db55f1bd29": {
5789
+ "source": "{n, plural, one {per year} other {every # years}}",
5790
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
5791
+ "origin": "machine"
5692
5792
  }
5693
5793
  }
5694
5794
  }
@@ -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);
@@ -3761,6 +3761,106 @@
3761
3761
  "source": "One-time payment",
3762
3762
  "translation": "Paiement unique",
3763
3763
  "origin": "one-app:payment-links-mobile:pay-links.mob.select-payment-link-type.single-use.title"
3764
+ },
3765
+ "h_14ed0860418c": {
3766
+ "source": "No Time Limit",
3767
+ "translation": "Sans limite de durée",
3768
+ "origin": "machine"
3769
+ },
3770
+ "h_e830e1381ba6": {
3771
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
3772
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
3773
+ "origin": "machine"
3774
+ },
3775
+ "h_a7ccfb719652": {
3776
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
3777
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
3778
+ "origin": "machine"
3779
+ },
3780
+ "h_5e4247c32900": {
3781
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
3782
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
3783
+ "origin": "machine"
3784
+ },
3785
+ "h_51d1d606ee9b": {
3786
+ "source": "Members couldn't be loaded.",
3787
+ "translation": "Impossible de charger les membres.",
3788
+ "origin": "machine"
3789
+ },
3790
+ "h_8f615630c7a8": {
3791
+ "source": "Search {count} members",
3792
+ "translation": "Rechercher des membres ({count})",
3793
+ "origin": "machine"
3794
+ },
3795
+ "h_bbeb7a9f223c": {
3796
+ "source": "Sign in to follow members.",
3797
+ "translation": "Connectez-vous pour suivre des membres.",
3798
+ "origin": "machine"
3799
+ },
3800
+ "h_4e520e13547e": {
3801
+ "source": "Couldn't update. Try again.",
3802
+ "translation": "Mise à jour impossible. Réessayez.",
3803
+ "origin": "machine"
3804
+ },
3805
+ "h_1b1e1de382f6": {
3806
+ "source": "You can cancel this plan yourself.",
3807
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
3808
+ "origin": "machine"
3809
+ },
3810
+ "h_af9f9729838a": {
3811
+ "source": "Limit: {n} per member.",
3812
+ "translation": "Limite : {n} par membre.",
3813
+ "origin": "machine"
3814
+ },
3815
+ "h_03df3dddc156": {
3816
+ "source": "You can choose a later start date.",
3817
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
3818
+ "origin": "machine"
3819
+ },
3820
+ "h_cb7c8c83bd90": {
3821
+ "source": "No upcoming events.",
3822
+ "translation": "Aucun événement à venir.",
3823
+ "origin": "machine"
3824
+ },
3825
+ "h_e84d8431b504": {
3826
+ "source": "{n, plural, one {for # day} other {for # days}}",
3827
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
3828
+ "origin": "machine"
3829
+ },
3830
+ "h_6c3b1b0caef6": {
3831
+ "source": "{n, plural, one {per day} other {every # days}}",
3832
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
3833
+ "origin": "machine"
3834
+ },
3835
+ "h_0e9096b5e692": {
3836
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
3837
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
3838
+ "origin": "machine"
3839
+ },
3840
+ "h_318d1043dc09": {
3841
+ "source": "{n, plural, one {per week} other {every # weeks}}",
3842
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
3843
+ "origin": "machine"
3844
+ },
3845
+ "h_f01e3692c61a": {
3846
+ "source": "{n, plural, one {for # month} other {for # months}}",
3847
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
3848
+ "origin": "machine"
3849
+ },
3850
+ "h_c8b9ca77129d": {
3851
+ "source": "{n, plural, one {per month} other {every # months}}",
3852
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
3853
+ "origin": "machine"
3854
+ },
3855
+ "h_bddf6b6e5d29": {
3856
+ "source": "{n, plural, one {for # year} other {for # years}}",
3857
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
3858
+ "origin": "machine"
3859
+ },
3860
+ "h_55db55f1bd29": {
3861
+ "source": "{n, plural, one {per year} other {every # years}}",
3862
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
3863
+ "origin": "machine"
3764
3864
  }
3765
3865
  }
3766
3866
  }
@@ -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);
@@ -3603,6 +3603,106 @@
3603
3603
  "source": "One-time payment",
3604
3604
  "translation": "Paiement unique",
3605
3605
  "origin": "one-app:payment-links-mobile:pay-links.mob.select-payment-link-type.single-use.title"
3606
+ },
3607
+ "h_14ed0860418c": {
3608
+ "source": "No Time Limit",
3609
+ "translation": "Sans limite de durée",
3610
+ "origin": "machine"
3611
+ },
3612
+ "h_e830e1381ba6": {
3613
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
3614
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
3615
+ "origin": "machine"
3616
+ },
3617
+ "h_a7ccfb719652": {
3618
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
3619
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
3620
+ "origin": "machine"
3621
+ },
3622
+ "h_5e4247c32900": {
3623
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
3624
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
3625
+ "origin": "machine"
3626
+ },
3627
+ "h_51d1d606ee9b": {
3628
+ "source": "Members couldn't be loaded.",
3629
+ "translation": "Impossible de charger les membres.",
3630
+ "origin": "machine"
3631
+ },
3632
+ "h_8f615630c7a8": {
3633
+ "source": "Search {count} members",
3634
+ "translation": "Rechercher des membres ({count})",
3635
+ "origin": "machine"
3636
+ },
3637
+ "h_bbeb7a9f223c": {
3638
+ "source": "Sign in to follow members.",
3639
+ "translation": "Connectez-vous pour suivre des membres.",
3640
+ "origin": "machine"
3641
+ },
3642
+ "h_4e520e13547e": {
3643
+ "source": "Couldn't update. Try again.",
3644
+ "translation": "Mise à jour impossible. Réessayez.",
3645
+ "origin": "machine"
3646
+ },
3647
+ "h_1b1e1de382f6": {
3648
+ "source": "You can cancel this plan yourself.",
3649
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
3650
+ "origin": "machine"
3651
+ },
3652
+ "h_af9f9729838a": {
3653
+ "source": "Limit: {n} per member.",
3654
+ "translation": "Limite : {n} par membre.",
3655
+ "origin": "machine"
3656
+ },
3657
+ "h_03df3dddc156": {
3658
+ "source": "You can choose a later start date.",
3659
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
3660
+ "origin": "machine"
3661
+ },
3662
+ "h_cb7c8c83bd90": {
3663
+ "source": "No upcoming events.",
3664
+ "translation": "Aucun événement à venir.",
3665
+ "origin": "machine"
3666
+ },
3667
+ "h_e84d8431b504": {
3668
+ "source": "{n, plural, one {for # day} other {for # days}}",
3669
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
3670
+ "origin": "machine"
3671
+ },
3672
+ "h_6c3b1b0caef6": {
3673
+ "source": "{n, plural, one {per day} other {every # days}}",
3674
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
3675
+ "origin": "machine"
3676
+ },
3677
+ "h_0e9096b5e692": {
3678
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
3679
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
3680
+ "origin": "machine"
3681
+ },
3682
+ "h_318d1043dc09": {
3683
+ "source": "{n, plural, one {per week} other {every # weeks}}",
3684
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
3685
+ "origin": "machine"
3686
+ },
3687
+ "h_f01e3692c61a": {
3688
+ "source": "{n, plural, one {for # month} other {for # months}}",
3689
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
3690
+ "origin": "machine"
3691
+ },
3692
+ "h_c8b9ca77129d": {
3693
+ "source": "{n, plural, one {per month} other {every # months}}",
3694
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
3695
+ "origin": "machine"
3696
+ },
3697
+ "h_bddf6b6e5d29": {
3698
+ "source": "{n, plural, one {for # year} other {for # years}}",
3699
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
3700
+ "origin": "machine"
3701
+ },
3702
+ "h_55db55f1bd29": {
3703
+ "source": "{n, plural, one {per year} other {every # years}}",
3704
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
3705
+ "origin": "machine"
3606
3706
  }
3607
3707
  }
3608
3708
  }
@@ -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);
@@ -4192,6 +4192,106 @@
4192
4192
  "source": "Unpaid",
4193
4193
  "translation": "Non payée",
4194
4194
  "origin": "one-app:wix-one-app-ecom-platform:merchant.dashboard.orderWidget.filter.unpaid"
4195
+ },
4196
+ "h_14ed0860418c": {
4197
+ "source": "No Time Limit",
4198
+ "translation": "Sans limite de durée",
4199
+ "origin": "machine"
4200
+ },
4201
+ "h_e830e1381ba6": {
4202
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
4203
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
4204
+ "origin": "machine"
4205
+ },
4206
+ "h_a7ccfb719652": {
4207
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
4208
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
4209
+ "origin": "machine"
4210
+ },
4211
+ "h_5e4247c32900": {
4212
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
4213
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
4214
+ "origin": "machine"
4215
+ },
4216
+ "h_51d1d606ee9b": {
4217
+ "source": "Members couldn't be loaded.",
4218
+ "translation": "Impossible de charger les membres.",
4219
+ "origin": "machine"
4220
+ },
4221
+ "h_8f615630c7a8": {
4222
+ "source": "Search {count} members",
4223
+ "translation": "Rechercher des membres ({count})",
4224
+ "origin": "machine"
4225
+ },
4226
+ "h_bbeb7a9f223c": {
4227
+ "source": "Sign in to follow members.",
4228
+ "translation": "Connectez-vous pour suivre des membres.",
4229
+ "origin": "machine"
4230
+ },
4231
+ "h_4e520e13547e": {
4232
+ "source": "Couldn't update. Try again.",
4233
+ "translation": "Mise à jour impossible. Réessayez.",
4234
+ "origin": "machine"
4235
+ },
4236
+ "h_1b1e1de382f6": {
4237
+ "source": "You can cancel this plan yourself.",
4238
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
4239
+ "origin": "machine"
4240
+ },
4241
+ "h_af9f9729838a": {
4242
+ "source": "Limit: {n} per member.",
4243
+ "translation": "Limite : {n} par membre.",
4244
+ "origin": "machine"
4245
+ },
4246
+ "h_03df3dddc156": {
4247
+ "source": "You can choose a later start date.",
4248
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
4249
+ "origin": "machine"
4250
+ },
4251
+ "h_cb7c8c83bd90": {
4252
+ "source": "No upcoming events.",
4253
+ "translation": "Aucun événement à venir.",
4254
+ "origin": "machine"
4255
+ },
4256
+ "h_e84d8431b504": {
4257
+ "source": "{n, plural, one {for # day} other {for # days}}",
4258
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
4259
+ "origin": "machine"
4260
+ },
4261
+ "h_6c3b1b0caef6": {
4262
+ "source": "{n, plural, one {per day} other {every # days}}",
4263
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
4264
+ "origin": "machine"
4265
+ },
4266
+ "h_0e9096b5e692": {
4267
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
4268
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
4269
+ "origin": "machine"
4270
+ },
4271
+ "h_318d1043dc09": {
4272
+ "source": "{n, plural, one {per week} other {every # weeks}}",
4273
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
4274
+ "origin": "machine"
4275
+ },
4276
+ "h_f01e3692c61a": {
4277
+ "source": "{n, plural, one {for # month} other {for # months}}",
4278
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
4279
+ "origin": "machine"
4280
+ },
4281
+ "h_c8b9ca77129d": {
4282
+ "source": "{n, plural, one {per month} other {every # months}}",
4283
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
4284
+ "origin": "machine"
4285
+ },
4286
+ "h_bddf6b6e5d29": {
4287
+ "source": "{n, plural, one {for # year} other {for # years}}",
4288
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
4289
+ "origin": "machine"
4290
+ },
4291
+ "h_55db55f1bd29": {
4292
+ "source": "{n, plural, one {per year} other {every # years}}",
4293
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
4294
+ "origin": "machine"
4195
4295
  }
4196
4296
  }
4197
4297
  }