@getmicdrop/svelte-components 5.18.2 → 5.20.0

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 (122) hide show
  1. package/dist/base.css +18 -0
  2. package/dist/calendar/Calendar/MiniMonthCalendar.svelte +10 -8
  3. package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts.map +1 -1
  4. package/dist/components/Heading.svelte +8 -2
  5. package/dist/components/Heading.svelte.d.ts +1 -0
  6. package/dist/components/Heading.svelte.d.ts.map +1 -1
  7. package/dist/components/Text.svelte +13 -2
  8. package/dist/components/Text.svelte.d.ts +2 -1
  9. package/dist/components/Text.svelte.d.ts.map +1 -1
  10. package/dist/constants/formOptions.d.ts +2 -5
  11. package/dist/constants/formOptions.d.ts.map +1 -1
  12. package/dist/constants/formOptions.js +6 -6
  13. package/dist/constants/formOptions.spec.js +2 -7
  14. package/dist/index.d.ts +6 -2
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +29 -2
  17. package/dist/patterns/forms/FormSection.svelte +2 -1
  18. package/dist/patterns/forms/FormSection.svelte.d.ts +2 -0
  19. package/dist/patterns/forms/FormSection.svelte.d.ts.map +1 -1
  20. package/dist/patterns/layout/SidebarTestWrapper.svelte.d.ts +1 -1
  21. package/dist/patterns/navigation/Header.svelte +3 -3
  22. package/dist/primitives/Input/Select.svelte +1 -1
  23. package/dist/primitives/Pagination/DotIndicator.svelte +66 -0
  24. package/dist/primitives/Pagination/DotIndicator.svelte.d.ts +18 -0
  25. package/dist/primitives/Pagination/DotIndicator.svelte.d.ts.map +1 -0
  26. package/dist/primitives/index.d.ts +1 -0
  27. package/dist/primitives/index.js +1 -0
  28. package/dist/recipes/inputs/phoneInput/CountrySelector.svelte +1 -1
  29. package/dist/recipes/modals/FeedbackModal.svelte +205 -0
  30. package/dist/recipes/modals/FeedbackModal.svelte.d.ts +24 -0
  31. package/dist/recipes/modals/FeedbackModal.svelte.d.ts.map +1 -0
  32. package/dist/recipes/modals/index.d.ts +1 -0
  33. package/dist/recipes/modals/index.js +1 -0
  34. package/dist/schemas/event.d.ts +4 -4
  35. package/dist/schemas/order.d.ts +2 -2
  36. package/dist/schemas/promo.d.ts +4 -4
  37. package/dist/services/event.service.d.ts +11 -0
  38. package/dist/services/event.service.d.ts.map +1 -0
  39. package/dist/services/event.service.js +64 -0
  40. package/dist/services/event.service.spec.d.ts +2 -0
  41. package/dist/services/event.service.spec.d.ts.map +1 -0
  42. package/dist/services/event.service.spec.js +168 -0
  43. package/dist/services/{ShowService.d.ts → show.service.d.ts} +1 -1
  44. package/dist/services/show.service.d.ts.map +1 -0
  45. package/dist/services/show.service.js +115 -0
  46. package/dist/services/show.service.spec.d.ts +2 -0
  47. package/dist/services/show.service.spec.d.ts.map +1 -0
  48. package/dist/services/show.service.spec.js +242 -0
  49. package/dist/tailwind/preset.cjs +5 -0
  50. package/dist/tailwind/preset.d.cts +2 -0
  51. package/dist/tailwind/preset.d.cts.map +1 -1
  52. package/dist/tokens/__tests__/spacing.test.js +2 -2
  53. package/dist/tokens/base-resets.css +124 -0
  54. package/dist/tokens/spacing.d.ts +2 -0
  55. package/dist/tokens/spacing.d.ts.map +1 -1
  56. package/dist/tokens/spacing.js +1 -0
  57. package/dist/tokens/tokens.css +1 -1
  58. package/dist/tokens/utilities.css +79 -2
  59. package/dist/utils/apiConfig.js +1 -1
  60. package/dist/utils/apiConfig.spec.js +34 -27
  61. package/dist/utils/assets.d.ts +3 -0
  62. package/dist/utils/assets.d.ts.map +1 -0
  63. package/dist/utils/assets.js +3 -0
  64. package/dist/utils/classNames.d.ts +10 -0
  65. package/dist/utils/classNames.d.ts.map +1 -0
  66. package/dist/utils/classNames.js +15 -0
  67. package/dist/utils/clickOutside.d.ts +4 -0
  68. package/dist/utils/clickOutside.d.ts.map +1 -0
  69. package/dist/utils/clickOutside.js +13 -0
  70. package/dist/utils/cookieHelpers.d.ts +40 -0
  71. package/dist/utils/cookieHelpers.d.ts.map +1 -0
  72. package/dist/utils/cookieHelpers.js +102 -0
  73. package/dist/utils/dateHelpers.d.ts +71 -0
  74. package/dist/utils/dateHelpers.d.ts.map +1 -0
  75. package/dist/utils/dateHelpers.js +253 -0
  76. package/dist/utils/eventFormatters.d.ts +9 -0
  77. package/dist/utils/eventFormatters.d.ts.map +1 -0
  78. package/dist/utils/eventFormatters.js +96 -0
  79. package/dist/utils/feedbackContext.d.ts +24 -0
  80. package/dist/utils/feedbackContext.d.ts.map +1 -0
  81. package/dist/utils/feedbackContext.js +19 -0
  82. package/dist/utils/fetchHelpers.d.ts +17 -0
  83. package/dist/utils/fetchHelpers.d.ts.map +1 -0
  84. package/dist/utils/fetchHelpers.js +45 -0
  85. package/dist/utils/focusTrap.d.ts +20 -0
  86. package/dist/utils/focusTrap.d.ts.map +1 -0
  87. package/dist/utils/focusTrap.js +130 -0
  88. package/dist/utils/formatters.d.ts +56 -0
  89. package/dist/utils/formatters.d.ts.map +1 -1
  90. package/dist/utils/formatters.js +121 -1
  91. package/dist/utils/formatters.spec.js +128 -1
  92. package/dist/utils/logger.d.ts +25 -1
  93. package/dist/utils/logger.d.ts.map +1 -1
  94. package/dist/utils/logger.js +59 -1
  95. package/dist/utils/logger.spec.js +99 -1
  96. package/dist/utils/permissions.d.ts +9 -0
  97. package/dist/utils/permissions.d.ts.map +1 -0
  98. package/dist/utils/permissions.js +93 -0
  99. package/dist/utils/stringHelpers.d.ts +17 -0
  100. package/dist/utils/stringHelpers.d.ts.map +1 -0
  101. package/dist/utils/stringHelpers.js +38 -0
  102. package/dist/utils/transitions.d.ts +99 -1
  103. package/dist/utils/transitions.d.ts.map +1 -1
  104. package/dist/utils/transitions.js +144 -2
  105. package/dist/utils/utils/utils.d.ts +2 -73
  106. package/dist/utils/utils/utils.d.ts.map +1 -1
  107. package/dist/utils/utils/utils.js +2 -2
  108. package/dist/utils/utils.d.ts +41 -98
  109. package/dist/utils/utils.d.ts.map +1 -1
  110. package/dist/utils/utils.js +58 -701
  111. package/package.json +16 -3
  112. package/dist/services/EventService.d.ts +0 -5
  113. package/dist/services/EventService.d.ts.map +0 -1
  114. package/dist/services/EventService.js +0 -79
  115. package/dist/services/EventService.spec.d.ts +0 -2
  116. package/dist/services/EventService.spec.d.ts.map +0 -1
  117. package/dist/services/EventService.spec.js +0 -217
  118. package/dist/services/ShowService.d.ts.map +0 -1
  119. package/dist/services/ShowService.js +0 -144
  120. package/dist/services/ShowService.spec.d.ts +0 -2
  121. package/dist/services/ShowService.spec.d.ts.map +0 -1
  122. package/dist/services/ShowService.spec.js +0 -345
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Truncate a string to a maximum length, appending "..." if truncated.
3
+ */
4
+ export declare function truncateTitle(title: string, maxLength: number): string;
5
+ /**
6
+ * Capitalize the first letter of a word and lowercase the rest.
7
+ */
8
+ export declare function capitalize(word: string): string;
9
+ /**
10
+ * Parse a location string into street address and city/state/zip components.
11
+ * @param locationString - Full location string (e.g., "3400 Warner Blvd, Burbank, CA 91505")
12
+ */
13
+ export declare function parseLocation(locationString: string | null | undefined): {
14
+ street: string;
15
+ cityStateZip: string;
16
+ };
17
+ //# sourceMappingURL=stringHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringHelpers.d.ts","sourceRoot":"","sources":["../../src/lib/utils/stringHelpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKtE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAiBjH"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Truncate a string to a maximum length, appending "..." if truncated.
3
+ */
4
+ export function truncateTitle(title, maxLength) {
5
+ if (title.length > maxLength) {
6
+ return title.slice(0, maxLength) + "...";
7
+ }
8
+ return title;
9
+ }
10
+ /**
11
+ * Capitalize the first letter of a word and lowercase the rest.
12
+ */
13
+ export function capitalize(word) {
14
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
15
+ }
16
+ /**
17
+ * Parse a location string into street address and city/state/zip components.
18
+ * @param locationString - Full location string (e.g., "3400 Warner Blvd, Burbank, CA 91505")
19
+ */
20
+ export function parseLocation(locationString) {
21
+ if (!locationString)
22
+ return { street: '', cityStateZip: '' };
23
+ const parts = locationString.split(',').map(part => part.trim());
24
+ if (parts.length >= 3) {
25
+ // Format: "3400 Warner Blvd, Burbank, CA 91505"
26
+ const street = parts[0];
27
+ const cityStateZip = parts.slice(1).join(', ');
28
+ return { street, cityStateZip };
29
+ }
30
+ else if (parts.length === 2) {
31
+ // Format: "Street, City State Zip"
32
+ return { street: parts[0], cityStateZip: parts[1] };
33
+ }
34
+ else {
35
+ // Single part or unexpected format
36
+ return { street: locationString, cityStateZip: '' };
37
+ }
38
+ }
@@ -1,12 +1,37 @@
1
1
  /**
2
- * Safe transition utilities that guard against NaN values
2
+ * Animation and transition utilities for polished UX
3
+ *
4
+ * Duration guidelines (research-backed):
5
+ * - Micro-interactions: 150-200ms (instant feel)
6
+ * - UI transitions: 200-300ms (smooth without slow)
7
+ * - Page transitions: 300-400ms (noticeable but fast)
8
+ * - Complex animations: 400-600ms (elaborate sequences)
3
9
  *
4
10
  * The standard Svelte slide transition can produce "Invalid keyframe value for property height: NaNpx"
5
11
  * when the element hasn't been measured yet (e.g., during SSR hydration or when mounted in an unmeasured container).
6
12
  *
7
13
  * These utilities wrap Svelte's transitions with guards against invalid values.
8
14
  */
