react-native-roster 0.0.1 → 0.1.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 (81) hide show
  1. package/README.md +108 -31
  2. package/dist/src/components/roster/body-layout.d.ts +9 -0
  3. package/dist/src/components/roster/body-layout.d.ts.map +1 -0
  4. package/dist/src/components/roster/body-layout.js +9 -0
  5. package/dist/src/components/roster/body-layout.js.map +1 -0
  6. package/dist/src/components/roster/index.d.ts +1 -1
  7. package/dist/src/components/roster/index.d.ts.map +1 -1
  8. package/dist/src/components/roster/index.js +10 -26
  9. package/dist/src/components/roster/index.js.map +1 -1
  10. package/dist/src/components/roster/lanes/lane.d.ts +2 -2
  11. package/dist/src/components/roster/lanes/lane.d.ts.map +1 -1
  12. package/dist/src/components/roster/lanes/lane.js +3 -8
  13. package/dist/src/components/roster/lanes/lane.js.map +1 -1
  14. package/dist/src/components/roster/parts/body.d.ts +3 -3
  15. package/dist/src/components/roster/parts/body.d.ts.map +1 -1
  16. package/dist/src/components/roster/parts/body.js +5 -20
  17. package/dist/src/components/roster/parts/body.js.map +1 -1
  18. package/dist/src/components/roster/parts/header-cell.d.ts +2 -4
  19. package/dist/src/components/roster/parts/header-cell.d.ts.map +1 -1
  20. package/dist/src/components/roster/parts/header-cell.js.map +1 -1
  21. package/dist/src/components/roster/parts/header.d.ts +1 -1
  22. package/dist/src/components/roster/parts/header.d.ts.map +1 -1
  23. package/dist/src/components/roster/parts/header.js +2 -2
  24. package/dist/src/components/roster/parts/header.js.map +1 -1
  25. package/dist/src/components/roster/parts/lane-label-column.d.ts +1 -1
  26. package/dist/src/components/roster/parts/lane-label-column.d.ts.map +1 -1
  27. package/dist/src/components/roster/parts/lane-label-column.js +2 -2
  28. package/dist/src/components/roster/parts/lane-label-column.js.map +1 -1
  29. package/dist/src/components/roster/parts/lane-list.d.ts +7 -0
  30. package/dist/src/components/roster/parts/lane-list.d.ts.map +1 -0
  31. package/dist/src/components/roster/parts/lane-list.js +25 -0
  32. package/dist/src/components/roster/parts/lane-list.js.map +1 -0
  33. package/dist/src/components/roster/roster.types.d.ts +19 -20
  34. package/dist/src/components/roster/roster.types.d.ts.map +1 -1
  35. package/dist/src/components/roster/utils/body-content-key.d.ts +1 -1
  36. package/dist/src/components/roster/utils/body-content-key.d.ts.map +1 -1
  37. package/dist/src/components/roster/utils/body-content-key.js +10 -10
  38. package/dist/src/components/roster/utils/body-content-key.js.map +1 -1
  39. package/dist/src/components/schedule/days/day.d.ts +2 -2
  40. package/dist/src/components/schedule/days/day.d.ts.map +1 -1
  41. package/dist/src/components/schedule/days/day.js +2 -11
  42. package/dist/src/components/schedule/days/day.js.map +1 -1
  43. package/dist/src/components/schedule/days/header-layout.d.ts +1 -1
  44. package/dist/src/components/schedule/days/header-layout.d.ts.map +1 -1
  45. package/dist/src/components/schedule/days/parts/column.d.ts +1 -1
  46. package/dist/src/components/schedule/days/parts/column.d.ts.map +1 -1
  47. package/dist/src/components/schedule/days/parts/column.js +3 -8
  48. package/dist/src/components/schedule/days/parts/column.js.map +1 -1
  49. package/dist/src/components/schedule/index.d.ts.map +1 -1
  50. package/dist/src/components/schedule/index.js +7 -8
  51. package/dist/src/components/schedule/index.js.map +1 -1
  52. package/dist/src/components/schedule/schedule.types.d.ts +17 -17
  53. package/dist/src/components/schedule/schedule.types.d.ts.map +1 -1
  54. package/dist/src/index.d.ts +3 -1
  55. package/dist/src/index.d.ts.map +1 -1
  56. package/dist/src/index.js +5 -1
  57. package/dist/src/index.js.map +1 -1
  58. package/dist/src/nativewind/index.d.ts +24 -26
  59. package/dist/src/nativewind/index.d.ts.map +1 -1
  60. package/docs/migrations.md +61 -0
  61. package/llms.txt +46 -29
  62. package/package.json +3 -2
  63. package/src/components/layers/README.md +7 -3
  64. package/src/components/roster/README.md +15 -4
  65. package/src/components/roster/body-layout.tsx +32 -0
  66. package/src/components/roster/index.tsx +63 -45
  67. package/src/components/roster/lanes/lane.tsx +16 -11
  68. package/src/components/roster/parts/body.tsx +17 -84
  69. package/src/components/roster/parts/header-cell.tsx +2 -2
  70. package/src/components/roster/parts/header.tsx +7 -2
  71. package/src/components/roster/parts/lane-label-column.tsx +2 -2
  72. package/src/components/roster/parts/lane-list.tsx +74 -0
  73. package/src/components/roster/roster.types.ts +17 -16
  74. package/src/components/roster/utils/body-content-key.ts +13 -13
  75. package/src/components/schedule/README.md +8 -3
  76. package/src/components/schedule/days/day.tsx +31 -18
  77. package/src/components/schedule/days/header-layout.tsx +1 -1
  78. package/src/components/schedule/days/parts/column.tsx +10 -10
  79. package/src/components/schedule/index.tsx +20 -21
  80. package/src/components/schedule/schedule.types.ts +13 -13
  81. package/src/index.ts +3 -0
package/README.md CHANGED
@@ -34,7 +34,7 @@ hundred people without lying about time zones, this is the one.
34
34
  z-order; coverage math unions availability, subtracts bookings, and sorts.
35
35
  - **Recurrence adapter.** Weekly, daily, and monthly rules with exclusions,
36
36
  caps, and content-keyed caches, kept out of the core.
37
- - **Zones everywhere.** Every visual region is an optional render function, and
37
+ - **Zones everywhere.** Input-bearing regions accept component types, singletons accept nodes, and
38
38
  every chrome region takes `style` plus a NativeWind `className` twin.
39
39
  - **Virtualized and measured.** Geometry runs only for mounted lanes; CI gates
40
40
  layout, coverage, bundle size, and browser action budgets.
