@spatika/react 1.3.0 → 1.4.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.
- package/README.md +6 -2
- package/dist/composites/EventCalendar.d.ts +13 -2
- package/dist/composites/EventCalendar.d.ts.map +1 -1
- package/dist/composites/EventCalendar.js +10 -24
- package/dist/composites/cartesian-charts.d.ts +12 -2
- package/dist/composites/cartesian-charts.d.ts.map +1 -1
- package/dist/composites/cartesian-charts.js +27 -13
- package/dist/composites/chart-composition.d.ts +19 -1
- package/dist/composites/chart-composition.d.ts.map +1 -1
- package/dist/composites/chart-composition.js +124 -62
- package/dist/composites/chart-interaction.d.ts +81 -0
- package/dist/composites/chart-interaction.d.ts.map +1 -0
- package/dist/composites/chart-interaction.js +56 -0
- package/dist/composites/chart-ui.d.ts +8 -13
- package/dist/composites/chart-ui.d.ts.map +1 -1
- package/dist/composites/chart-ui.js +9 -6
- package/dist/composites/flow-charts.d.ts +6 -1
- package/dist/composites/flow-charts.d.ts.map +1 -1
- package/dist/composites/flow-charts.js +28 -14
- package/dist/composites/radial-charts.d.ts +11 -1
- package/dist/composites/radial-charts.d.ts.map +1 -1
- package/dist/composites/radial-charts.js +33 -14
- package/dist/composites/scheduler-ui.d.ts +14 -1
- package/dist/composites/scheduler-ui.d.ts.map +1 -1
- package/dist/composites/scheduler-ui.js +23 -2
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/lib/chips.d.ts +3 -0
- package/dist/lib/chips.d.ts.map +1 -1
- package/dist/lib/chips.js +10 -0
- package/dist/lib/scheduler.d.ts +12 -0
- package/dist/lib/scheduler.d.ts.map +1 -1
- package/dist/lib/scheduler.js +22 -0
- package/dist/primitives/NativeSelect.d.ts +10 -1
- package/dist/primitives/NativeSelect.d.ts.map +1 -1
- package/dist/primitives/NativeSelect.js +2 -2
- package/package.json +3 -3
- package/skills/spatika-ui/SKILL.md +4 -0
- package/src/composites/EventCalendar.tsx +35 -24
- package/src/composites/cartesian-charts.test.tsx +86 -2
- package/src/composites/cartesian-charts.tsx +84 -16
- package/src/composites/chart-composition.test.tsx +15 -0
- package/src/composites/chart-composition.tsx +229 -88
- package/src/composites/chart-interaction.ts +136 -0
- package/src/composites/chart-ui.tsx +35 -27
- package/src/composites/flow-charts.test.tsx +21 -2
- package/src/composites/flow-charts.tsx +59 -25
- package/src/composites/radial-charts.test.tsx +17 -2
- package/src/composites/radial-charts.tsx +38 -12
- package/src/composites/scheduler-ui.tsx +128 -26
- package/src/composites/scheduler.test.tsx +39 -0
- package/src/index.test.ts +4 -0
- package/src/index.ts +18 -1
- package/src/lib/chips.ts +16 -0
- package/src/lib/scheduler.test.ts +16 -0
- package/src/lib/scheduler.ts +34 -0
- package/src/primitives/NativeSelect.test.tsx +28 -0
- package/src/primitives/NativeSelect.tsx +14 -4
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
React primitives and composites for **Spatika UI** — a glass React design system with four themes and shared tokens.
|
|
4
4
|
|
|
5
|
+
**Docs:** [spatika.sweyam.com](https://spatika.sweyam.com) · Machine index: [llms.txt](https://spatika.sweyam.com/llms.txt)
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -60,13 +62,15 @@ Prefer `@spatika/tokens/styles.css`. If you compile Tailwind in your app and onl
|
|
|
60
62
|
|
|
61
63
|
## Docs
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
Human docs and live previews: [spatika.sweyam.com](https://spatika.sweyam.com)
|
|
66
|
+
|
|
67
|
+
Run the documentation site from the monorepo root:
|
|
64
68
|
|
|
65
69
|
```bash
|
|
66
70
|
npm run dev
|
|
67
71
|
```
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
Packages on npm: [spatika scope](https://www.npmjs.com/org/spatika)
|
|
70
74
|
|
|
71
75
|
## License
|
|
72
76
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type CalendarView, type NormalizedEvent, type SchedulerEvent, type SchedulerPreferences, type SchedulerResource } from "../lib/scheduler";
|
|
2
|
+
import { type CalendarView, type CalendarVisibleRange, type NormalizedEvent, type SchedulerEvent, type SchedulerPreferences, type SchedulerResource } from "../lib/scheduler";
|
|
3
|
+
import { type SchedulerToolbarDensity } from "./scheduler-ui";
|
|
3
4
|
export type EventCalendarEventVariant = "month-bar" | "month-timed" | "all-day" | "time-grid" | "agenda";
|
|
4
5
|
export type EventCalendarEventRenderContext = {
|
|
5
6
|
view: CalendarView;
|
|
@@ -61,6 +62,16 @@ export type EventCalendarProps = {
|
|
|
61
62
|
showPreferences?: boolean;
|
|
62
63
|
/** Extra controls after the view menu. Ignored when `renderToolbar` is set. */
|
|
63
64
|
toolbarTrailing?: ReactNode;
|
|
65
|
+
/** Default toolbar layout. Compact is a single desktop row. Ignored when `renderToolbar` is set. */
|
|
66
|
+
toolbarDensity?: SchedulerToolbarDensity;
|
|
67
|
+
/** Month/year native selects on the default toolbar. Ignored when `renderToolbar` is set. */
|
|
68
|
+
showDateJump?: boolean;
|
|
69
|
+
/** Years in the date-jump select. Defaults to a window around the current year. */
|
|
70
|
+
yearOptions?: number[];
|
|
71
|
+
/** Fires when the painted date window changes. `end` is exclusive. */
|
|
72
|
+
onVisibleRangeChange?: (range: CalendarVisibleRange & {
|
|
73
|
+
view: CalendarView;
|
|
74
|
+
}) => void;
|
|
64
75
|
/** Replace event chip contents. The kit still wraps with the click/drag trigger. */
|
|
65
76
|
renderEvent?: (event: NormalizedEvent, context: EventCalendarEventRenderContext) => ReactNode;
|
|
66
77
|
/** Replace the toolbar. The default kit toolbar is used when omitted. */
|
|
@@ -68,5 +79,5 @@ export type EventCalendarProps = {
|
|
|
68
79
|
className?: string;
|
|
69
80
|
};
|
|
70
81
|
/** Month / week / day / agenda calendar with editor, resize, recurrence, and preferences. */
|
|
71
|
-
export declare function EventCalendar({ events, resources, view: viewProp, defaultView, onViewChange, date: dateProp, defaultDate, onDateChange, views, weekStartsOn, hourStart, hourEnd, locale, readOnly, areEventsDraggable, areEventsResizable, preferences, defaultPreferences, onPreferencesChange, onEventClick, onEventChange, onEventCreate, onEventDelete, onSlotClick, showEventEditor, showPreferences, toolbarTrailing, renderEvent, renderToolbar, className, }: EventCalendarProps): import("react").JSX.Element;
|
|
82
|
+
export declare function EventCalendar({ events, resources, view: viewProp, defaultView, onViewChange, date: dateProp, defaultDate, onDateChange, views, weekStartsOn, hourStart, hourEnd, locale, readOnly, areEventsDraggable, areEventsResizable, preferences, defaultPreferences, onPreferencesChange, onEventClick, onEventChange, onEventCreate, onEventDelete, onSlotClick, showEventEditor, showPreferences, toolbarTrailing, toolbarDensity, showDateJump, yearOptions, onVisibleRangeChange, renderEvent, renderToolbar, className, }: EventCalendarProps): import("react").JSX.Element;
|
|
72
83
|
//# sourceMappingURL=EventCalendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventCalendar.d.ts","sourceRoot":"","sources":["../../src/composites/EventCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"EventCalendar.d.ts","sourceRoot":"","sources":["../../src/composites/EventCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAoCL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAQL,KAAK,uBAAuB,EAC7B,MAAM,gBAAgB,CAAC;AAGxB,MAAM,MAAM,yBAAyB,GACjC,WAAW,GACX,aAAa,GACb,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,YAAY,CAAC;I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AM,EAAE,CAAC;IACvB,sEAAsE;IACtE,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,GAAG;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF,oFAAoF;IACpF,WAAW,CAAC,EAAE,CACZ,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,+BAA+B,KACrC,SAAS,CAAC;IACf,yEAAyE;IACzE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,SAAS,CAAC;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAiCF,6FAA6F;AAC7F,wBAAgB,aAAa,CAAC,EAC5B,MAAW,EACX,SAAc,EACd,IAAI,EAAE,QAAQ,EACd,WAAqB,EACrB,YAAY,EACZ,IAAI,EAAE,QAAQ,EACd,WAAW,EACX,YAAY,EACZ,KAA0C,EAC1C,YAAgB,EAChB,SAAa,EACb,OAAY,EACZ,MAAM,EACN,QAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EACX,eAAsB,EACtB,eAAsB,EACtB,eAAe,EACf,cAA0B,EAC1B,YAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,SAAS,GACV,EAAE,kBAAkB,+BA0WpB"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo, useRef, useState, } from "react";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { cn } from "../lib/cn";
|
|
4
4
|
import { expandVisibleEvents } from "../lib/rrule";
|
|
5
5
|
import { useControllableState } from "../lib/use-controllable-state";
|
|
6
|
-
import { addDays, addMonths, agendaDays, DEFAULT_SCHEDULER_PREFERENCES, eventCanDrag, eventCanResize, eventColorStyle, filterWeekendDays, formatDateSpan, formatDayHeading, formatHour, formatMonthYear, formatTime, formatWeekRange, getMonthGrid, getWeekDays, hoursInView, isMonthBar, isSameDay, isSameMonth, isoDay, layoutTimedEvents, normalizeEvents, occupiesDay, occurrenceKey, resizeEvent, shiftByDays, startOfDay, timedEventsOnDay, toDate, visibleEvents, weekNumber, weekSpanLanesForDays, } from "../lib/scheduler";
|
|
6
|
+
import { addDays, addMonths, agendaDays, calendarVisibleRange, CALENDAR_AGENDA_DAYS, DEFAULT_SCHEDULER_PREFERENCES, eventCanDrag, eventCanResize, eventColorStyle, filterWeekendDays, formatDateSpan, formatDayHeading, formatHour, formatMonthYear, formatTime, formatWeekRange, getMonthGrid, getWeekDays, hoursInView, isMonthBar, isSameDay, isSameMonth, isoDay, layoutTimedEvents, normalizeEvents, occupiesDay, occurrenceKey, resizeEvent, shiftByDays, startOfDay, timedEventsOnDay, toDate, visibleEvents, weekNumber, weekSpanLanesForDays, } from "../lib/scheduler";
|
|
7
7
|
import { EventEditor } from "./EventEditor";
|
|
8
|
-
import { CALENDAR_VIEW_LABEL, EventResizeHandle, ResourceLegend, SchedulerPreferencesMenu, SchedulerShell, SchedulerToolbar, } from "./scheduler-ui";
|
|
8
|
+
import { CALENDAR_VIEW_LABEL, EventResizeHandle, ResourceLegend, SchedulerDateJump, SchedulerPreferencesMenu, SchedulerShell, SchedulerToolbar, } from "./scheduler-ui";
|
|
9
9
|
import { DropdownMenuItem } from "../primitives/DropdownMenu";
|
|
10
10
|
const MAX_TIMED_IN_CELL = 3;
|
|
11
|
-
const AGENDA_LENGTH = 14;
|
|
12
11
|
function chunkWeeks(items) {
|
|
13
12
|
const weeks = [];
|
|
14
13
|
for (let i = 0; i < items.length; i += 7)
|
|
@@ -22,22 +21,6 @@ function startOfToday() {
|
|
|
22
21
|
const now = new Date();
|
|
23
22
|
return new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
24
23
|
}
|
|
25
|
-
function visibleRange(view, date, weekStartsOn) {
|
|
26
|
-
if (view === "month") {
|
|
27
|
-
const grid = getMonthGrid(date, weekStartsOn);
|
|
28
|
-
return { start: grid[0], end: addDays(grid[grid.length - 1], 1) };
|
|
29
|
-
}
|
|
30
|
-
if (view === "week") {
|
|
31
|
-
const days = getWeekDays(date, weekStartsOn);
|
|
32
|
-
return { start: days[0], end: addDays(days[6], 1) };
|
|
33
|
-
}
|
|
34
|
-
if (view === "agenda") {
|
|
35
|
-
const days = agendaDays(date, AGENDA_LENGTH);
|
|
36
|
-
return { start: days[0], end: addDays(days[days.length - 1], 1) };
|
|
37
|
-
}
|
|
38
|
-
const start = startOfDay(date);
|
|
39
|
-
return { start, end: addDays(start, 1) };
|
|
40
|
-
}
|
|
41
24
|
function draftFromSource(source) {
|
|
42
25
|
return {
|
|
43
26
|
id: source.id,
|
|
@@ -52,7 +35,7 @@ function draftFromSource(source) {
|
|
|
52
35
|
};
|
|
53
36
|
}
|
|
54
37
|
/** Month / week / day / agenda calendar with editor, resize, recurrence, and preferences. */
|
|
55
|
-
export function EventCalendar({ events = [], resources = [], view: viewProp, defaultView = "month", onViewChange, date: dateProp, defaultDate, onDateChange, views = ["month", "week", "day", "agenda"], weekStartsOn = 0, hourStart = 7, hourEnd = 21, locale, readOnly = false, areEventsDraggable, areEventsResizable, preferences, defaultPreferences, onPreferencesChange, onEventClick, onEventChange, onEventCreate, onEventDelete, onSlotClick, showEventEditor = true, showPreferences = true, toolbarTrailing, renderEvent, renderToolbar, className, }) {
|
|
38
|
+
export function EventCalendar({ events = [], resources = [], view: viewProp, defaultView = "month", onViewChange, date: dateProp, defaultDate, onDateChange, views = ["month", "week", "day", "agenda"], weekStartsOn = 0, hourStart = 7, hourEnd = 21, locale, readOnly = false, areEventsDraggable, areEventsResizable, preferences, defaultPreferences, onPreferencesChange, onEventClick, onEventChange, onEventCreate, onEventDelete, onSlotClick, showEventEditor = true, showPreferences = true, toolbarTrailing, toolbarDensity = "default", showDateJump = false, yearOptions, onVisibleRangeChange, renderEvent, renderToolbar, className, }) {
|
|
56
39
|
const [view, setView] = useControllableState({
|
|
57
40
|
prop: viewProp,
|
|
58
41
|
defaultProp: defaultView,
|
|
@@ -82,7 +65,10 @@ export function EventCalendar({ events = [], resources = [], view: viewProp, def
|
|
|
82
65
|
const canDrag = !readOnly && (areEventsDraggable ?? Boolean(onEventChange));
|
|
83
66
|
const canResize = !readOnly && (areEventsResizable ?? Boolean(onEventChange));
|
|
84
67
|
const editorLocked = readOnly || Boolean(draft?.id && sourceEvent(events, draft.id)?.readOnly);
|
|
85
|
-
const range = useMemo(() =>
|
|
68
|
+
const range = useMemo(() => calendarVisibleRange(resolvedView, resolvedDate, startOn), [resolvedView, resolvedDate, startOn]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
onVisibleRangeChange?.({ start: range.start, end: range.end, view: resolvedView });
|
|
71
|
+
}, [range.start, range.end, resolvedView, onVisibleRangeChange]);
|
|
86
72
|
const normalized = useMemo(() => {
|
|
87
73
|
const visible = visibleEvents(normalizeEvents(events, resources), hiddenIds);
|
|
88
74
|
return expandVisibleEvents(visible, range.start, range.end, events);
|
|
@@ -252,7 +238,7 @@ export function EventCalendar({ events = [], resources = [], view: viewProp, def
|
|
|
252
238
|
onToday: () => setDate(new Date()),
|
|
253
239
|
onDateChange: (next) => setDate(next),
|
|
254
240
|
onPreferencesChange: (next) => setPrefs(next),
|
|
255
|
-
})) : (_jsx(SchedulerToolbar, { title: title, onPrev: () => go(-1), onNext: () => go(1), onToday: () => setDate(new Date()), menuLabel: CALENDAR_VIEW_LABEL[resolvedView], menu: views.map((item) => (_jsx(DropdownMenuItem, { onClick: () => setView(item), children: CALENDAR_VIEW_LABEL[item] }, item))), trailing: _jsxs(_Fragment, { children: [toolbarTrailing, showPreferences ? (_jsx(SchedulerPreferencesMenu, { value: resolvedPrefs, onChange: (next) => setPrefs(next) })) : null] }) })), resolvedView === "month" ? (_jsx(MonthGrid, { date: resolvedDate, today: today, events: normalized, weekStartsOn: startOn, showWeekends: resolvedPrefs.showWeekends, showWeekNumber: resolvedPrefs.showWeekNumber, locale: locale, hour12: hour12, onSlotClick: openSlot, renderEventTrigger: renderEventTrigger })) : resolvedView === "agenda" ? (_jsx(AgendaList, { date: resolvedDate, events: normalized, showWeekends: resolvedPrefs.showWeekends, locale: locale, hour12: hour12, onSlotClick: openSlot, renderEventTrigger: renderEventTrigger })) : (_jsx(TimeGrid, { date: resolvedDate, today: today, events: normalized, view: resolvedView === "day" ? "day" : "week", weekStartsOn: startOn, showWeekends: resolvedPrefs.showWeekends, hourStart: hourStart, hourEnd: hourEnd, locale: locale, hour12: hour12, onSlotClick: openSlot, renderEventTrigger: renderEventTrigger })), _jsx(ResourceLegend, { resources: resources, hiddenIds: hiddenIds, onToggle: toggleResource }), showEventEditor ? (_jsx(EventEditor, { open: draft != null, onOpenChange: (open) => {
|
|
241
|
+
})) : (_jsx(SchedulerToolbar, { title: title, density: toolbarDensity, onPrev: () => go(-1), onNext: () => go(1), onToday: () => setDate(new Date()), menuLabel: CALENDAR_VIEW_LABEL[resolvedView], menu: views.map((item) => (_jsx(DropdownMenuItem, { onClick: () => setView(item), children: CALENDAR_VIEW_LABEL[item] }, item))), dateJump: showDateJump ? (_jsx(SchedulerDateJump, { date: resolvedDate, locale: locale, yearOptions: yearOptions, onDateChange: (next) => setDate(next) })) : null, trailing: _jsxs(_Fragment, { children: [toolbarTrailing, showPreferences ? (_jsx(SchedulerPreferencesMenu, { value: resolvedPrefs, onChange: (next) => setPrefs(next) })) : null] }) })), resolvedView === "month" ? (_jsx(MonthGrid, { date: resolvedDate, today: today, events: normalized, weekStartsOn: startOn, showWeekends: resolvedPrefs.showWeekends, showWeekNumber: resolvedPrefs.showWeekNumber, locale: locale, hour12: hour12, onSlotClick: openSlot, renderEventTrigger: renderEventTrigger })) : resolvedView === "agenda" ? (_jsx(AgendaList, { date: resolvedDate, events: normalized, showWeekends: resolvedPrefs.showWeekends, locale: locale, hour12: hour12, onSlotClick: openSlot, renderEventTrigger: renderEventTrigger })) : (_jsx(TimeGrid, { date: resolvedDate, today: today, events: normalized, view: resolvedView === "day" ? "day" : "week", weekStartsOn: startOn, showWeekends: resolvedPrefs.showWeekends, hourStart: hourStart, hourEnd: hourEnd, locale: locale, hour12: hour12, onSlotClick: openSlot, renderEventTrigger: renderEventTrigger })), _jsx(ResourceLegend, { resources: resources, hiddenIds: hiddenIds, onToggle: toggleResource }), showEventEditor ? (_jsx(EventEditor, { open: draft != null, onOpenChange: (open) => {
|
|
256
242
|
if (!open)
|
|
257
243
|
setDraft(null);
|
|
258
244
|
}, draft: draft, resources: resources, readOnly: editorLocked, onSave: (event) => {
|
|
@@ -357,7 +343,7 @@ function TimeGrid({ date, today, events, view, weekStartsOn, showWeekends, hourS
|
|
|
357
343
|
})] }), showNow && nowTop > 0 && nowTop < hours.length * hourHeight ? (_jsx("div", { className: "pointer-events-none absolute right-0 left-14 z-10 h-px bg-destructive", style: { top: nowTop }, children: _jsx("span", { className: "absolute -top-1 -left-1 size-2 rounded-full bg-destructive" }) })) : null] })] }));
|
|
358
344
|
}
|
|
359
345
|
function AgendaList({ date, events, showWeekends, locale, hour12, onSlotClick, renderEventTrigger, }) {
|
|
360
|
-
const days = filterWeekendDays(agendaDays(date,
|
|
346
|
+
const days = filterWeekendDays(agendaDays(date, CALENDAR_AGENDA_DAYS), showWeekends);
|
|
361
347
|
return (_jsx("div", { className: "divide-y divide-border/50", children: days.map((day) => {
|
|
362
348
|
const items = events.filter((event) => occupiesDay(event, day));
|
|
363
349
|
return (_jsxs("div", { className: "grid grid-cols-[7.5rem_minmax(0,1fr)] gap-3 px-3 py-3 sm:px-4", children: [_jsxs("button", { type: "button", "data-scheduler-day": isoDay(day), className: "text-left", onClick: () => onSlotClick?.({
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type BoxPlotStats, type ChartAxisConfig, type ChartCurve, type ChartMargin } from "../lib/charts";
|
|
3
|
+
import { type ChartItemEvent, type ChartMarkRenderContext, type ChartReferenceLine, type ChartTooltipRenderer } from "./chart-interaction";
|
|
2
4
|
import { type ScatterRenderer } from "../lib/webgl-scatter";
|
|
3
5
|
export type { ScatterRenderer };
|
|
4
6
|
export type NumericSeries = {
|
|
@@ -7,6 +9,8 @@ export type NumericSeries = {
|
|
|
7
9
|
data?: Array<number | null>;
|
|
8
10
|
dataKey?: string;
|
|
9
11
|
color?: string;
|
|
12
|
+
/** Per-category colors; each entry falls back to `color`. */
|
|
13
|
+
itemColors?: Array<string | null | undefined>;
|
|
10
14
|
stack?: string;
|
|
11
15
|
area?: boolean;
|
|
12
16
|
curve?: ChartCurve;
|
|
@@ -32,6 +36,12 @@ export type CartesianChartProps = {
|
|
|
32
36
|
highlightScope?: import("../lib/charts").HighlightScope;
|
|
33
37
|
animated?: boolean;
|
|
34
38
|
locale?: string;
|
|
39
|
+
fillHeight?: boolean;
|
|
40
|
+
onItemClick?: (event: ChartItemEvent) => void;
|
|
41
|
+
renderTooltip?: ChartTooltipRenderer;
|
|
42
|
+
renderMark?: (ctx: ChartMarkRenderContext) => ReactNode;
|
|
43
|
+
referenceLines?: ChartReferenceLine[];
|
|
44
|
+
showLabels?: boolean;
|
|
35
45
|
};
|
|
36
46
|
export type BarChartProps = CartesianChartProps & {
|
|
37
47
|
layout?: "vertical" | "horizontal";
|
|
@@ -59,8 +69,8 @@ export type ScatterSeries = {
|
|
|
59
69
|
color?: string;
|
|
60
70
|
data: ScatterPoint[];
|
|
61
71
|
};
|
|
62
|
-
export declare function BarChart({ xAxis, yAxis, series, dataset, height, width, layout, stacked, borderRadius, colors, hideLegend, hideGrid, margin, className, barGapRatio, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, }: BarChartProps): import("react").JSX.Element;
|
|
63
|
-
export declare function LineChart({ xAxis, yAxis, series, dataset, height, width, colors, hideLegend, hideGrid, margin, className, curve, area, showMark, stacked, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, }: LineChartProps): import("react").JSX.Element;
|
|
72
|
+
export declare function BarChart({ xAxis, yAxis, series, dataset, height, width, layout, stacked, borderRadius, colors, hideLegend, hideGrid, margin, className, barGapRatio, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, fillHeight, onItemClick, renderTooltip, renderMark, referenceLines, showLabels, }: BarChartProps): import("react").JSX.Element;
|
|
73
|
+
export declare function LineChart({ xAxis, yAxis, series, dataset, height, width, colors, hideLegend, hideGrid, margin, className, curve, area, showMark, stacked, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, fillHeight, onItemClick, renderTooltip, renderMark, referenceLines, }: LineChartProps): import("react").JSX.Element;
|
|
64
74
|
export declare function AreaChart(props: LineChartProps): import("react").JSX.Element;
|
|
65
75
|
export type SparkLineChartProps = {
|
|
66
76
|
data: number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesian-charts.d.ts","sourceRoot":"","sources":["../../src/composites/cartesian-charts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cartesian-charts.d.ts","sourceRoot":"","sources":["../../src/composites/cartesian-charts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAgBL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AAcvB,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,KA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ACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IACxE,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;KAAE,CAAC,CAAC;IAChG,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,UAAiB,EACjB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,OAAkB,GACnB,EAAE,qBAAqB,+BAyEvB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,qBAAqB,+BAErD"}
|
|
@@ -3,6 +3,7 @@ import { useCallback, useState } from "react";
|
|
|
3
3
|
import { areaPath, bandScale, boxPlotStats, chartColor, extent, formatChartNumber, linePath, linearScale, niceTicks, pointScale, rangeAreaPath, roundedRectPath, stackSeries, waterfallBars, } from "../lib/charts";
|
|
4
4
|
import { CartesianGrid, CategoryAxis, ChartFrame, ValueAxis, categoryLabels, formatSeriesValue, seriesMeta, useChartHover, useHiddenSeries, } from "./chart-ui";
|
|
5
5
|
import { ChartContainer } from "./chart-composition";
|
|
6
|
+
import { bindChartMark, seriesItemColor, } from "./chart-interaction";
|
|
6
7
|
import { ScatterWebGLLayer } from "./ScatterWebGL";
|
|
7
8
|
import { nearestScatterHit, shouldUseWebGL, svgPointerPosition, } from "../lib/webgl-scatter";
|
|
8
9
|
function box(width, height, m) {
|
|
@@ -68,14 +69,14 @@ function CartesianShell({ slot, ariaLabel, series, colors, hideLegend, hideGrid,
|
|
|
68
69
|
return (_jsxs("svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}`, children: [hideGrid ? null : (_jsx(CartesianGrid, { ticks: ticks, scale: yAt, left: plot.left, right: plot.right, top: plot.top, bottom: plot.bottom })), yAxis?.[0]?.hide ? null : _jsx(ValueAxis, { ticks: ticks, scale: yAt, left: plot.left }), xAxis?.[0]?.hide ? null : (_jsx(CategoryAxis, { labels: categories, position: xAt, y: plot.bottom })), children({ plot, xAt, yAt, bandwidth, ticks, hidden, meta, setHover, clear })] }));
|
|
69
70
|
} }));
|
|
70
71
|
}
|
|
71
|
-
export function BarChart({ xAxis, yAxis, series, dataset, height, width, layout = "vertical", stacked = false, borderRadius = 6, colors, hideLegend, hideGrid, margin, className, barGapRatio = 0.15, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, }) {
|
|
72
|
+
export function BarChart({ xAxis, yAxis, series, dataset, height, width, layout = "vertical", stacked = false, borderRadius = 6, colors, hideLegend, hideGrid, margin, className, barGapRatio = 0.15, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, fillHeight, onItemClick, renderTooltip, renderMark, referenceLines, showLabels, }) {
|
|
72
73
|
const meta = seriesMeta(series, colors);
|
|
73
74
|
if (layout === "horizontal") {
|
|
74
|
-
return (_jsx(HorizontalBarChart, { xAxis: xAxis, yAxis: yAxis, series: series, height: height, width: width, stacked: stacked, borderRadius: borderRadius, colors: colors, hideLegend: hideLegend, hideGrid: hideGrid, margin: margin, className: className, barGapRatio: barGapRatio }));
|
|
75
|
+
return (_jsx(HorizontalBarChart, { xAxis: xAxis, yAxis: yAxis, series: series, height: height, width: width, stacked: stacked, borderRadius: borderRadius, colors: colors, hideLegend: hideLegend, hideGrid: hideGrid, margin: margin, className: className, barGapRatio: barGapRatio, fillHeight: fillHeight, onItemClick: onItemClick, renderTooltip: renderTooltip, showLabels: showLabels }));
|
|
75
76
|
}
|
|
76
|
-
return (_jsx(ChartContainer, { slot: "bar-chart", "aria-label": `Bar chart of ${meta.map((s) => s.label).join(", ")}`, className: className, width: width, height: height, margin: margin, dataset: dataset, xAxis: xAxis, yAxis: yAxis, series: series.map((item) => ({ ...item, type: "bar" })), colors: colors, hideLegend: hideLegend, hideGrid: hideGrid, stacked: stacked, barGapRatio: barGapRatio, borderRadius: borderRadius, zoom: zoom, onZoomChange: onZoomChange, showToolbar: showToolbar, highlightScope: highlightScope, animated: animated, locale: locale }));
|
|
77
|
+
return (_jsx(ChartContainer, { slot: "bar-chart", "aria-label": `Bar chart of ${meta.map((s) => s.label).join(", ")}`, className: className, width: width, height: height, margin: margin, dataset: dataset, xAxis: xAxis, yAxis: yAxis, series: series.map((item) => ({ ...item, type: "bar" })), colors: colors, hideLegend: hideLegend, hideGrid: hideGrid, stacked: stacked, barGapRatio: barGapRatio, borderRadius: borderRadius, zoom: zoom, onZoomChange: onZoomChange, showToolbar: showToolbar, highlightScope: highlightScope, animated: animated, locale: locale, fillHeight: fillHeight, onItemClick: onItemClick, renderTooltip: renderTooltip, renderMark: renderMark, referenceLines: referenceLines, showLabels: showLabels }));
|
|
77
78
|
}
|
|
78
|
-
function HorizontalBarChart({ xAxis, yAxis, series, height, width, stacked, borderRadius = 6, colors, hideLegend, hideGrid, margin, className, barGapRatio = 0.15, }) {
|
|
79
|
+
function HorizontalBarChart({ xAxis, yAxis, series, height, width, stacked, borderRadius = 6, colors, hideLegend, hideGrid, margin, className, barGapRatio = 0.15, fillHeight, onItemClick, renderTooltip, showLabels, }) {
|
|
79
80
|
const categories = categoryLabels(xAxis?.[0], series[0]?.data?.length ?? 0);
|
|
80
81
|
const domain = numericDomain(series, Boolean(stacked), yAxis?.[0]);
|
|
81
82
|
const meta = seriesMeta(series, colors);
|
|
@@ -84,7 +85,7 @@ function HorizontalBarChart({ xAxis, yAxis, series, height, width, stacked, bord
|
|
|
84
85
|
const { hover, setHover, clear } = useChartHover();
|
|
85
86
|
const ticks = niceTicks(domain[0], domain[1], 5);
|
|
86
87
|
const stacks = stacked ? stackSeries(series.map((item) => (item.data ?? []).map((v) => v ?? 0))) : null;
|
|
87
|
-
return (_jsx(ChartFrame, { slot: "bar-chart", className: className, width: width, height: height, margin: margin ?? { top: 16, right: 16, bottom: 28, left: 72 }, legend: hideLegend ? undefined : meta, hiddenIds: hidden, onToggleSeries: toggle, hover: hover, "aria-label": `Bar chart of ${meta.map((s) => s.label).join(", ")}`, children: ({ width: w, height: h, m }) => {
|
|
88
|
+
return (_jsx(ChartFrame, { slot: "bar-chart", className: className, width: width, height: height, fillHeight: fillHeight, margin: margin ?? { top: 16, right: showLabels ? 48 : 16, bottom: 28, left: 72 }, legend: hideLegend ? undefined : meta, hiddenIds: hidden, onToggleSeries: toggle, hover: hover, renderTooltip: renderTooltip, "aria-label": `Bar chart of ${meta.map((s) => s.label).join(", ")}`, children: ({ width: w, height: h, m }) => {
|
|
88
89
|
const plot = box(w, h, m);
|
|
89
90
|
const xAt = linearScale(domain, [plot.left, plot.right]);
|
|
90
91
|
const yScale = bandScale(categories.map(String), [plot.top, plot.bottom], 0.24);
|
|
@@ -119,17 +120,30 @@ function HorizontalBarChart({ xAxis, yAxis, series, height, width, stacked, bord
|
|
|
119
120
|
}
|
|
120
121
|
const x = Math.min(x1, x2);
|
|
121
122
|
const barW = Math.max(1, Math.abs(x2 - x1));
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
const color = seriesItemColor(info.color, item.itemColors, i);
|
|
124
|
+
const event = {
|
|
125
|
+
seriesId: info.id,
|
|
126
|
+
seriesLabel: info.label,
|
|
127
|
+
dataIndex: i,
|
|
128
|
+
category: categories[i] ?? i,
|
|
129
|
+
value,
|
|
130
|
+
color,
|
|
131
|
+
};
|
|
132
|
+
return (_jsxs("g", { children: [_jsx("path", { d: roundedRectPath(x, y, barW, stacked ? yScale.bandwidth : barH, borderRadius), fill: color, ...bindChartMark({
|
|
133
|
+
event,
|
|
134
|
+
hover: {
|
|
135
|
+
title: String(categories[i]),
|
|
136
|
+
items: [{ color, label: info.label, value: formatSeriesValue(value) }],
|
|
137
|
+
},
|
|
138
|
+
onItemClick,
|
|
139
|
+
setHover,
|
|
140
|
+
clearHover: clear,
|
|
141
|
+
}) }), showLabels ? (_jsx("text", { className: "spk-chart-label", x: Math.max(x1, x2) + 6, y: y + (stacked ? yScale.bandwidth : barH) / 2, dominantBaseline: "middle", children: formatSeriesValue(value) })) : null] }, `${info.id}-${i}`));
|
|
128
142
|
});
|
|
129
143
|
})] }));
|
|
130
144
|
} }));
|
|
131
145
|
}
|
|
132
|
-
export function LineChart({ xAxis, yAxis, series, dataset, height, width, colors, hideLegend, hideGrid, margin, className, curve = "monotone", area = false, showMark = true, stacked = false, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, }) {
|
|
146
|
+
export function LineChart({ xAxis, yAxis, series, dataset, height, width, colors, hideLegend, hideGrid, margin, className, curve = "monotone", area = false, showMark = true, stacked = false, zoom, onZoomChange, showToolbar, highlightScope, animated, locale, fillHeight, onItemClick, renderTooltip, renderMark, referenceLines, }) {
|
|
133
147
|
const meta = seriesMeta(series, colors);
|
|
134
148
|
const stackedAreas = stacked && (area || series.some((item) => item.area || item.type === "area"));
|
|
135
149
|
return (_jsx(ChartContainer, { slot: area ? "area-chart" : "line-chart", "aria-label": `${area ? "Area" : "Line"} chart of ${meta.map((s) => s.label).join(", ")}`, className: className, width: width, height: height, margin: margin, dataset: dataset, xAxis: xAxis, yAxis: yAxis, series: series.map((item) => ({
|
|
@@ -137,7 +151,7 @@ export function LineChart({ xAxis, yAxis, series, dataset, height, width, colors
|
|
|
137
151
|
type: area || item.area ? "area" : "line",
|
|
138
152
|
curve: item.curve ?? curve,
|
|
139
153
|
showMark: item.showMark ?? (stackedAreas ? false : showMark),
|
|
140
|
-
})), colors: colors, hideLegend: hideLegend, hideGrid: hideGrid, stacked: stacked, zoom: zoom, onZoomChange: onZoomChange, showToolbar: showToolbar, highlightScope: highlightScope, animated: animated, locale: locale }));
|
|
154
|
+
})), colors: colors, hideLegend: hideLegend, hideGrid: hideGrid, stacked: stacked, zoom: zoom, onZoomChange: onZoomChange, showToolbar: showToolbar, highlightScope: highlightScope, animated: animated, locale: locale, fillHeight: fillHeight, onItemClick: onItemClick, renderTooltip: renderTooltip, renderMark: renderMark, referenceLines: referenceLines }));
|
|
141
155
|
}
|
|
142
156
|
export function AreaChart(props) {
|
|
143
157
|
return _jsx(LineChart, { ...props, area: true });
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type ReactNode, type RefObject } from "react";
|
|
2
2
|
import { type ChartAxisConfig, type ChartCurve, type ChartDataset, type ChartInteraction, type ChartMargin, type ChartZoom, type HighlightScope, type PlotBox } from "../lib/charts";
|
|
3
3
|
import { type ChartHover } from "./chart-ui";
|
|
4
|
+
import { type ChartItemEvent, type ChartMarkRenderContext, type ChartReferenceLine, type ChartTooltipRenderer } from "./chart-interaction";
|
|
4
5
|
export type ComposedSeriesType = "bar" | "line" | "area" | "scatter";
|
|
5
6
|
export type ComposedSeries = {
|
|
6
7
|
id?: string;
|
|
7
8
|
type?: ComposedSeriesType;
|
|
8
9
|
label?: string;
|
|
9
10
|
color?: string;
|
|
11
|
+
/** Per-category colors; each entry falls back to `color`. */
|
|
12
|
+
itemColors?: Array<string | null | undefined>;
|
|
10
13
|
data?: Array<number | null>;
|
|
11
14
|
dataKey?: string;
|
|
12
15
|
stack?: string;
|
|
@@ -25,6 +28,7 @@ type ResolvedSeries = {
|
|
|
25
28
|
type: ComposedSeriesType;
|
|
26
29
|
label: string;
|
|
27
30
|
color: string;
|
|
31
|
+
itemColors?: Array<string | null | undefined>;
|
|
28
32
|
data: Array<number | null>;
|
|
29
33
|
stack?: string;
|
|
30
34
|
yAxisId?: string;
|
|
@@ -86,6 +90,10 @@ type ChartContextValue = {
|
|
|
86
90
|
x1: number;
|
|
87
91
|
} | null) => void;
|
|
88
92
|
exportChart: (format: "svg" | "png") => Promise<void>;
|
|
93
|
+
onItemClick?: (event: ChartItemEvent) => void;
|
|
94
|
+
renderMark?: (ctx: ChartMarkRenderContext) => ReactNode;
|
|
95
|
+
referenceLines?: ChartReferenceLine[];
|
|
96
|
+
showLabels?: boolean;
|
|
89
97
|
};
|
|
90
98
|
declare const ChartContext: import("react").Context<ChartContextValue | null>;
|
|
91
99
|
export declare function useChartContext(): ChartContextValue;
|
|
@@ -115,8 +123,16 @@ export type ChartContainerProps = {
|
|
|
115
123
|
locale?: string;
|
|
116
124
|
children?: ReactNode;
|
|
117
125
|
"aria-label"?: string;
|
|
126
|
+
/** When true, plot height follows the parent instead of the numeric `height`. */
|
|
127
|
+
fillHeight?: boolean;
|
|
128
|
+
onItemClick?: (event: ChartItemEvent) => void;
|
|
129
|
+
renderTooltip?: ChartTooltipRenderer;
|
|
130
|
+
renderMark?: (ctx: ChartMarkRenderContext) => ReactNode;
|
|
131
|
+
referenceLines?: ChartReferenceLine[];
|
|
132
|
+
/** Draw the numeric value at the end of each bar. */
|
|
133
|
+
showLabels?: boolean;
|
|
118
134
|
};
|
|
119
|
-
export declare function ChartContainer({ slot, className, width, height, margin, dataset, xAxis, yAxis, series, colors, hideLegend, hideGrid, stacked, barGapRatio, borderRadius, zoom, defaultZoom, onZoomChange, showToolbar, highlightScope, selected, animated, locale, children, "aria-label": ariaLabel, }: ChartContainerProps): import("react").JSX.Element;
|
|
135
|
+
export declare function ChartContainer({ slot, className, width, height, margin, dataset, xAxis, yAxis, series, colors, hideLegend, hideGrid, stacked, barGapRatio, borderRadius, zoom, defaultZoom, onZoomChange, showToolbar, highlightScope, selected, animated, locale, children, "aria-label": ariaLabel, fillHeight, onItemClick, renderTooltip, renderMark, referenceLines, showLabels, }: ChartContainerProps): import("react").JSX.Element;
|
|
120
136
|
export declare function ChartSurface({ children, className }: {
|
|
121
137
|
children?: ReactNode;
|
|
122
138
|
className?: string;
|
|
@@ -131,6 +147,8 @@ export declare function LinePlot(): import("react").JSX.Element;
|
|
|
131
147
|
export declare function AreaPlot(): import("react").JSX.Element;
|
|
132
148
|
export declare function ScatterPlot(): import("react").JSX.Element | null;
|
|
133
149
|
export declare function ChartsBrush(): import("react").JSX.Element | null;
|
|
150
|
+
/** Horizontal (value) or vertical (category index) guide overlay. */
|
|
151
|
+
export declare function ChartsReferenceLine(): import("react").JSX.Element | null;
|
|
134
152
|
export declare function ChartsLegend(): import("react").JSX.Element;
|
|
135
153
|
export declare function ChartsToolbar({ className }: {
|
|
136
154
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-composition.d.ts","sourceRoot":"","sources":["../../src/composites/chart-composition.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EA0BL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAUL,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-composition.d.ts","sourceRoot":"","sources":["../../src/composites/chart-composition.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EA0BL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAUL,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,qBAA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