15
+ import { backOut, cubicInOut, cubicOut, quintOut } from 'svelte/easing';
9
16
  import type { EasingFunction, TransitionConfig } from 'svelte/transition';
17
+ export declare const DURATION: {
18
+ readonly instant: 100;
19
+ readonly micro: 150;
20
+ readonly fast: 200;
21
+ readonly normal: 300;
22
+ readonly slow: 400;
23
+ readonly elaborate: 600;
24
+ };
25
+ export declare const EASING: {
26
+ /** Standard ease-out for most UI (deceleration) */
27
+ readonly out: typeof cubicOut;
28
+ /** Ease in-out for page transitions */
29
+ readonly inOut: typeof cubicInOut;
30
+ /** Bouncy ease-out for celebration/success */
31
+ readonly bounce: typeof backOut;
32
+ /** Smooth for scroll-linked animations */
33
+ readonly smooth: typeof quintOut;
34
+ };
10
35
  interface SafeSlideParams {
11
36
  delay?: number;
12
37
  duration?: number;
@@ -33,5 +58,78 @@ export declare function safeSlide(node: HTMLElement, params?: SafeSlideParams):
33
58
  * Scales up from origin point with fade for a polished "bloom" effect.
34
59
  */
35
60
  export declare function bloom(_node: Element, { duration, delay, origin }?: BloomParams): TransitionConfig;
61
+ /**
62
+ * Fade with slight scale - more polished than plain fade
63
+ */
64
+ export declare function fadeScale(node: Element, { delay, duration, easing, start, }?: {
65
+ delay?: number;
66
+ duration?: number;
67
+ easing?: (t: number) => number;
68
+ start?: number;
69
+ }): TransitionConfig;
70
+ /**
71
+ * Slide up with fade - great for form fields appearing
72
+ */
73
+ export declare function slideUp(node: Element, { delay, duration, easing, distance, }?: {
74
+ delay?: number;
75
+ duration?: number;
76
+ easing?: (t: number) => number;
77
+ distance?: number;
78
+ }): TransitionConfig;
79
+ /**
80
+ * Slide in from left - for progress/step animations
81
+ */
82
+ export declare function slideInLeft(node: Element, { delay, duration, easing, distance, }?: {
83
+ delay?: number;
84
+ duration?: number;
85
+ easing?: (t: number) => number;
86
+ distance?: number;
87
+ }): TransitionConfig;
88
+ /**
89
+ * Pop in - for success states and celebrations
90
+ */
91
+ export declare function popIn(node: Element, { delay, duration, easing, }?: {
92
+ delay?: number;
93
+ duration?: number;
94
+ easing?: (t: number) => number;
95
+ }): TransitionConfig;
96
+ /**
97
+ * Stagger delay calculator for list animations
98
+ */
99
+ export declare function staggerDelay(index: number, base?: number, max?: number): number;
100
+ /**
101
+ * Cross-fade between two elements (for step transitions)
102
+ * Returns [outParams, inParams] for use with Svelte's transition directive
103
+ */
104
+ export declare function crossFadeParams(durationMs?: 300): [{
105
+ duration: number;
106
+ }, {
107
+ delay: number;
108
+ duration: number;
109
+ }];
110
+ /**
111
+ * Reduced motion check - respects user preferences
112
+ * SSR-safe: returns false on the server
113
+ */
114
+ export declare function prefersReducedMotion(): boolean;
115
+ /**
116
+ * Get duration based on reduced motion preference
117
+ * Returns 0 if user prefers reduced motion, otherwise returns the given duration
118
+ */
119
+ export declare function getAnimationDuration(duration: number): number;
120
+ /**
121
+ * CSS animation class helper - for Tailwind-based animations
122
+ */
123
+ export declare const ANIMATION_CLASSES: {
124
+ readonly fadeIn: "animate-in fade-in duration-300";
125
+ readonly fadeOut: "animate-out fade-out duration-200";
126
+ readonly slideUp: "animate-in slide-in-from-bottom-2 duration-300";
127
+ readonly slideDown: "animate-in slide-in-from-top-2 duration-300";
128
+ readonly scaleIn: "animate-in zoom-in-95 duration-200";
129
+ readonly scaleOut: "animate-out zoom-out-95 duration-150";
130
+ readonly spin: "animate-spin";
131
+ readonly pulse: "animate-pulse";
132
+ readonly bounce: "animate-bounce";
133
+ };
36
134
  export {};
37
135
  //# sourceMappingURL=transitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/lib/utils/transitions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAED,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,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K,MAAM,CAAC;CAC3B,GACL,gBAAgB,CAclB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,SAAK,EAAE,GAAG,SAAM,GAAG,MAAM,CAExE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,UAAU,MAAkB,GAC3B,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAI7D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;CAUpB,CAAC"}
@@ -1,5 +1,11 @@
1
1
  /**
2
- * Safe transition utilities that guard against NaN values
2
+ * Animation and transition utilities for polished UX
3
+ *
4
+ * Duration guidelines (research-backed):
5
+ * - Micro-interactions: 150-200ms (instant feel)
6
+ * - UI transitions: 200-300ms (smooth without slow)
7
+ * - Page transitions: 300-400ms (noticeable but fast)
8
+ * - Complex animations: 400-600ms (elaborate sequences)
3
9
  *
4
10
  * The standard Svelte slide transition can produce "Invalid keyframe value for property height: NaNpx"
5
11
  * when the element hasn't been measured yet (e.g., during SSR hydration or when mounted in an unmeasured container).
@@ -7,7 +13,27 @@
7
13
  * These utilities wrap Svelte's transitions with guards against invalid values.
8
14
  */
9
15
  import { slide as svelteSlide } from 'svelte/transition';
10
- import { cubicOut } from 'svelte/easing';
16
+ import { backOut, cubicInOut, cubicOut, quintOut } from 'svelte/easing';
17
+ // Duration constants
18
+ export const DURATION = {
19
+ instant: 100,
20
+ micro: 150,
21
+ fast: 200,
22
+ normal: 300,
23
+ slow: 400,
24
+ elaborate: 600,
25
+ };
26
+ // Common easing functions
27
+ export const EASING = {
28
+ /** Standard ease-out for most UI (deceleration) */
29
+ out: cubicOut,
30
+ /** Ease in-out for page transitions */
31
+ inOut: cubicInOut,
32
+ /** Bouncy ease-out for celebration/success */
33
+ bounce: backOut,
34
+ /** Smooth for scroll-linked animations */
35
+ smooth: quintOut,
36
+ };
11
37
  /**
12
38
  * A safe version of Svelte's slide transition that guards against NaN height values.
13
39
  *
@@ -48,3 +74,119 @@ export function bloom(_node, { duration = 200, delay = 0, origin = 'top right' }
48
74
  },
49
75
  };
50
76
  }
77
+ /**
78
+ * Fade with slight scale - more polished than plain fade
79
+ */
80
+ export function fadeScale(node, { delay = 0, duration = DURATION.normal, easing = EASING.out, start = 0.95, } = {}) {
81
+ const style = getComputedStyle(node);
82
+ const opacity = +style.opacity;
83
+ const transform = style.transform === 'none' ? '' : style.transform;
84
+ return {
85
+ delay,
86
+ duration,
87
+ easing,
88
+ css: t => `
89
+ transform: ${transform} scale(${start + (1 - start) * t});
90
+ opacity: ${opacity * t};
91
+ `,
92
+ };
93
+ }
94
+ /**
95
+ * Slide up with fade - great for form fields appearing
96
+ */
97
+ export function slideUp(node, { delay = 0, duration = DURATION.normal, easing = EASING.out, distance = 20, } = {}) {
98
+ const style = getComputedStyle(node);
99
+ const opacity = +style.opacity;
100
+ const transform = style.transform === 'none' ? '' : style.transform;
101
+ return {
102
+ delay,
103
+ duration,
104
+ easing,
105
+ css: t => `
106
+ transform: ${transform} translateY(${(1 - t) * distance}px);
107
+ opacity: ${opacity * t};
108
+ `,
109
+ };
110
+ }
111
+ /**
112
+ * Slide in from left - for progress/step animations
113
+ */
114
+ export function slideInLeft(node, { delay = 0, duration = DURATION.normal, easing = EASING.out, distance = 30, } = {}) {
115
+ const style = getComputedStyle(node);
116
+ const opacity = +style.opacity;
117
+ const transform = style.transform === 'none' ? '' : style.transform;
118
+ return {
119
+ delay,
120
+ duration,
121
+ easing,
122
+ css: t => `
123
+ transform: ${transform} translateX(${(1 - t) * -distance}px);
124
+ opacity: ${opacity * t};
125
+ `,
126
+ };
127
+ }
128
+ /**
129
+ * Pop in - for success states and celebrations
130
+ */
131
+ export function popIn(node, { delay = 0, duration = DURATION.normal, easing = EASING.bounce, } = {}) {
132
+ const style = getComputedStyle(node);
133
+ const opacity = +style.opacity;
134
+ const transform = style.transform === 'none' ? '' : style.transform;
135
+ return {
136
+ delay,
137
+ duration,
138
+ easing,
139
+ css: t => `
140
+ transform: ${transform} scale(${t * 1});
141
+ opacity: ${opacity * t};
142
+ `,
143
+ };
144
+ }
145
+ /**
146
+ * Stagger delay calculator for list animations
147
+ */
148
+ export function staggerDelay(index, base = 50, max = 500) {
149
+ return Math.min(index * base, max);
150
+ }
151
+ /**
152
+ * Cross-fade between two elements (for step transitions)
153
+ * Returns [outParams, inParams] for use with Svelte's transition directive
154
+ */
155
+ export function crossFadeParams(durationMs = DURATION.normal) {
156
+ const outParams = { duration: durationMs * 0.4 };
157
+ const inParams = { delay: durationMs * 0.2, duration: durationMs * 0.6 };
158
+ return [outParams, inParams];
159
+ }
160
+ /**
161
+ * Reduced motion check - respects user preferences
162
+ * SSR-safe: returns false on the server
163
+ */
164
+ export function prefersReducedMotion() {
165
+ if (typeof window === 'undefined')
166
+ return false;
167
+ return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
168
+ }
169
+ /**
170
+ * Get duration based on reduced motion preference
171
+ * Returns 0 if user prefers reduced motion, otherwise returns the given duration
172
+ */
173
+ export function getAnimationDuration(duration) {
174
+ if (prefersReducedMotion()) {
175
+ return 0;
176
+ }
177
+ return duration;
178
+ }
179
+ /**
180
+ * CSS animation class helper - for Tailwind-based animations
181
+ */
182
+ export const ANIMATION_CLASSES = {
183
+ fadeIn: 'animate-in fade-in duration-300',
184
+ fadeOut: 'animate-out fade-out duration-200',
185
+ slideUp: 'animate-in slide-in-from-bottom-2 duration-300',
186
+ slideDown: 'animate-in slide-in-from-top-2 duration-300',
187
+ scaleIn: 'animate-in zoom-in-95 duration-200',
188
+ scaleOut: 'animate-out zoom-out-95 duration-150',
189
+ spin: 'animate-spin',
190
+ pulse: 'animate-pulse',
191
+ bounce: 'animate-bounce',
192
+ };
@@ -1,73 +1,2 @@
1
- export function cn(...inputs: any[]): string;
2
- export function convertToDate(value: any): string | null;
3
- export function classNames(...classes: any[]): string;
4
- export function truncateTitle(title: any, maxLength: any): any;
5
- export function convertToCustomDateFormat(isoString: any): Date;
6
- export function convertToCustomDateTimeFormat(isoDateString: any): Date;
7
- export function formatHour(dateString: any): string;
8
- export function formattedDate(date: any): string;
9
- export function formattedFullDate(date: any): string;
10
- export function formatTimeRange(startDate: any, endDate: any): string;
11
- export function getDateRange(startDate: any, endDate: any): string[];
12
- export function capitalize(word: any): any;
13
- export function timeAgo(date: any): string;
14
- export function formatDateTime(dateTimeString: any, timeZone?: string): string;
15
- export function formatTimeline(startDateTime: any): string;
16
- export function getDay(dateString: any): string;
17
- export function getMonth(dateString: any): string;
18
- export function getDateOfMonth(dateString: any): number;
19
- export function getRoleFromRoleOnStage(roleOnStage: any): any;
20
- export function formatEvent(event: any): {
21
- eventId: any;
22
- venueId: any;
23
- title: any;
24
- role: any;
25
- startDateTime: any;
26
- acceptedState: any;
27
- doorsOpenTime: any;
28
- spotDuration: string;
29
- venueName: any;
30
- location: any;
31
- id: any;
32
- image: any;
33
- details: {
34
- venue: any;
35
- stageName: any;
36
- address: any;
37
- setLength: string;
38
- eventDetails: any;
39
- };
40
- lastUpdated: any;
41
- };
42
- export function formatRosterEventPerformerInvite(event: any): {
43
- venueId: any;
44
- role: any;
45
- acceptedState: any;
46
- name: any;
47
- shortVenue: string;
48
- location: string;
49
- id: any;
50
- lastUpdated: any;
51
- image: any;
52
- hasAvailability: boolean;
53
- invitationAccepted: boolean;
54
- };
55
- export function formatVenue(event: any): {
56
- venueId: any;
57
- name: any;
58
- image: any;
59
- location: string;
60
- start: any;
61
- end: any;
62
- doorOpen: any;
63
- email: any;
64
- phone: any;
65
- description: any;
66
- instagram: any;
67
- facebook: any;
68
- twitter: any;
69
- lastUpdated: any;
70
- timeRange: string;
71
- dateRange: string[];
72
- };
73
- //# sourceMappingURL=utils.d.ts.map
1
+ // Re-export everything from the consolidated barrel
2
+ export * from '../utils';
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAGA,6CAEC;AAED,yDAEC;AAED,sDAEC;AAED,+DAKC;AAED,gEAUC;AAED,wEAWC;AAED,oDAWC;AAED,iDAQC;AAED,qDAiBC;AAgDD,sEAgBC;AAED,qEAgBC;AA+HD,2CAEC;AAED,2CAsBC;AA1NM,+EAeN;AAEM,2DAYN;AAsCM,gDAIN;AAEM,kDAiBN;AAEM,wDAGN;AAgBM,8DAEN;AAGM;;;;;;;;;;;;;;;;;;;;;EAoCN;AAEM;;;;;;;;;;;;EAeN;AAEM;;;;;;;;;;;;;;;;;EAmBN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/utils/utils.js"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
- // Re-export everything from the consolidated utils.js
2
- // This file is kept for backward compatibility
1
+ // Re-export everything from the consolidated barrel
2
+ // This file is kept for backward compatibility with the nested utils/utils/utils path
3
3
  export * from '../utils.js';
@@ -1,98 +1,41 @@
1
- export function classNames(...classes: any[]): string;
2
- export function truncateTitle(title: any, maxLength: any): any;
3
- export function convertToCustomDateFormat(isoString: any): Date;
4
- export function cn(...inputs: any[]): string;
5
- export function getDays(params: any): {
6
- value: string;
7
- label: string;
8
- }[];
9
- export function getDaysNumberOptions(timeUnit: any): {
10
- value: string;
11
- label: string;
12
- }[];
13
- /**
14
- * Parse a location string into street address and city/state/zip components
15
- * @param {string} locationString - Full location string (e.g., "3400 Warner Blvd, Burbank, CA 91505")
16
- * @returns {{street: string, cityStateZip: string}} Parsed location object
17
- */
18
- export function parseLocation(locationString: string): {
19
- street: string;
20
- cityStateZip: string;
21
- };
22
- /**
23
- * Set authentication cookies with proper domain and security settings
24
- * @param {string} token - Authentication token
25
- * @param {Object} userDetails - User details object
26
- */
27
- export function setAuthCookies(token: string, userDetails: Object, rememberMe?: boolean): void;
28
- /**
29
- * Clear authentication cookies
30
- */
31
- export function clearAuthCookies(): void;
32
- /**
33
- * Parse all cookies into an object
34
- * @returns {Record<string, string>} Cookie key-value pairs
35
- */
36
- export function parseCookies(): Record<string, string>;
37
- /**
38
- * Get a specific cookie value
39
- * @param {string} name - Cookie name
40
- * @returns {string|null} Cookie value or null
41
- */
42
- export function getCookie(name: string): string | null;
43
- /**
44
- * Set a cookie with options
45
- * @param {string} name - Cookie name
46
- * @param {string} value - Cookie value
47
- * @param {Object} options - Cookie options
48
- */
49
- export function setCookie(name: string, value: string, options?: Object): void;
50
- /**
51
- * Get the performer token from cookies
52
- * @returns {string|null} Token or null
53
- */
54
- export function getPerformerToken(): string | null;
55
- /**
56
- * Get user details from cookies
57
- * @returns {Object|null} User details or null
58
- */
59
- export function getUserDetails(): Object | null;
60
- /**
61
- * Get suppressed alerts from cookies
62
- * @returns {string[]} Array of suppressed alert IDs
63
- */
64
- export function getSuppressedAlerts(): string[];
65
- /**
66
- * Save suppressed alerts to cookies
67
- * @param {string[]} alertIds - Array of alert IDs to suppress
68
- */
69
- export function saveSuppressedAlerts(alertIds: string[]): void;
70
- /**
71
- * Fetch data from an API endpoint with error handling
72
- * @param {string} endpoint - API endpoint
73
- * @param {Object} options - Fetch options
74
- * @returns {Promise<{data: any, error: string|null}>}
75
- */
76
- export function fetchData(endpoint: string, options?: Object): Promise<{
77
- data: any;
78
- error: string | null;
79
- }>;
80
- /**
81
- * Post data to an API endpoint
82
- * @param {string} endpoint - API endpoint
83
- * @param {Object} data - Data to post
84
- * @returns {Promise<{data: any, error: string|null, ok: boolean}>}
85
- */
86
- export function postData(endpoint: string, data: Object): Promise<{
87
- data: any;
88
- error: string | null;
89
- ok: boolean;
90
- }>;
91
- export const ROLE_PERMISSION_LIST: {
92
- icon: any;
93
- title: string;
94
- description: string;
95
- checkbox: string[];
96
- }[];
97
- export { microphonePlaceholder };
98
- //# sourceMappingURL=utils.d.ts.map
1
+ // Barrel re-exports see individual modules for full type definitions
2
+ export { classNames, cn } from "./classNames";
3
+ export { truncateTitle, capitalize, parseLocation } from "./stringHelpers";
4
+ export {
5
+ convertToDate,
6
+ convertToCustomDateFormat,
7
+ convertToCustomDateTimeFormat,
8
+ formatHour,
9
+ formattedDate,
10
+ formattedFullDate,
11
+ formatDateTime,
12
+ formatTimeline,
13
+ formatTimeRange,
14
+ getDateRange,
15
+ getDay,
16
+ getMonth,
17
+ getDateOfMonth,
18
+ timeAgo,
19
+ getDays,
20
+ getDaysNumberOptions,
21
+ } from "./dateHelpers";
22
+ export {
23
+ parseCookies,
24
+ getCookie,
25
+ setCookie,
26
+ getPerformerToken,
27
+ getUserDetails,
28
+ getSuppressedAlerts,
29
+ saveSuppressedAlerts,
30
+ setAuthCookies,
31
+ clearAuthCookies,
32
+ } from "./cookieHelpers";
33
+ export { fetchData, postData } from "./fetchHelpers";
34
+ export {
35
+ getRoleFromRoleOnStage,
36
+ formatEvent,
37
+ formatRosterEventPerformerInvite,
38
+ formatVenue,
39
+ } from "./eventFormatters";
40
+ export { ROLE_PERMISSION_LIST } from "./permissions";
41
+ export { microphonePlaceholder } from "./assets";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAaA,sDAEC;AAED,+DAKC;AAED,gEAUC;AAED,6CAEC;AAED;;;IA0BC;AAGD;;;IAiBC;AA+FD;;;;GAIG;AACH,8CAHW,MAAM,GACJ;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAoBlD;AAED;;;;GAIG;AACH,sCAHW,MAAM,eACN,MAAM,8BAYhB;AAED;;GAEG;AACH,yCAMC;AASD;;;GAGG;AACH,gCAFa,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUlC;AAED;;;;GAIG;AACH,gCAHW,MAAM,GACJ,MAAM,GAAC,IAAI,CAKvB;AAED;;;;;GAKG;AACH,gCAJW,MAAM,SACN,MAAM,YACN,MAAM,QAUhB;AAED;;;GAGG;AACH,qCAFa,MAAM,GAAC,IAAI,CAIvB;AAED;;;GAGG;AACH,kCAFa,MAAM,GAAC,IAAI,CAUvB;AAED;;;GAGG;AACH,uCAFa,MAAM,EAAE,CAUpB;AAED;;;GAGG;AACH,+CAFW,MAAM,EAAE,QAIlB;AAMD;;;;;GAKG;AACH,oCAJW,MAAM,YACN,MAAM,GACJ,OAAO,CAAC;IAAC,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,GAAC,IAAI,CAAA;CAAC,CAAC,CAmBpD;AAED;;;;;GAKG;AACH,mCAJW,MAAM,QACN,MAAM,GACJ,OAAO,CAAC;IAAC,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAC,CAAC,CAoBjE;AAlSD;;;;;IA2FE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils/utils.js"],"names":[],"mappings":""}