@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);
@@ -9093,6 +9093,106 @@
9093
9093
  "source": "Pick one file at a time.",
9094
9094
  "translation": "Sélectionnez un seul fichier à la fois.",
9095
9095
  "origin": "machine"
9096
+ },
9097
+ "h_14ed0860418c": {
9098
+ "source": "No Time Limit",
9099
+ "translation": "Sans limite de durée",
9100
+ "origin": "machine"
9101
+ },
9102
+ "h_e830e1381ba6": {
9103
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
9104
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
9105
+ "origin": "machine"
9106
+ },
9107
+ "h_a7ccfb719652": {
9108
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
9109
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
9110
+ "origin": "machine"
9111
+ },
9112
+ "h_5e4247c32900": {
9113
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
9114
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
9115
+ "origin": "machine"
9116
+ },
9117
+ "h_51d1d606ee9b": {
9118
+ "source": "Members couldn't be loaded.",
9119
+ "translation": "Impossible de charger les membres.",
9120
+ "origin": "machine"
9121
+ },
9122
+ "h_8f615630c7a8": {
9123
+ "source": "Search {count} members",
9124
+ "translation": "Rechercher des membres ({count})",
9125
+ "origin": "machine"
9126
+ },
9127
+ "h_bbeb7a9f223c": {
9128
+ "source": "Sign in to follow members.",
9129
+ "translation": "Connectez-vous pour suivre des membres.",
9130
+ "origin": "machine"
9131
+ },
9132
+ "h_4e520e13547e": {
9133
+ "source": "Couldn't update. Try again.",
9134
+ "translation": "Mise à jour impossible. Réessayez.",
9135
+ "origin": "machine"
9136
+ },
9137
+ "h_1b1e1de382f6": {
9138
+ "source": "You can cancel this plan yourself.",
9139
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
9140
+ "origin": "machine"
9141
+ },
9142
+ "h_af9f9729838a": {
9143
+ "source": "Limit: {n} per member.",
9144
+ "translation": "Limite : {n} par membre.",
9145
+ "origin": "machine"
9146
+ },
9147
+ "h_03df3dddc156": {
9148
+ "source": "You can choose a later start date.",
9149
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
9150
+ "origin": "machine"
9151
+ },
9152
+ "h_cb7c8c83bd90": {
9153
+ "source": "No upcoming events.",
9154
+ "translation": "Aucun événement à venir.",
9155
+ "origin": "machine"
9156
+ },
9157
+ "h_e84d8431b504": {
9158
+ "source": "{n, plural, one {for # day} other {for # days}}",
9159
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
9160
+ "origin": "machine"
9161
+ },
9162
+ "h_6c3b1b0caef6": {
9163
+ "source": "{n, plural, one {per day} other {every # days}}",
9164
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
9165
+ "origin": "machine"
9166
+ },
9167
+ "h_0e9096b5e692": {
9168
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
9169
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
9170
+ "origin": "machine"
9171
+ },
9172
+ "h_318d1043dc09": {
9173
+ "source": "{n, plural, one {per week} other {every # weeks}}",
9174
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
9175
+ "origin": "machine"
9176
+ },
9177
+ "h_f01e3692c61a": {
9178
+ "source": "{n, plural, one {for # month} other {for # months}}",
9179
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
9180
+ "origin": "machine"
9181
+ },
9182
+ "h_c8b9ca77129d": {
9183
+ "source": "{n, plural, one {per month} other {every # months}}",
9184
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
9185
+ "origin": "machine"
9186
+ },
9187
+ "h_bddf6b6e5d29": {
9188
+ "source": "{n, plural, one {for # year} other {for # years}}",
9189
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
9190
+ "origin": "machine"
9191
+ },
9192
+ "h_55db55f1bd29": {
9193
+ "source": "{n, plural, one {per year} other {every # years}}",
9194
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
9195
+ "origin": "machine"
9096
9196
  }
9097
9197
  }
9098
9198
  }
@@ -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);
@@ -3313,6 +3313,106 @@
3313
3313
  "source": "Expanded",
3314
3314
  "translation": "Développé",
3315
3315
  "origin": "machine"