@@ -130,7 +130,7 @@ export function RecurringExample() {
130
130
 
131
131
  Tuesday is a gap carrying the dated exclusion; the other weekdays carry the
132
132
  include rule. Expand once per `windowFor(spec)` in your screen's hook, never
133
- inside a zone filler; content-keyed caches reuse unchanged occurrences. The
133
+ inside a slot component; content-keyed caches reuse unchanged occurrences. The
134
134
  [adapter guide](./docs/adapters.md) covers validation, caps, cache lifetime,
135
135
  and mapping tables or feeds without a recurrence dependency;
136
136
  [recurrence semantics](./docs/recurrence.md) records the exact anchor, UNTIL,
@@ -167,7 +167,7 @@ and "Availability may be incomplete"; both are localizable props.
167
167
 
168
168
  | Import | Shipped surface |
169
169
  | --- | --- |
170
- | `react-native-roster` | `Roster`, `Schedule`, `useRoster`, `useSchedule`, zone fillers, and all core exports. |
170
+ | `react-native-roster` | `Roster`, `Schedule`, `useRoster`, `useSchedule`, slot components, and all core exports. |
171
171
  | `react-native-roster/core` | Types, `layoutLane`, `coverageFor`, `flagFor`, axis helpers, comparators, and counters. Standard JavaScript and `Intl` only. |
172
172
  | `react-native-roster/rrule` | `expandRuleSet`, `envelopeFor`, types, and expansion counters and caches. Uses pinned `rrule-temporal` and `@js-temporal/polyfill`. |
173
173
  | `react-native-roster/nativewind` | Registers `Roster` and `Schedule` with NativeWind so their `className` props resolve; re-exports the registered components. |
@@ -203,23 +203,42 @@ to `byLabel`; `byCoverage({ measure })` sorts by coverage descending.
203
203
 
204
204
  ## Roster zones
205
205
 
206
- Every zone is an optional render function. Compose the exported default filler
207
- inside a replacement to retain scrolling, geometry, or press behavior.
206
+ Props ending in `Component` accept `ComponentType<Input>` and are mounted by React.
207
+ Props ending in `Zone` accept `ReactNode`. Define components at module scope so
208
+ state survives rerenders; hooks and class components are supported. Compose the
209
+ exported default components inside replacements to retain scrolling, geometry,
210
+ or press behavior. Pass `null` to a node slot to suppress its default.
208
211
 
209
- | Zone | Receives | Default filler and behavior |
212
+ | Slot | Component inputs or node | Default and behavior |
210
213
  | --- | --- | --- |
211
- | `emptyZone` | Nothing | `RosterEmpty`: No lanes. |
212
- | `cornerZone` | Nothing | `RosterCorner`: nothing; the cell above the labels, `laneLabelWidth` wide. |
213
- | `laneLabelZone` | `lane`, `flag`, `complete`, `viewTimezone`, localized labels | `RosterLaneLabel`: label, differing IANA zone badge, and notices. |
214
- | `headerCellZone` | `tick` | `RosterHeaderCell`: tick label. |
215
- | `intervalZone` | `rect`, `layer`, `lane`, `highlighted` | `RosterInterval`: positioned colored rect, with final inset bounds. |
216
- | `gapZone` | `rect`, `layer`, `lane` | `RosterGap`: no visible content; the row supplies pressable bounds. |
217
- | `gridZone` | `ticks`, `contentWidth` | `RosterGrid`: one hairline per tick behind every lane. |
218
- | `headerZone` | `ticks`, `projection`, `scroll`, `contentWidth`, `headerCellZone` | `RosterHeader`: frozen header following horizontal offset. |
219
- | `laneLabelColumnZone` | `labels`, `projection`, `scroll`, `laneLabelZone` | `RosterLaneLabelColumn`: frozen labels following vertical offset. |
220
- | `bodyZone` | Ordered `lanes`, `window`, `geometryFor`, `projection`, `scroll`, `press`, `ticks`, `viewport`, `contentWidth`, highlight and hover, incomplete label, and rect zones | `RosterBody`: virtualized lanes. |
221
-
222
- A custom interval filler positions at `rect.x/y`, uses `rect.width/height/z`,
214
+ | `emptyZone` | `ReactNode` | `RosterEmpty`: No lanes. |
215
+ | `cornerZone` | `ReactNode` | `RosterCorner`: nothing; the cell above the labels, `laneLabelWidth` wide. |
216
+ | `laneLabelComponent` | `lane`, `flag`, `complete`, `viewTimezone`, localized labels | `RosterLaneLabel`: label, differing IANA zone badge, and notices. |
217
+ | `headerCellComponent` | `HeaderCellInput` (`tick`) | `RosterHeaderCell`: tick label. |
218
+ | `intervalComponent` | `rect`, `layer`, `lane`, `highlighted` | `RosterInterval`: positioned colored rect, with final inset bounds. |
219
+ | `gapComponent` | `rect`, `layer`, `lane` | `RosterGap`: no visible content; the row supplies pressable bounds. |
220
+ | `gridComponent` | `ticks`, `contentWidth` | `RosterGrid`: one hairline per tick behind every lane. |
221
+ | `headerComponent` | `ticks`, `projection`, `scroll`, `contentWidth`, `headerCellComponent` | `RosterHeader`: frozen header following horizontal offset. |
222
+ | `laneLabelColumnComponent` | `labels`, `projection`, `scroll`, `laneLabelComponent` | `RosterLaneLabelColumn`: frozen labels following vertical offset. |
223
+ | `bodyComponent` | Ordered `lanes`, `window`, `geometryFor`, `projection`, `scroll`, `press`, `ticks`, `viewport`, `contentWidth`, highlight and hover, incomplete label, and rect components | `RosterBody`: virtualized lanes. |
224
+
225
+ `RosterBody` composes `RosterBodyLayout`, which arranges `gridZone` and `listZone`
226
+ nodes with scroll wiring, and `RosterLaneList`, which owns LegendList and its
227
+ per-lane callback. The body waits for viewport measurement before mounting the list.
228
+
229
+ ```tsx
230
+ import type { LaneLabelInput } from 'react-native-roster';
231
+ import { Text } from 'react-native';
232
+
233
+ function LaneLabel({ lane }: LaneLabelInput) {
234
+ return <Text>{lane.label}</Text>;
235
+ }
236
+
237
+ <Roster lanes={lanes} windowSpec={windowSpec}
238
+ laneLabelComponent={LaneLabel} cornerZone={<Text>People</Text>} />
239
+ ```
240
+
241
+ A custom interval component positions at `rect.x/y`, uses `rect.width/height/z`,
223
242
  and sets `pointerEvents="none"` so the parent hit-test walk owns presses. Gap
224
243
  fillers are already inside positioned pressables. `useRoster` exposes ordered
225
244
  lanes, coverage, lane state, ticks, `geometryFor`, shared scrolling, `press`,
@@ -230,6 +249,63 @@ holding the corner and ticks), `laneLabelColumnStyle`, and `bodyStyle`.
230
249
  `laneLabelWidth` sizes the corner and label column, default 180. Each style
