@getmicdrop/venue-calendar 4.3.118 → 4.3.119

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 (91) hide show
  1. package/README.md +818 -818
  2. package/dist/{AddOnCard-D_d9UHNs.js → AddOnCard-BGFpF6uw.js} +65 -65
  3. package/dist/{ArrowLeftIcon-Bs7mUb9F.js → ArrowLeftIcon-pPaJkbnp.js} +1 -1
  4. package/dist/{BlockPlaceholder-BgUO-Q5N.js → BlockPlaceholder-BgLtwJnm.js} +1 -1
  5. package/dist/{Calendar-BMGUJww4.js → Calendar-S2Es6EKK.js} +97 -97
  6. package/dist/{CalendarFoundryView-0R64KICL.js → CalendarFoundryView-CZ36wO24.js} +4180 -4493
  7. package/dist/{CalendarIcon-29_IwvHT.js → CalendarIcon-C_6MSRyE.js} +1 -1
  8. package/dist/{CartView-H9Z2y9CT.js → CartView-9YSoRvTw.js} +337 -337
  9. package/dist/CheckIcon-sr8D0z-b.js +25 -0
  10. package/dist/{Checkout-wTWkk1vH.js → Checkout-BLkYIKoR.js} +65 -64
  11. package/dist/{Checkout-06U4m7pN.js → Checkout-BS3r4Qii.js} +66 -66
  12. package/dist/{CheckoutTimer-BYmPa5AI.js → CheckoutTimer-DY1NKJXP.js} +2 -2
  13. package/dist/{ChevronDownIcon-Denff3IQ.js → ChevronDownIcon-Co6rRQp-.js} +1 -1
  14. package/dist/{CloseIcon-BnwP0Nx3.js → CloseIcon-DpRE5O8y.js} +5 -26
  15. package/dist/{CollectionView-BEt1C1Cs.js → CollectionView-DyFDlCmo.js} +4 -4
  16. package/dist/{CropImage-BOd2evXB.js → CropImage-C8W_Xb_V.js} +3 -3
  17. package/dist/Event-DUq4tYBE.js +4058 -0
  18. package/dist/{EventPage-A3s6hjD0.js → EventPage-m5SlifRu.js} +19 -19
  19. package/dist/{Input-CvK81EKX.js → Input-CsHb9Z8e.js} +5 -5
  20. package/dist/{MailIcon-DdNZD4Cv.js → LocationIcon-Dxk7snUC.js} +4 -4
  21. package/dist/{Modal-hKMSS6bJ.js → Modal-kG0LKgMZ.js} +2 -2
  22. package/dist/{ModalFooter-9RwP9PR1.js → ModalFooter-CM5RDuvB.js} +42 -42
  23. package/dist/{ModalHeader-9TxpIx5T.js → ModalHeader-DBVXezSL.js} +1 -1
  24. package/dist/{PasswordInput-CJ7o73tQ.js → PasswordInput-BlL0w_yr.js} +5 -5
  25. package/dist/{PhoneInput-9qgnvS-F.js → PhoneInput-DnmN_L03.js} +21 -21
  26. package/dist/{RecommendationsRail-NGy6-gbC.js → RecommendationsRail-Dq9t0T02.js} +68 -43
  27. package/dist/{ScarcityBadge-BiseR8MX.js → ScarcityBadge-Bj_YMxz4.js} +3 -3
  28. package/dist/{SeriesPage-Bv_OY09w.js → SeriesPage-CaPTQRSo.js} +2 -2
  29. package/dist/{Success-Bt0VBW34.js → Success-tXgS0BXp.js} +61 -61
  30. package/dist/{TagIcon-DtX06EKe.js → TagIcon-Kq7_bapx.js} +1 -1
  31. package/dist/{WarningCircleIcon-BEbthCpd.js → WarningCircleIcon-BdbAYYi4.js} +1 -1
  32. package/dist/{WarningTriIcon-Ba68mCD0.js → WarningTriIcon-D8otatZe.js} +1 -1
  33. package/dist/api/transformers/event.d.ts +2 -2
  34. package/dist/{api-OjCXecbx.js → api-DG7ztpYi.js} +1 -1
  35. package/dist/{constants-kDn3-fLS.js → constants-C6MZgb2S.js} +14 -0
  36. package/dist/{copyToClipboard-pMnstOiv.js → copyToClipboard-DSangJpP.js} +4 -4
  37. package/dist/{createErrorGate.svelte-DgREjCbj.js → createErrorGate.svelte-CEBpRAmr.js} +1 -1
  38. package/dist/{datetime-vgtbUysw.js → datetime-YTw6PkGP.js} +158 -124
  39. package/dist/{de-Ddxx02Ub.js → de-BPmqZ6ao.js} +15 -1
  40. package/dist/{es-CbcvPdPt.js → es-BV3Sgeg-.js} +15 -1
  41. package/dist/{event-transform-B5i2_NHJ.js → event-transform-CyRMeKW_.js} +10 -10
  42. package/dist/{floatingPosition-Dka8Z2M5.js → floatingPosition-XIv5DYuP.js} +7 -8
  43. package/dist/{fr-B6StQGuk.js → fr-BJ0VQGEj.js} +15 -1
  44. package/dist/{href-Dv7vLRDA.js → href-yqxAPbkW.js} +416 -95
  45. package/dist/{i18n-B-mcjNXL.js → i18n-MF3q-UBI.js} +152 -148
  46. package/dist/{id-BgyzUf0j.js → id-CVXaHHqU.js} +15 -1
  47. package/dist/{imageOptimizer-CX9dzg-E.js → imageOptimizer-B3fj8_30.js} +7 -7
  48. package/dist/{it-FYvfjD40.js → it-C0lzsHje.js} +15 -1
  49. package/dist/{ja-CttqurG4.js → ja-Dl2r6tQ6.js} +15 -1
  50. package/dist/{ko-BExabPw4.js → ko-DINqFSE1.js} +15 -1
  51. package/dist/locales/{4.3.118 → 4.3.119}/flow/de.js +1 -1
  52. package/dist/locales/{4.3.118 → 4.3.119}/flow/es.js +1 -1
  53. package/dist/locales/{4.3.118 → 4.3.119}/flow/fr.js +1 -1
  54. package/dist/locales/{4.3.118 → 4.3.119}/flow/id.js +1 -1
  55. package/dist/locales/{4.3.118 → 4.3.119}/flow/it.js +1 -1
  56. package/dist/locales/{4.3.118 → 4.3.119}/flow/ja.js +1 -1
  57. package/dist/locales/{4.3.118 → 4.3.119}/flow/ko.js +1 -1
  58. package/dist/locales/{4.3.118 → 4.3.119}/flow/nl.js +1 -1
  59. package/dist/locales/{4.3.118 → 4.3.119}/flow/pl.js +1 -1
  60. package/dist/locales/{4.3.118 → 4.3.119}/flow/pt-br.js +1 -1
  61. package/dist/locales/{4.3.118 → 4.3.119}/flow/tr.js +1 -1
  62. package/dist/locales/{4.3.118 → 4.3.119}/flow/zh.js +1 -1
  63. package/dist/{nl-DQARtEz-.js → nl-D92n5tHa.js} +15 -1
  64. package/dist/{pl-bEHWdYWg.js → pl-BlZHcnlS.js} +15 -1
  65. package/dist/portal-D-oaEWsY.js +43 -0
  66. package/dist/{z-index-CeYVHpUz.js → portalContainment-CeAVqIb-.js} +111 -58
  67. package/dist/{pt-br-B8XEnIoG.js → pt-br-BrxthY0b.js} +15 -1
  68. package/dist/{to-event-card-props-BquqSDuB.js → to-event-card-props-Dn1eDOiJ.js} +23 -23
  69. package/dist/{tr-9EWGVIVf.js → tr-BnAdi4HO.js} +15 -1
  70. package/dist/{utils-vLhNHY0t.js → utils-CdNe7KGe.js} +1 -1
  71. package/dist/venue-calendar.css +1 -1
  72. package/dist/venue-calendar.es.js +126 -148
  73. package/dist/venue-calendar.iife.js +35 -35
  74. package/dist/venue-calendar.umd.js +57 -57
  75. package/dist/{zh-BOf81DR7.js → zh-Tg1OTvWs.js} +15 -1
  76. package/package.json +1 -1
  77. package/src/lib/theme.js +222 -222
  78. package/dist/Event-CUSr7idI.js +0 -3647
  79. package/dist/portal-BZBgqs8B.js +0 -98
  80. /package/dist/locales/{4.3.118 → 4.3.119}/main/de.js +0 -0
  81. /package/dist/locales/{4.3.118 → 4.3.119}/main/es.js +0 -0
  82. /package/dist/locales/{4.3.118 → 4.3.119}/main/fr.js +0 -0
  83. /package/dist/locales/{4.3.118 → 4.3.119}/main/id.js +0 -0
  84. /package/dist/locales/{4.3.118 → 4.3.119}/main/it.js +0 -0
  85. /package/dist/locales/{4.3.118 → 4.3.119}/main/ja.js +0 -0
  86. /package/dist/locales/{4.3.118 → 4.3.119}/main/ko.js +0 -0
  87. /package/dist/locales/{4.3.118 → 4.3.119}/main/nl.js +0 -0
  88. /package/dist/locales/{4.3.118 → 4.3.119}/main/pl.js +0 -0
  89. /package/dist/locales/{4.3.118 → 4.3.119}/main/pt-br.js +0 -0
  90. /package/dist/locales/{4.3.118 → 4.3.119}/main/tr.js +0 -0
  91. /package/dist/locales/{4.3.118 → 4.3.119}/main/zh.js +0 -0
