@joewinke/jatui 0.1.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 (62) hide show
  1. package/package.json +46 -0
  2. package/src/lib/components/AudioWaveform.svelte +694 -0
  3. package/src/lib/components/AvailabilityModal.svelte +173 -0
  4. package/src/lib/components/Badge.svelte +38 -0
  5. package/src/lib/components/BookingForm.svelte +276 -0
  6. package/src/lib/components/Button.svelte +72 -0
  7. package/src/lib/components/CalendarPicker.svelte +284 -0
  8. package/src/lib/components/Card.svelte +67 -0
  9. package/src/lib/components/CharacterCounter.svelte +82 -0
  10. package/src/lib/components/ChipInput.svelte +596 -0
  11. package/src/lib/components/ColorSelector.svelte +163 -0
  12. package/src/lib/components/ConfirmModal.svelte +75 -0
  13. package/src/lib/components/CountdownTimer.svelte +94 -0
  14. package/src/lib/components/DateRangePicker.svelte +192 -0
  15. package/src/lib/components/Drawer.svelte +110 -0
  16. package/src/lib/components/FilterDropdown.svelte +202 -0
  17. package/src/lib/components/ImageUpload.svelte +97 -0
  18. package/src/lib/components/InlineEdit.svelte +283 -0
  19. package/src/lib/components/LazyImage.svelte +122 -0
  20. package/src/lib/components/LoadingSpinner.svelte +102 -0
  21. package/src/lib/components/Modal.svelte +208 -0
  22. package/src/lib/components/PhoneInput.svelte +92 -0
  23. package/src/lib/components/ResizableDivider.svelte +305 -0
  24. package/src/lib/components/ResizablePanel.svelte +302 -0
  25. package/src/lib/components/SearchDropdown.svelte +341 -0
  26. package/src/lib/components/SelectInput.svelte +215 -0
  27. package/src/lib/components/SignaturePad.svelte +171 -0
  28. package/src/lib/components/SortDropdown.svelte +148 -0
  29. package/src/lib/components/Sparkline.svelte +107 -0
  30. package/src/lib/components/SpeechForm.svelte +114 -0
  31. package/src/lib/components/StatusBadge.svelte +155 -0
  32. package/src/lib/components/TextArea.svelte +143 -0
  33. package/src/lib/components/TextInput.svelte +108 -0
  34. package/src/lib/components/ThemeSelector.svelte +195 -0
  35. package/src/lib/components/TimeSlotPicker.svelte +162 -0
  36. package/src/lib/components/VoicePlayer.svelte +420 -0
  37. package/src/lib/components/messaging/Avatar.svelte +81 -0
  38. package/src/lib/components/messaging/ChannelInfoModal.svelte +163 -0
  39. package/src/lib/components/messaging/ChannelList.svelte +107 -0
  40. package/src/lib/components/messaging/ChannelMemberAvatarStack.svelte +69 -0
  41. package/src/lib/components/messaging/ChannelMembersModal.svelte +182 -0
  42. package/src/lib/components/messaging/CreateChannelModal.svelte +190 -0
  43. package/src/lib/components/messaging/DirectMessageList.svelte +145 -0
  44. package/src/lib/components/messaging/EmojiSelector.svelte +260 -0
  45. package/src/lib/components/messaging/MentionAutocomplete.svelte +193 -0
  46. package/src/lib/components/messaging/MessageAttachment.svelte +270 -0
  47. package/src/lib/components/messaging/MessageAttachmentUpload.svelte +243 -0
  48. package/src/lib/components/messaging/MessageInput.svelte +451 -0
  49. package/src/lib/components/messaging/MessageItem.svelte +338 -0
  50. package/src/lib/components/messaging/MessageThread.svelte +306 -0
  51. package/src/lib/components/messaging/NotificationSettingsModal.svelte +234 -0
  52. package/src/lib/components/messaging/QuotedMessageDisplay.svelte +118 -0
  53. package/src/lib/components/messaging/StartDMModal.svelte +100 -0
  54. package/src/lib/components/messaging/ThreadPanel.svelte +153 -0
  55. package/src/lib/index.ts +185 -0
  56. package/src/lib/types/booking.ts +143 -0
  57. package/src/lib/types/messaging.ts +459 -0
  58. package/src/lib/utils/currency.ts +20 -0
  59. package/src/lib/utils/daisyuiColors.ts +243 -0
  60. package/src/lib/utils/dateFormatters.ts +153 -0
  61. package/src/lib/utils/mentionParser.ts +188 -0
  62. package/src/lib/utils/phoneFormat.ts +74 -0