231
250
  prop has a `className` twin; see [NativeWind](#nativewind).
232
251
 
252
+ ### Consumer data in slot components
253
+
254
+ For consumer data beyond a slot's Input, mount a React context provider above
255
+ `Roster` and read it with `useContext` in a module-scope slot component. This
256
+ example supplies density and locale while keeping the header cell type stable:
257
+
258
+ ```tsx
259
+ import { createContext, useContext } from 'react';
260
+ import { Text } from 'react-native';
261
+ import type { HeaderCellInput, RosterProps } from 'react-native-roster';
262
+ import { Roster } from 'react-native-roster';
263
+
264
+ type SlotPreferences = {
265
+ density: 'compact' | 'comfortable';
266
+ locale: string;
267
+ };
268
+
269
+ const SlotPreferencesContext = createContext<SlotPreferences>({
270
+ density: 'comfortable',
271
+ locale: 'en-US',
272
+ });
273
+
274
+ function LocalizedHeaderCell({ tick }: HeaderCellInput) {
275
+ const { density, locale } = useContext(SlotPreferencesContext);
276
+ const label = new Intl.DateTimeFormat(locale, {
277
+ timeZone: 'UTC',
278
+ ...(tick.kind === 'day'
279
+ ? { month: 'short', day: 'numeric' }
280
+ : { hour: 'numeric', minute: '2-digit' }),
281
+ }).format(tick.time);
282
+
283
+ return (
284
+ <Text numberOfLines={1} style={{ padding: density === 'compact' ? 2 : 6 }}>
285
+ {label}
286
+ </Text>
287
+ );
288
+ }
289
+
290
+ export function ConsumerRoster({ lanes }: Pick<RosterProps, 'lanes'>) {
291
+ return (
292
+ <SlotPreferencesContext.Provider value={{ density: 'compact', locale: 'en-GB' }}>
293
+ <Roster
294
+ lanes={lanes}
295
+ windowSpec={{ span: 'week', anchorDate: '2024-01-01', timezone: 'UTC' }}
296
+ style={{ height: 480, flex: undefined }}
297
+ headerCellComponent={LocalizedHeaderCell}
298
+ />
299
+ </SlotPreferencesContext.Provider>
300
+ );
301
+ }
302
+ ```
303
+
304
+ An inline closure or a memoized factory that returns a new component per render
305
+ is not the recommended path. A new interval component type remounts every interval
306
+ and defeats the body's content key. Context supplies changing consumer data while
307
+ preserving the module-scope component type.
308
+
233
309
  ## Schedule and its zones
234
310
 
235
311
  ```tsx
@@ -249,17 +325,17 @@ reserves a 48 px gutter, and fits the day columns without horizontal scrolling.
249
325
  `pxPerHour` defaults to 48. Chrome takes `style`, `headerStyle`, `gutterStyle`,
250
326
  and `daysStyle`, each with a `className` twin.
251
327
 
252
- | Zone | Receives | Default filler and behavior |
328
+ | Slot | Component inputs or node | Default and behavior |
253
329
  | --- | --- | --- |
254
- | `gutterZone` | `hours`, `pxPerHour` | `ScheduleGutter`: 24 frozen hour labels. |
255
- | `gridZone` | `hours`, `pxPerHour` | `ScheduleGrid`: 24 bordered hour bands behind each day's rects. |
256
- | `dayHeaderZone` | `day` | `ScheduleDayHeader`: weekday, localDate, and transition badge. |
257
- | `skippedDateZone` | `localDate` | `ScheduleSkippedDate`: zero-width header marker for a wholly skipped date. |
258
- | `columnZone` | `day`, `rects`, `gapRects`, `lane`, `highlightSource`, `press`, interval and gap zones | `ScheduleColumn`: final rect bounds in layer order. |
259
- | `transitionZone` | `day`, `transition`, `y`, `dividerY`, `height`, `width` | `ScheduleTransition`: skipped-time hatch, or repeat divider and again label. |
260
- | `nowLineZone` | `y`, `column` | `ScheduleNowLine`: line in the current day's column, updated each minute. |
261
- | `intervalZone`, `gapZone` | Same inputs as Roster | Shared `RosterInterval` and `RosterGap`. |
262
- | `incompleteZone` | `lane`, `label` | `ScheduleIncomplete`: notice above the grid when the lane is incomplete. |
330
+ | `gutterComponent` | `hours`, `pxPerHour` | `ScheduleGutter`: 24 frozen hour labels. |
331
+ | `gridComponent` | `hours`, `pxPerHour` | `ScheduleGrid`: 24 bordered hour bands behind each day's rects. |
332
+ | `dayHeaderComponent` | `day` | `ScheduleDayHeader`: weekday, localDate, and transition badge. |
333
+ | `skippedDateComponent` | `localDate` | `ScheduleSkippedDate`: zero-width header marker for a wholly skipped date. |
334
+ | `columnComponent` | `day`, `rects`, `gapRects`, `lane`, `highlightSource`, `press`, interval and gap components | `ScheduleColumn`: final rect bounds in layer order. |
335
+ | `transitionComponent` | `day`, `transition`, `y`, `dividerY`, `height`, `width` | `ScheduleTransition`: skipped-time hatch, or repeat divider and again label. |
336
+ | `nowLineComponent` | `y`, `column` | `ScheduleNowLine`: line in the current day's column, updated each minute. |
337
+ | `intervalComponent`, `gapComponent` | Same inputs as Roster | Shared `RosterInterval` and `RosterGap`. |
338
+ | `incompleteComponent` | `lane`, `label` | `ScheduleIncomplete`: notice above the grid when the lane is incomplete. |
263
339
 
264
340
  ## NativeWind
265
341
 
@@ -297,8 +373,8 @@ import { Roster } from 'react-native-roster';
297
373
  />
298
374
  ```
299
375
 
300
- Zone fillers are ordinary React Native views, so a custom `laneLabelZone` or
301
- `intervalZone` uses `className` on `View` and `Text` directly. Without the
376
+ Slot components are ordinary React Native views, so a custom `laneLabelComponent` or
377
+ `intervalComponent` uses `className` on `View` and `Text` directly. Without the
302
378
  entry point, class props are ignored and style props still work. The entry
303
379
  point is the package's only module with side effects and is listed in
304
380
  `sideEffects`. The [showcase route](./demo/app/showcase.tsx) styles every region
@@ -321,7 +397,7 @@ network). The home page lists every fixture route:
321
397
  - The showcase at `/showcase`: twelve generated people across seven zones,
322
398
  weekly hours and exclusions from the recurrence adapter, booked events, day
323
399
  and week spans, sorting, filtering, and a per-person Schedule, styled with