3316
+ },
3317
+ "h_14ed0860418c": {
3318
+ "source": "No Time Limit",
3319
+ "translation": "Sans limite de durée",
3320
+ "origin": "machine"
3321
+ },
3322
+ "h_e830e1381ba6": {
3323
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
3324
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
3325
+ "origin": "machine"
3326
+ },
3327
+ "h_a7ccfb719652": {
3328
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
3329
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
3330
+ "origin": "machine"
3331
+ },
3332
+ "h_5e4247c32900": {
3333
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
3334
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
3335
+ "origin": "machine"
3336
+ },
3337
+ "h_51d1d606ee9b": {
3338
+ "source": "Members couldn't be loaded.",
3339
+ "translation": "Impossible de charger les membres.",
3340
+ "origin": "machine"
3341
+ },
3342
+ "h_8f615630c7a8": {
3343
+ "source": "Search {count} members",
3344
+ "translation": "Rechercher des membres ({count})",
3345
+ "origin": "machine"
3346
+ },
3347
+ "h_bbeb7a9f223c": {
3348
+ "source": "Sign in to follow members.",
3349
+ "translation": "Connectez-vous pour suivre des membres.",
3350
+ "origin": "machine"
3351
+ },
3352
+ "h_4e520e13547e": {
3353
+ "source": "Couldn't update. Try again.",
3354
+ "translation": "Mise à jour impossible. Réessayez.",
3355
+ "origin": "machine"
3356
+ },
3357
+ "h_1b1e1de382f6": {
3358
+ "source": "You can cancel this plan yourself.",
3359
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
3360
+ "origin": "machine"
3361
+ },
3362
+ "h_af9f9729838a": {
3363
+ "source": "Limit: {n} per member.",
3364
+ "translation": "Limite : {n} par membre.",
3365
+ "origin": "machine"
3366
+ },
3367
+ "h_03df3dddc156": {
3368
+ "source": "You can choose a later start date.",
3369
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
3370
+ "origin": "machine"
3371
+ },
3372
+ "h_cb7c8c83bd90": {
3373
+ "source": "No upcoming events.",
3374
+ "translation": "Aucun événement à venir.",
3375
+ "origin": "machine"
3376
+ },
3377
+ "h_e84d8431b504": {
3378
+ "source": "{n, plural, one {for # day} other {for # days}}",
3379
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
3380
+ "origin": "machine"
3381
+ },
3382
+ "h_6c3b1b0caef6": {
3383
+ "source": "{n, plural, one {per day} other {every # days}}",
3384
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
3385
+ "origin": "machine"
3386
+ },
3387
+ "h_0e9096b5e692": {
3388
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
3389
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
3390
+ "origin": "machine"
3391
+ },
3392
+ "h_318d1043dc09": {
3393
+ "source": "{n, plural, one {per week} other {every # weeks}}",
3394
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
3395
+ "origin": "machine"
3396
+ },
3397
+ "h_f01e3692c61a": {
3398
+ "source": "{n, plural, one {for # month} other {for # months}}",
3399
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
3400
+ "origin": "machine"
3401
+ },
3402
+ "h_c8b9ca77129d": {
3403
+ "source": "{n, plural, one {per month} other {every # months}}",
3404
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
3405
+ "origin": "machine"
3406
+ },
3407
+ "h_bddf6b6e5d29": {
3408
+ "source": "{n, plural, one {for # year} other {for # years}}",
3409
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
3410
+ "origin": "machine"
3411
+ },
3412
+ "h_55db55f1bd29": {
3413
+ "source": "{n, plural, one {per year} other {every # years}}",
3414
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
3415
+ "origin": "machine"
3316
3416
  }
3317
3417
  }
3318
3418
  }
@@ -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);
@@ -3173,6 +3173,106 @@
3173
3173
  "source": "Unpaid",
3174
3174
  "translation": "Non payée",
3175
3175
  "origin": "one-app:wix-one-app-ecom-platform:merchant.dashboard.orderWidget.filter.unpaid"
