@wix/himalaya-cli 0.1952.0 → 0.1954.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 (108) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +2 -1
  3. package/dist/cli.mjs +88 -27
  4. package/guides/one-app-section-mappings.md +3 -3
  5. package/guides/one-app-to-himi-app.md +3 -3
  6. package/package.json +2 -2
  7. package/templates/bare-fashion/tier5-src/_shared/engine-intl.ts +6 -0
  8. package/templates/beauty-salon/tier5-src/_shared/agenda-calendar.ts +95 -0
  9. package/templates/beauty-salon/tier5-src/_shared/booking-session.ts +10 -0
  10. package/templates/beauty-salon/tier5-src/_shared/class-sessions.ts +113 -0
  11. package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +6 -0
  12. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  13. package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +6 -0
  14. package/templates/beauty-salon-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  15. package/templates/branded-lite/l10n/ar.json +5 -0
  16. package/templates/branded-lite/l10n/cs.json +5 -0
  17. package/templates/branded-lite/l10n/da.json +5 -0
  18. package/templates/branded-lite/l10n/de.json +5 -0
  19. package/templates/branded-lite/l10n/el.json +5 -0
  20. package/templates/branded-lite/l10n/es.json +5 -0
  21. package/templates/branded-lite/l10n/fi.json +5 -0
  22. package/templates/branded-lite/l10n/fr.json +5 -0
  23. package/templates/branded-lite/l10n/he.json +4 -0
  24. package/templates/branded-lite/l10n/hu.json +5 -0
  25. package/templates/branded-lite/l10n/id.json +5 -0
  26. package/templates/branded-lite/l10n/it.json +5 -0
  27. package/templates/branded-lite/l10n/ja.json +5 -0
  28. package/templates/branded-lite/l10n/ko.json +5 -0
  29. package/templates/branded-lite/l10n/lt.json +5 -0
  30. package/templates/branded-lite/l10n/nl.json +5 -0
  31. package/templates/branded-lite/l10n/no.json +5 -0
  32. package/templates/branded-lite/l10n/pl.json +5 -0
  33. package/templates/branded-lite/l10n/pt.json +5 -0
  34. package/templates/branded-lite/l10n/ru.json +5 -0
  35. package/templates/branded-lite/l10n/sv.json +5 -0
  36. package/templates/branded-lite/l10n/th.json +5 -0
  37. package/templates/branded-lite/l10n/tr.json +5 -0
  38. package/templates/branded-lite/l10n/uk.json +5 -0
  39. package/templates/branded-lite/l10n/vi.json +5 -0
  40. package/templates/branded-lite/l10n/zh.json +5 -0
  41. package/templates/branded-lite/recipes/class-calendar.json +707 -0
  42. package/templates/branded-lite/recipes/upcoming-sessions.json +280 -0
  43. package/templates/branded-lite/tier5-src/_shared/agenda-calendar.ts +95 -0
  44. package/templates/branded-lite/tier5-src/_shared/booking-session.ts +10 -0
  45. package/templates/branded-lite/tier5-src/_shared/class-calendar-section.ts +280 -0
  46. package/templates/branded-lite/tier5-src/_shared/class-sessions.ts +113 -0
  47. package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +6 -0
  48. package/templates/branded-lite/tier5-src/_shared/upcoming-sessions-section.ts +121 -0
  49. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  50. package/templates/brandy/tier5-src/_shared/engine-intl.ts +6 -0
  51. package/templates/community-club/tier5-src/_shared/engine-intl.ts +6 -0
  52. package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +6 -0
  53. package/templates/community-club-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  54. package/templates/conference/tier5-src/_shared/engine-intl.ts +6 -0
  55. package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +6 -0
  56. package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +6 -0
  57. package/templates/events-meetups-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  58. package/templates/fitness-gym/tier5-src/_shared/agenda-calendar.ts +95 -0
  59. package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +10 -0
  60. package/templates/fitness-gym/tier5-src/_shared/class-sessions.ts +113 -0
  61. package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +6 -0
  62. package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  63. package/templates/gym-fitness/tier5-src/_shared/agenda-calendar.ts +95 -0
  64. package/templates/gym-fitness/tier5-src/_shared/booking-session.ts +10 -0
  65. package/templates/gym-fitness/tier5-src/_shared/class-sessions.ts +113 -0
  66. package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +6 -0
  67. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  68. package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +6 -0
  69. package/templates/gym-fitness-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  70. package/templates/medical-services/tier5-src/_shared/booking-session.ts +10 -0
  71. package/templates/medical-services/tier5-src/_shared/engine-intl.ts +6 -0
  72. package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +6 -0
  73. package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +6 -0
  74. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  75. package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +6 -0
  76. package/templates/owner-lite/tier5-src/_shared/owner-selected-site.ts +13 -0
  77. package/templates/personal-fitness-trainer/tier5-src/_shared/agenda-calendar.ts +95 -0
  78. package/templates/personal-fitness-trainer/tier5-src/_shared/booking-session.ts +10 -0
  79. package/templates/personal-fitness-trainer/tier5-src/_shared/class-sessions.ts +113 -0
  80. package/templates/personal-fitness-trainer/tier5-src/_shared/engine-intl.ts +6 -0
  81. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  82. package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +6 -0
  83. package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +6 -0
  84. package/templates/podcast-creator-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  85. package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +6 -0
  86. package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +6 -0
  87. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  88. package/templates/professional-services/tier5-src/_shared/booking-session.ts +10 -0
  89. package/templates/professional-services/tier5-src/_shared/engine-intl.ts +6 -0
  90. package/templates/restaurant/tier5-src/_shared/engine-intl.ts +6 -0
  91. package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +6 -0
  92. package/templates/restaurant-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  93. package/templates/retail-store/tier5-src/_shared/engine-intl.ts +6 -0
  94. package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +6 -0
  95. package/templates/retail-store-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
  96. package/templates/salon-spa/tier5-src/_shared/agenda-calendar.ts +95 -0
  97. package/templates/salon-spa/tier5-src/_shared/booking-session.ts +10 -0
  98. package/templates/salon-spa/tier5-src/_shared/class-sessions.ts +113 -0
  99. package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +6 -0
  100. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  101. package/templates/wholesale-store/tier5-src/_shared/engine-intl.ts +6 -0
  102. package/templates/yoga-studio/tier5-src/_shared/agenda-calendar.ts +95 -0
  103. package/templates/yoga-studio/tier5-src/_shared/booking-session.ts +10 -0
  104. package/templates/yoga-studio/tier5-src/_shared/class-sessions.ts +113 -0
  105. package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +6 -0
  106. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
  107. package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +6 -0
  108. package/templates/yoga-studio-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