324
- NativeWind class props and zone fillers, with a sun and moon theme toggle.
400
+ NativeWind class props and slot components, with a sun and moon theme toggle.
325
401
  Names, titles, and the organization come from `@faker-js/faker` with a fixed
326
402
  seed; any resemblance to real people is coincidental.
327
403
 
@@ -362,6 +438,7 @@ bun run check
362
438
  the library build, the static web export, tests with coverage, knip, strict
363
439
  publint, size-limit, and Playwright.
364
440
 
441
+ - [Migrations](https://github.com/simiancraft/react-native-roster/blob/main/docs/migrations.md) lists prop renames by version with before-and-after examples.
365
442
  - [Adapter guide](./docs/adapters.md), [recurrence semantics](./docs/recurrence.md),
366
443
  [timezones](./docs/timezones.md), [caches](./docs/caches.md), and the
367
444
  [performance guide](./docs/performance.md).
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BodyInput } from './roster.types';
3
+ export declare function RosterBodyLayout({ scroll, contentWidth, viewport, gridZone, listZone, }: Pick<BodyInput, 'scroll' | 'contentWidth' | 'viewport'> & {
4
+ /** Noninteractive grid behind the lane list. */
5
+ gridZone: ReactNode;
6
+ /** Virtualized lane collection within the measured viewport. */
7
+ listZone: ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=body-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/body-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,GAAG,UAAU,CAAC,GAAG;IAC3D,gDAAgD;IAChD,QAAQ,EAAE,SAAS,CAAC;IACpB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAgBA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RosterBodyLayout = RosterBodyLayout;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ function RosterBodyLayout({ scroll, contentWidth, viewport, gridZone, listZone, }) {
7
+ return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { testID: "roster-horizontal-scroll", ref: scroll.bodyRef, horizontal: true, onScroll: scroll.onBodyScroll, scrollEventThrottle: 16, style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { width: contentWidth, height: viewport.height }, children: [gridZone, listZone] }) }));
8
+ }
9
+ //# sourceMappingURL=body-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body-layout.js","sourceRoot":"","sources":["../../../../src/components/roster/body-layout.tsx"],"names":[],"mappings":";;;;AACA,+CAAgD;AAGhD,0BAAiC,EAC/B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GAMT;IACC,OAAO,CACL,uBAAC,yBAAU,IACT,MAAM,EAAC,0BAA0B,EACjC,GAAG,EAAE,MAAM,CAAC,OAAO,EACnB,UAAU,QACV,QAAQ,EAAE,MAAM,CAAC,YAAY,EAC7B,mBAAmB,EAAE,EAAE,EACvB,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAElB,wBAAC,mBAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,aAC1D,QAAQ,EACR,QAAQ,IACJ,GACI,CACd,CAAC;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { RosterProps } from './roster.types';
2
- export declare function Roster(props: RosterProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
2
+ export declare function Roster(props: RosterProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2WA2ExC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+VA0FxC"}
@@ -14,16 +14,20 @@ const header_1 = require("./parts/header");
14
14
  const header_cell_1 = require("./parts/header-cell");
15
15
  const lane_label_column_1 = require("./parts/lane-label-column");
16
16
  const use_roster_1 = require("./use-roster");
17
+ const defaultEmptyZone = (0, jsx_runtime_1.jsx)(empty_1.RosterEmpty, {});
18
+ const defaultCornerZone = (0, jsx_runtime_1.jsx)(corner_1.RosterCorner, {});
17
19
  function Roster(props) {
18
20
  const { status, orderedLanes, laneState, window, geometryFor, projection, scroll, press, ticks, contentWidth, viewport, onLayout, } = (0, use_roster_1.useRoster)(props);
19
- const { emptyZone = empty_1.RosterEmpty, cornerZone = corner_1.RosterCorner, headerZone = header_1.RosterHeader, laneLabelColumnZone = lane_label_column_1.RosterLaneLabelColumn, bodyZone = body_1.RosterBody, headerCellZone = header_cell_1.RosterHeaderCell, laneLabelZone = lane_label_1.RosterLaneLabel, intervalZone = interval_1.RosterInterval, gapZone = gap_1.RosterGap, gridZone = grid_1.RosterGrid, incompleteLabel = 'Availability may be incomplete', neverSetLabel = 'No availability set', } = props;
21
+ const { emptyZone = defaultEmptyZone, cornerZone = defaultCornerZone, headerComponent: HeaderComponent = header_1.RosterHeader, laneLabelColumnComponent: LaneLabelColumnComponent = lane_label_column_1.RosterLaneLabelColumn, bodyComponent: BodyComponent = body_1.RosterBody, headerCellComponent = header_cell_1.RosterHeaderCell, laneLabelComponent = lane_label_1.RosterLaneLabel, intervalComponent = interval_1.RosterInterval, gapComponent = gap_1.RosterGap, gridComponent = grid_1.RosterGrid, incompleteLabel = 'Availability may be incomplete', neverSetLabel = 'No availability set', } = props;
20
22
  if (status === 'empty')
21
- return emptyZone();
23
+ return emptyZone;
22
24
  if (window.start === window.end)
23
25
  return null;
24
- return ((0, jsx_runtime_1.jsx)(layout_1.RosterLayout, { style: props.style, headerStyle: props.headerStyle, laneLabelColumnStyle: props.laneLabelColumnStyle, bodyStyle: props.bodyStyle, laneLabelWidth: props.laneLabelWidth, onLayout: onLayout, cornerZone: cornerZone(), headerZone: headerZone({ ticks, projection, scroll, contentWidth, headerCellZone }), laneLabelColumnZone: laneLabelColumnZone({
25
- labels: orderedLanes.map((lane) => {
26
- const state = laneState.get(lane.id) ?? { flag: 'none', complete: true };
26
+ return ((0, jsx_runtime_1.jsx)(layout_1.RosterLayout, { style: props.style, headerStyle: props.headerStyle, laneLabelColumnStyle: props.laneLabelColumnStyle, bodyStyle: props.bodyStyle, laneLabelWidth: props.laneLabelWidth, onLayout: onLayout, cornerZone: cornerZone, headerZone: (0, jsx_runtime_1.jsx)(HeaderComponent, { ticks: ticks, projection: projection, scroll: scroll, contentWidth: contentWidth, headerCellComponent: headerCellComponent }), laneLabelColumnZone: (0, jsx_runtime_1.jsx)(LaneLabelColumnComponent, { labels: orderedLanes.map((lane) => {
27
+ const state = laneState.get(lane.id) ?? {
28
+ flag: 'none',
29
+ complete: true,
30
+ };
27
31
  return {
28
32
  lane,
29
33
  ...state,
@@ -31,26 +35,6 @@ function Roster(props) {
31
35
  incompleteLabel,
32
36
  neverSetLabel,
33
37
  };
34
- }),
35
- projection,
36
- scroll,
37
- laneLabelZone,
38
- }), bodyZone: bodyZone({
39
- lanes: orderedLanes,
40
- window,
41
- geometryFor,
42
- projection,
43
- scroll,
44
- press,
45
- ticks,
46
- contentWidth,
47
- viewport,
48
- intervalZone,
49
- gapZone,
50
- gridZone,
51
- highlightSource: props.highlightSource,
52
- onIntervalHover: props.onIntervalHover,
53
- incompleteLabel,
54
- }) }));
38
+ }), projection: projection, scroll: scroll, laneLabelComponent: laneLabelComponent }), bodyZone: (0, jsx_runtime_1.jsx)(BodyComponent, { lanes: orderedLanes, window: window, geometryFor: geometryFor, projection: projection, scroll: scroll, press: press, ticks: ticks, contentWidth: contentWidth, viewport: viewport, intervalComponent: intervalComponent, gapComponent: gapComponent, gridComponent: gridComponent, highlightSource: props.highlightSource, onIntervalHover: props.onIntervalHover, incompleteLabel: incompleteLabel }) }));
55
39
  }
56
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":";;;;AAAA,6CAAgD;AAChD,uDAA0D;AAC1D,yDAA2D;AAC3D,qCAAwC;AACxC,uCAA0C;AAC1C,2CAA8C;AAC9C,yCAA4C;AAC5C,uCAA0C;AAC1C,2CAA8C;AAC9C,qDAAuD;AACvD,iEAAkE;AAElE,6CAAyC;AAEzC,gBAAuB,KAAkB;IACvC,MAAM,EACJ,MAAM,EACN,YAAY,EACZ,SAAS,EACT,MAAM,EACN,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,GACT,GAAG,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC;IACrB,MAAM,EACJ,SAAS,GAAG,mBAAW,EACvB,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a;SACd,CAAC,EACF,QAAQ,EAAE,QAAQ,CAAC;YACjB,KAAK,EAAE,YAAY;YACnB,MAAM;YACN,WAAW;YACX,UAAU;YACV,MAAM;YACN,KAAK;YACL,KAAK;YACL,YAAY;YACZ,QAAQ;YACR,YAAY;YACZ,OAAO;YACP,QAAQ;YACR,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,eAAe;SAChB,CAAC,GACF,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/roster/index.tsx"],"names":[],"mappings":";;;;AAAA,6CAAgD;AAChD,uDAA0D;AAC1D,yDAA2D;AAC3D,qCAAwC;AACxC,uCAA0C;AAC1C,2CAA8C;AAC9C,yCAA4C;AAC5C,uCAA0C;AAC1C,2CAA8C;AAC9C,qDAAuD;AACvD,iEAAkE;AAElE,6CAAyC;AAEzC,MAAM,gBAAgB,GAAG,uBAAC,mBAAW,KAAG,CAAC;AACzC,MAAM,iBAAiB,GAAG,uBAAC,qBAAY,KAAG,CAAC;AAE3C,gBAAuB,KAAkB;IACvC,MAAM,EACJ,MAAM,EACN,YAAY,EACZ,SAAS,EACT,MAAM,EACN,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,GACT,GAAG,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC;IACrB,MAAM,EACJ,SAAS,GAAG,gBAAgB,EAC5B,UAAU,GAAG,iBAAiB,EAC9B,eAAe,EAAE,eAAe,GAAG,qBAAY,EAC/C,wBAAwB,EAAE,wBAAwB,GAAG,yCAAqB,EAC1E,aAAa,EAAE,aAAa,GAAG,iBAAU,EACzC,mBAAmB,GAAG,8BAAgB,EACtC,kBAAkB,GAAG,4BAAe,EACpC,iBAAiB,GAAG,yBAAc,EAClC,YAAY,GAAG,eAAS,EACxB,aAAa,GAAG,iBAAU,EAC1B,e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EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,eAAe,EAAE,eAAe,GAChC,GAEJ,CACH,CAAC;AACJ,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import type { Lane, LaneGeometry } from '../../../core';
2
2
  import type { BodyInput } from '../roster.types';
3
- export type LaneRowProps = Pick<BodyInput, 'press' | 'intervalZone' | 'gapZone' | 'highlightSource' | 'onIntervalHover' | 'incompleteLabel'> & {
3
+ export type LaneRowProps = Pick<BodyInput, 'press' | 'intervalComponent' | 'gapComponent' | 'highlightSource' | 'onIntervalHover' | 'incompleteLabel'> & {
4
4
  lane: Lane;
5
5
  geometry: LaneGeometry;
6
6
  width: number;
7
7
  rowHeight: number;
8
8
  };
9
- export declare function LaneRow({ lane, geometry, width, rowHeight, press, intervalZone, gapZone, highlightSource, onIntervalHover, incompleteLabel, }: LaneRowProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function LaneRow({ lane, geometry, width, rowHeight, press, intervalComponent: IntervalComponent, gapComponent: GapComponent, highlightSource, onIntervalHover, incompleteLabel, }: LaneRowProps): import("react/jsx-runtime").JSX.Element;
10
10
  //# sourceMappingURL=lane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lane.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/lanes/lane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,SAAS,EACT,OAAO,GAAG,cAAc,GAAG,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,iBAAiB,CACjG,GAAG;IACF,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,YAAY,EACZ,OAAO,EACP,eAAe,EACf,eAAe,EACf,eAAkD,GACnD,EAAE,YAAY,2CA0Dd"}
1
+ {"version":3,"file":"lane.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/lanes/lane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,SAAS,EACP,OAAO,GACP,mBAAmB,GACnB,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,CACpB,GAAG;IACF,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,eAAe,EACf,eAAe,EACf,eAAkD,GACnD,EAAE,YAAY,2CA0Dd"}
@@ -7,19 +7,14 @@ const react_native_1 = require("react-native");
7
7
  const press_point_1 = require("../../primitives/press-point");
8
8
  const interval_hover_1 = require("./interval-hover");
9
9
  const incomplete_1 = require("./parts/incomplete");
10
- function LaneRow({ lane, geometry, width, rowHeight, press, intervalZone, gapZone, highlightSource, onIntervalHover, incompleteLabel = 'Availability may be incomplete', }) {
10
+ function LaneRow({ lane, geometry, width, rowHeight, press, intervalComponent: IntervalComponent, gapComponent: GapComponent, highlightSource, onIntervalHover, incompleteLabel = 'Availability may be incomplete', }) {
11
11
  const layers = [...lane.layers].sort((a, b) => a.z - b.z);
12
12
  return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { ...(0, interval_hover_1.intervalHoverProps)({ lane, geometry, onIntervalHover }), testID: `roster-lane-${lane.id}`, accessibilityLabel: lane.label, onPress: (input) => {
13
13
  const point = (0, press_point_1.pressPoint)(input);
14
14
  press(lane, point.x, point.y);
15
15
  }, style: { width, height: rowHeight }, children: [(0, jsx_runtime_1.jsx)(incomplete_1.RosterIncomplete, { lane: lane, geometry: geometry, width: width, label: incompleteLabel }), layers.map((layer) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [geometry.rects
16
16
  .filter((rect) => rect.layerId === layer.id)
17
- .map((rect) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: intervalZone({
18
- rect,
19
- layer,
20
- lane,
21
- highlighted: rect.sources.some((source) => source.kind === highlightSource?.kind && source.id === highlightSource.id),
22
- }) }, `interval-${rect.x}:${rect.width}`))), geometry.gapRects
17
+ .map((rect) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(IntervalComponent, { rect: rect, layer: layer, lane: lane, highlighted: rect.sources.some((source) => source.kind === highlightSource?.kind && source.id === highlightSource.id) }) }, `interval-${rect.x}:${rect.width}`))), geometry.gapRects
23
18
  .filter((rect) => rect.layerId === layer.id)
24
19
  .map((rect) => ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityLabel: `${lane.label}: removed time`, onPress: (input) => {
25
20
  input.stopPropagation();
@@ -32,6 +27,6 @@ function LaneRow({ lane, geometry, width, rowHeight, press, intervalZone, gapZon
32
27
  width: rect.width,
33
28
  height: rect.height,
34
29
  zIndex: rect.z,
35
- }, children: gapZone({ rect, layer, lane }) }, `gap-${rect.x}:${rect.width}`)))] }, layer.id)))] }));
30
+ }, children: (0, jsx_runtime_1.jsx)(GapComponent, { rect: rect, layer: layer, lane: lane }) }, `gap-${rect.x}:${rect.width}`)))] }, layer.id)))] }));
36
31
  }
