@getmicdrop/venue-calendar 4.3.11 → 4.3.13

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 (31) hide show
  1. package/dist/{Calendar-D11ctjrD.js → Calendar-V0u5h9jS.js} +41 -40
  2. package/dist/{CalendarFoundryView-DKhpjxnV.js → CalendarFoundryView-SSWhFFtK.js} +1 -1
  3. package/dist/venue-calendar.css +1 -1
  4. package/dist/venue-calendar.es.js +521 -519
  5. package/dist/venue-calendar.iife.js +4 -4
  6. package/dist/venue-calendar.umd.js +2 -2
  7. package/package.json +220 -220
  8. /package/dist/locales/{4.3.11 → 4.3.13}/flow/de.js +0 -0
  9. /package/dist/locales/{4.3.11 → 4.3.13}/flow/es.js +0 -0
  10. /package/dist/locales/{4.3.11 → 4.3.13}/flow/fr.js +0 -0
  11. /package/dist/locales/{4.3.11 → 4.3.13}/flow/id.js +0 -0
  12. /package/dist/locales/{4.3.11 → 4.3.13}/flow/it.js +0 -0
  13. /package/dist/locales/{4.3.11 → 4.3.13}/flow/ja.js +0 -0
  14. /package/dist/locales/{4.3.11 → 4.3.13}/flow/ko.js +0 -0
  15. /package/dist/locales/{4.3.11 → 4.3.13}/flow/nl.js +0 -0
  16. /package/dist/locales/{4.3.11 → 4.3.13}/flow/pl.js +0 -0
  17. /package/dist/locales/{4.3.11 → 4.3.13}/flow/pt-br.js +0 -0
  18. /package/dist/locales/{4.3.11 → 4.3.13}/flow/tr.js +0 -0
  19. /package/dist/locales/{4.3.11 → 4.3.13}/flow/zh.js +0 -0
  20. /package/dist/locales/{4.3.11 → 4.3.13}/main/de.js +0 -0
  21. /package/dist/locales/{4.3.11 → 4.3.13}/main/es.js +0 -0
  22. /package/dist/locales/{4.3.11 → 4.3.13}/main/fr.js +0 -0
  23. /package/dist/locales/{4.3.11 → 4.3.13}/main/id.js +0 -0
  24. /package/dist/locales/{4.3.11 → 4.3.13}/main/it.js +0 -0
  25. /package/dist/locales/{4.3.11 → 4.3.13}/main/ja.js +0 -0
  26. /package/dist/locales/{4.3.11 → 4.3.13}/main/ko.js +0 -0
  27. /package/dist/locales/{4.3.11 → 4.3.13}/main/nl.js +0 -0
  28. /package/dist/locales/{4.3.11 → 4.3.13}/main/pl.js +0 -0
  29. /package/dist/locales/{4.3.11 → 4.3.13}/main/pt-br.js +0 -0
  30. /package/dist/locales/{4.3.11 → 4.3.13}/main/tr.js +0 -0
  31. /package/dist/locales/{4.3.11 → 4.3.13}/main/zh.js +0 -0
@@ -87,10 +87,10 @@ function R(e) {
87
87
  function z(e, t, n) {
88
88
  n === void 0 && (n = !1);
89
89
  let r = F(e), i = R(e), a = I(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
90
- return t.reference[a] > t.floating[a] && (o = Ce(o)), [o, Ce(o)];
90
+ return t.reference[a] > t.floating[a] && (o = B(o)), [o, B(o)];
91
91
  }
92
92
  function he(e) {
93
- let t = Ce(e);
93
+ let t = B(e);
94
94
  return [
95
95
  ge(e),
96
96
  t,
@@ -114,11 +114,11 @@ function Se(e, t, n, r) {
114
114
  let i = F(e), a = xe(P(e), n === "start", r);
115
115
  return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ge)))), a;
116
116
  }
