@getmicdrop/venue-calendar 3.4.2 → 3.4.3
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/dist/CarouselView.legacy-DdcBQB8k.js +65 -0
- package/dist/CarouselView.legacy-DdcBQB8k.js.map +1 -0
- package/dist/Checkout.legacy-ColJbEgW.js +1147 -0
- package/dist/Checkout.legacy-ColJbEgW.js.map +1 -0
- package/dist/FeaturedView.legacy-CtZabSNQ.js +128 -0
- package/dist/FeaturedView.legacy-CtZabSNQ.js.map +1 -0
- package/dist/GalleryCard-Ch072lif.js +84 -0
- package/dist/GalleryCard-Ch072lif.js.map +1 -0
- package/dist/GalleryView.legacy-CQOF_kYd.js +52 -0
- package/dist/GalleryView.legacy-CQOF_kYd.js.map +1 -0
- package/dist/GroupedListView.legacy-BWqs_hha.js +148 -0
- package/dist/GroupedListView.legacy-BWqs_hha.js.map +1 -0
- package/dist/Success.legacy-BcuRT_6P.js +191 -0
- package/dist/Success.legacy-BcuRT_6P.js.map +1 -0
- package/dist/VenueCalendar-DXZ34Hv2.js +26492 -0
- package/dist/VenueCalendar-DXZ34Hv2.js.map +1 -0
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +198 -163
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/events.d.ts +31 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/types.d.ts +61 -0
- package/dist/colors-BZoMuXdh.js +62 -0
- package/dist/colors-BZoMuXdh.js.map +1 -0
- package/dist/types/index.d.ts +24 -32
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +21 -25502
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +50 -24
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +50 -24
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/lib/theme.js +18 -10
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "svelte/internal/disclose-version";
|
|
2
|
+
import * as e from "svelte/internal/client";
|
|
3
|
+
import { onMount as y } from "svelte";
|
|
4
|
+
import { G as C } from "./GalleryCard-Ch072lif.js";
|
|
5
|
+
import { f as S } from "./VenueCalendar-DXZ34Hv2.js";
|
|
6
|
+
var x = e.from_html('<button class="carousel-arrow carousel-arrow-left svelte-1lcnwer" aria-label="Scroll left"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="arrow-icon svelte-1lcnwer"><polyline points="15 18 9 12 15 6"></polyline></svg></button>'), B = e.from_html('<div class="carousel-item svelte-1lcnwer" role="listitem"><!></div>'), W = e.from_html('<button class="carousel-arrow carousel-arrow-right svelte-1lcnwer" aria-label="Scroll right"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="arrow-icon svelte-1lcnwer"><polyline points="9 18 15 12 9 6"></polyline></svg></button>'), j = e.from_html('<section class="carousel-view svelte-1lcnwer" aria-label="Events carousel"><h2 class="sr-only svelte-1lcnwer">Upcoming events</h2> <div class="carousel-wrapper svelte-1lcnwer"><!> <div class="carousel-scroll svelte-1lcnwer" role="list"></div> <!></div></section>');
|
|
7
|
+
function R(p, n) {
|
|
8
|
+
e.push(n, !0);
|
|
9
|
+
let g = e.prop(n, "events", 19, () => []), l, v = e.state(!1), d = e.state(!1), i = e.state(!1), h = e.derived(() => S(g()));
|
|
10
|
+
function a() {
|
|
11
|
+
if (!l) return;
|
|
12
|
+
const { scrollLeft: r, scrollWidth: t, clientWidth: o } = l;
|
|
13
|
+
e.set(v, r > 1), e.set(d, r + o < t - 1), e.set(i, t > o + 1);
|
|
14
|
+
}
|
|
15
|
+
function u(r) {
|
|
16
|
+
if (!l) return;
|
|
17
|
+
const t = l.querySelector(".carousel-item");
|
|
18
|
+
if (!t) return;
|
|
19
|
+
const o = t.offsetWidth + 16;
|
|
20
|
+
l.scrollBy({ left: r * o, behavior: "smooth" });
|
|
21
|
+
}
|
|
22
|
+
y(() => {
|
|
23
|
+
a();
|
|
24
|
+
const r = new ResizeObserver(() => a());
|
|
25
|
+
return l && r.observe(l), () => r.disconnect();
|
|
26
|
+
});
|
|
27
|
+
var c = j(), f = e.sibling(e.child(c), 2), w = e.child(f);
|
|
28
|
+
{
|
|
29
|
+
var m = (r) => {
|
|
30
|
+
var t = x();
|
|
31
|
+
e.delegated("click", t, () => u(-1)), e.append(r, t);
|
|
32
|
+
};
|
|
33
|
+
e.if(w, (r) => {
|
|
34
|
+
e.get(i) && e.get(v) && r(m);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
var s = e.sibling(w, 2);
|
|
38
|
+
e.each(s, 21, () => e.get(h), e.index, (r, t) => {
|
|
39
|
+
var o = B(), k = e.child(o);
|
|
40
|
+
C(k, {
|
|
41
|
+
get event() {
|
|
42
|
+
return e.get(t);
|
|
43
|
+
},
|
|
44
|
+
get oneventClick() {
|
|
45
|
+
return n.oneventClick;
|
|
46
|
+
}
|
|
47
|
+
}), e.reset(o), e.append(r, o);
|
|
48
|
+
}), e.reset(s), e.bind_this(s, (r) => l = r, () => l);
|
|
49
|
+
var b = e.sibling(s, 2);
|
|
50
|
+
{
|
|
51
|
+
var _ = (r) => {
|
|
52
|
+
var t = W();
|
|
53
|
+
e.delegated("click", t, () => u(1)), e.append(r, t);
|
|
54
|
+
};
|
|
55
|
+
e.if(b, (r) => {
|
|
56
|
+
e.get(i) && e.get(d) && r(_);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
e.reset(f), e.reset(c), e.event("scroll", s, a), e.append(p, c), e.pop();
|
|
60
|
+
}
|
|
61
|
+
e.delegate(["click"]);
|
|
62
|
+
export {
|
|
63
|
+
R as default
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=CarouselView.legacy-DdcBQB8k.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselView.legacy-DdcBQB8k.js","sources":["../src/components/Calendar/CarouselView.legacy.svelte"],"sourcesContent":["<script>\n import { onMount } from \"svelte\";\n import GalleryCard from \"./GalleryCard.svelte\";\n import { filterTodayAndFuture } from \"$lib/utils/browse-status.js\";\n\n let { events = [], oneventClick } = $props();\n\n let scrollContainer;\n let canScrollLeft = $state(false);\n let canScrollRight = $state(false);\n let showArrows = $state(false);\n\n // Filter to today and future, sorted chronologically\n let futureEvents = $derived(filterTodayAndFuture(events));\n\n function updateScrollState() {\n if (!scrollContainer) return;\n const { scrollLeft, scrollWidth, clientWidth } = scrollContainer;\n canScrollLeft = scrollLeft > 1;\n canScrollRight = scrollLeft + clientWidth < scrollWidth - 1;\n showArrows = scrollWidth > clientWidth + 1;\n }\n\n function scrollByCard(direction) {\n if (!scrollContainer) return;\n // Get the width of the first card item\n const firstCard = scrollContainer.querySelector('.carousel-item');\n if (!firstCard) return;\n const cardWidth = firstCard.offsetWidth + 16; // card width + gap\n scrollContainer.scrollBy({ left: direction * cardWidth, behavior: 'smooth' });\n }\n\n onMount(() => {\n updateScrollState();\n // Use ResizeObserver to update on container resize\n const observer = new ResizeObserver(() => updateScrollState());\n if (scrollContainer) {\n observer.observe(scrollContainer);\n }\n return () => observer.disconnect();\n });\n</script>\n\n<section class=\"carousel-view\" aria-label=\"Events carousel\">\n <h2 class=\"sr-only\">Upcoming events</h2>\n\n <div class=\"carousel-wrapper\">\n <!-- Left arrow -->\n {#if showArrows && canScrollLeft}\n <button\n class=\"carousel-arrow carousel-arrow-left\"\n onclick={() => scrollByCard(-1)}\n aria-label=\"Scroll left\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"arrow-icon\"><polyline points=\"15 18 9 12 15 6\"></polyline></svg>\n </button>\n {/if}\n\n <!-- Scroll container -->\n <div\n class=\"carousel-scroll\"\n bind:this={scrollContainer}\n onscroll={updateScrollState}\n role=\"list\"\n >\n {#each futureEvents as event}\n <div class=\"carousel-item\" role=\"listitem\">\n <GalleryCard {event} {oneventClick} />\n </div>\n {/each}\n </div>\n\n <!-- Right arrow -->\n {#if showArrows && canScrollRight}\n <button\n class=\"carousel-arrow carousel-arrow-right\"\n onclick={() => scrollByCard(1)}\n aria-label=\"Scroll right\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"arrow-icon\"><polyline points=\"9 18 15 12 9 6\"></polyline></svg>\n </button>\n {/if}\n </div>\n</section>\n\n<style>\n @reference \"../../app.css\";\n\n .carousel-view {\n width: 100%;\n }\n\n .carousel-wrapper {\n @apply relative;\n }\n\n .carousel-scroll {\n @apply flex gap-4 overflow-x-auto p-2;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n }\n\n .carousel-scroll::-webkit-scrollbar {\n display: none;\n }\n\n .carousel-item {\n scroll-snap-align: start;\n flex: 0 0 85%;\n }\n\n /* Tablet: 2 visible cards with peek */\n @media (min-width: 640px) {\n .carousel-item {\n flex: 0 0 calc(50% - 8px);\n }\n\n .carousel-scroll {\n @apply p-3;\n }\n }\n\n /* Desktop: 3 visible cards with peek */\n @media (min-width: 1024px) {\n .carousel-item {\n flex: 0 0 calc(33.333% - 11px);\n }\n\n .carousel-scroll {\n @apply p-4;\n }\n }\n\n /* Arrow buttons */\n .carousel-arrow {\n @apply absolute top-1/2 -translate-y-1/2 z-10;\n @apply w-10 h-10 rounded-full flex items-center justify-center;\n @apply bg-white/90 dark:bg-gray-800/90 border border-gray-200 dark:border-gray-600;\n @apply shadow-lg cursor-pointer;\n @apply transition-opacity duration-200;\n }\n\n .carousel-arrow:hover {\n @apply bg-white dark:bg-gray-700;\n }\n\n .carousel-arrow:focus-visible {\n @apply outline-2 outline-blue-700 dark:outline-blue-500 outline-offset-2;\n }\n\n .carousel-arrow-left {\n left: 8px;\n }\n\n .carousel-arrow-right {\n right: 8px;\n }\n\n .arrow-icon {\n @apply w-5 h-5 text-gray-700 dark:text-gray-200;\n }\n\n /* Hide arrows on mobile — touch scrolling is natural */\n @media (max-width: 639px) {\n .carousel-arrow {\n display: none;\n }\n }\n\n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n .carousel-scroll {\n scroll-behavior: auto;\n }\n }\n\n /* Screen reader only text */\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n</style>\n"],"names":["events","$","$$props","scrollContainer","canScrollLeft","canScrollRight","showArrows","futureEvents","filterTodayAndFuture","updateScrollState","scrollLeft","scrollWidth","clientWidth","scrollByCard","direction","firstCard","cardWidth","onMount","observer","section","root","div","button","root_1","$$render","consequent","div_1","node","$$anchor","event","div_2","root_2","GalleryCard","node_1","$$value","button_1","root_3","consequent_1"],"mappings":";;;;;;iBAAA;;MAKQA,IAAMC,EAAA,KAAAC,GAAA,UAAA,IAAA,MAAA,EAAA,GAERC,GACAC,IAAgBH,EAAA,MAAO,EAAK,GAC5BI,IAAiBJ,EAAA,MAAO,EAAK,GAC7BK,IAAaL,EAAA,MAAO,EAAK,GAGzBM,IAAYN,EAAA,QAAA,MAAYO,EAAqBR,EAAM,CAAA,CAAA;AAE9C,WAAAS,IAAoB;SACtBN,EAAe;AACZ,UAAA,EAAA,YAAAO,GAAY,aAAAC,GAAa,aAAAC,EAAW,IAAKT;UACjDC,GAAgBM,IAAa,CAAC,GAC9BT,EAAA,IAAAI,GAAiBK,IAAaE,IAAcD,IAAc,CAAC,GAC3DV,EAAA,IAAAK,GAAaK,IAAcC,IAAc,CAAC;AAAA,EAC5C;WAESC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