37
32
  //# sourceMappingURL=lane.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lane.js","sourceRoot":"","sources":["../../../../../src/components/roster/lanes/lane.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiC;AACjC,+CAAyC;AAEzC,8DAA0D;AAE1D,qDAAsD;AACtD,mDAAsD;AAYtD,iBAAwB,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,YAAY,EACZ,OAAO,EACP,eAAe,EACf,eAAe,EACf,eAAe,GAAG,gCAAgC,GACrC;IACb,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CACL,wBAAC,wBAAS,OACJ,IAAA,mCAAkB,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAC3D,MAAM,EAAE,eAAe,IAAI,CAAC,EAAE,EAAE,EAChC,kBAAkB,EAAE,IAAI,CAAC,KAAK,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,MAAM,KAAK,GAAG,IAAA,wBAAU,EAAC,KAAK,CAAC,CAAC;YAChC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,aAEnC,uBAAC,6BAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAA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AC;4BACxB,MAAM,KAAK,GAAG,IAAA,wBAAU,EAAC,KAAK,CAAC,CAAC;4BAChC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;wBAClD,CAAC,EACD,KAAK,EAAE;4BACL,QAAQ,EAAE,UAAU;4BACpB,IAAI,EAAE,IAAI,CAAC,CAAC;4BACZ,GAAG,EAAE,IAAI,CAAC,CAAC;4BACX,KAAK,EAAE,IAAI,CAAC,KAAK;4BACjB,MAAM,EAAE,IAAI,CAAC,MAAM;4BACnB,MAAM,EAAE,IAAI,CAAC,CAAC;yBACf,YAED,uBAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,IAhBjD,OAAO,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAiBxB,CACb,CAAC,KAtCS,KAAK,CAAC,EAAE,CAuCZ,CACZ,CAAC,IACQ,CACb,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
