@joewinke/jatui 0.1.22 → 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.
Files changed (124) hide show
  1. package/CLAUDE.md +244 -0
  2. package/package.json +23 -10
  3. package/src/lib/actions/collapse.ts +0 -134
  4. package/src/lib/actions/railNav.ts +0 -473
  5. package/src/lib/components/AnnotationLayer.svelte +0 -108
  6. package/src/lib/components/AnnotationPanel.svelte +0 -319
  7. package/src/lib/components/AudioWaveform.svelte +0 -698
  8. package/src/lib/components/AvailabilityModal.svelte +0 -177
  9. package/src/lib/components/AvatarUpload.svelte +0 -234
  10. package/src/lib/components/Badge.svelte +0 -38
  11. package/src/lib/components/BookingForm.svelte +0 -278
  12. package/src/lib/components/BurndownChart.svelte +0 -778
  13. package/src/lib/components/Button.svelte +0 -81
  14. package/src/lib/components/CalendarPicker.svelte +0 -284
  15. package/src/lib/components/Card.svelte +0 -67
  16. package/src/lib/components/CharacterCounter.svelte +0 -82
  17. package/src/lib/components/ChipInput.svelte +0 -609
  18. package/src/lib/components/Collapse.svelte +0 -82
  19. package/src/lib/components/ColorSelector.svelte +0 -167
  20. package/src/lib/components/CommentThread.svelte +0 -773
  21. package/src/lib/components/ConfirmDialog.svelte +0 -348
  22. package/src/lib/components/ConfirmModal.svelte +0 -142
  23. package/src/lib/components/ContextMenu.svelte +0 -188
  24. package/src/lib/components/CountdownTimer.svelte +0 -94
  25. package/src/lib/components/DateRangePicker.svelte +0 -194
  26. package/src/lib/components/Drawer.svelte +0 -143
  27. package/src/lib/components/EmojiPicker.svelte +0 -159
  28. package/src/lib/components/EntityPreviewCard.svelte +0 -104
  29. package/src/lib/components/FileDropzone.svelte +0 -493
  30. package/src/lib/components/FilePicker.svelte +0 -488
  31. package/src/lib/components/FileThumbnail.svelte +0 -80
  32. package/src/lib/components/FilterDropdown.svelte +0 -203
  33. package/src/lib/components/FloatingActionBar.svelte +0 -354
  34. package/src/lib/components/GPSTracker.svelte +0 -202
  35. package/src/lib/components/HunkDiffView.svelte +0 -348
  36. package/src/lib/components/ImageLightbox.svelte +0 -274
  37. package/src/lib/components/ImageUpload.svelte +0 -147
  38. package/src/lib/components/InlineEdit.svelte +0 -291
  39. package/src/lib/components/InputDialog.svelte +0 -327
  40. package/src/lib/components/KeyboardShortcutsOverlay.svelte +0 -296
  41. package/src/lib/components/LazyImage.svelte +0 -123
  42. package/src/lib/components/LinkShortener.svelte +0 -274
  43. package/src/lib/components/LoadingSpinner.svelte +0 -106
  44. package/src/lib/components/LocationMap.svelte +0 -186
  45. package/src/lib/components/MapView.svelte +0 -341
  46. package/src/lib/components/MarkupEditor.svelte +0 -485
  47. package/src/lib/components/MarkupOverlay.svelte +0 -55
  48. package/src/lib/components/MediaWorkbench.svelte +0 -871
  49. package/src/lib/components/MilestoneCard.svelte +0 -98
  50. package/src/lib/components/MilestoneTimeline.svelte +0 -91
  51. package/src/lib/components/Modal.svelte +0 -244
  52. package/src/lib/components/PDFViewer.svelte +0 -105
  53. package/src/lib/components/PdfThumbnail.svelte +0 -63
  54. package/src/lib/components/PhoneInput.svelte +0 -212
  55. package/src/lib/components/ResizableDivider.svelte +0 -307
  56. package/src/lib/components/ResizablePanel.svelte +0 -305
  57. package/src/lib/components/SearchDropdown.svelte +0 -421
  58. package/src/lib/components/SelectInput.svelte +0 -237
  59. package/src/lib/components/SidebarUserFooter.svelte +0 -34
  60. package/src/lib/components/SignaturePad.svelte +0 -175
  61. package/src/lib/components/SmartImageEditor.svelte +0 -720
  62. package/src/lib/components/SortDropdown.svelte +0 -156
  63. package/src/lib/components/Sparkline.svelte +0 -116
  64. package/src/lib/components/SpeechForm.svelte +0 -114
  65. package/src/lib/components/StatusBadge.svelte +0 -157
  66. package/src/lib/components/TaskTypeIcon.svelte +0 -54
  67. package/src/lib/components/TextArea.svelte +0 -162
  68. package/src/lib/components/TextInput.svelte +0 -131
  69. package/src/lib/components/ThemeSelector.svelte +0 -206
  70. package/src/lib/components/TimeSlotPicker.svelte +0 -162
  71. package/src/lib/components/UserAvatar.svelte +0 -72
  72. package/src/lib/components/VariablePicker.svelte +0 -170
  73. package/src/lib/components/VoicePlayer.svelte +0 -422
  74. package/src/lib/components/linked-columns/LinkedColumns.svelte +0 -526
  75. package/src/lib/components/markup.ts +0 -287
  76. package/src/lib/components/messaging/Avatar.svelte +0 -81
  77. package/src/lib/components/messaging/ChannelInfoModal.svelte +0 -163
  78. package/src/lib/components/messaging/ChannelList.svelte +0 -107
  79. package/src/lib/components/messaging/ChannelMemberAvatarStack.svelte +0 -69
  80. package/src/lib/components/messaging/ChannelMembersModal.svelte +0 -182
  81. package/src/lib/components/messaging/CreateChannelModal.svelte +0 -190
  82. package/src/lib/components/messaging/DirectMessageList.svelte +0 -145
  83. package/src/lib/components/messaging/EmojiSelector.svelte +0 -261
  84. package/src/lib/components/messaging/MentionAutocomplete.svelte +0 -193
  85. package/src/lib/components/messaging/MessageAttachment.svelte +0 -273
  86. package/src/lib/components/messaging/MessageAttachmentUpload.svelte +0 -243
  87. package/src/lib/components/messaging/MessageInput.svelte +0 -452
  88. package/src/lib/components/messaging/MessageItem.svelte +0 -341
  89. package/src/lib/components/messaging/MessageThread.svelte +0 -306
  90. package/src/lib/components/messaging/NotificationSettingsModal.svelte +0 -234
  91. package/src/lib/components/messaging/QuotedMessageDisplay.svelte +0 -123
  92. package/src/lib/components/messaging/StartDMModal.svelte +0 -100
  93. package/src/lib/components/messaging/ThreadPanel.svelte +0 -153
  94. package/src/lib/components/pipeline/DESIGN.md +0 -361
  95. package/src/lib/components/pipeline/Pipeline.svelte +0 -391
  96. package/src/lib/components/pipeline/PipelineCard.svelte +0 -94
  97. package/src/lib/components/pipeline/PipelineColumn.svelte +0 -163
  98. package/src/lib/components/replay/ChapterTimeline.svelte +0 -326
  99. package/src/lib/components/session-nav/transcriptModel.ts +0 -352
  100. package/src/lib/data/emojis.ts +0 -1208
  101. package/src/lib/index.ts +0 -405
  102. package/src/lib/stores/confirmDialog.svelte.ts +0 -48
  103. package/src/lib/stores/inputDialog.svelte.ts +0 -51
  104. package/src/lib/styles/rail.css +0 -63
  105. package/src/lib/types/annotation.ts +0 -38
  106. package/src/lib/types/booking.ts +0 -143
  107. package/src/lib/types/comments.ts +0 -97
  108. package/src/lib/types/entityPreview.ts +0 -45
  109. package/src/lib/types/filePicker.ts +0 -16
  110. package/src/lib/types/googleMaps.d.ts +0 -51
  111. package/src/lib/types/maps.ts +0 -43
  112. package/src/lib/types/messaging.ts +0 -459
  113. package/src/lib/types/milestone.ts +0 -22
  114. package/src/lib/types/pipeline.ts +0 -150
  115. package/src/lib/types/smartImageEditor.ts +0 -39
  116. package/src/lib/types/templateVars.ts +0 -36
  117. package/src/lib/utils/currency.ts +0 -20
  118. package/src/lib/utils/daisyuiColors.ts +0 -243
  119. package/src/lib/utils/dateFormatters.ts +0 -196
  120. package/src/lib/utils/googleMapsLoader.ts +0 -84
  121. package/src/lib/utils/mentionParser.ts +0 -188
  122. package/src/lib/utils/phone.ts +0 -80
  123. package/src/lib/utils/phoneFormat.ts +0 -74
  124. package/src/lib/utils/taskUtils.ts +0 -75