@@ -0,0 +1,280 @@
1
+ {
2
+ "_recipe": "A page's upcoming sessions (the One App's platform_general_upcoming_section): the section's title with a View All button to the Agenda, then the business's next sessions in the source's time window as rows: a date block (day over month), the class, the day and local times, its coach, and the member's own place (Booked, On waitlist) as a badge. A row opens the class on that session. Then the empty text. ONE node, always mounted. Service: registerUpcomingSessionsSection(svc, { limit, interval }).",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerUpcomingSessionsSection",
5
+ "id": "unique node id prefix for this section",
6
+ "title": "the section's title. The header keeps exactly one flexing child: the generator removes {{id}}.headSpacer when the title shows (the title takes the row) and {{id}}.title when the source hides it (the spacer keeps See All trailing)",
7
+ "seeAllLabel": "the View All button's label",
8
+ "seeAllScreen": "the Agenda screen, himi_agenda",
9
+ "serviceScreen": "the service screen, himi_service: a row opens it on the session"
10
+ },
11
+ "node": {
12
+ "id": "{{id}}.upcoming",
13
+ "body": {
14
+ "package": "himalaya",
15
+ "type": "VStack",
16
+ "props": {
17
+ "spacing": 12,
18
+ "alignment": "leading",
19
+ "children": [
20
+ {
21
+ "id": "{{id}}.head",
22
+ "body": {
23
+ "package": "himalaya",
24
+ "type": "HStack",
25
+ "props": {
26
+ "spacing": 8,
27
+ "alignment": "center",
28
+ "children": [
29
+ {
30
+ "id": "{{id}}.title",
31
+ "body": {
32
+ "package": "himalaya",
33
+ "type": "Text",
34
+ "props": {
35
+ "text": "{{title}}",
36
+ "style": "title3",
37
+ "maxLines": 2
38
+ }
39
+ },
40
+ "modifiers": {
41
+ "weight": 1
42
+ }
43
+ },
44
+ {
45
+ "id": "{{id}}.headSpacer",
46
+ "body": {
47
+ "package": "himalaya",
48
+ "type": "Spacer",
49
+ "props": {}
50
+ }
51
+ },
52
+ {
53
+ "id": "{{id}}.all",
54
+ "body": {
55
+ "package": "himalaya",
56
+ "type": "Button",
57
+ "props": {
58
+ "title": "{{seeAllLabel}}",
59
+ "style": "tertiary",
60
+ "size": "md",
61
+ "action": {
62
+ "actionId": "himi.open",
63
+ "params": {
64
+ "screenId": "{{seeAllScreen}}"
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ },
73
+ "modifiers": {
74
+ "fillMaxWidth": true
75
+ }
76
+ },
77
+ {
78
+ "id": "{{id}}.loading",
79
+ "body": {
80
+ "package": "himalaya",
81
+ "type": "Skeleton",
82
+ "props": {
83
+ "height": 56,
84
+ "count": 2,
85
+ "cornerRadius": 12
86
+ }
87
+ },
88
+ "modifiers": {
89
+ "hiddenPath": "$service:{{svc}}.notLoading"
90
+ }
91
+ },
92
+ {
93
+ "id": "{{id}}.list",
94
+ "body": {
95
+ "package": "himalaya",
96
+ "type": "LazyList",
97
+ "props": {
98
+ "spacing": 12,
99
+ "itemsPath": "$service:{{svc}}.rows",
100
+ "items": [
101
+ {
102
+ "id": "{{id}}.row",
103
+ "body": {
104
+ "package": "himalaya",
105
+ "type": "HStack",
106
+ "props": {
107
+ "spacing": 16,
108
+ "alignment": "center",
109
+ "children": [
110
+ {
111
+ "id": "{{id}}.date",
112
+ "body": {
113
+ "package": "himalaya",
114
+ "type": "VStack",
115
+ "props": {
116
+ "spacing": 0,
117
+ "alignment": "center",
118
+ "children": [
119
+ {
120
+ "id": "{{id}}.dayNumber",
121
+ "body": {
122
+ "package": "himalaya",
123
+ "type": "Text",
124
+ "props": {
125
+ "text": "$item.dayNumber",
126
+ "style": "title2",
127
+ "maxLines": 1,
128
+ "monospacedDigits": true
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "id": "{{id}}.month",
134
+ "body": {
135
+ "package": "himalaya",
136
+ "type": "Text",
137
+ "props": {
138
+ "text": "$item.month",
139
+ "style": "caption",
140
+ "color": "textSecondary",
141
+ "maxLines": 1
142
+ }
143
+ }
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ "modifiers": {
149
+ "width": 44
150
+ }
151
+ },
152
+ {
153
+ "id": "{{id}}.text",
154
+ "body": {
155
+ "package": "himalaya",
156
+ "type": "VStack",
157
+ "props": {
158
+ "spacing": 2,
159
+ "alignment": "leading",
160
+ "children": [
161
+ {
162
+ "id": "{{id}}.name",
163
+ "body": {
164
+ "package": "himalaya",
165
+ "type": "Text",
166
+ "props": {
167
+ "text": "$item.title",
168
+ "style": "bodyEmphasis",
169
+ "maxLines": 2
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "id": "{{id}}.when",
175
+ "body": {
176
+ "package": "himalaya",
177
+ "type": "Text",
178
+ "props": {
179
+ "text": "$item.when",
180
+ "style": "footnote",
181
+ "color": "textSecondary",
182
+ "maxLines": 1
183
+ }
184
+ }
185
+ },
186
+ {
187
+ "id": "{{id}}.coach",
188
+ "body": {
189
+ "package": "himalaya",
190
+ "type": "Text",
191
+ "props": {
192
+ "text": "$item.coach",
193
+ "style": "footnote",
194
+ "color": "textSecondary",
195
+ "maxLines": 2
196
+ }
197
+ },
198
+ "modifiers": {
199
+ "hiddenPath": "$item.noCoach"
200
+ }
201
+ }
202
+ ]
203
+ }
204
+ },
205
+ "modifiers": {
206
+ "weight": 1
207
+ }
208
+ },
209
+ {
210
+ "id": "{{id}}.place",
211
+ "body": {
212
+ "package": "himalaya",
213
+ "type": "Text",
214
+ "props": {
215
+ "text": "$item.place",
216
+ "style": "caption",
217
+ "color": "textPrimary",
218
+ "maxLines": 1
219
+ }
220
+ },
221
+ "modifiers": {
222
+ "hiddenPath": "$item.noPlace",
223
+ "background": {
224
+ "token": "surfaceSecondary"
225
+ },
226
+ "cornerRadius": 12,
227
+ "padding": {
228
+ "leading": 10,
229
+ "trailing": 10,
230
+ "top": 4,
231
+ "bottom": 4
232
+ }
233
+ }
234
+ }
235
+ ]
236
+ }
237
+ },
238
+ "modifiers": {
239
+ "fillMaxWidth": true,
240
+ "onTap": {
241
+ "actionId": "himi.open",
242
+ "params": {
243
+ "screenId": "{{serviceScreen}}",
244
+ "id": "$item.serviceId",
245
+ "sessionId": "$item.sessionId",
246
+ "start": "$item.start"
247
+ }
248
+ },
249
+ "pressFeedback": "highlight",
250
+ "accessibilityRole": "button",
251
+ "accessibilityLabel": "$item.a11y"
252
+ }
253
+ }
254
+ ]
255
+ }
256
+ },
257
+ "modifiers": {
258
+ "hiddenPath": "$service:{{svc}}.noRows"
259
+ }
260
+ },
261
+ {
262
+ "id": "{{id}}.empty",
263
+ "body": {
264
+ "package": "himalaya",
265
+ "type": "Text",
266
+ "props": {
267
+ "text": "$service:{{svc}}.emptyText",
268
+ "style": "body",
269
+ "color": "textSecondary"
270
+ }
271
+ },
272
+ "modifiers": {
273
+ "hiddenPath": "$service:{{svc}}.noEmpty"
274
+ }
275
+ }
276
+ ]
277
+ }
278
+ }
279
+ }
280
+ }
@@ -0,0 +1,95 @@
1
+ // The Bookings Agenda's calendar rules: which days a page dims and dots, which days it reads, and where the selection
2
+ // goes when the calendar pages. Shared by the Agenda screen and the class calendar section a page shows inline, so the
3
+ // two calendars behave the same.
4
+ import { addDays, dayKey, toDate, weekOf, type DayDecoration, type Weekday } from "@himalaya/time";
5
+ import type { Session } from "./booking-session.js";
6
+
7
+ /** How far past the selected day the list reaches. */
8
+ export const AGENDA_DAYS = 28;
9
+
10
+ /** The first and last cell any month grid of `day`'s month can have, padding included. */
11
+ function monthGrid(day: string): { start: string; end: string } {
12
+ const d = toDate(day);
13
+ if (!d) return { start: day, end: day };
14
+ return { start: dayKey(new Date(d.getFullYear(), d.getMonth(), 1 - 6)), end: dayKey(new Date(d.getFullYear(), d.getMonth() + 1, 6)) };
15
+ }
16
+
17
+ /** One dot per day that has a session — "something is on", not how much — and the visible
18
+ * days before today dimmed and unselectable: the agenda is what is still to come. */
19
+ export function decorationsOf(sessions: Session[], today: string, rangeStart: string, rangeEnd: string): DayDecoration[] {
20
+ const out: DayDecoration[] = [];
21
+ const dimmed = new Set<string>();
22
+ const dim = (from: string, to: string) => {
23
+ for (let day = from; day && day < today && day <= to; day = dayKey(addDays(day, 1))) {
24
+ if (!dimmed.has(day)) { dimmed.add(day); out.push({ date: day, disabled: true }); }
25
+ }
26
+ };
27
+ // Bounded by the visible days: a page a year back dims its 7-42 cells, not a year.
28
+ dim(rangeStart, rangeEnd);
29
+ // And this month's grid: an older binary (no week mode) draws it on first open, while it
30
+ // reports nothing until the member pages.
31
+ dim(monthGrid(today).start, today);
32
+ for (const date of [...new Set(sessions.filter((s) => s.day >= today).map((s) => s.day))].sort()) out.push({ date, dotCount: 1 });
33
+ return out;
34
+ }
35
+
36
+ /** The days to load: the visible days (never before today) through AGENDA_DAYS past the
37
+ * selected day, so the list under the calendar always has its full reach. */
38
+ export function windowFor(today: string, rangeStart: string, rangeEnd: string, selected: string): { start: string; end: string } {
39
+ const start = rangeStart > today ? rangeStart : today;
40
+ const from = selected > today ? selected : today;
41
+ // Through the last cell of the selected day's month grid as well, which is what an older
42
+ // binary draws before it has reported any page: every dot on it is then real.
43
+ const end = [rangeEnd, dayKey(addDays(from, AGENDA_DAYS)), monthGrid(from).end].reduce((a, b) => (b > a ? b : a));
44
+ return { start, end };
45
+ }
46
+
47
+ /** Where the selection goes when the calendar pages away from it: the first day of the
48
+ * page (the 1st of the titled month in month view — the grid's first cell is padding),
49
+ * or today when that is on the page. A page wholly before today has no day to select (past
50
+ * days are disabled), so `current` stays selected and the list keeps showing from it. */
51
+ export function selectionForRange(today: string, rangeStart: string, rangeEnd: string, current = today): string {
52
+ const { first, last } = titledDays(rangeStart, rangeEnd);
53
+ if (today >= first && today <= last) return today;
54
+ return last < today ? current : first;
55
+ }
56
+
57
+ /** The days a page is about: the whole week, or a month grid's TITLED month — its padding cells
58
+ * belong to the neighbouring months. */
59
+ export function titledDays(rangeStart: string, rangeEnd: string): { first: string; last: string } {
60
+ let first = rangeStart;
61
+ let last = rangeEnd;
62
+ const span = Math.round((Date.parse(rangeEnd) - Date.parse(rangeStart)) / 86_400_000);
63
+ if (span > 7) {
64
+ // A month grid: its padding cells belong to the neighbouring months. Today counts only when
65
+ // it is in the TITLED month — a today in the trailing padding would move the selection, and
66
+ // with it the grid, a month forward.
67
+ const d = toDate(rangeStart);
68
+ if (d) {
69
+ const month = rangeStart.endsWith("-01") ? d : new Date(d.getFullYear(), d.getMonth() + 1, 1);
70
+ first = dayKey(month);
71
+ last = dayKey(new Date(month.getFullYear(), month.getMonth() + 1, 0));
72
+ }
73
+ }
74
+ return { first, last };
75
+ }
76
+
77
+ /** The month grid (whole weeks) of `day`'s month, as a calendar draws it. */
78
+ export function monthGridOf(day: string, firstWeekday: number): { start: string; end: string } | undefined {
79
+ const d = toDate(day);
80
+ if (!d) return undefined;
81
+ const fw = (((firstWeekday % 7) + 7) % 7) as Weekday;
82
+ const start = weekOf(new Date(d.getFullYear(), d.getMonth(), 1), fw)[0];
83
+ const end = weekOf(new Date(d.getFullYear(), d.getMonth() + 1, 0), fw)[6];
84
+ return start && end ? { start, end } : undefined;
85
+ }
86
+
87
+ /** Does the selection survive a page change? Inside the page's TITLED days, yes — a selection in a
88
+ * month grid's padding belongs to the neighbouring month. Today stays selected on any page that
89
+ * shows it: opening a week that straddles two months into the month holding most of it must not
90
+ * move the agenda off today. */
91
+ export function keepsSelection(cur: { today: string; selectedDate: string }, start: string, end: string): boolean {
92
+ const page = titledDays(start, end);
93
+ if (cur.selectedDate >= page.first && cur.selectedDate <= page.last) return true;
94
+ return !!cur.today && cur.selectedDate === cur.today && cur.today >= start && cur.today <= end;
95
+ }
@@ -138,6 +138,16 @@ export function bySession(found: Map<string, MemberPlace>, inWindow: Session[]):
138
138
  return out;
139
139
  }
140
140
 
141
+ /** "1 hr", "45 min", "1 hr 30 min" — the length under a session's time (the Agenda row, the class calendar section). */
142
+ export function lengthLabel(start: string, end: string): string {
143
+ const mins = Math.round((Date.parse(end) - Date.parse(start)) / 60_000);
144
+ if (!Number.isFinite(mins) || mins <= 0) return "";
145
+ const h = Math.floor(mins / 60), m = mins % 60;
146
+ return h && m
147
+ ? copyTemplate("agenda.lengthHoursMinutes", "{h} hr {m} min", { h, m })
148
+ : h ? copyTemplate("agenda.lengthHours", "{h} hr", { h }) : copyTemplate("agenda.lengthMinutes", "{m} min", { m });
149
+ }
150
+
141
151
  /** "4 spots left", "1 spot left", or "Full". Empty when the site reports no capacity, and for a
142
152
  * course: a session's open spots do not say whether the course has room. */
143
153
  export function spotsLabel(s: Session): string {