- import { type ProfilerOnRenderCallback } from 'react';
1
+ import type { ProfilerOnRenderCallback } from 'react';
2
2
  import type { BodyInput } from '../roster.types';
3
- export declare function RosterBody({ lanes, geometryFor, projection, scroll, press, ticks, contentWidth, viewport, window, intervalZone, gapZone, gridZone, highlightSource, onIntervalHover, incompleteLabel, onRowRender, }: BodyInput & {
4
- /** Optional per-lane commit observer; used by the development gallery's Profiler gate. */
3
+ export declare function RosterBody(props: BodyInput & {
4
+ /** Development-only Profiler hook used by the gallery; not a supported customization point. */
5
5
  onRowRender?: ProfilerOnRenderCallback;
6
6
  }): import("react/jsx-runtime").JSX.Element | null;
7
7
  //# sourceMappingURL=body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/body.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,GACZ,EAAE,SAAS,GAAG;IACb,0FAA0F;IAC1F,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,kDA+DA"}
1
+ {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,wBAAgB,UAAU,CACxB,KAAK,EAAE,SAAS,GAAG;IACjB,+FAA+F;IAC/F,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,kDAcF"}
@@ -2,28 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RosterBody = RosterBody;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const list_1 = require("@legendapp/list");
6
- const react_1 = require("react");
7
- const react_native_1 = require("react-native");
8
- const lane_1 = require("../lanes/lane");
9
- const body_content_key_1 = require("../utils/body-content-key");
10
- function RosterBody({ lanes, geometryFor, projection, scroll, press, ticks, contentWidth, viewport, window, intervalZone, gapZone, gridZone, highlightSource, onIntervalHover, incompleteLabel, onRowRender, }) {
5
+ const body_layout_1 = require("../body-layout");
6
+ const lane_list_1 = require("./lane-list");
7
+ function RosterBody(props) {
8
+ const { viewport, scroll, contentWidth, ticks, gridComponent: GridComponent } = props;
11
9
  // LegendList requires a measured viewport and does not support static rendering.
12
10
  if (viewport.width <= 0 || viewport.height <= 0)
13
11
  return null;
14
- return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { testID: "roster-horizontal-scroll", ref: scroll.bodyRef, horizontal: true, onScroll: scroll.onBodyScroll, scrollEventThrottle: 16, style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { width: contentWidth, height: viewport.height }, children: [gridZone({ ticks, contentWidth }), (0, jsx_runtime_1.jsx)(list_1.LegendList, { testID: "roster-vertical-scroll", data: lanes, extraData: (0, body_content_key_1.bodyContentKey)({
15
- window,
16
- projection,
17
- highlightSource,
18
- intervalZone,
19
- gapZone,
20
- onIntervalHover,
21
- incompleteLabel,
22
- }), keyExtractor: (lane) => lane.id, estimatedListSize: { width: contentWidth, height: viewport.height }, estimatedItemSize: projection.rowHeight, getFixedItemSize: () => projection.rowHeight, drawDistance: 0, recycleItems: false, maintainVisibleContentPosition: false, onScroll: scroll.onVerticalScroll, scrollEventThrottle: 16, style: { flex: 1 }, renderItem: ({ item }) => {
23
- const row = ((0, jsx_runtime_1.jsx)(lane_1.LaneRow, { lane: item, geometry: geometryFor(item), width: contentWidth, rowHeight: projection.rowHeight, press: press, intervalZone: intervalZone, gapZone: gapZone, highlightSource: highlightSource, onIntervalHover: onIntervalHover, incompleteLabel: incompleteLabel }));
24
- if (onRowRender)
25
- return ((0, jsx_runtime_1.jsx)(react_1.Profiler, { id: item.id, onRender: onRowRender, children: row }));
26
- return row;
27
- } })] }) }));
12
+ return ((0, jsx_runtime_1.jsx)(body_layout_1.RosterBodyLayout, { scroll: scroll, contentWidth: contentWidth, viewport: viewport, gridZone: (0, jsx_runtime_1.jsx)(GridComponent, { ticks: ticks, contentWidth: contentWidth }), listZone: (0, jsx_runtime_1.jsx)(lane_list_1.RosterLaneList, { ...props }) }));
28
13
  }