@@ -1,319 +0,0 @@
1
- <script lang="ts">
2
- import type { Annotation, AnnotationProfile, AnnotationCallbacks } from '../types/annotation'
3
-
4
- interface Props {
5
- annotations: Annotation[]
6
- profiles: Record<string, AnnotationProfile>
7
- activeAnnotationId?: string | null
8
- currentUserId: string
9
- callbacks: AnnotationCallbacks
10
- onAnnotationSelect?: (annotation: Annotation | null) => void
11
- onAnnotationsChanged?: () => void
12
- }
13
-
14
- let {
15
- annotations = [],
16
- profiles = {},
17
- activeAnnotationId = null,
18
- currentUserId,
19
- callbacks,
20
- onAnnotationSelect,
21
- onAnnotationsChanged,
22
- }: Props = $props()
23
-
24
- let replyContent = $state("")
25
- let isSubmitting = $state(false)
26
- let showResolved = $state(false)
27
- let editingId = $state<string | null>(null)
28
- let editContent = $state("")
29
-
30
- // Group annotations into threads
31
- const threads = $derived.by(() => {
32
- const roots = annotations.filter((a) => !a.parent_annotation_id)
33
- return roots
34
- .filter((r) => showResolved || !r.resolved)
35
- .map((root) => ({
36
- root,
37
- replies: annotations
38
- .filter((a) => a.parent_annotation_id === root.id)
39
- .sort((a, b) => new Date(a.created_at).getTime() - new Date(b.created_at).getTime()),
40
- }))
41
- .sort((a, b) => new Date(b.root.created_at).getTime() - new Date(a.root.created_at).getTime())
42
- })
43
-
44
- const resolvedCount = $derived(
45
- annotations.filter((a) => !a.parent_annotation_id && a.resolved).length,
46
- )
47
- const totalRoots = $derived(annotations.filter((a) => !a.parent_annotation_id).length)
48
-
49
- function getAuthorName(userId: string): string {
50
- return profiles[userId]?.full_name || "Unknown"
51
- }
52
-
53
- function getInitials(userId: string): string {
54
- const name = getAuthorName(userId)
55
- return name
56
- .split(" ")
57
- .map((n) => n[0])
58
- .join("")
59
- .toUpperCase()
60
- .slice(0, 2)
61
- }
62
-
63
- function formatTime(dateStr: string): string {
64
- const date = new Date(dateStr)
65
- const now = new Date()
66
- const diffMs = now.getTime() - date.getTime()
67
- const diffMins = Math.floor(diffMs / 60000)
68
- if (diffMins < 1) return "just now"
69
- if (diffMins < 60) return `${diffMins}m ago`
70
- const diffHours = Math.floor(diffMins / 60)
71
- if (diffHours < 24) return `${diffHours}h ago`
72
- const diffDays = Math.floor(diffHours / 24)
73
- if (diffDays < 7) return `${diffDays}d ago`
74
- return date.toLocaleDateString("en-US", { month: "short", day: "numeric" })
75
- }
76
-
77
- async function submitReply(parentId: string) {
78
- if (!replyContent.trim() || isSubmitting) return
79
- isSubmitting = true
80
- try {
81
- await callbacks.onAddReply(parentId, replyContent.trim())
82
- replyContent = ""
83
- onAnnotationsChanged?.()
84
- } catch (err) {
85
- console.error("Error posting reply:", err)
86
- } finally {
87
- isSubmitting = false
88
- }
89
- }
90
-
91
- async function toggleResolve(annotation: Annotation) {
92
- try {
93
- await callbacks.onResolve(annotation.id, !annotation.resolved)
94
- onAnnotationsChanged?.()
95
- } catch (err) {
96
- console.error("Error updating annotation:", err)
97
- }
98
- }
99
-
100
- async function deleteAnnotation(id: string) {
101
- try {
102
- await callbacks.onDelete(id)
103
- if (activeAnnotationId === id) onAnnotationSelect?.(null)
104
- onAnnotationsChanged?.()
105
- } catch (err) {
106
- console.error("Error deleting annotation:", err)
107
- }
108
- }
109
-
110
- async function saveEdit(id: string) {
111
- if (!editContent.trim() || isSubmitting) return
112
- isSubmitting = true
113
- try {
114
- await callbacks.onEdit(id, editContent.trim())
115
- editingId = null
116
- editContent = ""
117
- onAnnotationsChanged?.()
118
- } catch (err) {
119
- console.error("Error editing annotation:", err)
120
- } finally {
121
- isSubmitting = false
122
- }
123
- }
124
-
125
- function startEdit(annotation: Annotation) {
126
- editingId = annotation.id
127
- editContent = annotation.content
128
- }
129
- </script>
130
-
131
- <div class="flex flex-col h-full">
132
- <!-- Header -->
133
- <div class="flex items-center justify-between px-3 py-2 border-b border-base-300 flex-shrink-0">
134
- <div class="flex items-center gap-2">
135
- <h4 class="text-sm font-semibold">Annotations</h4>
136
- {#if totalRoots > 0}
137
- <span class="badge badge-xs badge-ghost">{totalRoots - resolvedCount} open</span>
138
- {/if}
139
- </div>
140
- {#if resolvedCount > 0}
141
- <label class="flex items-center gap-1.5 cursor-pointer">
142
- <span class="text-xs text-base-content/50">Show resolved</span>
143
- <input
144
- type="checkbox"
145
- class="toggle toggle-xs"
146
- bind:checked={showResolved}
147
- />
148
- </label>
149
- {/if}
150
- </div>
151
-
152
- <!-- Thread list -->
153
- <div class="flex-1 overflow-y-auto">
154
- {#if threads.length === 0}
155
- <div class="text-center py-8 px-4">
156
- <svg class="mx-auto h-10 w-10 text-base-content/20" fill="none" stroke="currentColor" viewBox="0 0 24 24">
157
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z" />
158
- </svg>
159
- <p class="text-sm text-base-content/40 mt-2">No annotations yet</p>
160
- <p class="text-xs text-base-content/30 mt-1">Click the pin icon then click on the image to add one</p>
161
- </div>
162
- {:else}
163
- {#each threads as thread (thread.root.id)}
164
- {@const isActive = activeAnnotationId === thread.root.id}
165
- <div
166
- class="border-b border-base-200 transition-colors {isActive ? 'bg-primary/5' : 'hover:bg-base-200/50'}"
167
- >
168
- <!-- Root annotation -->
169
- <button
170
- class="w-full text-left px-3 py-2.5"
171
- onclick={() => onAnnotationSelect?.(isActive ? null : thread.root)}
172
- >
173
- <div class="flex items-start gap-2">
174
- <!-- Avatar -->
175
- <div class="flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-[10px] font-bold mt-0.5">
176
- {getInitials(thread.root.user_id)}
177
- </div>
178
- <div class="flex-1 min-w-0">
179
- <div class="flex items-center gap-1.5">
180
- <span class="text-xs font-medium text-base-content">{getAuthorName(thread.root.user_id)}</span>
181
- <span class="text-[10px] text-base-content/40">{formatTime(thread.root.created_at)}</span>
182
- {#if thread.root.resolved}
183
- <span class="badge badge-xs badge-success gap-0.5">
184
- <svg class="w-2.5 h-2.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
185
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M5 13l4 4L19 7" />
186
- </svg>
187
- Resolved
188
- </span>
189
- {/if}
190
- </div>
191
- <p class="text-sm text-base-content/80 mt-0.5 {isActive ? '' : 'line-clamp-2'}">{thread.root.content}</p>
192
- {#if thread.replies.length > 0 && !isActive}
193
- <span class="text-xs text-base-content/40 mt-1 inline-block">
194
- {thread.replies.length} {thread.replies.length === 1 ? "reply" : "replies"}
195
- </span>
196
- {/if}
197
- </div>
198
- </div>
199
- </button>
200
-
201
- <!-- Expanded thread -->
202
- {#if isActive}
203
- <div class="px-3 pb-3 space-y-2">
204
- <!-- Actions for root -->
205
- <div class="flex items-center gap-1 ml-8">
206
- <button
207
- class="btn btn-ghost btn-xs gap-1 {thread.root.resolved ? 'text-warning' : 'text-success'}"
208
- onclick={() => toggleResolve(thread.root)}
209
- >
210
- {#if thread.root.resolved}
211
- <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
212
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
213
- </svg>
214
- Reopen
215
- {:else}
216
- <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
217
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
218
- </svg>
219
- Resolve
220
- {/if}
221
- </button>
222
- {#if thread.root.user_id === currentUserId}
223
- <button
224
- class="btn btn-ghost btn-xs text-base-content/50"
225
- onclick={() => startEdit(thread.root)}
226
- >Edit</button>
227
- <button
228
- class="btn btn-ghost btn-xs text-error/70"
229
- onclick={() => deleteAnnotation(thread.root.id)}
230
- >Delete</button>
231
- {/if}
232
- </div>
233
-
234
- <!-- Edit form for root -->
235
- {#if editingId === thread.root.id}
236
- <div class="ml-8 space-y-1.5">
237
- <textarea
238
- class="textarea textarea-bordered textarea-sm w-full"
239
- rows="2"
240
- bind:value={editContent}
241
- ></textarea>
242
- <div class="flex gap-1">
243
- <button class="btn btn-xs btn-primary" onclick={() => saveEdit(thread.root.id)} disabled={isSubmitting}>Save</button>
244
- <button class="btn btn-xs btn-ghost" onclick={() => { editingId = null; editContent = ""; }}>Cancel</button>
245
- </div>
246
- </div>
247
- {/if}
248
-
249
- <!-- Replies -->
250
- {#each thread.replies as reply (reply.id)}
251
- <div class="ml-8 flex items-start gap-2 bg-base-200/50 rounded-lg p-2">
252
- <div class="flex-shrink-0 w-5 h-5 rounded-full bg-secondary/10 text-secondary flex items-center justify-center text-[9px] font-bold mt-0.5">
253
- {getInitials(reply.user_id)}
254
- </div>
255
- <div class="flex-1 min-w-0">
256
- <div class="flex items-center gap-1.5">
257
- <span class="text-xs font-medium">{getAuthorName(reply.user_id)}</span>
258
- <span class="text-[10px] text-base-content/40">{formatTime(reply.created_at)}</span>
259
- </div>
260
- {#if editingId === reply.id}
261
- <div class="mt-1 space-y-1.5">
262
- <textarea
263
- class="textarea textarea-bordered textarea-xs w-full"
264
- rows="2"
265
- bind:value={editContent}
266
- ></textarea>
267
- <div class="flex gap-1">
268
- <button class="btn btn-xs btn-primary" onclick={() => saveEdit(reply.id)} disabled={isSubmitting}>Save</button>
269
- <button class="btn btn-xs btn-ghost" onclick={() => { editingId = null; editContent = ""; }}>Cancel</button>
270
- </div>
271
- </div>
272
- {:else}
273
- <p class="text-sm text-base-content/80 mt-0.5">{reply.content}</p>
274
- {#if reply.user_id === currentUserId}
275
- <div class="flex gap-1 mt-1">
276
- <button class="btn btn-ghost btn-xs text-base-content/40 h-5 min-h-0" onclick={() => startEdit(reply)}>Edit</button>
277
- <button class="btn btn-ghost btn-xs text-error/50 h-5 min-h-0" onclick={() => deleteAnnotation(reply.id)}>Delete</button>
278
- </div>
279
- {/if}
280
- {/if}
281
- </div>
282
- </div>
283
- {/each}
284
-
285
- <!-- Reply input -->
286
- <div class="ml-8 flex gap-2">
287
- <textarea
288
- class="textarea textarea-bordered textarea-sm flex-1 min-h-[36px]"
289
- rows="1"
290
- placeholder="Reply..."
291
- bind:value={replyContent}
292
- onkeydown={(e) => {
293
- if (e.key === "Enter" && !e.shiftKey) {
294
- e.preventDefault()
295
- submitReply(thread.root.id)
296
- }
297
- }}
298
- ></textarea>
299
- <button
300
- class="btn btn-sm btn-primary self-end"
301
- disabled={!replyContent.trim() || isSubmitting}
302
- onclick={() => submitReply(thread.root.id)}
303
- >
304
- {#if isSubmitting}
305
- <span class="loading loading-spinner loading-xs"></span>
306
- {:else}
307
- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
308
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
309
- </svg>
310
- {/if}
311
- </button>
312
- </div>
313
- </div>
314
- {/if}
315
- </div>
316
- {/each}
317
- {/if}
318
- </div>
319
- </div>