3176
+ },
3177
+ "h_14ed0860418c": {
3178
+ "source": "No Time Limit",
3179
+ "translation": "Sans limite de durée",
3180
+ "origin": "machine"
3181
+ },
3182
+ "h_e830e1381ba6": {
3183
+ "source": "{n, plural, one {# minute ago} other {# minutes ago}}",
3184
+ "translation": "{n, plural, one {il y a # minute} other {il y a # minutes}}",
3185
+ "origin": "machine"
3186
+ },
3187
+ "h_a7ccfb719652": {
3188
+ "source": "{n, plural, one {# hour ago} other {# hours ago}}",
3189
+ "translation": "{n, plural, one {il y a # heure} other {il y a # heures}}",
3190
+ "origin": "machine"
3191
+ },
3192
+ "h_5e4247c32900": {
3193
+ "source": "{n, plural, one {# day ago} other {# days ago}}",
3194
+ "translation": "{n, plural, one {il y a # jour} other {il y a # jours}}",
3195
+ "origin": "machine"
3196
+ },
3197
+ "h_51d1d606ee9b": {
3198
+ "source": "Members couldn't be loaded.",
3199
+ "translation": "Impossible de charger les membres.",
3200
+ "origin": "machine"
3201
+ },
3202
+ "h_8f615630c7a8": {
3203
+ "source": "Search {count} members",
3204
+ "translation": "Rechercher des membres ({count})",
3205
+ "origin": "machine"
3206
+ },
3207
+ "h_bbeb7a9f223c": {
3208
+ "source": "Sign in to follow members.",
3209
+ "translation": "Connectez-vous pour suivre des membres.",
3210
+ "origin": "machine"
3211
+ },
3212
+ "h_4e520e13547e": {
3213
+ "source": "Couldn't update. Try again.",
3214
+ "translation": "Mise à jour impossible. Réessayez.",
3215
+ "origin": "machine"
3216
+ },
3217
+ "h_1b1e1de382f6": {
3218
+ "source": "You can cancel this plan yourself.",
3219
+ "translation": "Vous pouvez annuler ce forfait vous-même.",
3220
+ "origin": "machine"
3221
+ },
3222
+ "h_af9f9729838a": {
3223
+ "source": "Limit: {n} per member.",
3224
+ "translation": "Limite : {n} par membre.",
3225
+ "origin": "machine"
3226
+ },
3227
+ "h_03df3dddc156": {
3228
+ "source": "You can choose a later start date.",
3229
+ "translation": "Vous pouvez choisir une date de début ultérieure.",
3230
+ "origin": "machine"
3231
+ },
3232
+ "h_cb7c8c83bd90": {
3233
+ "source": "No upcoming events.",
3234
+ "translation": "Aucun événement à venir.",
3235
+ "origin": "machine"
3236
+ },
3237
+ "h_e84d8431b504": {
3238
+ "source": "{n, plural, one {for # day} other {for # days}}",
3239
+ "translation": "{n, plural, one {pendant # jour} other {pendant # jours}}",
3240
+ "origin": "machine"
3241
+ },
3242
+ "h_6c3b1b0caef6": {
3243
+ "source": "{n, plural, one {per day} other {every # days}}",
3244
+ "translation": "{n, plural, one {par jour} other {tous les # jours}}",
3245
+ "origin": "machine"
3246
+ },
3247
+ "h_0e9096b5e692": {
3248
+ "source": "{n, plural, one {for # week} other {for # weeks}}",
3249
+ "translation": "{n, plural, one {pendant # semaine} other {pendant # semaines}}",
3250
+ "origin": "machine"
3251
+ },
3252
+ "h_318d1043dc09": {
3253
+ "source": "{n, plural, one {per week} other {every # weeks}}",
3254
+ "translation": "{n, plural, one {par semaine} other {toutes les # semaines}}",
3255
+ "origin": "machine"
3256
+ },
3257
+ "h_f01e3692c61a": {
3258
+ "source": "{n, plural, one {for # month} other {for # months}}",
3259
+ "translation": "{n, plural, one {pendant # mois} other {pendant # mois}}",
3260
+ "origin": "machine"
3261
+ },
3262
+ "h_c8b9ca77129d": {
3263
+ "source": "{n, plural, one {per month} other {every # months}}",
3264
+ "translation": "{n, plural, one {par mois} other {tous les # mois}}",
3265
+ "origin": "machine"
3266
+ },
3267
+ "h_bddf6b6e5d29": {
3268
+ "source": "{n, plural, one {for # year} other {for # years}}",
3269
+ "translation": "{n, plural, one {pendant # an} other {pendant # ans}}",
3270
+ "origin": "machine"
3271
+ },
3272
+ "h_55db55f1bd29": {
3273
+ "source": "{n, plural, one {per year} other {every # years}}",
3274
+ "translation": "{n, plural, one {par an} other {tous les # ans}}",
3275
+ "origin": "machine"
3176
3276
  }
3177
3277
  }
3178
3278
  }
@@ -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);