@@ -0,0 +1,185 @@
1
+ // Components — from JAT IDE
2
+ export { default as SearchDropdown } from './components/SearchDropdown.svelte';
3
+ export { default as FilterDropdown } from './components/FilterDropdown.svelte';
4
+ export { default as ChipInput } from './components/ChipInput.svelte';
5
+ export { default as ResizableDivider } from './components/ResizableDivider.svelte';
6
+ export { default as DateRangePicker } from './components/DateRangePicker.svelte';
7
+ export { default as SortDropdown } from './components/SortDropdown.svelte';
8
+ export { default as InlineEdit } from './components/InlineEdit.svelte';
9
+
10
+ // Components — from Flush
11
+ export { default as Button } from './components/Button.svelte';
12
+ export { default as Badge } from './components/Badge.svelte';
13
+ export { default as Card } from './components/Card.svelte';
14
+ export { default as Drawer } from './components/Drawer.svelte';
15
+ export { default as Modal } from './components/Modal.svelte';
16
+ export { default as LoadingSpinner } from './components/LoadingSpinner.svelte';
17
+ export { default as StatusBadge } from './components/StatusBadge.svelte';
18
+ export { default as TextInput } from './components/TextInput.svelte';
19
+ export { default as TextArea } from './components/TextArea.svelte';
20
+ export { default as SelectInput } from './components/SelectInput.svelte';
21
+ export { default as PhoneInput } from './components/PhoneInput.svelte';
22
+
23
+ // Components — from Chimaro
24
+ export { default as AudioWaveform } from './components/AudioWaveform.svelte';
25
+ export { default as CharacterCounter } from './components/CharacterCounter.svelte';
26
+ export { default as ColorSelector } from './components/ColorSelector.svelte';
27
+ export { default as ConfirmModal } from './components/ConfirmModal.svelte';
28
+ export { default as CountdownTimer } from './components/CountdownTimer.svelte';
29
+ export { default as ImageUpload } from './components/ImageUpload.svelte';
30
+ export { default as LazyImage } from './components/LazyImage.svelte';
31
+ export { default as ResizablePanel } from './components/ResizablePanel.svelte';
32
+ export { default as VoicePlayer } from './components/VoicePlayer.svelte';
33
+ export { default as SpeechForm } from './components/SpeechForm.svelte';
34
+
35
+ // Components — from Headcount
36
+ export { default as ThemeSelector } from './components/ThemeSelector.svelte';
37
+ export { default as Sparkline } from './components/Sparkline.svelte';
38
+
39
+ // Components — from Marduk
40
+ export { default as SignaturePad } from './components/SignaturePad.svelte';
41
+ export { default as TimeSlotPicker } from './components/TimeSlotPicker.svelte';
42
+ export { default as CalendarPicker } from './components/CalendarPicker.svelte';
43
+ export { default as AvailabilityModal } from './components/AvailabilityModal.svelte';
44
+ export { default as BookingForm } from './components/BookingForm.svelte';
45
+
46
+ // Component types — JAT IDE
47
+ export type { SearchDropdownOption, SearchDropdownGroup } from './components/SearchDropdown.svelte';
48
+ export type { ChipSuggestion, SuggestionGroup, ChipInfo } from './components/ChipInput.svelte';
49
+ export type { SortOption } from './components/SortDropdown.svelte';
50
+ export type { DisplaySegment } from './components/InlineEdit.svelte';
51
+
52
+ // Component types — Flush
53
+ export type { SelectOption } from './components/SelectInput.svelte';
54
+ export type { StatusValue } from './components/StatusBadge.svelte';
55
+
56
+ // Booking types (centralized)
57
+ export type {
58
+ LocationType,
59
+ BookingStatus,
60
+ OverrideType,
61
+ Host,
62
+ EventType,
63
+ WeeklyAvailability,
64
+ DateOverride,
65
+ Booking,
66
+ BookingAttendee,
67
+ TimeSlot,
68
+ BookingFormData,
69
+ AvailabilityCounts
70
+ } from './types/booking';
71
+ export {
72
+ DAYS_OF_WEEK,
73
+ DAYS_SHORT,
74
+ LOCATION_LABELS,
75
+ LOCATION_ICONS
76
+ } from './types/booking';
77
+
78
+ // Utilities — date formatting
79
+ export {
80
+ normalizeTimestamp,
81
+ parseTimestamp,
82
+ formatRelativeTime,
83
+ formatFullDate,
84
+ formatShortDate,
85
+ formatLastActivity,
86
+ formatDate,
87
+ getTimeSinceMs,
88
+ getTimeSinceMinutes,
89
+ isWithinMinutes
90
+ } from './utils/dateFormatters';
91
+
92
+ // Utilities — phone formatting
93
+ export {
94
+ stripPhoneNumber,
95
+ formatPhoneNumber,
96
+ isCompletePhoneNumber,
97
+ isValidPhoneNumber,
98
+ updatePhoneInput
99
+ } from './utils/phoneFormat';
100
+
101
+ // Utilities — currency
102
+ export { formatCurrency } from './utils/currency';
103
+
104
+ // Utilities — DaisyUI colors (Canvas/JS contexts)
105
+ export {
106
+ getDaisyUIColor,
107
+ lightenColor,
108
+ darkenColor,
109
+ watchThemeChanges,
110
+ isDarkTheme,
111
+ getCurrentTheme,
112
+ clearColorCache
113
+ } from './utils/daisyuiColors';
114
+
115
+ // Components — Messaging (from Flush)
116
+ export { default as Avatar } from './components/messaging/Avatar.svelte';
117
+ export { default as ChannelList } from './components/messaging/ChannelList.svelte';
118
+ export { default as ChannelMemberAvatarStack } from './components/messaging/ChannelMemberAvatarStack.svelte';
119
+ export { default as DirectMessageList } from './components/messaging/DirectMessageList.svelte';
120
+ export { default as EmojiSelector } from './components/messaging/EmojiSelector.svelte';
121
+ export { default as MentionAutocomplete } from './components/messaging/MentionAutocomplete.svelte';
122
+ export { default as MessageAttachment } from './components/messaging/MessageAttachment.svelte';
123
+ export { default as MessageAttachmentUpload } from './components/messaging/MessageAttachmentUpload.svelte';
124
+ export { default as MessageInput } from './components/messaging/MessageInput.svelte';
125
+ export { default as MessageItem } from './components/messaging/MessageItem.svelte';
126
+ export { default as MessageThread } from './components/messaging/MessageThread.svelte';
127
+ export { default as QuotedMessageDisplay } from './components/messaging/QuotedMessageDisplay.svelte';
128
+ export { default as ThreadPanel } from './components/messaging/ThreadPanel.svelte';
129
+ export { default as CreateChannelModal } from './components/messaging/CreateChannelModal.svelte';
130
+ export { default as StartDMModal } from './components/messaging/StartDMModal.svelte';
131
+ export { default as ChannelInfoModal } from './components/messaging/ChannelInfoModal.svelte';
132
+ export { default as ChannelMembersModal } from './components/messaging/ChannelMembersModal.svelte';
133
+ export { default as NotificationSettingsModal } from './components/messaging/NotificationSettingsModal.svelte';
134
+
135
+ // Messaging types
136
+ export type {
137
+ Message,
138
+ QuotedMessage,
139
+ MessageAttachment as MessageAttachmentType,
140
+ PendingAttachment,
141
+ Channel,
142
+ ChannelMember,
143
+ DirectConversation,
144
+ OrgMember,
145
+ EmojiCategory,
146
+ SkinTone,
147
+ StandardEmoji,
148
+ CustomEmoji,
149
+ EmojiReaction,
150
+ ReactionSummary,
151
+ EmojiSelection,
152
+ EmojiPreferences,
153
+ EmojiCategoryInfo,
154
+ SkinToneInfo,
155
+ MentionItem,
156
+ NotificationPreferences,
157
+ PresenceState,
158
+ MessageCallbacks,
159
+ ReactionCallbacks,
160
+ AttachmentCallbacks,
161
+ MentionCallbacks,
162
+ EmojiCallbacks,
163
+ ChannelCallbacks,
164
+ ThreadCallbacks,
165
+ NotificationCallbacks
166
+ } from './types/messaging';
167
+ export {
168
+ EMOJI_CATEGORIES,
169
+ SKIN_TONES,
170
+ DEFAULT_QUICK_REACTIONS
171
+ } from './types/messaging';
172
+
173
+ // Utilities — mention parsing
174
+ export {
175
+ parseMentions,
176
+ renderMentionsAsHTML,
177
+ createMentionString,
178
+ extractPlainText,
179
+ findMentionAtCursor,
180
+ findPartialMention,
181
+ replaceMentionInContent,
182
+ escapeHTML,
183
+ countMentions,
184
+ setMentionUrlGenerator
185
+ } from './utils/mentionParser';
@@ -0,0 +1,143 @@
1
+ // Booking System Types
2
+ // Generic types for scheduling/booking UI components
3
+
4
+ export type LocationType = 'remote' | 'phone' | 'in_person';
5
+ export type BookingStatus = 'pending' | 'confirmed' | 'cancelled' | 'completed' | 'no_show';
6
+ export type OverrideType = 'unavailable' | 'custom_hours';
7
+
8
+ export interface Host {
9
+ id: string;
10
+ name: string;
11
+ email: string;
12
+ timezone: string;
13
+ avatar_url?: string;
14
+ bio?: string;
15
+ notify_on_new_booking?: boolean;
16
+ notify_on_cancellation?: boolean;
17
+ notify_on_reschedule?: boolean;
18
+ created_at: string;
19
+ updated_at: string;
20
+ }
21
+
22
+ export interface EventType {
23
+ id: string;
24
+ host_id: string;
25
+ title: string;
26
+ slug: string;
27
+ description?: string;
28
+ duration_minutes: number;
29
+ location_type: LocationType;
30
+ location_details?: string;
31
+ color: string;
32
+ is_active: boolean;
33
+ buffer_before_minutes: number;
34
+ buffer_after_minutes: number;
35
+ min_notice_hours: number;
36
+ max_days_in_advance: number;
37
+ confirmation_redirect_url?: string;
38
+ booking_instructions?: string;
39
+ created_at: string;
40
+ updated_at: string;
41
+ host?: Host;
42
+ }
43
+
44
+ export interface WeeklyAvailability {
45
+ id: string;
46
+ host_id: string;
47
+ day_of_week: number; // 0 = Sunday, 1 = Monday, etc.
48
+ start_time: string; // HH:MM:SS format
49
+ end_time: string;
50
+ event_type_id?: string;
51
+ is_active: boolean;
52
+ created_at: string;
53
+ }
54
+
55
+ export interface DateOverride {
56
+ id: string;
57
+ host_id: string;
58
+ override_date: string; // YYYY-MM-DD
59
+ override_type: OverrideType;
60
+ start_time?: string;
61
+ end_time?: string;
62
+ reason?: string;
63
+ created_at: string;
64
+ }
65
+
66
+ export interface Booking {
67
+ id: string;
68
+ event_type_id: string;
69
+ host_id: string;
70
+ guest_name: string;
71
+ guest_email: string;
72
+ guest_phone?: string;
73
+ guest_notes?: string;
74
+ start_time: string;
75
+ end_time: string;
76
+ timezone: string;
77
+ status: BookingStatus;
78
+ cancelled_at?: string;
79
+ cancellation_reason?: string;
80
+ meeting_url?: string;
81
+ location_details?: string;
82
+ confirmation_sent_at?: string;
83
+ reminder_sent_at?: string;
84
+ created_at: string;
85
+ updated_at: string;
86
+ event_type?: EventType;
87
+ host?: Host;
88
+ attendees?: BookingAttendee[];
89
+ }
90
+
91
+ export interface BookingAttendee {
92
+ id: string;
93
+ booking_id: string;
94
+ name: string;
95
+ email: string;
96
+ created_at: string;
97
+ }
98
+
99
+ export interface TimeSlot {
100
+ start: Date;
101
+ end: Date;
102
+ available: boolean;
103
+ }
104
+
105
+ export interface BookingFormData {
106
+ guest_name: string;
107
+ guest_email: string;
108
+ guest_phone?: string;
109
+ guest_notes?: string;
110
+ timezone: string;
111
+ start_time: string;
112
+ attendees?: { name: string; email: string }[];
113
+ }
114
+
115
+ export interface AvailabilityCounts {
116
+ [dateStr: string]: { available: number; total: number };
117
+ }
118
+
119
+ // Day of week helpers
120
+ export const DAYS_OF_WEEK = [
121
+ 'Sunday',
122
+ 'Monday',
123
+ 'Tuesday',
124
+ 'Wednesday',
125
+ 'Thursday',
126
+ 'Friday',
127
+ 'Saturday'
128
+ ] as const;
129
+
130
+ export const DAYS_SHORT = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as const;
131
+
132
+ // Location type display
133
+ export const LOCATION_LABELS: Record<LocationType, string> = {
134
+ remote: 'Video Call',
135
+ phone: 'Phone Call',
136
+ in_person: 'In Person'
137
+ };
138
+
139
+ export const LOCATION_ICONS: Record<LocationType, string> = {
140
+ remote: 'video',
141
+ phone: 'phone',
142
+ in_person: 'map-pin'
143
+ };