@joewinke/jatui 0.1.23 → 0.1.24
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/CLAUDE.md +244 -0
- package/package.json +23 -10
- package/src/lib/actions/collapse.ts +0 -136
- package/src/lib/actions/railNav.ts +0 -473
- package/src/lib/components/AnnotationLayer.svelte +0 -108
- package/src/lib/components/AnnotationPanel.svelte +0 -319
- package/src/lib/components/AudioWaveform.svelte +0 -698
- package/src/lib/components/AvailabilityModal.svelte +0 -177
- package/src/lib/components/AvatarUpload.svelte +0 -234
- package/src/lib/components/Badge.svelte +0 -38
- package/src/lib/components/BookingForm.svelte +0 -278
- package/src/lib/components/BurndownChart.svelte +0 -778
- package/src/lib/components/Button.svelte +0 -81
- package/src/lib/components/CalendarPicker.svelte +0 -284
- package/src/lib/components/Card.svelte +0 -67
- package/src/lib/components/CharacterCounter.svelte +0 -82
- package/src/lib/components/ChipInput.svelte +0 -609
- package/src/lib/components/Collapse.svelte +0 -82
- package/src/lib/components/ColorSelector.svelte +0 -167
- package/src/lib/components/CommentThread.svelte +0 -773
- package/src/lib/components/ConfirmDialog.svelte +0 -348
- package/src/lib/components/ConfirmModal.svelte +0 -142
- package/src/lib/components/ContextMenu.svelte +0 -188
- package/src/lib/components/CountdownTimer.svelte +0 -94
- package/src/lib/components/DateRangePicker.svelte +0 -194
- package/src/lib/components/Drawer.svelte +0 -143
- package/src/lib/components/EmojiPicker.svelte +0 -159
- package/src/lib/components/EntityPreviewCard.svelte +0 -104
- package/src/lib/components/FileDropzone.svelte +0 -493
- package/src/lib/components/FilePicker.svelte +0 -488
- package/src/lib/components/FileThumbnail.svelte +0 -80
- package/src/lib/components/FilterDropdown.svelte +0 -203
- package/src/lib/components/FloatingActionBar.svelte +0 -354
- package/src/lib/components/GPSTracker.svelte +0 -202
- package/src/lib/components/HunkDiffView.svelte +0 -348
- package/src/lib/components/ImageLightbox.svelte +0 -274
- package/src/lib/components/ImageUpload.svelte +0 -147
- package/src/lib/components/InlineEdit.svelte +0 -291
- package/src/lib/components/InputDialog.svelte +0 -327
- package/src/lib/components/KeyboardShortcutsOverlay.svelte +0 -296
- package/src/lib/components/LazyImage.svelte +0 -123
- package/src/lib/components/LinkShortener.svelte +0 -274
- package/src/lib/components/LoadingSpinner.svelte +0 -106
- package/src/lib/components/LocationMap.svelte +0 -186
- package/src/lib/components/MapView.svelte +0 -341
- package/src/lib/components/MarkupEditor.svelte +0 -485
- package/src/lib/components/MarkupOverlay.svelte +0 -55
- package/src/lib/components/MediaWorkbench.svelte +0 -871
- package/src/lib/components/MilestoneCard.svelte +0 -98
- package/src/lib/components/MilestoneTimeline.svelte +0 -91
- package/src/lib/components/Modal.svelte +0 -244
- package/src/lib/components/PDFViewer.svelte +0 -105
- package/src/lib/components/PdfThumbnail.svelte +0 -63
- package/src/lib/components/PhoneInput.svelte +0 -212
- package/src/lib/components/ResizableDivider.svelte +0 -307
- package/src/lib/components/ResizablePanel.svelte +0 -305
- package/src/lib/components/SearchDropdown.svelte +0 -421
- package/src/lib/components/SelectInput.svelte +0 -237
- package/src/lib/components/SidebarUserFooter.svelte +0 -34
- package/src/lib/components/SignaturePad.svelte +0 -175
- package/src/lib/components/SmartImageEditor.svelte +0 -720
- package/src/lib/components/SortDropdown.svelte +0 -156
- package/src/lib/components/Sparkline.svelte +0 -116
- package/src/lib/components/SpeechForm.svelte +0 -114
- package/src/lib/components/StatusBadge.svelte +0 -157
- package/src/lib/components/TaskTypeIcon.svelte +0 -54
- package/src/lib/components/TextArea.svelte +0 -162
- package/src/lib/components/TextInput.svelte +0 -131
- package/src/lib/components/ThemeSelector.svelte +0 -206
- package/src/lib/components/TimeSlotPicker.svelte +0 -162
- package/src/lib/components/UserAvatar.svelte +0 -72
- package/src/lib/components/VariablePicker.svelte +0 -170
- package/src/lib/components/VoicePlayer.svelte +0 -422
- package/src/lib/components/linked-columns/LinkedColumns.svelte +0 -526
- package/src/lib/components/markup.ts +0 -287
- package/src/lib/components/messaging/Avatar.svelte +0 -81
- package/src/lib/components/messaging/ChannelInfoModal.svelte +0 -163
- package/src/lib/components/messaging/ChannelList.svelte +0 -107
- package/src/lib/components/messaging/ChannelMemberAvatarStack.svelte +0 -69
- package/src/lib/components/messaging/ChannelMembersModal.svelte +0 -182
- package/src/lib/components/messaging/CreateChannelModal.svelte +0 -190
- package/src/lib/components/messaging/DirectMessageList.svelte +0 -145
- package/src/lib/components/messaging/EmojiSelector.svelte +0 -261
- package/src/lib/components/messaging/MentionAutocomplete.svelte +0 -193
- package/src/lib/components/messaging/MessageAttachment.svelte +0 -273
- package/src/lib/components/messaging/MessageAttachmentUpload.svelte +0 -243
- package/src/lib/components/messaging/MessageInput.svelte +0 -452
- package/src/lib/components/messaging/MessageItem.svelte +0 -341
- package/src/lib/components/messaging/MessageThread.svelte +0 -306
- package/src/lib/components/messaging/NotificationSettingsModal.svelte +0 -234
- package/src/lib/components/messaging/QuotedMessageDisplay.svelte +0 -123
- package/src/lib/components/messaging/StartDMModal.svelte +0 -100
- package/src/lib/components/messaging/ThreadPanel.svelte +0 -153
- package/src/lib/components/pipeline/DESIGN.md +0 -361
- package/src/lib/components/pipeline/Pipeline.svelte +0 -391
- package/src/lib/components/pipeline/PipelineCard.svelte +0 -94
- package/src/lib/components/pipeline/PipelineColumn.svelte +0 -163
- package/src/lib/components/replay/ChapterTimeline.svelte +0 -326
- package/src/lib/components/session-nav/transcriptModel.ts +0 -352
- package/src/lib/data/emojis.ts +0 -1208
- package/src/lib/index.ts +0 -405
- package/src/lib/stores/confirmDialog.svelte.ts +0 -48
- package/src/lib/stores/inputDialog.svelte.ts +0 -51
- package/src/lib/styles/rail.css +0 -63
- package/src/lib/types/annotation.ts +0 -38
- package/src/lib/types/booking.ts +0 -143
- package/src/lib/types/comments.ts +0 -97
- package/src/lib/types/entityPreview.ts +0 -45
- package/src/lib/types/filePicker.ts +0 -16
- package/src/lib/types/googleMaps.d.ts +0 -51
- package/src/lib/types/maps.ts +0 -43
- package/src/lib/types/messaging.ts +0 -459
- package/src/lib/types/milestone.ts +0 -22
- package/src/lib/types/pipeline.ts +0 -150
- package/src/lib/types/smartImageEditor.ts +0 -39
- package/src/lib/types/templateVars.ts +0 -36
- package/src/lib/utils/currency.ts +0 -20
- package/src/lib/utils/daisyuiColors.ts +0 -243
- package/src/lib/utils/dateFormatters.ts +0 -196
- package/src/lib/utils/googleMapsLoader.ts +0 -84
- package/src/lib/utils/mentionParser.ts +0 -188
- package/src/lib/utils/phone.ts +0 -80
- package/src/lib/utils/phoneFormat.ts +0 -74
- package/src/lib/utils/taskUtils.ts +0 -75
|
@@ -1,459 +0,0 @@
|
|
|
1
|
-
// Messaging System Types
|
|
2
|
-
// Generic types for messaging UI components — no framework or backend dependencies
|
|
3
|
-
|
|
4
|
-
// ─── Core Message Types ───────────────────────────────────────────────
|
|
5
|
-
|
|
6
|
-
export interface Message {
|
|
7
|
-
id: string
|
|
8
|
-
content: string
|
|
9
|
-
senderId: string
|
|
10
|
-
senderName: string
|
|
11
|
-
senderAvatar?: string
|
|
12
|
-
createdAt: string
|
|
13
|
-
editedAt?: string
|
|
14
|
-
isRead?: boolean
|
|
15
|
-
readByCount?: number
|
|
16
|
-
isPinned?: boolean
|
|
17
|
-
pinnedAt?: string
|
|
18
|
-
pinnedBy?: string
|
|
19
|
-
pinnedByName?: string
|
|
20
|
-
parentMessageId?: string
|
|
21
|
-
recipientId?: string
|
|
22
|
-
thread_reply_count?: number
|
|
23
|
-
thread_last_reply_at?: string
|
|
24
|
-
thread_last_sender?: {
|
|
25
|
-
id: string
|
|
26
|
-
full_name: string
|
|
27
|
-
avatar_url?: string
|
|
28
|
-
}
|
|
29
|
-
quotedMessageId?: string
|
|
30
|
-
quotedMessage?: QuotedMessage
|
|
31
|
-
attachments?: MessageAttachment[]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface QuotedMessage {
|
|
35
|
-
id: string
|
|
36
|
-
content: string
|
|
37
|
-
senderId: string
|
|
38
|
-
senderName: string
|
|
39
|
-
senderAvatar?: string
|
|
40
|
-
createdAt: string
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface MessageAttachment {
|
|
44
|
-
id: string
|
|
45
|
-
file_name: string
|
|
46
|
-
file_type: string
|
|
47
|
-
file_size: number
|
|
48
|
-
storage_path: string
|
|
49
|
-
width?: number
|
|
50
|
-
height?: number
|
|
51
|
-
duration?: number
|
|
52
|
-
thumbnail_path?: string
|
|
53
|
-
uploaded_by: string
|
|
54
|
-
created_at: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface PendingAttachment {
|
|
58
|
-
id: string
|
|
59
|
-
file: File
|
|
60
|
-
preview?: string
|
|
61
|
-
uploading: boolean
|
|
62
|
-
progress: number
|
|
63
|
-
error?: string
|
|
64
|
-
storagePath?: string
|
|
65
|
-
width?: number
|
|
66
|
-
height?: number
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// ─── Channel Types ────────────────────────────────────────────────────
|
|
70
|
-
|
|
71
|
-
export interface Channel {
|
|
72
|
-
id: string
|
|
73
|
-
name: string
|
|
74
|
-
description?: string
|
|
75
|
-
type: 'public' | 'private' | 'direct'
|
|
76
|
-
isActive: boolean
|
|
77
|
-
memberRole: 'admin' | 'moderator' | 'member'
|
|
78
|
-
joinedAt: string
|
|
79
|
-
createdAt: string
|
|
80
|
-
unreadCount?: number
|
|
81
|
-
emoji?: string
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface ChannelMember {
|
|
85
|
-
id: string
|
|
86
|
-
userId: string
|
|
87
|
-
fullName: string
|
|
88
|
-
avatarUrl?: string | null
|
|
89
|
-
role: 'admin' | 'moderator' | 'member'
|
|
90
|
-
userRole?: string
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// ─── Direct Message Types ─────────────────────────────────────────────
|
|
94
|
-
|
|
95
|
-
export interface DirectConversation {
|
|
96
|
-
id: string
|
|
97
|
-
name: string
|
|
98
|
-
avatar?: string
|
|
99
|
-
lastMessageAt: string
|
|
100
|
-
unreadCount?: number
|
|
101
|
-
isOnline?: boolean
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface OrgMember {
|
|
105
|
-
id: string
|
|
106
|
-
full_name: string
|
|
107
|
-
avatar_url?: string
|
|
108
|
-
role: string
|
|
109
|
-
active?: boolean
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// ─── Emoji Types ──────────────────────────────────────────────────────
|
|
113
|
-
|
|
114
|
-
export type EmojiCategory =
|
|
115
|
-
| 'search'
|
|
116
|
-
| 'frequently_used'
|
|
117
|
-
| 'smileys_people'
|
|
118
|
-
| 'animals_nature'
|
|
119
|
-
| 'food_drink'
|
|
120
|
-
| 'travel_places'
|
|
121
|
-
| 'activities'
|
|
122
|
-
| 'objects'
|
|
123
|
-
| 'symbols'
|
|
124
|
-
| 'flags'
|
|
125
|
-
| 'custom'
|
|
126
|
-
|
|
127
|
-
export type SkinTone =
|
|
128
|
-
| 'default'
|
|
129
|
-
| 'light'
|
|
130
|
-
| 'medium-light'
|
|
131
|
-
| 'medium'
|
|
132
|
-
| 'medium-dark'
|
|
133
|
-
| 'dark'
|
|
134
|
-
|
|
135
|
-
export interface StandardEmoji {
|
|
136
|
-
unicode: string
|
|
137
|
-
name: string
|
|
138
|
-
shortcode: string
|
|
139
|
-
category: EmojiCategory
|
|
140
|
-
keywords: string[]
|
|
141
|
-
skinTones?: string[]
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface CustomEmoji {
|
|
145
|
-
id: string
|
|
146
|
-
organizationId: string
|
|
147
|
-
name: string
|
|
148
|
-
displayName: string
|
|
149
|
-
description?: string
|
|
150
|
-
fileName: string
|
|
151
|
-
fileSize: number
|
|
152
|
-
contentType: 'image/png' | 'image/gif'
|
|
153
|
-
storagePath: string
|
|
154
|
-
isAnimated: boolean
|
|
155
|
-
isActive: boolean
|
|
156
|
-
usageCount: number
|
|
157
|
-
uploadedBy: string
|
|
158
|
-
createdAt: string
|
|
159
|
-
updatedAt: string
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface EmojiReaction {
|
|
163
|
-
id: string
|
|
164
|
-
messageId: string
|
|
165
|
-
userId: string
|
|
166
|
-
emojiUnicode?: string
|
|
167
|
-
customEmojiId?: string
|
|
168
|
-
skinTone?: SkinTone
|
|
169
|
-
createdAt: string
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface ReactionSummary {
|
|
173
|
-
emojiUnicode?: string
|
|
174
|
-
customEmojiId?: string
|
|
175
|
-
customEmojiName?: string
|
|
176
|
-
customEmojiStoragePath?: string
|
|
177
|
-
customEmojiIsAnimated?: boolean
|
|
178
|
-
reactionCount: number
|
|
179
|
-
userReacted: boolean
|
|
180
|
-
recentUsers: Array<{ id: string; name: string }>
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface EmojiSelection {
|
|
184
|
-
type: 'standard' | 'custom'
|
|
185
|
-
unicode?: string
|
|
186
|
-
customEmojiId?: string
|
|
187
|
-
name: string
|
|
188
|
-
shortcode: string
|
|
189
|
-
skinTone?: SkinTone
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface EmojiPreferences {
|
|
193
|
-
skinTone: SkinTone
|
|
194
|
-
frequentlyUsed: string[]
|
|
195
|
-
lastUsedAt?: string
|
|
196
|
-
customEmojiFavorites?: string[]
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export interface EmojiCategoryInfo {
|
|
200
|
-
id: EmojiCategory
|
|
201
|
-
name: string
|
|
202
|
-
icon: string
|
|
203
|
-
description: string
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export interface SkinToneInfo {
|
|
207
|
-
id: SkinTone
|
|
208
|
-
name: string
|
|
209
|
-
unicode: string
|
|
210
|
-
preview: string
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// ─── Mention Types ────────────────────────────────────────────────────
|
|
214
|
-
|
|
215
|
-
export interface MentionItem {
|
|
216
|
-
type: string
|
|
217
|
-
id: string
|
|
218
|
-
name: string
|
|
219
|
-
secondary: string
|
|
220
|
-
url: string
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// ─── Notification Types ───────────────────────────────────────────────
|
|
224
|
-
|
|
225
|
-
export interface NotificationChannels {
|
|
226
|
-
email: boolean
|
|
227
|
-
sms: boolean
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export interface NotificationEvents {
|
|
231
|
-
[key: string]: boolean
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export interface NotificationTiming {
|
|
235
|
-
[key: string]: string | number
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export interface NotificationPreferences {
|
|
239
|
-
channels: NotificationChannels
|
|
240
|
-
events: NotificationEvents
|
|
241
|
-
timing: NotificationTiming
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// ─── Presence Types ───────────────────────────────────────────────────
|
|
245
|
-
|
|
246
|
-
export interface PresenceState {
|
|
247
|
-
[userId: string]: {
|
|
248
|
-
status: string
|
|
249
|
-
technicianStatus?: string
|
|
250
|
-
lastSeen?: string
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// ─── Callback Interfaces ──────────────────────────────────────────────
|
|
255
|
-
// These define the data-layer contracts that consuming apps must implement.
|
|
256
|
-
|
|
257
|
-
export interface MessageCallbacks {
|
|
258
|
-
loadMessages: (params: {
|
|
259
|
-
channelId?: string
|
|
260
|
-
dmUserId?: string
|
|
261
|
-
before?: string
|
|
262
|
-
limit?: number
|
|
263
|
-
}) => Promise<Message[]>
|
|
264
|
-
sendMessage: (params: {
|
|
265
|
-
content: string
|
|
266
|
-
channelId?: string
|
|
267
|
-
dmUserId?: string
|
|
268
|
-
parentMessageId?: string
|
|
269
|
-
quotedMessageId?: string
|
|
270
|
-
attachments?: PendingAttachment[]
|
|
271
|
-
priority?: string
|
|
272
|
-
}) => Promise<Message>
|
|
273
|
-
editMessage: (messageId: string, content: string) => Promise<Message>
|
|
274
|
-
deleteMessage: (messageId: string) => Promise<void>
|
|
275
|
-
pinMessage: (messageId: string, channelId: string) => Promise<void>
|
|
276
|
-
unpinMessage: (messageId: string, channelId: string) => Promise<void>
|
|
277
|
-
markAsRead: (messageIds: string[]) => Promise<void>
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export interface ReactionCallbacks {
|
|
281
|
-
loadReactions: (messageId: string) => Promise<ReactionSummary[]>
|
|
282
|
-
addReaction: (
|
|
283
|
-
messageId: string,
|
|
284
|
-
emoji: { unicode?: string; customEmojiId?: string; skinTone?: SkinTone }
|
|
285
|
-
) => Promise<void>
|
|
286
|
-
removeReaction: (
|
|
287
|
-
messageId: string,
|
|
288
|
-
emoji: { unicode?: string; customEmojiId?: string }
|
|
289
|
-
) => Promise<void>
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export interface AttachmentCallbacks {
|
|
293
|
-
getSignedUrl: (storagePath: string) => Promise<string>
|
|
294
|
-
getThumbnailUrl: (thumbnailPath: string) => Promise<string | null>
|
|
295
|
-
uploadFile: (
|
|
296
|
-
file: File,
|
|
297
|
-
organizationId: string
|
|
298
|
-
) => Promise<{ path: string; error?: string }>
|
|
299
|
-
deleteAttachment: (attachmentId: string) => Promise<void>
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export interface MentionCallbacks {
|
|
303
|
-
searchMentions: (query: string) => Promise<MentionItem[]>
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export interface EmojiCallbacks {
|
|
307
|
-
loadCustomEmojis: () => Promise<CustomEmoji[]>
|
|
308
|
-
loadPreferences: () => Promise<EmojiPreferences>
|
|
309
|
-
savePreferences: (prefs: Partial<EmojiPreferences>) => Promise<void>
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export interface ChannelCallbacks {
|
|
313
|
-
createChannel: (params: {
|
|
314
|
-
name: string
|
|
315
|
-
description?: string
|
|
316
|
-
type: 'public' | 'private'
|
|
317
|
-
emoji?: string
|
|
318
|
-
memberIds?: string[]
|
|
319
|
-
}) => Promise<Channel>
|
|
320
|
-
updateChannel: (
|
|
321
|
-
channelId: string,
|
|
322
|
-
params: Partial<Pick<Channel, 'name' | 'description' | 'emoji'>>
|
|
323
|
-
) => Promise<Channel>
|
|
324
|
-
deleteChannel: (channelId: string) => Promise<void>
|
|
325
|
-
leaveChannel: (channelId: string) => Promise<void>
|
|
326
|
-
getMembers: (channelId: string) => Promise<ChannelMember[]>
|
|
327
|
-
addMember: (channelId: string, userId: string) => Promise<void>
|
|
328
|
-
removeMember: (channelId: string, userId: string) => Promise<void>
|
|
329
|
-
updateMemberRole: (
|
|
330
|
-
channelId: string,
|
|
331
|
-
userId: string,
|
|
332
|
-
role: 'admin' | 'moderator' | 'member'
|
|
333
|
-
) => Promise<void>
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
export interface ThreadCallbacks {
|
|
337
|
-
loadReplies: (parentMessageId: string) => Promise<Message[]>
|
|
338
|
-
sendReply: (
|
|
339
|
-
parentMessageId: string,
|
|
340
|
-
content: string,
|
|
341
|
-
attachments?: PendingAttachment[]
|
|
342
|
-
) => Promise<Message>
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export interface NotificationCallbacks {
|
|
346
|
-
loadSettings: (params: {
|
|
347
|
-
type: 'global' | 'channel'
|
|
348
|
-
channelId?: string
|
|
349
|
-
}) => Promise<NotificationPreferences>
|
|
350
|
-
saveSettings: (
|
|
351
|
-
params: {
|
|
352
|
-
type: 'global' | 'channel'
|
|
353
|
-
channelId?: string
|
|
354
|
-
},
|
|
355
|
-
settings: NotificationPreferences
|
|
356
|
-
) => Promise<void>
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// ─── Emoji Data Constants ─────────────────────────────────────────────
|
|
360
|
-
|
|
361
|
-
export const EMOJI_CATEGORIES: EmojiCategoryInfo[] = [
|
|
362
|
-
{ id: 'search', name: 'Search', icon: '🔍', description: 'Search results' },
|
|
363
|
-
{
|
|
364
|
-
id: 'frequently_used',
|
|
365
|
-
name: 'Frequently Used',
|
|
366
|
-
icon: '🕐',
|
|
367
|
-
description: 'Your most used emojis'
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
id: 'smileys_people',
|
|
371
|
-
name: 'Smileys & People',
|
|
372
|
-
icon: '😀',
|
|
373
|
-
description: 'Faces, people, and emotions'
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
id: 'animals_nature',
|
|
377
|
-
name: 'Animals & Nature',
|
|
378
|
-
icon: '🐻',
|
|
379
|
-
description: 'Animals, plants, and nature'
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
id: 'food_drink',
|
|
383
|
-
name: 'Food & Drink',
|
|
384
|
-
icon: '🍎',
|
|
385
|
-
description: 'Food, drinks, and meals'
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
id: 'travel_places',
|
|
389
|
-
name: 'Travel & Places',
|
|
390
|
-
icon: '🏠',
|
|
391
|
-
description: 'Places, transport, and travel'
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
id: 'activities',
|
|
395
|
-
name: 'Activities',
|
|
396
|
-
icon: '⚽',
|
|
397
|
-
description: 'Sports, games, and activities'
|
|
398
|
-
},
|
|
399
|
-
{ id: 'objects', name: 'Objects', icon: '🔨', description: 'Tools, objects, and items' },
|
|
400
|
-
{
|
|
401
|
-
id: 'symbols',
|
|
402
|
-
name: 'Symbols',
|
|
403
|
-
icon: '❤️',
|
|
404
|
-
description: 'Symbols, signs, and icons'
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
id: 'flags',
|
|
408
|
-
name: 'Flags',
|
|
409
|
-
icon: '🏳️',
|
|
410
|
-
description: 'Country and regional flags'
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
id: 'custom',
|
|
414
|
-
name: 'Custom',
|
|
415
|
-
icon: '🎨',
|
|
416
|
-
description: 'Organization custom emojis'
|
|
417
|
-
}
|
|
418
|
-
]
|
|
419
|
-
|
|
420
|
-
export const SKIN_TONES: SkinToneInfo[] = [
|
|
421
|
-
{ id: 'default', name: 'Default', unicode: '', preview: '👋' },
|
|
422
|
-
{ id: 'light', name: 'Light', unicode: '🏻', preview: '👋🏻' },
|
|
423
|
-
{ id: 'medium-light', name: 'Medium Light', unicode: '🏼', preview: '👋🏼' },
|
|
424
|
-
{ id: 'medium', name: 'Medium', unicode: '🏽', preview: '👋🏽' },
|
|
425
|
-
{ id: 'medium-dark', name: 'Medium Dark', unicode: '🏾', preview: '👋🏾' },
|
|
426
|
-
{ id: 'dark', name: 'Dark', unicode: '🏿', preview: '👋🏿' }
|
|
427
|
-
]
|
|
428
|
-
|
|
429
|
-
// Default quick-reaction emojis (used when no user preferences available)
|
|
430
|
-
export const DEFAULT_QUICK_REACTIONS: StandardEmoji[] = [
|
|
431
|
-
{
|
|
432
|
-
unicode: '👍',
|
|
433
|
-
name: 'Thumbs Up',
|
|
434
|
-
shortcode: 'thumbsup',
|
|
435
|
-
category: 'smileys_people',
|
|
436
|
-
keywords: ['like', 'approve', 'yes']
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
unicode: '❤️',
|
|
440
|
-
name: 'Red Heart',
|
|
441
|
-
shortcode: 'heart',
|
|
442
|
-
category: 'symbols',
|
|
443
|
-
keywords: ['love', 'heart']
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
unicode: '😂',
|
|
447
|
-
name: 'Face with Tears of Joy',
|
|
448
|
-
shortcode: 'joy',
|
|
449
|
-
category: 'smileys_people',
|
|
450
|
-
keywords: ['laugh', 'lol', 'funny']
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
unicode: '🎉',
|
|
454
|
-
name: 'Party Popper',
|
|
455
|
-
shortcode: 'tada',
|
|
456
|
-
category: 'activities',
|
|
457
|
-
keywords: ['party', 'celebrate']
|
|
458
|
-
}
|
|
459
|
-
]
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generic milestone/timeline types for stepped workflows.
|
|
3
|
-
*
|
|
4
|
-
* Used by MilestoneCard and MilestoneTimeline components.
|
|
5
|
-
* Projects extend this with domain-specific fields (e.g. stripe_invoice_id).
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export type MilestoneStatus = "pending" | "delivered" | "accepted" | "paid"
|
|
9
|
-
|
|
10
|
-
export interface Milestone {
|
|
11
|
-
id: string
|
|
12
|
-
name: string
|
|
13
|
-
description: string
|
|
14
|
-
percentage: number
|
|
15
|
-
amount: number
|
|
16
|
-
acceptance_criteria: string
|
|
17
|
-
status: MilestoneStatus
|
|
18
|
-
sort_order: number
|
|
19
|
-
delivered_at: string | null
|
|
20
|
-
accepted_at: string | null
|
|
21
|
-
paid_at: string | null
|
|
22
|
-
}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
// ─── Core Stage/Column Types ───
|
|
2
|
-
|
|
3
|
-
/** A single stage (column) in the pipeline */
|
|
4
|
-
export interface PipelineStage {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
order: number;
|
|
8
|
-
/** oklch color string, e.g. "oklch(0.70 0.18 240)" */
|
|
9
|
-
color?: string;
|
|
10
|
-
/** DaisyUI semantic color fallback: "primary" | "secondary" | "success" | "warning" | "error" | "info" */
|
|
11
|
-
semantic?: string;
|
|
12
|
-
/** Optional icon (SVG path or component name) */
|
|
13
|
-
icon?: string;
|
|
14
|
-
/** Whether cards can be dragged out of this column */
|
|
15
|
-
draggableOut?: boolean;
|
|
16
|
-
/** Whether cards can be dropped into this column */
|
|
17
|
-
droppableIn?: boolean;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/** Resolved colors for a stage, computed from PipelineStage.color or .semantic */
|
|
21
|
-
export interface StageColors {
|
|
22
|
-
bg: string;
|
|
23
|
-
text: string;
|
|
24
|
-
border: string;
|
|
25
|
-
accent: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ─── Item Types ───
|
|
29
|
-
|
|
30
|
-
/** A single item (card) in the pipeline. Generic — consumers extend with their own fields. */
|
|
31
|
-
export interface PipelineItem {
|
|
32
|
-
id: string;
|
|
33
|
-
stageId: string;
|
|
34
|
-
title: string;
|
|
35
|
-
/** Optional subtitle (e.g. client name, company) */
|
|
36
|
-
subtitle?: string;
|
|
37
|
-
/** Numeric value for metrics aggregation (e.g. deal value, session cost) */
|
|
38
|
-
value?: number;
|
|
39
|
-
/** ISO date string — when the item entered the current stage */
|
|
40
|
-
stageEnteredAt?: string;
|
|
41
|
-
/** ISO date string — expected completion/close date */
|
|
42
|
-
expectedDate?: string;
|
|
43
|
-
/** Priority: 0 = highest */
|
|
44
|
-
priority?: number;
|
|
45
|
-
/** Assignee name or ID */
|
|
46
|
-
assignee?: string;
|
|
47
|
-
/** Freeform labels/tags */
|
|
48
|
-
labels?: string[];
|
|
49
|
-
/** Arbitrary metadata for card snippets to consume */
|
|
50
|
-
meta?: Record<string, unknown>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ─── Metrics Types ───
|
|
54
|
-
|
|
55
|
-
/** A single metric to display in the pipeline header */
|
|
56
|
-
export interface PipelineMetric {
|
|
57
|
-
label: string;
|
|
58
|
-
value: string | number;
|
|
59
|
-
/** Optional format hint: "currency" | "percent" | "number" */
|
|
60
|
-
format?: 'currency' | 'percent' | 'number';
|
|
61
|
-
/** Change from previous period, e.g. +5 or -2.3 */
|
|
62
|
-
change?: number;
|
|
63
|
-
/** DaisyUI color for the metric card */
|
|
64
|
-
color?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/** Per-stage aggregate computed by the Pipeline component */
|
|
68
|
-
export interface StageMetrics {
|
|
69
|
-
stageId: string;
|
|
70
|
-
count: number;
|
|
71
|
-
totalValue: number;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// ─── Configuration Types ───
|
|
75
|
-
|
|
76
|
-
/** View mode for the pipeline display */
|
|
77
|
-
export type PipelineViewMode = 'kanban' | 'table';
|
|
78
|
-
|
|
79
|
-
/** Table column definition for table view */
|
|
80
|
-
export interface PipelineTableColumn {
|
|
81
|
-
key: string;
|
|
82
|
-
label: string;
|
|
83
|
-
/** Width hint: "sm" (80px) | "md" (120px) | "lg" (200px) | "flex" (fill) */
|
|
84
|
-
width?: 'sm' | 'md' | 'lg' | 'flex';
|
|
85
|
-
/** Sort direction if sortable */
|
|
86
|
-
sortable?: boolean;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/** Drag-drop configuration */
|
|
90
|
-
export interface PipelineDragConfig {
|
|
91
|
-
enabled: boolean;
|
|
92
|
-
/** Duration for flip animation in ms (default: 200) */
|
|
93
|
-
flipDurationMs?: number;
|
|
94
|
-
/** CSS class applied to the drop zone during drag */
|
|
95
|
-
dropTargetClass?: string;
|
|
96
|
-
/** Stage IDs where drag is disabled (overrides per-stage draggableOut/droppableIn) */
|
|
97
|
-
disabledStages?: string[];
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** Top-level pipeline configuration */
|
|
101
|
-
export interface PipelineConfig {
|
|
102
|
-
/** Which views are available */
|
|
103
|
-
views?: PipelineViewMode[];
|
|
104
|
-
/** Default view on mount */
|
|
105
|
-
defaultView?: PipelineViewMode;
|
|
106
|
-
/** Drag-drop settings */
|
|
107
|
-
drag?: PipelineDragConfig;
|
|
108
|
-
/** Whether columns can be collapsed */
|
|
109
|
-
collapsible?: boolean;
|
|
110
|
-
/** Column min-height in px (default: 200) */
|
|
111
|
-
columnMinHeight?: number;
|
|
112
|
-
/** Table columns for table view */
|
|
113
|
-
tableColumns?: PipelineTableColumn[];
|
|
114
|
-
/** Currency code for value formatting (default: "USD") */
|
|
115
|
-
currency?: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// ─── Event Types ───
|
|
119
|
-
|
|
120
|
-
/** Fired when an item is moved between stages via drag-drop */
|
|
121
|
-
export interface PipelineStageChangeEvent {
|
|
122
|
-
itemId: string;
|
|
123
|
-
fromStageId: string;
|
|
124
|
-
toStageId: string;
|
|
125
|
-
/** New index within the target stage */
|
|
126
|
-
newIndex: number;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/** Fired when an item is clicked */
|
|
130
|
-
export interface PipelineItemClickEvent {
|
|
131
|
-
item: PipelineItem;
|
|
132
|
-
stageId: string;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// ─── Defaults ───
|
|
136
|
-
|
|
137
|
-
export const DEFAULT_DRAG_CONFIG: PipelineDragConfig = {
|
|
138
|
-
enabled: true,
|
|
139
|
-
flipDurationMs: 200,
|
|
140
|
-
dropTargetClass: 'outline-dashed outline-2 outline-base-content/20'
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export const DEFAULT_PIPELINE_CONFIG: PipelineConfig = {
|
|
144
|
-
views: ['kanban'],
|
|
145
|
-
defaultView: 'kanban',
|
|
146
|
-
drag: DEFAULT_DRAG_CONFIG,
|
|
147
|
-
collapsible: true,
|
|
148
|
-
columnMinHeight: 200,
|
|
149
|
-
currency: 'USD'
|
|
150
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface ImageVariantSpec {
|
|
2
|
-
name: string
|
|
3
|
-
width: number
|
|
4
|
-
height: number
|
|
5
|
-
fit?: "contain" | "cover" | "fill"
|
|
6
|
-
/** CSS hex color or "transparent". Transparent background when omitted. */
|
|
7
|
-
background?: string
|
|
8
|
-
/**
|
|
9
|
-
* Optional Gemini edit instruction run on the (background-removed) source
|
|
10
|
-
* before Sharp's deterministic resize. Used to intelligently re-frame the
|
|
11
|
-
* variant — e.g. crop a logo down to just the brand mark, or compose an OG
|
|
12
|
-
* card. Falls back to Sharp-only if the Gemini call fails.
|
|
13
|
-
*/
|
|
14
|
-
aiPrompt?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface ImageProcessingSpec {
|
|
18
|
-
removeBackground?: boolean
|
|
19
|
-
aspectRatio?: string
|
|
20
|
-
variants: ImageVariantSpec[]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface VariantResult {
|
|
24
|
-
name: string
|
|
25
|
-
url: string
|
|
26
|
-
width: number
|
|
27
|
-
height: number
|
|
28
|
-
backgroundRemovalFailed?: boolean
|
|
29
|
-
/** True when this variant had an aiPrompt but the Gemini edit call failed
|
|
30
|
-
* and we fell back to Sharp-only. The result is still uploaded; this is a
|
|
31
|
-
* non-blocking signal that the smart re-frame didn't happen. */
|
|
32
|
-
aiEditFailed?: boolean
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type VariantState =
|
|
36
|
-
| { status: "idle" }
|
|
37
|
-
| { status: "loading" }
|
|
38
|
-
| { status: "done"; result: VariantResult }
|
|
39
|
-
| { status: "error"; message: string }
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Template variable types — shared shape between the JST server-side registry
|
|
3
|
-
* (`src/lib/server/template-vars.ts`, `getVarsForCategory`) and the
|
|
4
|
-
* VariablePicker component.
|
|
5
|
-
*
|
|
6
|
-
* jatui cannot import the host app's `$lib/server` module (server-only), so
|
|
7
|
-
* these types are mirrored here. They are kept structurally identical to the
|
|
8
|
-
* registry's output so `getVarsForCategory(category, availableVars)` can be
|
|
9
|
-
* passed straight into `<VariablePicker groups={...} />` with no mapping —
|
|
10
|
-
* same jst↔jatui structural-compatibility pattern used by CommentThread.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/** A single insertable merge variable. */
|
|
14
|
-
export interface TemplateVar {
|
|
15
|
-
/**
|
|
16
|
-
* Dotted variable path inserted into the template as `{{name}}`.
|
|
17
|
-
* e.g. `contact.name`, `org.logo_url`, `total`.
|
|
18
|
-
*/
|
|
19
|
-
name: string
|
|
20
|
-
/** Human label shown in the picker, e.g. "Contact name". */
|
|
21
|
-
label: string
|
|
22
|
-
/** Optional one-line help text describing the value. */
|
|
23
|
-
description?: string
|
|
24
|
-
/** Optional sample value shown as a hint, e.g. "Acme Inc.". */
|
|
25
|
-
example?: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** Variable context group, e.g. all client/org/financial/custom vars. */
|
|
29
|
-
export interface TemplateVarGroup {
|
|
30
|
-
/** Stable group id — matches VarGroupId in the host app's template-vars registry. */
|
|
31
|
-
id: string
|
|
32
|
-
/** Group heading shown in the picker, e.g. "Client". */
|
|
33
|
-
label: string
|
|
34
|
-
/** Variables in this group (never empty — empty groups are omitted). */
|
|
35
|
-
vars: TemplateVar[]
|
|
36
|
-
}
|