@scopetickets/checkout 0.1.1 → 0.1.3

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.
package/README.md CHANGED
@@ -33,7 +33,7 @@ import '@scopetickets/checkout/styles.css';
33
33
  <ScopeTicketsCheckout
34
34
  appKey="…"
35
35
  intent={{ subject: { kind: 'series', key: 'a-run-of-nights' } }}
36
- align="bottom" // or "top", or "center" — which way the card grows
36
+ align="bottom" // or "top", "center", "left", "right", or a corner such as "top-left"
37
37
  initialPresentation="card" // or "pill" — the state the page loads on
38
38
  />
39
39
  ```
@@ -42,6 +42,23 @@ The host supplies no copy, no styling and no steps: hand it what is already know
42
42
  about the order and it asks for the rest in its own words. `intent` is how much it
43
43
  already knows, and every field in it is a step the buyer is not asked for.
44
44
 
45
+ **One exception: `openingLabel`**, the words on the opening pill. It names what is on
46
+ sale, which the page knows and the widget does not, so a page selling one show can say
47
+ `openingLabel="Book Santo Panto"`. Absent or blank, the pill says "Get Tickets". Every
48
+ later pill names its step and stays the widget's own.
49
+
50
+ **Floating on the screen, or in the page — `placement`.** By default the widget sits
51
+ where it was mounted and `align` places it inside that box. `placement="screen"` pins it
52
+ to the window instead, so `align` names a corner of the screen and the host writes no
53
+ positioning CSS of its own:
54
+
55
+ ```tsx
56
+ <ScopeTicketsCheckout appKey="…" placement="screen" align="top-right" />
57
+ ```
58
+
59
+ A `transform`, `filter` or `contain` on any ancestor still captures a fixed box, so mount a
60
+ pinned widget at the end of `<body>` rather than inside a theme's wrapper.
61
+
45
62
  **Leave `intent` out and it mounts with nothing to sell.** No walk, no steps, no
46
63
  cart and nothing fetched — one card about the buyer's account, which is what
47
64
  belongs on a page that is not selling anything:
@@ -99,6 +116,17 @@ picker they needed. The four that can answer from the intent run first and often
99
116
  spare the request. A check that throws sends the buyer to the card it guards
100
117
  rather than past it.
101
118
 
119
+ **The event's questions are asked, and the answers are sent before payment.** A question
120
+ can be set on the ticket, the event or its series: the tickets carry their own, and once
121
+ the cart is open the event's questionnaire is read — the series' where the event has
122
+ none. Text is a field, a whole number is a numeric field, a yes or no is a switch, and
123
+ the card stays shut until every one is answered; a buyer the checks opened past it is
124
+ walked back to it. The answers — the buyer's, or the `intent.answers` a host already
125
+ collected, which excuse the card only where they answer every question — go to every
126
+ cart item before any charge. The platform only adds answers, so once saved they are
127
+ shown read-only and never sent twice. A questionnaire that cannot be read, or answers
128
+ that are refused, stop the buyer on a notice with Try Again, before anything is charged.
129
+
102
130
  **A host that already opened a cart passes it**, and the widget adopts it rather
103
131
  than opening a second:
104
132
 
@@ -889,6 +889,26 @@ function ContentFlag({ tone, title }) {
889
889
  return /* @__PURE__ */ jsx2("span", { className: `scopetickets-island-content-flag scopetickets-island-content-flag--${tone}`, children: /* @__PURE__ */ jsx2(Glyph, { fill: true, color: "currentColor", title }) });
890
890
  }
891
891
 
892
+ // src/island/Switch.tsx
893
+ import { jsx as jsx3 } from "react/jsx-runtime";
894
+ function Switch({ checked, onChange, label, size = "wide", disabled = false }) {
895
+ const press = useIslandPress("element");
896
+ return /* @__PURE__ */ jsx3(
897
+ "button",
898
+ {
899
+ type: "button",
900
+ role: "switch",
901
+ "aria-checked": checked,
902
+ "aria-label": label,
903
+ disabled,
904
+ className: `scopetickets-island-switch scopetickets-island-switch--${size}`,
905
+ onClick: () => onChange(!checked),
906
+ ...disabled ? {} : press,
907
+ children: /* @__PURE__ */ jsx3("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
908
+ }
909
+ );
910
+ }
911
+
892
912
  // src/island/CounterRing.tsx
893
913
  import { IconGlyph } from "@scopetickets/icons";
894
914
 
@@ -1028,7 +1048,7 @@ function counterRingPaths(progress, direction = "cw") {
1028
1048
  }
1029
1049
 
1030
1050
  // src/island/CounterRing.tsx
1031
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1051
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
1032
1052
  var LAYER = { position: "absolute", inset: 0 };
1033
1053
  var DEFAULT_FILL = "var(--scopetickets-island-counter-ring-fill)";
1034
1054
  var DEFAULT_TRACK = "var(--scopetickets-island-counter-ring-track)";
@@ -1043,12 +1063,12 @@ function CounterRing({
1043
1063
  track = true
1044
1064
  }) {
1045
1065
  if (complete !== void 0) {
1046
- return /* @__PURE__ */ jsx3(
1066
+ return /* @__PURE__ */ jsx4(
1047
1067
  "span",
1048
1068
  {
1049
1069
  className: "scopetickets-island-counter-ring",
1050
1070
  style: { width: size, height: size, flex: "none" },
1051
- children: /* @__PURE__ */ jsx3(ContentFlag, { tone: complete, title })
1071
+ children: /* @__PURE__ */ jsx4(ContentFlag, { tone: complete, title })
1052
1072
  }
1053
1073
  );
1054
1074
  }
@@ -1058,7 +1078,7 @@ function CounterRing({
1058
1078
  className: "scopetickets-island-counter-ring",
1059
1079
  style: { position: "relative", display: "block", width: size, height: size, flex: "none" },
1060
1080
  children: [
1061
- track ? /* @__PURE__ */ jsx3("span", { style: LAYER, children: /* @__PURE__ */ jsx3(
1081
+ track ? /* @__PURE__ */ jsx4("span", { style: LAYER, children: /* @__PURE__ */ jsx4(
1062
1082
  IconGlyph,
1063
1083
  {
1064
1084
  glyph: "StepCompletionProgressRingTrack",
@@ -1067,7 +1087,7 @@ function CounterRing({
1067
1087
  fill: true
1068
1088
  }
1069
1089
  ) }) : null,
1070
- /* @__PURE__ */ jsx3("span", { style: LAYER, children: /* @__PURE__ */ jsx3(
1090
+ /* @__PURE__ */ jsx4("span", { style: LAYER, children: /* @__PURE__ */ jsx4(
1071
1091
  IconGlyph,
1072
1092
  {
1073
1093
  glyph: "StepCompletionProgressRing",
@@ -1086,13 +1106,13 @@ function CounterRing({
1086
1106
  import { useCallback as useCallback2, useEffect as useEffect4, useMemo as useMemo2, useState as useState4 } from "react";
1087
1107
 
1088
1108
  // src/island/CalendarMonthHeading.tsx
1089
- import { jsx as jsx4 } from "react/jsx-runtime";
1109
+ import { jsx as jsx5 } from "react/jsx-runtime";
1090
1110
  function CalendarMonthHeading({ month }) {
1091
- return /* @__PURE__ */ jsx4("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
1111
+ return /* @__PURE__ */ jsx5("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
1092
1112
  }
1093
1113
 
1094
1114
  // src/island/CalendarDayIndicator.tsx
1095
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1115
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
1096
1116
  var SEGMENTS = 3;
1097
1117
  var FILLED_SEGMENTS = {
1098
1118
  LOW: 1,
@@ -1104,20 +1124,20 @@ function CalendarDayIndicator({ level }) {
1104
1124
  return (
1105
1125
  // DECORATIVE, and now correctly so.
1106
1126
  /* @__PURE__ */ jsxs3("span", { className: "scopetickets-island-day-indicator", "aria-hidden": "true", children: [
1107
- /* @__PURE__ */ jsx5(
1127
+ /* @__PURE__ */ jsx6(
1108
1128
  "span",
1109
1129
  {
1110
1130
  className: `scopetickets-island-day-indicator__fill scopetickets-island-day-indicator__fill--${level.toLowerCase()}`,
1111
1131
  style: { flexGrow: filled }
1112
1132
  }
1113
1133
  ),
1114
- filled < SEGMENTS ? /* @__PURE__ */ jsx5("span", { style: { flexGrow: SEGMENTS - filled } }) : null
1134
+ filled < SEGMENTS ? /* @__PURE__ */ jsx6("span", { style: { flexGrow: SEGMENTS - filled } }) : null
1115
1135
  ] })
1116
1136
  );
1117
1137
  }
1118
1138
 
1119
1139
  // src/island/CalendarDay.tsx
1120
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1140
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1121
1141
  function CalendarDay({
1122
1142
  cell,
1123
1143
  accessory,
@@ -1129,10 +1149,10 @@ function CalendarDay({
1129
1149
  const press = useIslandPress("element");
1130
1150
  const dimmed = outsideMonth ? { "data-outside-month": "" } : null;
1131
1151
  if (cell.kind === "EMPTY") {
1132
- return /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
1152
+ return /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
1133
1153
  }
1134
1154
  if (isSelectableCalendarCell(cell)) {
1135
- return /* @__PURE__ */ jsx6(
1155
+ return /* @__PURE__ */ jsx7(
1136
1156
  CalendarDayButton,
1137
1157
  {
1138
1158
  cell,
@@ -1146,7 +1166,7 @@ function CalendarDay({
1146
1166
  );
1147
1167
  }
1148
1168
  if (cell.kind === "UNAVAILABLE") {
1149
- return /* @__PURE__ */ jsx6(
1169
+ return /* @__PURE__ */ jsx7(
1150
1170
  CalendarDayButton,
1151
1171
  {
1152
1172
  cell,
@@ -1158,7 +1178,7 @@ function CalendarDay({
1158
1178
  }
1159
1179
  );
1160
1180
  }
1161
- return /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
1181
+ return /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
1162
1182
  }
1163
1183
  function CalendarDayButton({
1164
1184
  cell,
@@ -1171,7 +1191,7 @@ function CalendarDayButton({
1171
1191
  }) {
1172
1192
  const selected = cell.kind === "SELECTED";
1173
1193
  const availability = readAvailability(remaining);
1174
- return /* @__PURE__ */ jsx6(
1194
+ return /* @__PURE__ */ jsx7(
1175
1195
  "button",
1176
1196
  {
1177
1197
  type: "button",
@@ -1183,16 +1203,16 @@ function CalendarDayButton({
1183
1203
  onClick: onSelect ? () => onSelect(cell.day) : void 0,
1184
1204
  ...press,
1185
1205
  children: /* @__PURE__ */ jsxs4("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: [
1186
- /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
1187
- cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
1188
- accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ jsx6(CalendarDayIndicator, { level: availability.level }) }) : null
1206
+ /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
1207
+ cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
1208
+ accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ jsx7(CalendarDayIndicator, { level: availability.level }) }) : null
1189
1209
  ] })
1190
1210
  }
1191
1211
  );
1192
1212
  }
1193
1213
 
1194
1214
  // src/island/CalendarRunGrid.tsx
1195
- import { jsx as jsx7 } from "react/jsx-runtime";
1215
+ import { jsx as jsx8 } from "react/jsx-runtime";
1196
1216
  function CalendarRunGrid({
1197
1217
  series,
1198
1218
  weeks,
@@ -1203,10 +1223,10 @@ function CalendarRunGrid({
1203
1223
  selectedDay,
1204
1224
  onSelectDay
1205
1225
  }) {
1206
- return /* @__PURE__ */ jsx7("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
1226
+ return /* @__PURE__ */ jsx8("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
1207
1227
  // A presentational row: the seven columns are a layout, and announcing "row 3
1208
1228
  // of 9" describes the grid rather than the run.
1209
- /* @__PURE__ */ jsx7("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx7(
1229
+ /* @__PURE__ */ jsx8("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx8(
1210
1230
  CalendarDay,
1211
1231
  {
1212
1232
  cell,
@@ -1228,7 +1248,7 @@ import {
1228
1248
  useRef as useRef3,
1229
1249
  useState as useState3
1230
1250
  } from "react";
1231
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1251
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
1232
1252
  var WHEEL_IDLE_MS = 200;
1233
1253
  var CALENDAR_DRAG_SLOP = 4;
1234
1254
  function CalendarScroller({
@@ -1383,8 +1403,8 @@ function CalendarScroller({
1383
1403
  onPointerCancel,
1384
1404
  onClickCapture,
1385
1405
  children: [
1386
- /* @__PURE__ */ jsx8("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
1387
- /* @__PURE__ */ jsx8(
1406
+ /* @__PURE__ */ jsx9("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
1407
+ /* @__PURE__ */ jsx9(
1388
1408
  "div",
1389
1409
  {
1390
1410
  ref: trackRef,
@@ -1402,17 +1422,17 @@ function CalendarScroller({
1402
1422
  }
1403
1423
 
1404
1424
  // src/island/CalendarWeekdayNames.tsx
1405
- import { jsx as jsx9 } from "react/jsx-runtime";
1425
+ import { jsx as jsx10 } from "react/jsx-runtime";
1406
1426
  var WEEKDAY_NAMES = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
1407
1427
  function CalendarWeekdayNames() {
1408
1428
  return (
1409
1429
  // `aria-hidden`, and it is not a shortcut.
1410
- /* @__PURE__ */ jsx9("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ jsx9("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
1430
+ /* @__PURE__ */ jsx10("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ jsx10("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
1411
1431
  );
1412
1432
  }
1413
1433
 
1414
1434
  // src/island/DayPicker.tsx
1415
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
1435
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1416
1436
  function DayPicker({
1417
1437
  series,
1418
1438
  today,
@@ -1446,9 +1466,9 @@ function DayPicker({
1446
1466
  );
1447
1467
  if (weeks.length === 0) return null;
1448
1468
  return /* @__PURE__ */ jsxs6("div", { className: "scopetickets-island-calendar", "data-accessory": accessory, children: [
1449
- currentMonth !== null && /* @__PURE__ */ jsx10(CalendarMonthHeading, { month: currentMonth }),
1450
- /* @__PURE__ */ jsx10(CalendarWeekdayNames, {}),
1451
- /* @__PURE__ */ jsx10(
1469
+ currentMonth !== null && /* @__PURE__ */ jsx11(CalendarMonthHeading, { month: currentMonth }),
1470
+ /* @__PURE__ */ jsx11(CalendarWeekdayNames, {}),
1471
+ /* @__PURE__ */ jsx11(
1452
1472
  CalendarScroller,
1453
1473
  {
1454
1474
  rowCount: weeks.length,
@@ -1456,7 +1476,7 @@ function DayPicker({
1456
1476
  onRowChange: setRow,
1457
1477
  onRowPreview: setShownRow,
1458
1478
  label: "Weeks of the run",
1459
- children: /* @__PURE__ */ jsx10(
1479
+ children: /* @__PURE__ */ jsx11(
1460
1480
  CalendarRunGrid,
1461
1481
  {
1462
1482
  series,
@@ -1478,7 +1498,7 @@ function DayPicker({
1478
1498
  import { useMemo as useMemo3 } from "react";
1479
1499
 
1480
1500
  // src/island/Timeslot.tsx
1481
- import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1501
+ import { Fragment, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1482
1502
  var REMAINING_SIZE = "var(--scopetickets-island-space-4)";
1483
1503
  var SELECTED_ARC = "var(--scopetickets-island-timeslot-ring-selected)";
1484
1504
  var TRACK = "var(--scopetickets-island-timeslot-track)";
@@ -1486,16 +1506,16 @@ var SELECTED_TRACK = "var(--scopetickets-island-timeslot-track-selected)";
1486
1506
  var SOLD_OUT = "Sold Out";
1487
1507
  function Timeslot({ cell, accessory, onSelect }) {
1488
1508
  if (isDatePickerCellSelectable(cell.state)) {
1489
- return /* @__PURE__ */ jsx11(TimeslotButton, { cell, accessory, onSelect });
1509
+ return /* @__PURE__ */ jsx12(TimeslotButton, { cell, accessory, onSelect });
1490
1510
  }
1491
- return /* @__PURE__ */ jsx11(TimeslotFixed, { cell });
1511
+ return /* @__PURE__ */ jsx12(TimeslotFixed, { cell });
1492
1512
  }
1493
1513
  function TimeslotRow({ cell }) {
1494
1514
  return /* @__PURE__ */ jsxs7("span", { className: "scopetickets-island-timeslot__times", children: [
1495
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
1515
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
1496
1516
  cell.slot.endTime === null ? null : /* @__PURE__ */ jsxs7(Fragment, { children: [
1497
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
1498
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
1517
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
1518
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
1499
1519
  ] }),
1500
1520
  cell.state === "UNAVAILABLE" ? (
1501
1521
  /*
@@ -1506,8 +1526,8 @@ function TimeslotRow({ cell }) {
1506
1526
  * merely BEGUN keeps its ring — it still has seats, and "Sold Out" over them
1507
1527
  * would be false.
1508
1528
  */
1509
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
1510
- ) : cell.slot.remaining === null ? null : /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ jsx11(
1529
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
1530
+ ) : cell.slot.remaining === null ? null : /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ jsx12(
1511
1531
  CounterRing,
1512
1532
  {
1513
1533
  progress: cell.slot.remaining,
@@ -1526,7 +1546,7 @@ function TimeslotButton({ cell, accessory, onSelect }) {
1526
1546
  const press = useIslandPress("element");
1527
1547
  const selected = cell.state === "SELECTED";
1528
1548
  const availability = readAvailability(cell.slot.remaining);
1529
- return /* @__PURE__ */ jsx11(
1549
+ return /* @__PURE__ */ jsx12(
1530
1550
  "button",
1531
1551
  {
1532
1552
  type: "button",
@@ -1536,22 +1556,22 @@ function TimeslotButton({ cell, accessory, onSelect }) {
1536
1556
  onClick: () => onSelect(cell.slot.startTime),
1537
1557
  ...press,
1538
1558
  children: /* @__PURE__ */ jsxs7("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: [
1539
- /* @__PURE__ */ jsx11(TimeslotRow, { cell }),
1540
- accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ jsx11(CalendarDayIndicator, { level: availability.level }) }) : null
1559
+ /* @__PURE__ */ jsx12(TimeslotRow, { cell }),
1560
+ accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ jsx12(CalendarDayIndicator, { level: availability.level }) }) : null
1541
1561
  ] })
1542
1562
  }
1543
1563
  );
1544
1564
  }
1545
1565
  function TimeslotFixed({ cell }) {
1546
- return /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ jsx11(TimeslotRow, { cell }) }) });
1566
+ return /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ jsx12(TimeslotRow, { cell }) }) });
1547
1567
  }
1548
1568
 
1549
1569
  // src/island/TimeslotGroupSection.tsx
1550
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
1570
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1551
1571
  function TimeslotGroupSection({ group, accessory, onSelect }) {
1552
1572
  return /* @__PURE__ */ jsxs8("section", { className: "scopetickets-island-timeslots__group", children: [
1553
- group.label === null ? null : /* @__PURE__ */ jsx12("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
1554
- /* @__PURE__ */ jsx12("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ jsx12(
1573
+ group.label === null ? null : /* @__PURE__ */ jsx13("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
1574
+ /* @__PURE__ */ jsx13("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ jsx13(
1555
1575
  Timeslot,
1556
1576
  {
1557
1577
  cell,
@@ -1564,7 +1584,7 @@ function TimeslotGroupSection({ group, accessory, onSelect }) {
1564
1584
  }
1565
1585
 
1566
1586
  // src/island/TimeslotPicker.tsx
1567
- import { jsx as jsx13 } from "react/jsx-runtime";
1587
+ import { jsx as jsx14 } from "react/jsx-runtime";
1568
1588
  function TimeslotPicker({
1569
1589
  slots,
1570
1590
  selection,
@@ -1578,7 +1598,7 @@ function TimeslotPicker({
1578
1598
  () => buildTimeslotGroups(slots, { selection, today, nowTime, grouping }),
1579
1599
  [slots, selection, today, nowTime, grouping]
1580
1600
  );
1581
- return /* @__PURE__ */ jsx13("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ jsx13(
1601
+ return /* @__PURE__ */ jsx14("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ jsx14(
1582
1602
  TimeslotGroupSection,
1583
1603
  {
1584
1604
  group,
@@ -1594,7 +1614,7 @@ import { useEffect as useEffect6, useReducer } from "react";
1594
1614
 
1595
1615
  // src/island/CalendarWeekSection.tsx
1596
1616
  import { useCallback as useCallback3, useEffect as useEffect5, useLayoutEffect, useRef as useRef4, useState as useState5 } from "react";
1597
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1617
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1598
1618
  function CalendarWeekSection({
1599
1619
  series,
1600
1620
  today,
@@ -1650,15 +1670,15 @@ function CalendarWeekSection({
1650
1670
  }, [weeks.length, visibleWeek, selectedWeek, selectedDay, onVisibleMonthChange]);
1651
1671
  if (weeks.length === 0) return null;
1652
1672
  return /* @__PURE__ */ jsxs9("div", { className: "scopetickets-island-week", children: [
1653
- /* @__PURE__ */ jsx14(CalendarWeekdayNames, {}),
1654
- /* @__PURE__ */ jsx14("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ jsx14(
1673
+ /* @__PURE__ */ jsx15(CalendarWeekdayNames, {}),
1674
+ /* @__PURE__ */ jsx15("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ jsx15(
1655
1675
  "div",
1656
1676
  {
1657
1677
  className: "scopetickets-island-week__page",
1658
1678
  ref: (node) => {
1659
1679
  pageRefs.current[index] = node;
1660
1680
  },
1661
- children: /* @__PURE__ */ jsx14("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx14(
1681
+ children: /* @__PURE__ */ jsx15("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx15(
1662
1682
  CalendarDay,
1663
1683
  {
1664
1684
  cell,
@@ -1676,14 +1696,14 @@ function CalendarWeekSection({
1676
1696
  }
1677
1697
 
1678
1698
  // src/island/SelectedDayHeading.tsx
1679
- import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1699
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1680
1700
  function SelectedDayHeading({ day }) {
1681
1701
  return /* @__PURE__ */ jsxs10("h3", { className: "scopetickets-island-day-heading", children: [
1682
1702
  /* @__PURE__ */ jsxs10("span", { className: "scopetickets-island-day-heading__weekday", children: [
1683
1703
  formatDayWeekday(day),
1684
1704
  ","
1685
1705
  ] }),
1686
- /* @__PURE__ */ jsx15("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
1706
+ /* @__PURE__ */ jsx16("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
1687
1707
  ] });
1688
1708
  }
1689
1709
 
@@ -1731,7 +1751,7 @@ function reduceDaySwap(state, event) {
1731
1751
  }
1732
1752
 
1733
1753
  // src/island/TimePicker.tsx
1734
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1754
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1735
1755
  function TimePicker({
1736
1756
  series,
1737
1757
  today,
@@ -1757,7 +1777,7 @@ function TimePicker({
1757
1777
  };
1758
1778
  const shownSelection = swap.shown.day === selection.day ? selection : { day: swap.shown.day, startTime: null };
1759
1779
  return /* @__PURE__ */ jsxs11("div", { className: "scopetickets-island-time", "data-accessory": accessory, children: [
1760
- /* @__PURE__ */ jsx16(
1780
+ /* @__PURE__ */ jsx17(
1761
1781
  CalendarWeekSection,
1762
1782
  {
1763
1783
  series,
@@ -1777,8 +1797,8 @@ function TimePicker({
1777
1797
  style: swap.phase === "REST" ? void 0 : { "--scopetickets-island-swap-sign": swap.sign },
1778
1798
  onAnimationEnd: onSwapAnimationEnd,
1779
1799
  children: [
1780
- /* @__PURE__ */ jsx16(SelectedDayHeading, { day: swap.shown.day }),
1781
- /* @__PURE__ */ jsx16(
1800
+ /* @__PURE__ */ jsx17(SelectedDayHeading, { day: swap.shown.day }),
1801
+ /* @__PURE__ */ jsx17(
1782
1802
  TimeslotPicker,
1783
1803
  {
1784
1804
  slots: swap.shown.slots,
@@ -1797,7 +1817,7 @@ function TimePicker({
1797
1817
 
1798
1818
  // src/island/CalendarGrainButton.tsx
1799
1819
  import { useCallback as useCallback4, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "react";
1800
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1820
+ import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1801
1821
  function useShortenedMonth(long) {
1802
1822
  const [short, setShort] = useState6(false);
1803
1823
  const title = useRef5(null);
@@ -1848,7 +1868,7 @@ function CalendarGrainButton({ month, grain, onPress }) {
1848
1868
  ...grain === "MONTH" && short ? { "data-grain-short": "" } : null,
1849
1869
  children: [
1850
1870
  shown,
1851
- grain === "MONTH" ? /* @__PURE__ */ jsx17(
1871
+ grain === "MONTH" ? /* @__PURE__ */ jsx18(
1852
1872
  "span",
1853
1873
  {
1854
1874
  className: "scopetickets-island-header-button__probe",
@@ -1861,9 +1881,9 @@ function CalendarGrainButton({ month, grain, onPress }) {
1861
1881
  }
1862
1882
  );
1863
1883
  if (onPress === void 0) {
1864
- return /* @__PURE__ */ jsx17("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
1884
+ return /* @__PURE__ */ jsx18("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
1865
1885
  }
1866
- return /* @__PURE__ */ jsx17(
1886
+ return /* @__PURE__ */ jsx18(
1867
1887
  "button",
1868
1888
  {
1869
1889
  type: "button",
@@ -1875,26 +1895,6 @@ function CalendarGrainButton({ month, grain, onPress }) {
1875
1895
  );
1876
1896
  }
1877
1897
 
1878
- // src/island/Switch.tsx
1879
- import { jsx as jsx18 } from "react/jsx-runtime";
1880
- function Switch({ checked, onChange, label, size = "wide", disabled = false }) {
1881
- const press = useIslandPress("element");
1882
- return /* @__PURE__ */ jsx18(
1883
- "button",
1884
- {
1885
- type: "button",
1886
- role: "switch",
1887
- "aria-checked": checked,
1888
- "aria-label": label,
1889
- disabled,
1890
- className: `scopetickets-island-switch scopetickets-island-switch--${size}`,
1891
- onClick: () => onChange(!checked),
1892
- ...disabled ? {} : press,
1893
- children: /* @__PURE__ */ jsx18("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
1894
- }
1895
- );
1896
- }
1897
-
1898
1898
  export {
1899
1899
  SURFACE_MORPH_MS,
1900
1900
  SURFACE_SPRING,
@@ -1976,6 +1976,7 @@ export {
1976
1976
  SOLO_KEY,
1977
1977
  flagTone,
1978
1978
  ContentFlag,
1979
+ Switch,
1979
1980
  clampRemaining,
1980
1981
  trackPaths,
1981
1982
  timerPaths,
@@ -1983,7 +1984,6 @@ export {
1983
1984
  DayPicker,
1984
1985
  TimeslotPicker,
1985
1986
  TimePicker,
1986
- CalendarGrainButton,
1987
- Switch
1987
+ CalendarGrainButton
1988
1988
  };
1989
- //# sourceMappingURL=chunk-4BOPQURW.js.map
1989
+ //# sourceMappingURL=chunk-GJZKPJB5.js.map