29
14
  //# sourceMappingURL=body.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts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CAAC,UAAU,CAAC,SAAS,EAC5C,YAAY,EAAE,CAAC,EACf,YAAY,EAAE,KAAK,EACnB,8BAA8B,EAAE,KAAK,EACrC,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EACjC,mBAAmB,EAAE,EAAE,EACvB,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAClB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;wBACvB,MAAM,GAAG,GAAG,CACV,uBAAC,cAAO,IACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,EAC3B,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,UAAU,CAAC,SAAS,EAC/B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;wBACF,IAAI,WAAW;4BACb,OAAO,CACL,uBAAC,gBAAQ,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,WAAW,YACzC,GAAG,GACK,CACZ,CAAC;wBACJ,OAAO,GAAG,CAAC;oBACb,CAAC,GACD,IACG,GACI,CACd,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/body.tsx"],"names":[],"mappings":";;;;AACA,gDAAkD;AAElD,2CAA6C;AAE7C,oBACE,KAGC;IAED,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACtF,iFAAiF;IACjF,IAAI,QAAQ,CAAC,KAAK,IAAI,CAAC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7D,OAAO,CACL,uBAAC,8BAAgB,IACf,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,uBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,EACrE,QAAQ,EAAE,uBAAC,0BAAc,OAAK,KAAK,GAAI,GACvC,CACH,CAAC;AACJ,CAAC"}
@@ -1,5 +1,3 @@
1
- import type { RosterTick } from '../roster.types';
2
- export declare function RosterHeaderCell({ tick }: {
3
- tick: RosterTick;
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import type { HeaderCellInput } from '../roster.types';
2
+ export declare function RosterHeaderCell({ tick }: HeaderCellInput): import("react/jsx-runtime").JSX.Element;
5
3
  //# sourceMappingURL=header-cell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-cell.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,2CAM9D"}
1
+ {"version":3,"file":"header-cell.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE,eAAe,2CAMzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"header-cell.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header-cell.tsx"],"names":[],"mappings":";;;;AAAA,+CAAoC;AAGpC,0BAAiC,EAAE,IAAI,EAAwB;IAC7D,OAAO,CACL,uBAAC,mBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,YAC1E,IAAI,CAAC,KAAK,GACN,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"header-cell.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header-cell.tsx"],"names":[],"mappings":";;;;AAAA,+CAAoC;AAGpC,0BAAiC,EAAE,IAAI,EAAmB;IACxD,OAAO,CACL,uBAAC,mBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,YAC1E,IAAI,CAAC,KAAK,GACN,CACR,CAAC;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { HeaderInput } from '../roster.types';
2
- export declare function RosterHeader({ ticks, contentWidth, scroll, headerCellZone }: HeaderInput): import("react/jsx-runtime").JSX.Element;
2
+ export declare function RosterHeader({ ticks, contentWidth, scroll, headerCellComponent: HeaderCellComponent, }: HeaderInput): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,WAAW,2CAaxF"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,YAAY,EACZ,MAAM,EACN,mBAAmB,EAAE,mBAAmB,GACzC,EAAE,WAAW,2CAab"}
@@ -7,7 +7,7 @@ exports.RosterHeader = RosterHeader;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_native_1 = require("react-native");
9
9
  const react_native_reanimated_1 = __importDefault(require("react-native-reanimated"));
10
- function RosterHeader({ ticks, contentWidth, scroll, headerCellZone }) {
11
- return ((0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { testID: "roster-header", style: [{ width: contentWidth, height: 40 }, scroll.headerStyle], children: ticks.map((tick) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: { position: 'absolute', left: tick.x, top: 0 }, children: headerCellZone({ tick }) }, tick.time))) }));
10
+ function RosterHeader({ ticks, contentWidth, scroll, headerCellComponent: HeaderCellComponent, }) {
11
+ return ((0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { testID: "roster-header", style: [{ width: contentWidth, height: 40 }, scroll.headerStyle], children: ticks.map((tick) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: { position: 'absolute', left: tick.x, top: 0 }, children: (0, jsx_runtime_1.jsx)(HeaderCellComponent, { tick: tick }) }, tick.time))) }));
12
12
  }
13
13
  //# sourceMappingURL=header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header.tsx"],"names":[],"mappings":";;;;;;;AAAA,+CAAoC;AACpC,sFAA+C;AAG/C,sBAA6B,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAe;IACvF,OAAO,CACL,uBAAC,iCAAQ,CAAC,IAAI,IACZ,MAAM,EAAC,eAAe,EACtB,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,YAE/D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,uBAAC,mBAAI,IAAiB,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,YACxE,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,IADhB,IAAI,CAAC,IAAI,CAEb,CACR,CAAC,GACY,CACjB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/header.tsx"],"names":[],"mappings":";;;;;;;AAAA,+CAAoC;AACpC,sFAA+C;AAG/C,sBAA6B,EAC3B,KAAK,EACL,YAAY,EACZ,MAAM,EACN,mBAAmB,EAAE,mBAAmB,GAC5B;IACZ,OAAO,CACL,uBAAC,iCAAQ,CAAC,IAAI,IACZ,MAAM,EAAC,eAAe,EACtB,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,YAE/D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,uBAAC,mBAAI,IAAiB,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,YACzE,uBAAC,mBAAmB,IAAC,IAAI,EAAE,IAAI,GAAI,IAD1B,IAAI,CAAC,IAAI,CAEb,CACR,CAAC,GACY,CACjB,CAAC;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { LabelColumnInput } from '../roster.types';
