@spatika/react 1.2.0 → 1.3.1
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/AGENTS.md +2 -2
- package/README.md +6 -2
- package/dist/composites/EventCalendar.d.ts +39 -2
- package/dist/composites/EventCalendar.d.ts.map +1 -1
- package/dist/composites/EventCalendar.js +48 -16
- package/dist/composites/EventTimeline.d.ts +6 -1
- package/dist/composites/EventTimeline.d.ts.map +1 -1
- package/dist/composites/EventTimeline.js +5 -3
- package/dist/composites/scheduler-ui.d.ts +4 -3
- package/dist/composites/scheduler-ui.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/lib/scheduler.d.ts +4 -0
- package/dist/lib/scheduler.d.ts.map +1 -1
- package/dist/lib/scheduler.js +1 -0
- package/package.json +4 -4
- package/skills/spatika-ui/SKILL.md +2 -2
- package/src/composites/EventCalendar.tsx +174 -72
- package/src/composites/EventTimeline.tsx +32 -23
- package/src/composites/scheduler-ui.tsx +11 -9
- package/src/composites/scheduler.test.tsx +86 -0
- package/src/index.test.ts +4 -0
- package/src/index.ts +10 -0
- package/src/lib/scheduler.test.ts +13 -0
- package/src/lib/scheduler.ts +5 -0
package/src/lib/scheduler.ts
CHANGED
|
@@ -33,6 +33,8 @@ export type SchedulerEvent = {
|
|
|
33
33
|
readOnly?: boolean;
|
|
34
34
|
draggable?: boolean;
|
|
35
35
|
resizable?: boolean;
|
|
36
|
+
/** Opaque host payload. The kit never inspects it. */
|
|
37
|
+
data?: unknown;
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
export type SchedulerResource = {
|
|
@@ -74,6 +76,8 @@ export type NormalizedEvent = {
|
|
|
74
76
|
draggable?: boolean;
|
|
75
77
|
resizable?: boolean;
|
|
76
78
|
occurrenceStart?: Date;
|
|
79
|
+
/** Opaque host payload. The kit never inspects it. */
|
|
80
|
+
data?: unknown;
|
|
77
81
|
};
|
|
78
82
|
|
|
79
83
|
export const SCHEDULER_COLOR_VARS: Record<SchedulerColorTone, string> = {
|
|
@@ -335,6 +339,7 @@ export function normalizeEvents(
|
|
|
335
339
|
readOnly: event.readOnly,
|
|
336
340
|
draggable: event.draggable,
|
|
337
341
|
resizable: event.resizable,
|
|
342
|
+
data: event.data,
|
|
338
343
|
};
|
|
339
344
|
})
|
|
340
345
|
.sort((a, b) => a.start.getTime() - b.start.getTime() || a.title.localeCompare(b.title));
|