117
- function Ce(e) {
117
+ function B(e) {
118
118
  let t = P(e);
119
119
  return pe[t] + e.slice(t.length);
120
120
  }
121
- function we(e) {
121
+ function Ce(e) {
122
122
  return {
123
123
  top: e.top ?? 0,
124
124
  right: e.right ?? 0,
@@ -126,15 +126,15 @@ function we(e) {
126
126
  left: e.left ?? 0
127
127
  };
128
128
  }
129
- function B(e) {
129
+ function V(e) {
130
130
  return typeof e == "number" ? {
131
131
  top: e,
132
132
  right: e,
133
133
  bottom: e,
134
134
  left: e
135
- } : we(e);
135
+ } : Ce(e);
136
136
  }
137
- function V(e) {
137
+ function H(e) {
138
138
  let { x: t, y: n, width: r, height: i } = e;
139
139
  return {
140
140
  width: r,
@@ -149,7 +149,7 @@ function V(e) {
149
149
  }
150
150
  //#endregion
151
151
  //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
152
- function Te(e, t, n) {
152
+ function we(e, t, n) {
153
153
  let { reference: r, floating: i } = e, a = L(t), o = R(t), s = I(o), c = P(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
154
154
  switch (c) {
155
155
  case "top":
@@ -184,9 +184,9 @@ function Te(e, t, n) {
184
184
  let m = F(t);
185
185
  return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
186
186
  }
187
- async function Ee(e, t) {
187
+ async function Te(e, t) {
188
188
  t === void 0 && (t = {});
189
- let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = N(t, e), p = B(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = V(await i.getClippingRect({
189
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = N(t, e), p = V(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = H(await i.getClippingRect({
190
190
  element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
191
191
  boundary: c,
192
192
  rootBoundary: l,
@@ -199,7 +199,7 @@ async function Ee(e, t) {
199
199
  } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
200
200
  x: 1,
201
201
  y: 1
202
- }, y = V(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
202
+ }, y = H(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
203
203
  elements: o,
204
204
  rect: g,
205
205
  offsetParent: _,
@@ -212,15 +212,15 @@ async function Ee(e, t) {
212
212
  right: (y.right - h.right + p.right) / v.x
213
213
  };
214
214
  }
215
- var H = 50, De = async (e, t, n) => {
215
+ var Ee = 50, De = async (e, t, n) => {
216
216
  let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
217
217
  ...o,
218
- detectOverflow: Ee
218
+ detectOverflow: Te
219
219
  }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
220
220
  reference: e,
221
221
  floating: t,
222
222
  strategy: i
223
- }), { x: u, y: d } = Te(l, r, c), f = r, p = 0, m = {};
223
+ }), { x: u, y: d } = we(l, r, c), f = r, p = 0, m = {};
224
224
  for (let n = 0; n < a.length; n++) {
225
225
  let h = a[n];
226
226
  if (!h) continue;
@@ -241,11 +241,11 @@ var H = 50, De = async (e, t, n) => {
241
241
  u = v ?? u, d = y ?? d, m[g] = {
242
242
  ...m[g],
243
243
  ...b
244
- }, x && p < H && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
244
+ }, x && p < Ee && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
245
245
  reference: e,
246
246
  floating: t,
247
247
  strategy: i
248
- }) : x.rects), {x: u, y: d} = Te(l, f, c)), n = -1);
248
+ }) : x.rects), {x: u, y: d} = we(l, f, c)), n = -1);
249
249
  }
250
250
  return {
251
251
  x: u,
@@ -262,7 +262,7 @@ var H = 50, De = async (e, t, n) => {
262
262
  var n;
263
263
  let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = N(e, t);
264
264
  if ((n = i.arrow) != null && n.alignmentOffset) return {};
265
- let g = P(r), _ = L(o), v = P(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Ce(o)] : he(o)), x = p !== "none";
265
+ let g = P(r), _ = L(o), v = P(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [B(o)] : he(o)), x = p !== "none";
266
266
  !d && x && b.push(...Se(o, m, p, y));
267
267
  let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
268
268
  if (l && w.push(C[g]), u) {
@@ -531,7 +531,7 @@ function $(e, t, n, r) {
531
531
  c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = K(i), i = Je(n);
532
532
  }
533
533
  }
534
- return V({
534
+ return H({
535
535
  width: u,
536
536
  height: d,
537
537
  x: c,
@@ -622,7 +622,7 @@ function lt(e, t, n) {
622
622
  height: t.height
623
623
  };
624
624
  }
625
- return V(r);
625
+ return H(r);
626
626
  }
627
627
  function ut(e, t) {
628
628
  let n = t.get(e);
@@ -1121,7 +1121,7 @@ function $t(e, n) {
1121
1121
  function Se(e) {
1122
1122
  E.get(z) && (he !== null && (clearTimeout(he), he = null), E.set(z, !1), E.set(R, !1)), M = e.touches[0].clientX, N = e.touches[0].clientY, P = M, F = e.timeStamp, me = 0, E.set(I, !1), E.set(L, 0);
1123
1123
  }
1124
- function Ce(e) {
1124
+ function B(e) {
1125
1125
  if (!M || E.get(z)) return;
1126
1126
  let t = e.touches[0].clientX, n = e.touches[0].clientY, r = M - t, i = N - n, a = e.timeStamp;
1127
1127
  if (!E.get(I) && Math.abs(r) > 10) {
@@ -1137,7 +1137,7 @@ function $t(e, n) {
1137
1137
  n > 0 && (me = (P - t) / n), P = t, F = a, E.set(L, -r * .95);
1138
1138
  }
1139
1139
  }
1140
- function we(e) {
1140
+ function Ce(e) {
1141
1141
  if (!M || !E.get(I) || E.get(z)) {
1142
1142
  M = 0, E.set(I, !1);
1143
1143
  return;
@@ -1145,54 +1145,54 @@ function $t(e, n) {
1145
1145
  let t = e.currentTarget?.offsetWidth || ye(), r = Math.abs(E.get(L)) / t > .08, i = Math.abs(me) > .2, o = E.get(L) > 0 ? -1 : 1;
1146
1146
  r || i ? (a("medium"), be(o, () => o === 1 ? n.onswipeNext?.() : n.onswipePrev?.(), t)) : E.set(L, 0), M = 0, E.set(I, !1), me = 0;
1147
1147
  }
1148
- let B = E.state(""), V = E.state("");
1149
- function Te(e) {
1148
+ let V = E.state(""), H = E.state("");
1149
+ function we(e) {
1150
1150
  let t = [
1151
1151
  "ArrowLeft",
1152
1152
  "ArrowRight",
1153
1153
  "ArrowUp",
1154
1154
  "ArrowDown"
1155
1155
  ].includes(e.key), r = o(e);
1156
- if (!t && !r || !E.get(V)) return;
1157
- let i = E.get(D).findIndex((e) => e.date === E.get(V));
1156
+ if (!t && !r || !E.get(H)) return;
1157
+ let i = E.get(D).findIndex((e) => e.date === E.get(H));
1158
1158
  if (i === -1) return;
1159
1159
  if (r) {
1160
1160
  e.preventDefault();
1161
1161
  let t = E.get(D)[i];
1162
- t.groupedEvents.length > 0 && (E.set(B, t.date, !0), n.ondaySelect?.({
1162
+ t.groupedEvents.length > 0 && (E.set(V, t.date, !0), n.ondaySelect?.({
1163
1163
  date: t.date,
1164
1164
  events: t.groupedEvents
1165
1165
  }));
1166
1166
  return;
1167
1167
  }
1168
1168
  let a = i;
1169
- e.key === "ArrowLeft" ? a = i - 1 : e.key === "ArrowRight" ? a = i + 1 : e.key === "ArrowUp" ? a = i - 7 : e.key === "ArrowDown" && (a = i + 7), !(a < 0 || a >= E.get(D).length) && (e.preventDefault(), E.set(V, E.get(D)[a].date, !0), queueMicrotask(() => {
1169
+ e.key === "ArrowLeft" ? a = i - 1 : e.key === "ArrowRight" ? a = i + 1 : e.key === "ArrowUp" ? a = i - 7 : e.key === "ArrowDown" && (a = i + 7), !(a < 0 || a >= E.get(D).length) && (e.preventDefault(), E.set(H, E.get(D)[a].date, !0), queueMicrotask(() => {
1170
1170
  document.querySelector(`[data-current-page] [data-cell-date="${E.get(D)[a].date}"]`)?.focus();
1171
1171
  }));
1172
1172
  }
1173
1173
  E.user_effect(() => {
1174
- if (E.get(V) && E.get(D).some((e) => e.date === E.get(V))) return;
1175
- if (E.get(H) && E.get(D).some((e) => e.date === E.get(H))) {
1176
- E.set(V, E.get(H), !0);
1174
+ if (E.get(H) && E.get(D).some((e) => e.date === E.get(H))) return;
1175
+ if (E.get(Ee) && E.get(D).some((e) => e.date === E.get(Ee))) {
1176
+ E.set(H, E.get(Ee), !0);
1177
1177
  return;
1178
1178
  }
1179
1179
  let e = E.get(D).find((e) => e.isToday);
1180
1180
  if (e) {
1181
- E.set(V, e.date, !0);
1181
+ E.set(H, e.date, !0);
1182
1182
  return;
1183
1183
  }
1184
1184
  let t = E.get(D).find((e) => !e.isOutsideMonth && e.groupedEvents.length > 0);
1185
1185
  if (t) {
1186
- E.set(V, t.date, !0);
1186
+ E.set(H, t.date, !0);
1187
1187
  return;
1188
1188
  }
1189
1189
  let n = E.get(D).find((e) => !e.isOutsideMonth);
1190
- n && E.set(V, n.date, !0);
1190
+ n && E.set(H, n.date, !0);
1191
1191
  });
1192
- function Ee(e) {
1192
+ function Te(e) {
1193
1193
  return !!e && E.get(D).some((t) => t.date === e && !t.isOutsideMonth);
1194
1194
  }
1195
- let H = E.derived(() => Ee(E.get(B)) ? E.get(B) : Ee(ie) ? ie : ""), De = E.derived(() => !!E.get(B) && E.get(H) === E.get(B)), Oe = E.derived(() => E.get(De) ? y(E.get(ue).get(E.get(B)) ?? []) : E.get(D).filter((e) => !e.isOutsideMonth && e.date >= ie).flatMap((e) => e.groupedEvents));
1195
+ let Ee = E.derived(() => Te(E.get(V)) ? E.get(V) : Te(ie) ? ie : ""), De = E.derived(() => !!E.get(V) && E.get(Ee) === E.get(V)), Oe = E.derived(() => E.get(De) ? y(E.get(ue).get(E.get(V)) ?? []) : E.get(D).filter((e) => !e.isOutsideMonth && e.date >= ie).flatMap((e) => e.groupedEvents));
1196
1196
  var ke = { animateMonthTransition: xe }, Ae = Qt(), U = E.first_child(Ae);
1197
1197
  {
1198
1198
  let e = (e, r = E.noop, i = E.noop, a = E.noop) => {
@@ -1266,19 +1266,20 @@ function $t(e, n) {
1266
1266
  let e = (e, a = E.noop, o = E.noop, s = E.noop) => {
1267
1267
  var c = Xt();
1268
1268
  E.each(c, 21, a, (e) => `${e.date}|${e.isOutsideMonth ? "O" : "I"}`, (e, a) => {
1269
- let o = E.derived(() => E.get(a).groupedEvents.length > 0), c = E.derived(() => E.get(a).date === E.get(H));
1269
+ let o = E.derived(() => E.get(a).groupedEvents.length > 0), c = E.derived(() => E.get(a).date === E.get(Ee));
1270
1270
  var l = Yt();
1271
1271
  let u;
1272
1272
  var d = E.child(l), f = E.child(d, !0);
1273
1273
  E.reset(d), E.reset(l), E.template_effect(() => {
1274
1274
  u = E.set_class(l, 1, `mini-cell ${t.label ?? ""} ${(E.get(c) ? r.heavy : E.get(o) ? r.strong : "") ?? ""}`, "svelte-1twddf5", u, {
1275
1275
  "mini-cell--outside": E.get(a).isOutsideMonth,
1276
- "mini-cell--selected": E.get(c),
1276
+ "mini-cell--today": E.get(a).isToday,
1277
+ "mini-cell--selected": E.get(c) && E.get(De),
1277
1278
  "mini-cell--has-events": E.get(o)
1278
- }), E.set_attribute(l, "aria-disabled", !E.get(o)), E.set_attribute(l, "tabindex", s() && E.get(V) === E.get(a).date ? 0 : -1), E.set_attribute(l, "data-cell-date", E.get(a).date), E.set_attribute(l, "aria-label", `${E.get(a).day ?? ""} ${E.get(o) ? `· ${E.get(a).groupedEvents.length} event${E.get(a).groupedEvents.length === 1 ? "" : "s"}` : ""}`), E.set_attribute(l, "aria-pressed", E.get(c)), E.set_class(d, 1, `mini-day ${i.none ?? ""}`, "svelte-1twddf5"), E.set_text(f, E.get(a).day);
1279
+ }), E.set_attribute(l, "aria-disabled", !E.get(o)), E.set_attribute(l, "tabindex", s() && E.get(H) === E.get(a).date ? 0 : -1), E.set_attribute(l, "data-cell-date", E.get(a).date), E.set_attribute(l, "aria-label", `${E.get(a).day ?? ""} ${E.get(o) ? `· ${E.get(a).groupedEvents.length} event${E.get(a).groupedEvents.length === 1 ? "" : "s"}` : ""}`), E.set_attribute(l, "aria-pressed", E.get(c)), E.set_class(d, 1, `mini-day ${i.none ?? ""}`, "svelte-1twddf5"), E.set_text(f, E.get(a).day);
1279
1280
  }), E.delegated("click", l, function(...e) {
1280
1281
  (E.get(o) ? () => {
1281
- E.set(B, E.get(a).date, !0), E.set(V, E.get(a).date, !0), n.ondaySelect?.({
1282
+ E.set(V, E.get(a).date, !0), E.set(H, E.get(a).date, !0), n.ondaySelect?.({
1282
1283
  date: E.get(a).date,
1283
1284
  events: E.get(a).groupedEvents
1284
1285
  });
@@ -1353,7 +1354,7 @@ function $t(e, n) {
1353
1354
  }
1354
1355
  return E.template_effect(() => {
1355
1356
  E.set_attribute(U, "data-size", ee()), E.set_attribute(q, "data-size", ee());
1356
- }), E.delegated("touchstart", U, Se, void 0, !0), E.delegated("touchmove", U, Ce, void 0, !0), E.delegated("touchend", U, we), E.event("touchcancel", U, we), E.delegated("touchstart", q, Se, void 0, !0), E.delegated("touchmove", q, Ce, void 0, !0), E.delegated("touchend", q, we), E.event("touchcancel", q, we), E.delegated("keydown", q, Te), E.append(e, Ae), E.pop(ke);
1357
+ }), E.delegated("touchstart", U, Se, void 0, !0), E.delegated("touchmove", U, B, void 0, !0), E.delegated("touchend", U, Ce), E.event("touchcancel", U, Ce), E.delegated("touchstart", q, Se, void 0, !0), E.delegated("touchmove", q, B, void 0, !0), E.delegated("touchend", q, Ce), E.event("touchcancel", q, Ce), E.delegated("keydown", q, we), E.append(e, Ae), E.pop(ke);
1357
1358
  }
1358
1359
  E.delegate([
1359
1360
  "touchstart",
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./rolldown-runtime-DtPi1Y-2.js";
2
2
  import { A as t, C as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, d as u, f as d, g as f, i as p, j as m, k as h, l as g, m as _, o as v, s as y, t as b, w as x, x as S, y as C } from "./Button-vmWb6wKc.js";
3
- import { a as w, c as T, i as E, n as D, o as O, r as k, s as A, t as j } from "./Calendar-D11ctjrD.js";
3
+ import { a as w, c as T, i as E, n as D, o as O, r as k, s as A, t as j } from "./Calendar-V0u5h9jS.js";
4
4
  import { n as M, r as N, t as P } from "./WarningCircleIcon-AuYbQdPU.js";
5
5
  import { n as F, r as I, t as L } from "./CloseIcon-CyR73vpD.js";
6
6
  import { t as R } from "./CloseOutline-qpVa62mu.js";