2
- export declare function RosterLaneLabelColumn({ labels, projection, scroll, laneLabelZone, }: LabelColumnInput): import("react/jsx-runtime").JSX.Element;
2
+ export declare function RosterLaneLabelColumn({ labels, projection, scroll, laneLabelComponent: LaneLabelComponent, }: LabelColumnInput): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=lane-label-column.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lane-label-column.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-label-column.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,UAAU,EACV,MAAM,EACN,aAAa,GACd,EAAE,gBAAgB,2CAqBlB"}
1
+ {"version":3,"file":"lane-label-column.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-label-column.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,UAAU,EACV,MAAM,EACN,kBAAkB,EAAE,kBAAkB,GACvC,EAAE,gBAAgB,2CAqBlB"}
@@ -7,12 +7,12 @@ exports.RosterLaneLabelColumn = RosterLaneLabelColumn;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_native_1 = require("react-native");
9
9
  const react_native_reanimated_1 = __importDefault(require("react-native-reanimated"));
10
- function RosterLaneLabelColumn({ labels, projection, scroll, laneLabelZone, }) {
10
+ function RosterLaneLabelColumn({ labels, projection, scroll, laneLabelComponent: LaneLabelComponent, }) {
11
11
  return ((0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { testID: "roster-labels", style: [{ height: labels.length * projection.rowHeight }, scroll.labelStyle], children: labels.map((label, index) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
12
12
  position: 'absolute',
13
13
  top: index * projection.rowHeight,
14
14
  height: projection.rowHeight,
15
15
  width: '100%',
16
- }, children: laneLabelZone(label) }, label.lane.id))) }));
16
+ }, children: (0, jsx_runtime_1.jsx)(LaneLabelComponent, { ...label }) }, label.lane.id))) }));
17
17
  }
18
18
  //# sourceMappingURL=lane-label-column.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lane-label-column.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-label-column.tsx"],"names":[],"mappings":";;;;;;;AAAA,+CAAoC;AACpC,sFAA+C;AAG/C,+BAAsC,EACpC,MAAM,EACN,UAAU,EACV,MAAM,EACN,aAAa,GACI;IACjB,OAAO,CACL,uBAAC,iCAAQ,CAAC,IAAI,IACZ,MAAM,EAAC,eAAe,EACtB,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,UAAU,CAAC,YAE3E,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,uBAAC,mBAAI,IAEH,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,KAAK,GAAG,UAAU,CAAC,SAAS;gBACjC,MAAM,EAAE,UAAU,CAAC,SAAS;gBAC5B,KAAK,EAAE,MAAM;aACd,YAEA,aAAa,CAAC,KAAK,CAAC,IARhB,KAAK,CAAC,IAAI,CAAC,EAAE,CASb,CACR,CAAC,GACY,CACjB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"lane-label-column.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-label-column.tsx"],"names":[],"mappings":";;;;;;;AAAA,+CAAoC;AACpC,sFAA+C;AAG/C,+BAAsC,EACpC,MAAM,EACN,UAAU,EACV,MAAM,EACN,kBAAkB,EAAE,kBAAkB,GACrB;IACjB,OAAO,CACL,uBAAC,iCAAQ,CAAC,IAAI,IACZ,MAAM,EAAC,eAAe,EACtB,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,UAAU,CAAC,YAE3E,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,uBAAC,mBAAI,IAEH,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,KAAK,GAAG,UAAU,CAAC,SAAS;gBACjC,MAAM,EAAE,UAAU,CAAC,SAAS;gBAC5B,KAAK,EAAE,MAAM;aACd,YAED,uBAAC,kBAAkB,OAAK,KAAK,GAAI,IAR5B,KAAK,CAAC,IAAI,CAAC,EAAE,CASb,CACR,CAAC,GACY,CACjB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ProfilerOnRenderCallback } from 'react';
2
+ import type { BodyInput } from '../roster.types';
3
+ export declare function RosterLaneList({ lanes, geometryFor, projection, scroll, press, contentWidth, viewport, window, intervalComponent, gapComponent, highlightSource, onIntervalHover, incompleteLabel, onRowRender, }: Omit<BodyInput, 'ticks' | 'gridComponent'> & {
4
+ /** Development-only Profiler hook used by the gallery; not a supported customization point. */
5
+ onRowRender?: ProfilerOnRenderCallback;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=lane-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,GACZ,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,eAAe,CAAC,GAAG;IAC9C,+FAA+F;IAC/F,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,2CAiDA"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RosterLaneList = RosterLaneList;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const list_1 = require("@legendapp/list");
6
+ const react_1 = require("react");
7
+ const lane_1 = require("../lanes/lane");
8
+ const body_content_key_1 = require("../utils/body-content-key");
9
+ function RosterLaneList({ lanes, geometryFor, projection, scroll, press, contentWidth, viewport, window, intervalComponent, gapComponent, highlightSource, onIntervalHover, incompleteLabel, onRowRender, }) {
10
+ return ((0, jsx_runtime_1.jsx)(list_1.LegendList, { testID: "roster-vertical-scroll", data: lanes, extraData: (0, body_content_key_1.bodyContentKey)({
11
+ window,
12
+ projection,
13
+ highlightSource,
14
+ intervalComponent,
15
+ gapComponent,
16
+ onIntervalHover,
17
+ incompleteLabel,
18
+ }), keyExtractor: (lane) => lane.id, estimatedListSize: { width: contentWidth, height: viewport.height }, estimatedItemSize: projection.rowHeight, getFixedItemSize: () => projection.rowHeight, drawDistance: 0, recycleItems: false, maintainVisibleContentPosition: false, onScroll: scroll.onVerticalScroll, scrollEventThrottle: 16, style: { flex: 1 }, renderItem: ({ item }) => {
19
+ const row = ((0, jsx_runtime_1.jsx)(lane_1.LaneRow, { lane: item, geometry: geometryFor(item), width: contentWidth, rowHeight: projection.rowHeight, press: press, intervalComponent: intervalComponent, gapComponent: gapComponent, highlightSource: highlightSource, onIntervalHover: onIntervalHover, incompleteLabel: incompleteLabel }));
20
+ if (onRowRender)
21
+ return ((0, jsx_runtime_1.jsx)(react_1.Profiler, { id: item.id, onRender: onRowRender, children: row }));
22
+ return row;
23
+ } }));
24
+ }
25
+ //# sourceMappingURL=lane-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-list.js","sourceRoot":"","sources":["../../../../../src/components/roster/parts/lane-list.tsx"],"names":[],"mappings":";;;;AAAA,0CAA6C;AAC7C,iCAAgE;AAChE,wCAAwC;AAExC,gEAA2D;AAE3D,wBAA+B,EAC7B,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,GAIZ;IACC,OAAO,CACL,uBAAC,iBAAU,IACT,MAAM,EAAC,wBAAwB,EAC/B,IAA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