@@ -132,6 +132,10 @@ var e = {
132
132
  doorsOpenAt: "入场时间:",
133
133
  upcomingDates: "近期场次",
134
134
  showtimeDifferentLocation: "其他场地:",
135
+ upcomingShows: "近期演出",
136
+ otherDates: "其他日期",
137
+ showMore: "显示更多",
138
+ showLess: "收起",
135
139
  closeTicketSelection: "关闭选票",
136
140
  closeTicketSelector: "关闭选票器",
137
141
  ticketSelection: "选择门票",
@@ -205,7 +209,17 @@ var e = {
205
209
  recommendationYouMightLike: "你可能也喜欢",
206
210
  recommendationFeatured: "精选",
207
211
  unlocked: "已解锁",
208
- discountApplied: "已应用优惠"
212
+ discountApplied: "已应用优惠",
213
+ doorsAtTime: "{time} 开场",
214
+ shareText: "快来看看{venueName}的{eventName}!",
215
+ shareCopyLink: "复制链接",
216
+ shareCopied: "已复制",
217
+ shareMessages: "信息",
218
+ shareWhatsApp: "WhatsApp",
219
+ shareEmail: "邮箱",
220
+ shareFacebook: "Facebook",
221
+ shareX: "X",
222
+ shareMore: "更多"
209
223
  };
210
224
  //#endregion
211
225
  export { e as zh };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@getmicdrop/venue-calendar",
3
3
  "_version_comment": "4.1.55 was the last PUBLISHED version, and the tree carried 36 commits npm's 4.1.55 does not have — including the gate-password security fix and four money fixes. A filename must never reuse a version npm has taken (jsDelivr/unpkg cache the FIRST bytes they see under `@4.1.55` forever, so republishing that number ships the old widget to every venue that pinned it). Bumped to 4.2.0 here, BEFORE anything is built for publish. `npm run release:preflight` refuses to proceed when this number already exists in the registry.",
4
- "version": "4.3.118",
4
+ "version": "4.3.119",
5
5
  "description": "A customizable Svelte calendar component for displaying comedy events",
6
6
  "type": "module",
7
7
  "types": "./dist/types/index.d.ts",
package/src/lib/theme.js CHANGED
@@ -1,222 +1,222 @@
1
- /**
2
- * Theme Configuration for Embeddable Calendar Widget
3
- *
4
- * This module provides comprehensive theming options for the calendar widget.
5
- * All colors use HSL format for easy manipulation.
6
- *
7
- * Usage:
8
- * 1. Import and call applyTheme() with your custom theme
9
- * 2. Or set CSS custom properties directly on the widget container
10
- *
11
- * Example:
12
- * ```js
13
- * import { applyTheme, themes } from '@getmicdrop/venue-calendar/theme';
14
- * applyTheme(themes.dark);
15
- *
16
- * // Or custom theme:
17
- * applyTheme({
18
- * brandPrimary: '270 76% 60%', // Purple
19
- * textPrimary: '0 0% 100%',
20
- * bgPrimary: '0 0% 10%',
21
- * });
22
- * ```
23
- */
24
-
25
- // Default light theme
26
- export const lightTheme = {
27
- // Brand colors
28
- brandPrimary: '217 91% 60%', // #2563EB - Blue
29
-
30
- // Text colors
31
- textPrimary: '0 0% 0%', // Black
32
- textSecondary: '0 0% 40%', // Dark Gray
33
- textTertiary: '0 0% 60%', // Gray
34
-
35
- // Background colors
36
- bgPrimary: '0 0% 100%', // White
37
- bgSecondary: '0 0% 98%', // Light Gray
38
- bgQuaternary: '0 0% 96%', // Very Light Gray
39
-
40
- // Border/Stroke colors
41
- strokePrimary: '0 0% 80%', // Medium Gray
42
- strokeSecondary: '0 0% 90%', // Light Gray
43
-
44
- // Status colors
45
- statusOnSale: '217 91% 60%', // Blue
46
- statusSellingFast: '38 92% 50%', // Orange
47
- statusSoldOut: '0 84% 60%', // Red
48
-
49
- // Calendar specific
50
- todayBg: '217 91% 97%', // Light blue
51
- todayText: '217 91% 50%', // Blue
52
- eventDotOnSale: '217 91% 60%',
53
- eventDotSellingFast: '38 92% 50%',
54
- eventDotSoldOut: '0 84% 60%',
55
-
56
- // Interaction states
57
- hoverBg: '0 0% 96%',
58
- focusRing: '217 91% 60%',
59
- };
60
-
61
- // Dark theme
62
- export const darkTheme = {
63
- // Brand colors
64
- brandPrimary: '217 91% 65%', // Lighter blue for dark mode
65
-
66
- // Text colors
67
- textPrimary: '0 0% 98%', // Near white
68
- textSecondary: '0 0% 70%', // Light gray
69
- textTertiary: '0 0% 50%', // Gray
70
-
71
- // Background colors
72
- bgPrimary: '0 0% 9%', // Very dark gray
73
- bgSecondary: '0 0% 13%', // Dark gray
74
- bgQuaternary: '0 0% 17%', // Slightly lighter
75
-
76
- // Border/Stroke colors
77
- strokePrimary: '0 0% 30%',
78
- strokeSecondary: '0 0% 20%',
79
-
80
- // Status colors
81
- statusOnSale: '217 91% 65%',
82
- statusSellingFast: '38 92% 55%',
83
- statusSoldOut: '0 84% 65%',
84
-
85
- // Calendar specific
86
- todayBg: '217 50% 20%',
87
- todayText: '217 91% 70%',
88
- eventDotOnSale: '217 91% 65%',
89
- eventDotSellingFast: '38 92% 55%',
90
- eventDotSoldOut: '0 84% 65%',
91
-
92
- // Interaction states
93
- hoverBg: '0 0% 20%',
94
- focusRing: '217 91% 65%',
95
- };
96
-
97
- // High contrast theme for accessibility
98
- export const highContrastTheme = {
99
- brandPrimary: '217 100% 50%',
100
- textPrimary: '0 0% 0%',
101
- textSecondary: '0 0% 20%',
102
- textTertiary: '0 0% 30%',
103
- bgPrimary: '0 0% 100%',
104
- bgSecondary: '0 0% 95%',
105
- bgQuaternary: '0 0% 90%',
106
- strokePrimary: '0 0% 0%',
107
- strokeSecondary: '0 0% 30%',
108
- statusOnSale: '217 100% 40%',
109
- statusSellingFast: '30 100% 40%',
110
- statusSoldOut: '0 100% 40%',
111
- todayBg: '217 100% 90%',
112
- todayText: '217 100% 30%',
113
- eventDotOnSale: '217 100% 40%',
114
- eventDotSellingFast: '30 100% 40%',
115
- eventDotSoldOut: '0 100% 40%',
116
- hoverBg: '217 100% 95%',
117
- focusRing: '217 100% 40%',
118
- };
119
-
120
- // Preset themes collection
121
- export const themes = {
122
- light: lightTheme,
123
- dark: darkTheme,
124
- highContrast: highContrastTheme,
125
- };
126
-
127
- /**
128
- * Apply a theme to the calendar widget
129
- * @param {Object} theme - Theme object with HSL color values
130
- * @param {HTMLElement} container - Optional container element (defaults to :root)
131
- */
132
- export function applyTheme(theme, container = document.documentElement) {
133
- const cssVarMap = {
134
- brandPrimary: '--brand-primary',
135
- textPrimary: '--text-primary',
136
- textSecondary: '--text-secondary',
137
- textTertiary: '--text-tertiary',
138
- bgPrimary: '--bg-primary',
139
- bgSecondary: '--bg-secondary',
140
- bgQuaternary: '--bg-quaternary',
141
- strokePrimary: '--stroke-primary',
142
- strokeSecondary: '--stroke-secondary',
143
- statusOnSale: '--status-on-sale',
144
- statusSellingFast: '--status-selling-fast',
145
- statusSoldOut: '--status-sold-out',
146
- todayBg: '--today-bg',
147
- todayText: '--today-text',
148
- eventDotOnSale: '--event-dot-on-sale',
149
- eventDotSellingFast: '--event-dot-selling-fast',
150
- eventDotSoldOut: '--event-dot-sold-out',
151
- hoverBg: '--hover-bg',
152
- focusRing: '--focus-ring',
153
- };
154
-
155
- Object.entries(theme).forEach(([key, value]) => {
156
- const cssVar = cssVarMap[key];
157
- if (cssVar) {
158
- container.style.setProperty(cssVar, value);
159
- }
160
- });
161
-
162
- // Sync data-theme attribute when a known preset is applied so SC
163
- // components (Stripe theme detector, DarkModeToggle reader, etc.)
164
- // see the same intent. Partial/custom themes don't trigger this —
165
- // they edit a few CSS vars without flipping the overall light/dark
166
- // mode signal.
167
- if (container.setAttribute) {
168
- if (theme === darkTheme) {
169
- container.setAttribute('data-theme', 'dark');
170
- } else if (theme === lightTheme || theme === highContrastTheme) {
171
- container.setAttribute('data-theme', 'light');
172
- }
173
- }
174
- }
175
-
176
- /**
177
- * Generate CSS string for embedding
178
- * @param {Object} theme - Theme object
179
- * @returns {string} CSS string
180
- */
181
- export function generateThemeCSS(theme) {
182
- const cssVarMap = {
183
- brandPrimary: '--brand-primary',
184
- textPrimary: '--text-primary',
185
- textSecondary: '--text-secondary',
186
- textTertiary: '--text-tertiary',
187
- bgPrimary: '--bg-primary',
188
- bgSecondary: '--bg-secondary',
189
- bgQuaternary: '--bg-quaternary',
190
- strokePrimary: '--stroke-primary',
191
- strokeSecondary: '--stroke-secondary',
192
- statusOnSale: '--status-on-sale',
193
- statusSellingFast: '--status-selling-fast',
194
- statusSoldOut: '--status-sold-out',
195
- todayBg: '--today-bg',
196
- todayText: '--today-text',
197
- eventDotOnSale: '--event-dot-on-sale',
198
- eventDotSellingFast: '--event-dot-selling-fast',
199
- eventDotSoldOut: '--event-dot-sold-out',
200
- hoverBg: '--hover-bg',
201
- focusRing: '--focus-ring',
202
- };
203
-
204
- const lines = [];
205
- Object.entries(theme).forEach(([key, value]) => {
206
- const cssVar = cssVarMap[key];
207
- if (cssVar) {
208
- lines.push(` ${cssVar}: ${value};`);
209
- }
210
- });
211
-
212
- return `:root {\n${lines.join('\n')}\n}`;
213
- }
214
-
215
- export default {
216
- themes,
217
- lightTheme,
218
- darkTheme,
219
- highContrastTheme,
220
- applyTheme,
221
- generateThemeCSS,
222
- };
1
+ /**
2
+ * Theme Configuration for Embeddable Calendar Widget
3
+ *
4
+ * This module provides comprehensive theming options for the calendar widget.
5
+ * All colors use HSL format for easy manipulation.
6
+ *
7
+ * Usage:
8
+ * 1. Import and call applyTheme() with your custom theme
9
+ * 2. Or set CSS custom properties directly on the widget container
10
+ *
11
+ * Example:
12
+ * ```js
13
+ * import { applyTheme, themes } from '@getmicdrop/venue-calendar/theme';
14
+ * applyTheme(themes.dark);
15
+ *
16
+ * // Or custom theme:
17
+ * applyTheme({
18
+ * brandPrimary: '270 76% 60%', // Purple
19
+ * textPrimary: '0 0% 100%',
20
+ * bgPrimary: '0 0% 10%',
21
+ * });
22
+ * ```
23
+ */
24
+
25
+ // Default light theme
26
+ export const lightTheme = {
27
+ // Brand colors
28
+ brandPrimary: '217 91% 60%', // #2563EB - Blue
29
+
30
+ // Text colors
31
+ textPrimary: '0 0% 0%', // Black
32
+ textSecondary: '0 0% 40%', // Dark Gray
33
+ textTertiary: '0 0% 60%', // Gray
34
+
35
+ // Background colors
36
+ bgPrimary: '0 0% 100%', // White
37
+ bgSecondary: '0 0% 98%', // Light Gray
38
+ bgQuaternary: '0 0% 96%', // Very Light Gray
39
+
40
+ // Border/Stroke colors
41
+ strokePrimary: '0 0% 80%', // Medium Gray
42
+ strokeSecondary: '0 0% 90%', // Light Gray
43
+
44
+ // Status colors
45
+ statusOnSale: '217 91% 60%', // Blue
46
+ statusSellingFast: '38 92% 50%', // Orange
47
+ statusSoldOut: '0 84% 60%', // Red
48
+
49
+ // Calendar specific
50
+ todayBg: '217 91% 97%', // Light blue
51
+ todayText: '217 91% 50%', // Blue
52
+ eventDotOnSale: '217 91% 60%',
53
+ eventDotSellingFast: '38 92% 50%',
54
+ eventDotSoldOut: '0 84% 60%',
55
+
56
+ // Interaction states
57
+ hoverBg: '0 0% 96%',
58
+ focusRing: '217 91% 60%',
59
+ };
60
+
61
+ // Dark theme
62
+ export const darkTheme = {
63
+ // Brand colors
64
+ brandPrimary: '217 91% 65%', // Lighter blue for dark mode
65
+
66
+ // Text colors
67
+ textPrimary: '0 0% 98%', // Near white
68
+ textSecondary: '0 0% 70%', // Light gray
69
+ textTertiary: '0 0% 50%', // Gray
70
+
71
+ // Background colors
72
+ bgPrimary: '0 0% 9%', // Very dark gray
73
+ bgSecondary: '0 0% 13%', // Dark gray
74
+ bgQuaternary: '0 0% 17%', // Slightly lighter
75
+
76
+ // Border/Stroke colors
77
+ strokePrimary: '0 0% 30%',
78
+ strokeSecondary: '0 0% 20%',
79
+
80
+ // Status colors
81
+ statusOnSale: '217 91% 65%',
82
+ statusSellingFast: '38 92% 55%',
83
+ statusSoldOut: '0 84% 65%',
84
+
85
+ // Calendar specific
86
+ todayBg: '217 50% 20%',
87
+ todayText: '217 91% 70%',
88
+ eventDotOnSale: '217 91% 65%',
89
+ eventDotSellingFast: '38 92% 55%',
90
+ eventDotSoldOut: '0 84% 65%',
91
+
92
+ // Interaction states
93
+ hoverBg: '0 0% 20%',
94
+ focusRing: '217 91% 65%',
95
+ };
96
+
97
+ // High contrast theme for accessibility
98
+ export const highContrastTheme = {
99
+ brandPrimary: '217 100% 50%',
100
+ textPrimary: '0 0% 0%',
101
+ textSecondary: '0 0% 20%',
102
+ textTertiary: '0 0% 30%',
103
+ bgPrimary: '0 0% 100%',
104
+ bgSecondary: '0 0% 95%',
105
+ bgQuaternary: '0 0% 90%',
106
+ strokePrimary: '0 0% 0%',
107
+ strokeSecondary: '0 0% 30%',
108
+ statusOnSale: '217 100% 40%',
109
+ statusSellingFast: '30 100% 40%',
110
+ statusSoldOut: '0 100% 40%',
111
+ todayBg: '217 100% 90%',
112
+ todayText: '217 100% 30%',
113
+ eventDotOnSale: '217 100% 40%',
114
+ eventDotSellingFast: '30 100% 40%',
115
+ eventDotSoldOut: '0 100% 40%',
116
+ hoverBg: '217 100% 95%',
117
+ focusRing: '217 100% 40%',
118
+ };
119
+
120
+ // Preset themes collection
121
+ export const themes = {
122
+ light: lightTheme,
123
+ dark: darkTheme,
124
+ highContrast: highContrastTheme,
125
+ };
126
+
127
+ /**
128
+ * Apply a theme to the calendar widget
129
+ * @param {Object} theme - Theme object with HSL color values
130
+ * @param {HTMLElement} container - Optional container element (defaults to :root)
131
+ */
132
+ export function applyTheme(theme, container = document.documentElement) {
133
+ const cssVarMap = {
134
+ brandPrimary: '--brand-primary',
135
+ textPrimary: '--text-primary',
136
+ textSecondary: '--text-secondary',
137
+ textTertiary: '--text-tertiary',
138
+ bgPrimary: '--bg-primary',
139
+ bgSecondary: '--bg-secondary',
140
+ bgQuaternary: '--bg-quaternary',
141
+ strokePrimary: '--stroke-primary',
142
+ strokeSecondary: '--stroke-secondary',
143
+ statusOnSale: '--status-on-sale',
144
+ statusSellingFast: '--status-selling-fast',
145
+ statusSoldOut: '--status-sold-out',
146
+ todayBg: '--today-bg',
147
+ todayText: '--today-text',
148
+ eventDotOnSale: '--event-dot-on-sale',
149
+ eventDotSellingFast: '--event-dot-selling-fast',
150
+ eventDotSoldOut: '--event-dot-sold-out',
151
+ hoverBg: '--hover-bg',
152
+ focusRing: '--focus-ring',
153
+ };
154
+
155
+ Object.entries(theme).forEach(([key, value]) => {
156
+ const cssVar = cssVarMap[key];
157
+ if (cssVar) {
158
+ container.style.setProperty(cssVar, value);
159
+ }
160
+ });
161
+
162
+ // Sync data-theme attribute when a known preset is applied so SC
163
+ // components (Stripe theme detector, DarkModeToggle reader, etc.)
164
+ // see the same intent. Partial/custom themes don't trigger this —
165
+ // they edit a few CSS vars without flipping the overall light/dark
166
+ // mode signal.
167
+ if (container.setAttribute) {
168
+ if (theme === darkTheme) {
169
+ container.setAttribute('data-theme', 'dark');
170
+ } else if (theme === lightTheme || theme === highContrastTheme) {
171
+ container.setAttribute('data-theme', 'light');
172
+ }
173
+ }
174
+ }
175
+
176
+ /**
177
+ * Generate CSS string for embedding
178
+ * @param {Object} theme - Theme object
179
+ * @returns {string} CSS string
180
+ */
181
+ export function generateThemeCSS(theme) {
182
+ const cssVarMap = {
183
+ brandPrimary: '--brand-primary',
184
+ textPrimary: '--text-primary',
185
+ textSecondary: '--text-secondary',
186
+ textTertiary: '--text-tertiary',
187
+ bgPrimary: '--bg-primary',
188
+ bgSecondary: '--bg-secondary',
189
+ bgQuaternary: '--bg-quaternary',
190
+ strokePrimary: '--stroke-primary',
191
+ strokeSecondary: '--stroke-secondary',
192
+ statusOnSale: '--status-on-sale',
193
+ statusSellingFast: '--status-selling-fast',
194
+ statusSoldOut: '--status-sold-out',
195
+ todayBg: '--today-bg',
196
+ todayText: '--today-text',
197
+ eventDotOnSale: '--event-dot-on-sale',
198
+ eventDotSellingFast: '--event-dot-selling-fast',
199
+ eventDotSoldOut: '--event-dot-sold-out',
200
+ hoverBg: '--hover-bg',
201
+ focusRing: '--focus-ring',
202
+ };
203
+
204
+ const lines = [];
205
+ Object.entries(theme).forEach(([key, value]) => {
206
+ const cssVar = cssVarMap[key];
207
+ if (cssVar) {
208
+ lines.push(` ${cssVar}: ${value};`);
209
+ }
210
+ });
211
+
212
+ return `:root {\n${lines.join('\n')}\n}`;
213
+ }
214
+
215
+ export default {
216
+ themes,
217
+ lightTheme,
218
+ darkTheme,
219
+ highContrastTheme,
220
+ applyTheme,
221
+ generateThemeCSS,
222
+ };