@cocoar/vue-calendar 3.2.0-beta.7 → 3.2.0-beta.9
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 +2 -2
- package/dist/builders/calendar-builder-config.d.ts +11 -1
- package/dist/builders/calendar-builder-config.d.ts.map +1 -1
- package/dist/builders/calendar-builder-state.d.ts +2 -0
- package/dist/builders/calendar-builder-state.d.ts.map +1 -1
- package/dist/builders/types.d.ts +12 -0
- package/dist/builders/types.d.ts.map +1 -1
- package/dist/components/CoarAgendaView.vue.d.ts +17 -0
- package/dist/components/CoarAgendaView.vue.d.ts.map +1 -1
- package/dist/components/CoarCalendar.vue.d.ts +11 -0
- package/dist/components/CoarCalendar.vue.d.ts.map +1 -1
- package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthCell.vue.d.ts +17 -12
- package/dist/components/internal/month/CoarMonthCell.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts +51 -0
- package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts.map +1 -0
- package/dist/components/internal/month/CoarMonthPill.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthRow.vue.d.ts +4 -4
- package/dist/components/internal/month/CoarMonthRow.vue.d.ts.map +1 -1
- package/dist/composables/useMonthDayOverlay.d.ts +34 -0
- package/dist/composables/useMonthDayOverlay.d.ts.map +1 -0
- package/dist/composables/useMonthGeometry.d.ts +39 -0
- package/dist/composables/useMonthGeometry.d.ts.map +1 -0
- package/dist/composables/useMonthMetrics.d.ts +32 -0
- package/dist/composables/useMonthMetrics.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/monthGridLayout.d.ts +43 -1
- package/dist/core/monthGridLayout.d.ts.map +1 -1
- package/dist/{core-COjCRcPw.js → core-DNwsMOSU.js} +82 -19
- package/dist/core.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1650 -1335
- package/dist/vue-calendar.css +1 -1
- package/package.json +3 -3
- package/dist/composables/useMonthExpansion.d.ts +0 -32
- package/dist/composables/useMonthExpansion.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CalendarEvent } from './types';
|
|
1
|
+
import { CalendarEvent, CalendarMonthDensity } from './types';
|
|
2
2
|
import { Temporal } from './temporal';
|
|
3
3
|
export interface MonthMultiDayBar<TMeta extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
4
|
event: CalendarEvent<TMeta>;
|
|
@@ -60,6 +60,48 @@ export interface MonthLayoutOptions {
|
|
|
60
60
|
visibleStart?: Temporal.PlainDate;
|
|
61
61
|
visibleEnd?: Temporal.PlainDate;
|
|
62
62
|
}
|
|
63
|
+
/** Colour marks a Stacked month cell shows. Mirrors iOS. */
|
|
64
|
+
export declare const MONTH_STACKED_VISIBLE_PILLS = 2;
|
|
65
|
+
/** Segments a Compact month cell's colour capsule shows. Mirrors iOS. */
|
|
66
|
+
export declare const MONTH_COMPACT_VISIBLE_PILLS = 6;
|
|
67
|
+
/**
|
|
68
|
+
* Single-day pills a month cell shows for a density before the
|
|
69
|
+
* remainder folds into the "+N" marker. Details honours the
|
|
70
|
+
* builder's `maxEventsPerCell`; Stacked and Compact use the fixed
|
|
71
|
+
* iOS limits because their marks carry no title to read.
|
|
72
|
+
*/
|
|
73
|
+
export declare function monthCellPillLimit(density: CalendarMonthDensity, maxEventsPerCell: number): number;
|
|
74
|
+
export interface MonthCellPillCap<TMeta extends Record<string, unknown> = Record<string, unknown>> {
|
|
75
|
+
/** Pills the cell renders, in layout order. */
|
|
76
|
+
visible: ReadonlyArray<MonthCellPill<TMeta>>;
|
|
77
|
+
/** Pills folded into the "+N" marker. `0` = no marker. */
|
|
78
|
+
hidden: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Cap a cell's pills at `limit`. A non-finite or negative limit
|
|
82
|
+
* means "no cap". Pure — the same input always yields the same
|
|
83
|
+
* split, so the marker count is stable across renders.
|
|
84
|
+
*/
|
|
85
|
+
export declare function capMonthCellPills<TMeta extends Record<string, unknown> = Record<string, unknown>>(pills: ReadonlyArray<MonthCellPill<TMeta>>, limit: number): MonthCellPillCap<TMeta>;
|
|
86
|
+
/** Multi-day lanes a month row shows before the rest fold into "+N". */
|
|
87
|
+
export declare const MONTH_DEFAULT_MAX_VISIBLE_LANES = 2;
|
|
88
|
+
export interface MonthRowLaneCap<TMeta extends Record<string, unknown> = Record<string, unknown>> {
|
|
89
|
+
/** Bars the row renders (lane < cap), in layout order. */
|
|
90
|
+
visible: ReadonlyArray<MonthMultiDayBar<TMeta>>;
|
|
91
|
+
/** Bars folded away (lane >= cap). */
|
|
92
|
+
hidden: ReadonlyArray<MonthMultiDayBar<TMeta>>;
|
|
93
|
+
/** Hidden bars covering each column 0..6 — feeds the cell's "+N". */
|
|
94
|
+
hiddenPerColumn: ReadonlyArray<number>;
|
|
95
|
+
/** Lanes the row actually shows. */
|
|
96
|
+
laneCount: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Cap a row's multi-day bars at `maxLanes`. `null`, a non-finite or
|
|
100
|
+
* a negative value means "no cap" (the row grows with its lanes).
|
|
101
|
+
* Lane numbers come from the first-fit interval layout, so a bar
|
|
102
|
+
* is either fully visible or fully folded — never clipped mid-row.
|
|
103
|
+
*/
|
|
104
|
+
export declare function capMonthRowLanes<TMeta extends Record<string, unknown> = Record<string, unknown>>(bars: ReadonlyArray<MonthMultiDayBar<TMeta>>, maxLanes: number | null): MonthRowLaneCap<TMeta>;
|
|
63
105
|
/**
|
|
64
106
|
* Compute the full layout for a month grid.
|
|
65
107
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monthGridLayout.d.ts","sourceRoot":"","sources":["../../src/core/monthGridLayout.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":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endregion
|
|
704
704
|
//#region src/core/monthGridLayout.ts
|
|
705
|
-
|
|
705
|
+
var xe = 2, Se = 6;
|
|
706
|
+
function Ce(e, t) {
|
|
707
|
+
switch (e) {
|
|
708
|
+
case "compact": return 6;
|
|
709
|
+
case "stacked": return 2;
|
|
710
|
+
default: return t;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
function we(e, t) {
|
|
714
|
+
if (!Number.isFinite(t) || t < 0) return {
|
|
715
|
+
visible: e,
|
|
716
|
+
hidden: 0
|
|
717
|
+
};
|
|
718
|
+
let n = Math.floor(t);
|
|
719
|
+
return e.length <= n ? {
|
|
720
|
+
visible: e,
|
|
721
|
+
hidden: 0
|
|
722
|
+
} : {
|
|
723
|
+
visible: e.slice(0, n),
|
|
724
|
+
hidden: e.length - n
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
var Te = 2;
|
|
728
|
+
function Ee(e, t) {
|
|
729
|
+
let n = e.length ? e[0].laneCount : 0, r = t === null || !Number.isFinite(t) || t < 0 ? n : Math.floor(t);
|
|
730
|
+
if (n <= r) return {
|
|
731
|
+
visible: e,
|
|
732
|
+
hidden: [],
|
|
733
|
+
hiddenPerColumn: [
|
|
734
|
+
0,
|
|
735
|
+
0,
|
|
736
|
+
0,
|
|
737
|
+
0,
|
|
738
|
+
0,
|
|
739
|
+
0,
|
|
740
|
+
0
|
|
741
|
+
],
|
|
742
|
+
laneCount: n
|
|
743
|
+
};
|
|
744
|
+
let i = [], a = [], o = [
|
|
745
|
+
0,
|
|
746
|
+
0,
|
|
747
|
+
0,
|
|
748
|
+
0,
|
|
749
|
+
0,
|
|
750
|
+
0,
|
|
751
|
+
0
|
|
752
|
+
];
|
|
753
|
+
for (let t of e) {
|
|
754
|
+
if (t.lane < r) {
|
|
755
|
+
i.push(t);
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
a.push(t);
|
|
759
|
+
for (let e = t.startCol; e <= t.endCol; e++) o[e]++;
|
|
760
|
+
}
|
|
761
|
+
return {
|
|
762
|
+
visible: i,
|
|
763
|
+
hidden: a,
|
|
764
|
+
hiddenPerColumn: o,
|
|
765
|
+
laneCount: r
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
function De(e, t) {
|
|
706
769
|
let { gridDates: n, timezone: i } = t;
|
|
707
770
|
if (n.length < 7 || n.length % 7 != 0) throw RangeError(`gridDates must contain complete seven-day rows (got ${n.length})`);
|
|
708
771
|
let a = [];
|
|
@@ -721,7 +784,7 @@ function xe(e, t) {
|
|
|
721
784
|
for (let n of e) {
|
|
722
785
|
if (o.has(n.id)) continue;
|
|
723
786
|
o.add(n.id);
|
|
724
|
-
let { firstDay: e, lastDayInclusive: a, isMultiDay: l } =
|
|
787
|
+
let { firstDay: e, lastDayInclusive: a, isMultiDay: l } = Oe(n, i), u = (e) => (!t.visibleStart || r.PlainDate.compare(e, t.visibleStart) >= 0) && (!t.visibleEnd || r.PlainDate.compare(e, t.visibleEnd) <= 0);
|
|
725
788
|
if (l) s.push({
|
|
726
789
|
event: n,
|
|
727
790
|
firstDay: e,
|
|
@@ -791,7 +854,7 @@ function xe(e, t) {
|
|
|
791
854
|
};
|
|
792
855
|
}) };
|
|
793
856
|
}
|
|
794
|
-
function
|
|
857
|
+
function Oe(t, n) {
|
|
795
858
|
if (e(t)) {
|
|
796
859
|
let e = t.start, n;
|
|
797
860
|
return t.end ? (n = t.end.subtract({ days: 1 }), r.PlainDate.compare(n, e) < 0 && (n = e)) : n = e, {
|
|
@@ -809,7 +872,7 @@ function Se(t, n) {
|
|
|
809
872
|
}
|
|
810
873
|
//#endregion
|
|
811
874
|
//#region src/core/agendaLayout.ts
|
|
812
|
-
function
|
|
875
|
+
function ke(t, n) {
|
|
813
876
|
let { rangeStart: i, rangeEnd: a, timezone: o, showEmptyDays: s = !1 } = n, c = r.PlainDate.from(i), l = r.PlainDate.from(a);
|
|
814
877
|
if (r.PlainDate.compare(l, c) <= 0) return [];
|
|
815
878
|
let u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set();
|
|
@@ -823,7 +886,7 @@ function Z(t, n) {
|
|
|
823
886
|
for (let n of t) {
|
|
824
887
|
if (d.has(n.id)) continue;
|
|
825
888
|
d.add(n.id);
|
|
826
|
-
let t = e(n), { firstDay: i, lastDayInclusive: a } =
|
|
889
|
+
let t = e(n), { firstDay: i, lastDayInclusive: a } = Z(n, o), s = r.PlainDate.compare(i, c) < 0 ? c : i, u = l.subtract({ days: 1 }), p = r.PlainDate.compare(a, u) > 0 ? u : a;
|
|
827
890
|
if (r.PlainDate.compare(p, s) < 0) continue;
|
|
828
891
|
let m = s, h = !0;
|
|
829
892
|
for (; r.PlainDate.compare(m, p) <= 0;) {
|
|
@@ -833,7 +896,7 @@ function Z(t, n) {
|
|
|
833
896
|
isContinuation: a
|
|
834
897
|
});
|
|
835
898
|
else {
|
|
836
|
-
let t = a ? -Infinity :
|
|
899
|
+
let t = a ? -Infinity : Ae(n, o);
|
|
837
900
|
e.timed.push({
|
|
838
901
|
event: n,
|
|
839
902
|
startMs: t,
|
|
@@ -873,7 +936,7 @@ function Z(t, n) {
|
|
|
873
936
|
}
|
|
874
937
|
return p;
|
|
875
938
|
}
|
|
876
|
-
function
|
|
939
|
+
function Z(t, n) {
|
|
877
940
|
if (e(t)) {
|
|
878
941
|
let e = t.start, n;
|
|
879
942
|
return t.end ? (n = t.end.subtract({ days: 1 }), r.PlainDate.compare(n, e) < 0 && (n = e)) : n = e, {
|
|
@@ -891,15 +954,15 @@ function Ce(t, n) {
|
|
|
891
954
|
lastDayInclusive: a
|
|
892
955
|
};
|
|
893
956
|
}
|
|
894
|
-
function
|
|
957
|
+
function Ae(t, n) {
|
|
895
958
|
return e(t) ? t.start.toZonedDateTime({ timeZone: n }).epochMilliseconds : t.start.epochMilliseconds;
|
|
896
959
|
}
|
|
897
960
|
//#endregion
|
|
898
961
|
//#region src/core/timelineLayout.ts
|
|
899
|
-
function
|
|
962
|
+
function je(e, t) {
|
|
900
963
|
let { windowStart: r, windowEnd: i, pixelsPerDay: a, rowHeight: o, displayZone: s } = t, c = r.until(i, { largestUnit: "days" }).days * a, l = /* @__PURE__ */ new Map();
|
|
901
964
|
for (let t of e) {
|
|
902
|
-
let e =
|
|
965
|
+
let e = Me(t), n = Q(t) !== null, r = l.get(e);
|
|
903
966
|
r || (r = {
|
|
904
967
|
events: [],
|
|
905
968
|
isRecurring: n
|
|
@@ -909,7 +972,7 @@ function Te(e, t) {
|
|
|
909
972
|
for (let [e, t] of l) {
|
|
910
973
|
let o = [];
|
|
911
974
|
for (let e of t.events) {
|
|
912
|
-
let { startDate: t, endDate: c } =
|
|
975
|
+
let { startDate: t, endDate: c } = Ne(e, s);
|
|
913
976
|
if (n.PlainDate.compare(c, r) <= 0 || n.PlainDate.compare(t, i) >= 0) continue;
|
|
914
977
|
let l = n.PlainDate.compare(t, r) < 0, u = n.PlainDate.compare(c, i) > 0, d = l ? r : t, f = u ? i : c, p = r.until(d, { largestUnit: "days" }).days, m = d.until(f, { largestUnit: "days" }).days;
|
|
915
978
|
o.push({
|
|
@@ -945,10 +1008,10 @@ function Q(e) {
|
|
|
945
1008
|
let t = e.meta?.__recurrence?.seriesId;
|
|
946
1009
|
return typeof t == "string" ? t : null;
|
|
947
1010
|
}
|
|
948
|
-
function
|
|
1011
|
+
function Me(e) {
|
|
949
1012
|
return Q(e) ?? e.id;
|
|
950
1013
|
}
|
|
951
|
-
function
|
|
1014
|
+
function Ne(e, t) {
|
|
952
1015
|
if (e.start instanceof n.PlainDate) {
|
|
953
1016
|
let t = e.start;
|
|
954
1017
|
return {
|
|
@@ -964,7 +1027,7 @@ function De(e, t) {
|
|
|
964
1027
|
}
|
|
965
1028
|
//#endregion
|
|
966
1029
|
//#region src/core/measurementCache.ts
|
|
967
|
-
var
|
|
1030
|
+
var Pe = class {
|
|
968
1031
|
_itemCount;
|
|
969
1032
|
_estimatedSize;
|
|
970
1033
|
_measured;
|
|
@@ -1063,20 +1126,20 @@ function $(e, t, n, r = 3) {
|
|
|
1063
1126
|
totalSize: i
|
|
1064
1127
|
};
|
|
1065
1128
|
}
|
|
1066
|
-
function
|
|
1129
|
+
function Fe(e, t, n, r, i, a, o = 3, s = 3) {
|
|
1067
1130
|
return {
|
|
1068
1131
|
x: $(e, n, i, o),
|
|
1069
1132
|
y: $(t, r, a, s)
|
|
1070
1133
|
};
|
|
1071
1134
|
}
|
|
1072
|
-
function
|
|
1135
|
+
function Ie(e, t, n) {
|
|
1073
1136
|
if (n < 0) throw RangeError(`anchorIndex must be non-negative, got ${n}`);
|
|
1074
1137
|
let r = e.prefixSum(n);
|
|
1075
1138
|
return t.prefixSum(n) - r;
|
|
1076
1139
|
}
|
|
1077
1140
|
//#endregion
|
|
1078
1141
|
//#region src/core/dragHitTest.ts
|
|
1079
|
-
function
|
|
1142
|
+
function Le(e, t, n, r, i) {
|
|
1080
1143
|
if (r.itemCount === 0) return {
|
|
1081
1144
|
itemIndex: -1,
|
|
1082
1145
|
ratio: NaN,
|
|
@@ -1107,7 +1170,7 @@ function je(e, t, n, r, i) {
|
|
|
1107
1170
|
pixelInItem: u
|
|
1108
1171
|
};
|
|
1109
1172
|
}
|
|
1110
|
-
function
|
|
1173
|
+
function Re(e, t, n, r = {}) {
|
|
1111
1174
|
let i = r.hotZone ?? 30, a = r.maxVelocity ?? 24, o = r.curve ?? "linear";
|
|
1112
1175
|
if (i <= 0 || a <= 0) return {
|
|
1113
1176
|
velocityX: 0,
|
|
@@ -1131,4 +1194,4 @@ function Me(e, t, n, r = {}) {
|
|
|
1131
1194
|
};
|
|
1132
1195
|
}
|
|
1133
1196
|
//#endregion
|
|
1134
|
-
export {
|
|
1197
|
+
export { S as $, ne as A, r as B, z as C, N as D, I as E, E as F, s as G, b as H, k as I, x as J, m as K, O as L, oe as M, ae as N, se as O, ie as P, v as Q, D as R, L as S, P as T, l as U, u as V, o as W, h as X, T as Y, y as Z, ye as _, Fe as a, g as at, W as b, ke as c, xe as d, w as et, we as f, be as g, Ce as h, $ as i, ee as it, re as j, te as k, Se as l, De as m, Le as n, p as nt, Pe as o, _ as ot, Ee as p, f as q, Ie as r, d as rt, je as s, Re as t, C as tt, Te as u, Y as v, R as w, B as x, ue as y, A as z };
|
package/dist/core.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./move-math-BFP9Tfuo.js";
|
|
2
|
-
import { $ as c, A as l, B as u, C as d, D as f, E as p, F as m, G as h, H as g, I as _, J as v, K as y, L as b, M as x, N as S, O as C, P as w, Q as T, R as E, S as D, T as O, U as k, V as A, W as j, X as M, Y as N, Z as P, _ as F, a as I,
|
|
3
|
-
export {
|
|
2
|
+
import { $ as c, A as l, B as u, C as d, D as f, E as p, F as m, G as h, H as g, I as _, J as v, K as y, L as b, M as x, N as S, O as C, P as w, Q as T, R as E, S as D, T as O, U as k, V as A, W as j, X as M, Y as N, Z as P, _ as F, a as I, at as L, b as R, c as z, d as B, et as V, f as H, g as U, h as W, i as G, it as K, j as q, k as J, l as Y, m as X, n as Z, nt as Q, o as $, ot as ee, p as te, q as ne, r as re, rt as ie, s as ae, t as oe, tt as se, u as ce, v as le, w as ue, x as de, y as fe, z as pe } from "./core-DNwsMOSU.js";
|
|
3
|
+
export { D as DEFAULT_ALL_DAY_MAX_VISIBLE_LANES, O as DEFAULT_TIMED_EVENT_DETAIL_MIN_WIDTH, J as DEFAULT_WORK_DAYS, s as DstResolutionError, r as MIN_RESIZE_MINUTES, Y as MONTH_COMPACT_VISIBLE_PILLS, ce as MONTH_DEFAULT_MAX_VISIBLE_LANES, B as MONTH_STACKED_VISIBLE_PILLS, $ as MeasurementCache, m as TIME_GRID_PRESETS, u as Temporal, d as allDayBandLanes, a as applyMoveToEvent, z as buildAgendaItems, n as buildDropPayload, A as buildFormatOptions, ue as capAllDayBand, H as capMonthCellPills, te as capMonthRowLanes, re as computeAnchorAdjustment, oe as computeAutoScrollVelocity, l as computeViewWindow, de as contentAwareCascadeFrames, g as dateKey, q as daysInWindow, k as detectBrowserTimezone, e as detectDstSituation, j as detectFirstDayOfWeekFromLocale, h as detectHour12FromLocale, y as endOfMonth, ne as endOfWeek, fe as eventInkColor, v as eventStartDateInZone, R as eventTextColor, f as formatRangeLabel, N as formatScheduledTime, G as getVisibleRange1D, I as getVisibleRange2D, Z as hitTestVerticalSurface, i as isAllDayEvent, o as isTimedEvent, M as isoWeekNumber, U as layoutAllDayBand, F as layoutDayEvents, X as layoutMonthGrid, le as layoutOverlappingIntervals, ae as layoutTimeline, P as localizedWeekdayNames, W as monthCellPillLimit, T as monthGridDates, x as navigateCursor, c as nowInZone, V as parsePlainDate, se as parseScheduledTime, _ as resolveSpanDays, b as resolveTimeGridRange, p as resolveTimedCardAnatomy, C as responsiveDayColumnCount, Q as startOfMonth, ie as startOfWeek, E as timeGridRangeSpecFor, pe as timeGridStepDays, K as todayInZone, t as validateCalendarEvent, L as weekDates, S as windowContainsDate, w as windowDayCount, ee as workWeekDates };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useCalendar } from './useCalendar';
|
|
2
2
|
export { CalendarBuilder, type CalendarApi, type CalendarBuilderState, } from './builders/calendar-builder';
|
|
3
|
-
export type { CalendarDensity, CanDropFn, DateClickHandler, DateDoubleClickHandler, DayHeaderRenderer, DstPolicy, EventClickHandler, EventDoubleClickHandler, EventDropHandler, EventHoverHandler, EventHoverLeaveHandler, EventDropPayload, EventLayoutCtx, EventRenderer, EventRendererCtx, EventsLoader, RangeChangeHandler, SeriesLoader, TimeClickHandler, TimeDoubleClickHandler, TimeRange, } from './builders/types';
|
|
3
|
+
export type { CalendarDensity, CanDropFn, DateClickHandler, DateDoubleClickHandler, DayHeaderRenderer, DstPolicy, EventClickHandler, EventDoubleClickHandler, EventDropHandler, EventHoverHandler, EventHoverLeaveHandler, EventDropPayload, EventLayoutCtx, EventRenderer, EventRendererCtx, EventsLoader, RangeChangeHandler, SeriesLoader, TimeClickHandler, TimeDoubleClickHandler, TimeRange, WeekStripSlotScope, } from './builders/types';
|
|
4
4
|
export { getEventZoneHints, type EventZoneHints } from './builders/event-zone-hints';
|
|
5
5
|
export { useViewWindow } from './composables/useViewWindow';
|
|
6
6
|
export { useCalendarDnd, buildDropPayload, type UseCalendarDndOptions, type UseCalendarDndReturn, type CalendarDragMode, type CalendarDropTarget, type DstDisambiguation, } from './composables/useCalendarDnd';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,0BAA0B,CAAC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,0BAA0B,CAAC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,i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