@wix/himalaya-cli 0.1786.0 → 0.1787.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 (66) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +6 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +8 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +18 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +11 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +11 -0
  6. package/dist/cli.mjs +920 -738
  7. package/guides/app-config.md +30 -0
  8. package/guides/component-reference.json +1 -1
  9. package/guides/component-reference.md +8 -0
  10. package/guides/himi-json-output.md +2 -0
  11. package/guides/push-cli-onboarding.md +18 -0
  12. package/guides/qa-builds.md +22 -9
  13. package/package.json +2 -2
  14. package/templates/beauty-salon/tokens.json +2 -1
  15. package/templates/branded-lite/dev/index.ts +1719 -452
  16. package/templates/branded-lite/l10n/ar.json +36 -16
  17. package/templates/branded-lite/l10n/cs.json +36 -16
  18. package/templates/branded-lite/l10n/da.json +36 -16
  19. package/templates/branded-lite/l10n/de.json +36 -16
  20. package/templates/branded-lite/l10n/el.json +36 -16
  21. package/templates/branded-lite/l10n/en.json +42 -12
  22. package/templates/branded-lite/l10n/es.json +36 -16
  23. package/templates/branded-lite/l10n/fi.json +36 -16
  24. package/templates/branded-lite/l10n/fr.json +36 -16
  25. package/templates/branded-lite/l10n/he.json +30 -13
  26. package/templates/branded-lite/l10n/hu.json +36 -16
  27. package/templates/branded-lite/l10n/id.json +36 -16
  28. package/templates/branded-lite/l10n/it.json +36 -16
  29. package/templates/branded-lite/l10n/ja.json +36 -16
  30. package/templates/branded-lite/l10n/ko.json +36 -16
  31. package/templates/branded-lite/l10n/lt.json +36 -16
  32. package/templates/branded-lite/l10n/nl.json +36 -16
  33. package/templates/branded-lite/l10n/no.json +36 -16
  34. package/templates/branded-lite/l10n/pl.json +36 -16
  35. package/templates/branded-lite/l10n/pt.json +36 -16
  36. package/templates/branded-lite/l10n/ru.json +36 -16
  37. package/templates/branded-lite/l10n/sv.json +36 -16
  38. package/templates/branded-lite/l10n/th.json +36 -16
  39. package/templates/branded-lite/l10n/tr.json +36 -16
  40. package/templates/branded-lite/l10n/uk.json +36 -16
  41. package/templates/branded-lite/l10n/vi.json +36 -16
  42. package/templates/branded-lite/l10n/zh.json +36 -16
  43. package/templates/branded-lite/tier5-src/_shared/inbox-rooms.ts +10 -5
  44. package/templates/branded-lite/tier5-src/_shared/inbox-search.ts +1 -1
  45. package/templates/branded-lite/tier5-src/himi-branded-lite-inbox/index.ts +1 -1
  46. package/templates/branded-lite/tokens.json +3 -2
  47. package/templates/brandy/dev/member-screens.ts +7546 -5432
  48. package/templates/brandy/tier5-src/_shared/inbox-rooms.ts +10 -5
  49. package/templates/brandy/tier5-src/_shared/inbox-search.ts +1 -1
  50. package/templates/brandy/tier5-src/himi-branded-lite-inbox/index.ts +1 -1
  51. package/templates/brandy/tokens.json +5 -0
  52. package/templates/community-club/tokens.json +2 -1
  53. package/templates/conference/tier5-src/_shared/inbox-rooms.ts +10 -5
  54. package/templates/events-meetups/tokens.json +2 -1
  55. package/templates/fitness-gym/tier5-src/_shared/inbox-rooms.ts +10 -5
  56. package/templates/gym-fitness/tokens.json +2 -1
  57. package/templates/medical-services/tier5-src/_shared/inbox-rooms.ts +10 -5
  58. package/templates/nonprofit-cause/tokens.json +2 -1
  59. package/templates/personal-fitness-trainer/tier5-src/_shared/inbox-rooms.ts +10 -5
  60. package/templates/podcast-creator/tokens.json +2 -1
  61. package/templates/portfolio-creative/tokens.json +2 -1
  62. package/templates/restaurant/tokens.json +2 -1
  63. package/templates/retail-store/tokens.json +2 -1
  64. package/templates/salon-spa/tier5-src/_shared/inbox-rooms.ts +10 -5
  65. package/templates/wholesale-store/tier5-src/_shared/inbox-rooms.ts +10 -5
  66. package/templates/yoga-studio/tokens.json +2 -1
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -107,7 +107,7 @@ export function readSearch(response: unknown, options: ReadSearchOptions): Searc
107
107
  screenId: room?.screenId ?? (business ? BUSINESS_SCREEN : "himi_chat_thread"),
108
108
  kind: room ? room.kind : business ? "" : "chatroom",
109
109
  photo: room?.photo ?? "",
110
- noPhoto: !room?.photo,
110
+ noPhoto: room ? room.noPhoto : !business,
111
111
  initial: room?.initial ?? (title[0] ?? "#").toUpperCase(),
112
112
  });
113
113
  }
@@ -85,7 +85,7 @@ interface S extends LoadFlags {
85
85
 
86
86
  const PREFIX = "inbox";
87
87
  const sample = (base: Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "initial">): Row =>
88
- strip(completeRow({ ...base, photo: "", unread: false, unreadCount: 0, dateLabel: "", isArchived: false, isPrivate: false, at: 0 }));
88
+ strip(completeRow({ ...base, business: base.screenId === "himi_business_chat", photo: "", unread: false, unreadCount: 0, dateLabel: "", isArchived: false, isPrivate: false, at: 0 }));
89
89
  const SAMPLES: Row[] = [
90
90
  sample({ id: "sample-support", title: "Support", subtitle: "Hi! Let us know how we can help.", screenId: "himi_business_chat", kind: "", initial: "S" }),
91
91
  sample({ id: "sample-member", title: "A member", subtitle: "Welcome 👋 Thanks for joining us!", screenId: "himi_chat_thread", kind: "chatroom", initial: "A" }),
@@ -149,6 +149,11 @@
149
149
  "weight": 700,
150
150
  "line": 1.2
151
151
  },
152
+ "screenTitle": {
153
+ "size": 24,
154
+ "weight": 700,
155
+ "line": 1.2
156
+ },
152
157
  "pricingSection": {
153
158
  "size": 14,
154
159
  "weight": 700,
@@ -185,7 +185,7 @@
185
185
  "size": 14,
186
186
  "weight": 400,
187
187
  "line": 1.4,
188
- "letterSpacing": 1
188
+ "letterSpacing": 0
189
189
  },
190
190
  "caption": {
191
191
  "size": 13,
@@ -225,6 +225,7 @@
225
225
  "sm": 18,
226
226
  "md": 24,
227
227
  "lg": 12,
228
+ "full": 999,
228
229
  "pill": 28
229
230
  },
230
231
  "kit": {
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -175,7 +175,7 @@
175
175
  "size": 14,
176
176
  "weight": 400,
177
177
  "line": 1.4,
178
- "letterSpacing": 1
178
+ "letterSpacing": 0
179
179
  },
180
180
  "caption": {
181
181
  "size": 13,
@@ -212,6 +212,7 @@
212
212
  "sm": 12,
213
213
  "md": 18,
214
214
  "lg": 12,
215
+ "full": 999,
215
216
  "pill": 26
216
217
  },
217
218
  "kit": {
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -181,7 +181,7 @@
181
181
  "size": 14,
182
182
  "weight": 400,
183
183
  "line": 1.4,
184
- "letterSpacing": 1
184
+ "letterSpacing": 0
185
185
  },
186
186
  "caption": {
187
187
  "size": 12,
@@ -221,6 +221,7 @@
221
221
  "sm": 0,
222
222
  "md": 0,
223
223
  "lg": 12,
224
+ "full": 999,
224
225
  "pill": 0
225
226
  },
226
227
  "kit": {
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -175,7 +175,7 @@
175
175
  "size": 14,
176
176
  "weight": 400,
177
177
  "line": 1.4,
178
- "letterSpacing": 1
178
+ "letterSpacing": 0
179
179
  },
180
180
  "caption": {
181
181
  "size": 12,
@@ -212,6 +212,7 @@
212
212
  "sm": 8,
213
213
  "md": 12,
214
214
  "lg": 12,
215
+ "full": 999,
215
216
  "pill": 20
216
217
  },
217
218
  "kit": {
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -181,7 +181,7 @@
181
181
  "size": 14,
182
182
  "weight": 400,
183
183
  "line": 1.4,
184
- "letterSpacing": 1
184
+ "letterSpacing": 0
185
185
  },
186
186
  "caption": {
187
187
  "size": 12,
@@ -221,6 +221,7 @@
221
221
  "sm": 10,
222
222
  "md": 14,
223
223
  "lg": 12,
224
+ "full": 999,
224
225
  "pill": 22
225
226
  },
226
227
  "kit": {
@@ -181,7 +181,7 @@
181
181
  "size": 14,
182
182
  "weight": 400,
183
183
  "line": 1.4,
184
- "letterSpacing": 1
184
+ "letterSpacing": 0
185
185
  },
186
186
  "caption": {
187
187
  "size": 12,
@@ -221,6 +221,7 @@
221
221
  "sm": 2,
222
222
  "md": 4,
223
223
  "lg": 12,
224
+ "full": 999,
224
225
  "pill": 4
225
226
  },
226
227
  "kit": {
@@ -181,7 +181,7 @@
181
181
  "size": 14,
182
182
  "weight": 400,
183
183
  "line": 1.4,
184
- "letterSpacing": 1
184
+ "letterSpacing": 0
185
185
  },
186
186
  "caption": {
187
187
  "size": 12,
@@ -221,6 +221,7 @@
221
221
  "sm": 10,
222
222
  "md": 14,
223
223
  "lg": 12,
224
+ "full": 999,
224
225
  "pill": 22
225
226
  },
226
227
  "kit": {
@@ -175,7 +175,7 @@
175
175
  "size": 14,
176
176
  "weight": 400,
177
177
  "line": 1.4,
178
- "letterSpacing": 1
178
+ "letterSpacing": 0
179
179
  },
180
180
  "caption": {
181
181
  "size": 12,
@@ -212,6 +212,7 @@
212
212
  "sm": 8,
213
213
  "md": 12,
214
214
  "lg": 12,
215
+ "full": 999,
215
216
  "pill": 20
216
217
  },
217
218
  "kit": {
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -27,7 +27,10 @@ export interface InboxRow {
27
27
  /** `chatroom` makes the thread use `id` as the room instead of resolving it as a member id. */
28
28
  kind: "chatroom" | "";
29
29
  photo: string;
30
- /** No photo: the screen draws the initial instead (`!photo`, kept with the photo by completeRow). */
30
+ /** The business's own room. Set from the room, never from `screenId`, which a host may route elsewhere. */
31
+ business: boolean;
32
+ /** No photo on a member's room: the screen draws grey initials. Always false for the business, which keeps the solid
33
+ * accent avatar (kept with the photo by completeRow). */
31
34
  noPhoto: boolean;
32
35
  initial: string;
33
36
  /** Has unread messages, or the member marked it unread. */
@@ -61,14 +64,15 @@ export const unreadCountText = (count: number): string => (count > MAX_COUNT ? `
61
64
 
62
65
  /** Everything that follows from a row's base fields. The one place a flag is derived, so a row that changes
63
66
  * (marked read, archived) can never carry a flag that disagrees with its base fields. */
64
- export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
67
+ export type RowBase = Pick<InboxRow, "id" | "title" | "subtitle" | "screenId" | "kind" | "business" | "photo" | "initial" | "unread" | "unreadCount" | "dateLabel" | "isArchived" | "isPrivate" | "at">;
65
68
  export function completeRow(base: RowBase): InboxRow {
66
69
  const unreadText = unreadCountText(base.unreadCount);
67
70
  const showCount = base.unread && unreadText !== "";
68
71
  const showDot = base.unread && !showCount;
69
72
  return {
70
73
  ...base,
71
- noPhoto: !base.photo,
74
+ // Grey initials are for members: the business row keeps the solid accent avatar, photo or not.
75
+ noPhoto: !base.photo && !base.business,
72
76
  unreadDot: base.unread ? "●" : "",
73
77
  unreadText,
74
78
  showCount, hideCount: !showCount, showDot, hideDot: !showDot,
@@ -80,8 +84,8 @@ export function completeRow(base: RowBase): InboxRow {
80
84
 
81
85
  /** A row's read state changed: `count` is the server's count (0 = unknown or none). */
82
86
  export function withUnread(row: InboxRow, unread: boolean, count: number): InboxRow {
83
- const { id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
84
- return completeRow({ id, title, subtitle, screenId, kind, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
87
+ const { id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at } = row;
88
+ return completeRow({ id, title, subtitle, screenId, kind, business, photo, initial, dateLabel, isArchived, isPrivate, at, unread, unreadCount: unread ? count : 0 });
85
89
  }
86
90
 
87
91
  /** Last-activity label in the device's zone: today → the time, yesterday → [yesterday] (the caller passes the localised
@@ -138,6 +142,7 @@ export function inboxRows(rooms: unknown[], fallbackTitle: string, options: Inbo
138
142
  subtitle: text(last.summary),
139
143
  screenId: business ? BUSINESS_SCREEN : "himi_chat_thread",
140
144
  kind: business ? "" : "chatroom",
145
+ business,
141
146
  photo: text(object(object(room.displayData).image).url),
142
147
  initial: (title[0] ?? "#").toUpperCase(),
143
148
  unread: count > 0 || unreadIds?.has(id) === true,
@@ -189,7 +189,7 @@
189
189
  "size": 14,
190
190
  "weight": 400,
191
191
  "line": 1.4,
192
- "letterSpacing": 1
192
+ "letterSpacing": 0
193
193
  },
194
194
  "caption": {
195
195
  "size": 13,
@@ -229,6 +229,7 @@
229
229
  "sm": 12,
230
230
  "md": 16,
231
231
  "lg": 12,
232
+ "full": 999,
232
233
  "pill": 22
233
234
  },
234
235
  "kit": {