@happyvertical/smrt-svelte 0.73.0 → 0.73.1
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/AGENTS.md +1 -1
- package/README.md +2 -2
- package/agents/overview-surfaces.md +2 -1
- package/dist/components/activity/ActivityList.svelte +311 -28
- package/dist/components/activity/ActivityList.svelte.d.ts +2 -4
- package/dist/components/activity/ActivityList.svelte.d.ts.map +1 -1
- package/dist/components/activity/index.d.ts +3 -1
- package/dist/components/activity/index.d.ts.map +1 -1
- package/dist/components/activity/index.js +2 -0
- package/dist/components/activity/safe-href.d.ts +1 -1
- package/dist/components/activity/safe-href.d.ts.map +1 -1
- package/dist/components/activity/safe-href.js +19 -4
- package/dist/components/activity/time.d.ts +27 -0
- package/dist/components/activity/time.d.ts.map +1 -0
- package/dist/components/activity/time.js +171 -0
- package/dist/components/activity/types.d.ts +56 -1
- package/dist/components/activity/types.d.ts.map +1 -1
- package/dist/components/overview/OverviewGrid.svelte +6 -0
- package/dist/components/overview/OverviewGrid.svelte.d.ts.map +1 -1
- package/dist/components/overview/controller.svelte.d.ts +4 -0
- package/dist/components/overview/controller.svelte.d.ts.map +1 -1
- package/dist/components/overview/controller.svelte.js +25 -2
- package/dist/components/overview/index.d.ts +4 -2
- package/dist/components/overview/index.d.ts.map +1 -1
- package/dist/components/overview/index.js +2 -1
- package/dist/components/overview/load.d.ts +4 -0
- package/dist/components/overview/load.d.ts.map +1 -1
- package/dist/components/overview/load.js +17 -1
- package/dist/components/overview/server.d.ts +4 -0
- package/dist/components/overview/server.d.ts.map +1 -1
- package/dist/components/overview/server.js +2 -0
- package/dist/components/overview/types.d.ts +12 -0
- package/dist/components/overview/types.d.ts.map +1 -1
- package/dist/components/overview/widgets/ActivityWidget.svelte +238 -0
- package/dist/components/overview/widgets/ActivityWidget.svelte.d.ts +6 -0
- package/dist/components/overview/widgets/ActivityWidget.svelte.d.ts.map +1 -0
- package/dist/components/overview/widgets/core.d.ts +11 -2
- package/dist/components/overview/widgets/core.d.ts.map +1 -1
- package/dist/components/overview/widgets/core.js +33 -1
- package/dist/components/overview/widgets/data.d.ts +5 -0
- package/dist/components/overview/widgets/data.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ActivityItem.svelte +322 -33
- package/dist/components/workspace/admin-shell/ActivityItem.svelte.d.ts +16 -3
- package/dist/components/workspace/admin-shell/ActivityItem.svelte.d.ts.map +1 -1
- package/dist/i18n/strings.overview.d.ts +2 -0
- package/dist/i18n/strings.overview.d.ts.map +1 -1
- package/dist/i18n/strings.overview.js +2 -0
- package/dist/i18n/strings.workspace.d.ts +13 -0
- package/dist/i18n/strings.workspace.d.ts.map +1 -1
- package/dist/i18n/strings.workspace.js +13 -0
- package/package.json +16 -16
|
@@ -1,43 +1,216 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
-
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
|
+
import { Badge, Button } from '@happyvertical/smrt-ui/ui';
|
|
4
4
|
import { M } from '../../../i18n/strings.workspace.js';
|
|
5
|
+
import { safeActivityHref } from '../../activity/safe-href.js';
|
|
6
|
+
import { formatActivityTimestamp } from '../../activity/time.js';
|
|
7
|
+
import type {
|
|
8
|
+
ActivityListEntry,
|
|
9
|
+
ActivityStatusTone,
|
|
10
|
+
} from '../../activity/types.js';
|
|
5
11
|
import type { ShellActivity } from './types.js';
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
const VALID_TONES = new Set<ActivityStatusTone>([
|
|
14
|
+
'neutral',
|
|
15
|
+
'primary',
|
|
16
|
+
'success',
|
|
17
|
+
'warning',
|
|
18
|
+
'error',
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
export interface Props {
|
|
22
|
+
/** Shell background activity record (job status, progress, and cancel handler). */
|
|
23
|
+
activity?: ShellActivity;
|
|
24
|
+
/** Authorized domain activity feed entry (enriched metadata and dismissal). */
|
|
25
|
+
entry?: ActivityListEntry;
|
|
26
|
+
/** Callback invoked when the user dismisses `entry`. */
|
|
27
|
+
onDismiss?: (id: string) => void | Promise<void>;
|
|
28
|
+
/** Callback invoked when the user restores a dismissed `entry`. */
|
|
29
|
+
onRestore?: (id: string) => void | Promise<void>;
|
|
30
|
+
/** Shared reference epoch (ms) for deterministic relative timestamp rendering across SSR and hydration. */
|
|
31
|
+
now?: number;
|
|
32
|
+
/** IANA time zone for timestamp tooltips and absolute fallbacks (defaults to `'UTC'`). */
|
|
33
|
+
timeZone?: string;
|
|
34
|
+
/** Optional BCP-47 locale override for timestamp formatting. */
|
|
35
|
+
locale?: string;
|
|
10
36
|
}
|
|
11
37
|
|
|
12
|
-
let {
|
|
13
|
-
|
|
38
|
+
let {
|
|
39
|
+
activity,
|
|
40
|
+
entry,
|
|
41
|
+
onDismiss,
|
|
42
|
+
onRestore,
|
|
43
|
+
now,
|
|
44
|
+
timeZone,
|
|
45
|
+
locale: localeProp,
|
|
46
|
+
}: Props = $props();
|
|
47
|
+
const { locale: i18nLocale, t } = useI18n();
|
|
48
|
+
const effectiveLocale = $derived(localeProp?.trim() || i18nLocale);
|
|
49
|
+
|
|
50
|
+
const isDismissed = $derived(Boolean(entry?.dismissed));
|
|
51
|
+
const titleText = $derived(entry ? entry.title : (activity?.label ?? ''));
|
|
52
|
+
const detailText = $derived(entry ? entry.detail : activity?.message);
|
|
53
|
+
const codeText = $derived(entry?.code?.trim() || undefined);
|
|
54
|
+
const sourceText = $derived(
|
|
55
|
+
entry?.sourceLabel?.trim() || entry?.source?.trim() || undefined,
|
|
56
|
+
);
|
|
57
|
+
const contextLabel = $derived(entry?.context?.label?.trim() || undefined);
|
|
58
|
+
const contextHref = $derived(
|
|
59
|
+
contextLabel ? safeActivityHref(entry?.context?.href) : undefined,
|
|
60
|
+
);
|
|
61
|
+
const statusBadge = $derived.by(() => {
|
|
62
|
+
const label = entry?.status?.label?.trim();
|
|
63
|
+
if (!label) return null;
|
|
64
|
+
const rawTone = entry?.status?.tone;
|
|
65
|
+
const tone: ActivityStatusTone =
|
|
66
|
+
rawTone && VALID_TONES.has(rawTone) ? rawTone : 'neutral';
|
|
67
|
+
return { label, tone };
|
|
68
|
+
});
|
|
69
|
+
const metaText = $derived(entry?.meta?.trim() || undefined);
|
|
70
|
+
const jobStatus = $derived(!entry ? activity?.status : undefined);
|
|
71
|
+
const rawTimestamp = $derived(
|
|
72
|
+
entry ? entry.occurredAt : (activity?.updatedAt ?? activity?.createdAt),
|
|
73
|
+
);
|
|
74
|
+
const timeInfo = $derived(
|
|
75
|
+
formatActivityTimestamp(rawTimestamp, {
|
|
76
|
+
locale: effectiveLocale,
|
|
77
|
+
timeZone,
|
|
78
|
+
justNowLabel: t(M['ui.activity_item.just_now']),
|
|
79
|
+
now,
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
const hasEyebrow = $derived(
|
|
83
|
+
Boolean(
|
|
84
|
+
sourceText ||
|
|
85
|
+
contextLabel ||
|
|
86
|
+
statusBadge ||
|
|
87
|
+
metaText ||
|
|
88
|
+
jobStatus ||
|
|
89
|
+
timeInfo,
|
|
90
|
+
),
|
|
91
|
+
);
|
|
92
|
+
const resolvedHref = $derived(
|
|
93
|
+
safeActivityHref(entry ? entry.href : activity?.detailHref),
|
|
94
|
+
);
|
|
95
|
+
const canCancelJob = $derived(
|
|
96
|
+
Boolean(
|
|
97
|
+
!entry &&
|
|
98
|
+
activity?.cancel &&
|
|
99
|
+
(activity.status === 'queued' || activity.status === 'running'),
|
|
100
|
+
),
|
|
101
|
+
);
|
|
102
|
+
const canRestoreEntry = $derived(Boolean(entry && isDismissed && onRestore));
|
|
103
|
+
const canDismissEntry = $derived(Boolean(entry && !isDismissed && onDismiss));
|
|
104
|
+
const hasActions = $derived(
|
|
105
|
+
Boolean(resolvedHref || canCancelJob || canRestoreEntry || canDismissEntry),
|
|
106
|
+
);
|
|
14
107
|
</script>
|
|
15
108
|
|
|
16
|
-
<article
|
|
109
|
+
<article
|
|
110
|
+
class="smrt-activity-item"
|
|
111
|
+
class:smrt-activity-item--dismissed={isDismissed}
|
|
112
|
+
data-status={entry ? statusBadge?.tone : activity?.status}
|
|
113
|
+
data-dismissed={isDismissed ? 'true' : undefined}
|
|
114
|
+
data-smrt-component="ActivityItem"
|
|
115
|
+
>
|
|
17
116
|
<div class="smrt-activity-item__main" data-smrt-part="body">
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
117
|
+
{#if hasEyebrow}
|
|
118
|
+
<div class="smrt-activity-item__eyebrow" data-smrt-part="eyebrow">
|
|
119
|
+
<div class="smrt-activity-item__eyebrow-items">
|
|
120
|
+
{#if sourceText}
|
|
121
|
+
<span class="smrt-activity-item__source" data-smrt-part="source">{sourceText}</span>
|
|
122
|
+
{/if}
|
|
123
|
+
{#if contextLabel}
|
|
124
|
+
{#if contextHref}
|
|
125
|
+
<a
|
|
126
|
+
class="smrt-activity-item__context smrt-activity-item__context--link"
|
|
127
|
+
data-smrt-part="context"
|
|
128
|
+
href={contextHref}
|
|
129
|
+
>{contextLabel}</a>
|
|
130
|
+
{:else}
|
|
131
|
+
<span class="smrt-activity-item__context" data-smrt-part="context">{contextLabel}</span>
|
|
132
|
+
{/if}
|
|
133
|
+
{/if}
|
|
134
|
+
{#if statusBadge}
|
|
135
|
+
<Badge size="sm" variant={statusBadge.tone}>{statusBadge.label}</Badge>
|
|
136
|
+
{/if}
|
|
137
|
+
{#if jobStatus}
|
|
138
|
+
<span class="smrt-activity-item__job-status" data-smrt-part="status">{jobStatus}</span>
|
|
139
|
+
{/if}
|
|
140
|
+
{#if metaText}
|
|
141
|
+
<span class="smrt-activity-item__meta-text" data-smrt-part="meta">{metaText}</span>
|
|
142
|
+
{/if}
|
|
143
|
+
</div>
|
|
144
|
+
{#if timeInfo}
|
|
145
|
+
{#if timeInfo.datetime}
|
|
146
|
+
<time
|
|
147
|
+
class="smrt-activity-item__time"
|
|
148
|
+
data-smrt-part="time"
|
|
149
|
+
datetime={timeInfo.datetime}
|
|
150
|
+
title={timeInfo.title}
|
|
151
|
+
>{timeInfo.label}</time>
|
|
152
|
+
{:else}
|
|
153
|
+
<span class="smrt-activity-item__time" data-smrt-part="time">{timeInfo.label}</span>
|
|
154
|
+
{/if}
|
|
155
|
+
{/if}
|
|
156
|
+
</div>
|
|
22
157
|
{/if}
|
|
23
|
-
|
|
158
|
+
|
|
159
|
+
<div class="smrt-activity-item__heading" data-smrt-part="heading">
|
|
160
|
+
{#if codeText}
|
|
161
|
+
<code class="smrt-activity-item__code" data-smrt-part="code">{codeText}</code>
|
|
162
|
+
{/if}
|
|
163
|
+
<strong class="smrt-activity-item__title" data-smrt-part="title">{titleText}</strong>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
{#if detailText}
|
|
167
|
+
<p class="smrt-activity-item__detail" data-smrt-part="detail">{detailText}</p>
|
|
168
|
+
{/if}
|
|
169
|
+
|
|
170
|
+
{#if !entry && typeof activity?.progress === 'number'}
|
|
24
171
|
<progress max="100" value={activity.progress}>
|
|
25
172
|
{Math.round(activity.progress)}%
|
|
26
173
|
</progress>
|
|
27
174
|
{/if}
|
|
28
175
|
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
176
|
+
|
|
177
|
+
{#if hasActions}
|
|
178
|
+
<div class="smrt-activity-item__actions" data-smrt-part="actions">
|
|
179
|
+
{#if resolvedHref}
|
|
180
|
+
<Button variant="ghost" size="sm" labelWhitespace="trim" href={resolvedHref}>
|
|
181
|
+
{t(M['ui.activity_item.view'])}
|
|
182
|
+
</Button>
|
|
183
|
+
{/if}
|
|
184
|
+
{#if canRestoreEntry && entry}
|
|
185
|
+
<Button
|
|
186
|
+
variant="ghost"
|
|
187
|
+
size="sm"
|
|
188
|
+
labelWhitespace="trim"
|
|
189
|
+
aria-label={t(M['ui.activity_item.restore_item'], { title: entry.title })}
|
|
190
|
+
onclick={() => void onRestore?.(entry.id)}
|
|
191
|
+
>
|
|
192
|
+
{t(M['ui.activity_item.restore'])}
|
|
193
|
+
</Button>
|
|
194
|
+
{:else if canDismissEntry && entry}
|
|
195
|
+
<Button
|
|
196
|
+
variant="ghost"
|
|
197
|
+
size="sm"
|
|
198
|
+
labelWhitespace="trim"
|
|
199
|
+
class="smrt-activity-item__dismiss"
|
|
200
|
+
aria-label={t(M['ui.activity_item.dismiss_item'], { title: entry.title })}
|
|
201
|
+
title={t(M['ui.activity_item.dismiss_item'], { title: entry.title })}
|
|
202
|
+
onclick={() => void onDismiss?.(entry.id)}
|
|
203
|
+
>
|
|
204
|
+
<span aria-hidden="true">✕</span>
|
|
205
|
+
</Button>
|
|
206
|
+
{/if}
|
|
207
|
+
{#if canCancelJob && activity}
|
|
208
|
+
<Button variant="ghost" size="sm" labelWhitespace="trim" onclick={() => activity.cancel?.()}>
|
|
209
|
+
{t(M['ui.activity_item.cancel'])}
|
|
210
|
+
</Button>
|
|
211
|
+
{/if}
|
|
212
|
+
</div>
|
|
213
|
+
{/if}
|
|
41
214
|
</article>
|
|
42
215
|
|
|
43
216
|
<style>
|
|
@@ -51,27 +224,85 @@ const { t } = useI18n();
|
|
|
51
224
|
gap: var(--smrt-spacing-3);
|
|
52
225
|
padding: var(--smrt-spacing-3) 0;
|
|
53
226
|
}
|
|
227
|
+
.smrt-activity-item--dismissed {
|
|
228
|
+
padding-inline: var(--smrt-spacing-2);
|
|
229
|
+
}
|
|
54
230
|
.smrt-activity-item__main {
|
|
55
231
|
display: grid;
|
|
232
|
+
flex: 1 1 auto;
|
|
56
233
|
gap: var(--smrt-spacing-1);
|
|
57
|
-
min-
|
|
234
|
+
min-inline-size: 0;
|
|
58
235
|
}
|
|
59
|
-
.smrt-activity-
|
|
60
|
-
|
|
61
|
-
|
|
236
|
+
.smrt-activity-item__eyebrow {
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
justify-content: space-between;
|
|
240
|
+
gap: var(--smrt-spacing-2);
|
|
241
|
+
min-inline-size: 0;
|
|
242
|
+
}
|
|
243
|
+
.smrt-activity-item__eyebrow-items {
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-wrap: wrap;
|
|
246
|
+
align-items: center;
|
|
247
|
+
gap: var(--smrt-spacing-2);
|
|
248
|
+
min-inline-size: 0;
|
|
249
|
+
}
|
|
250
|
+
.smrt-activity-item__source {
|
|
251
|
+
white-space: nowrap;
|
|
252
|
+
}
|
|
253
|
+
.smrt-activity-item__context {
|
|
254
|
+
display: inline-flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
max-inline-size: 16rem;
|
|
257
|
+
padding: 0 var(--smrt-spacing-2);
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
text-overflow: ellipsis;
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
}
|
|
262
|
+
.smrt-activity-item__meta-text {
|
|
62
263
|
overflow-wrap: anywhere;
|
|
63
264
|
}
|
|
64
|
-
.smrt-activity-
|
|
265
|
+
.smrt-activity-item__time {
|
|
266
|
+
flex-shrink: 0;
|
|
267
|
+
margin-inline-start: auto;
|
|
268
|
+
white-space: nowrap;
|
|
269
|
+
}
|
|
270
|
+
.smrt-activity-item__heading {
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: baseline;
|
|
273
|
+
gap: var(--smrt-spacing-2);
|
|
274
|
+
min-inline-size: 0;
|
|
275
|
+
}
|
|
276
|
+
.smrt-activity-item__code {
|
|
277
|
+
flex-shrink: 0;
|
|
278
|
+
padding: 0 var(--smrt-spacing-1);
|
|
279
|
+
white-space: nowrap;
|
|
280
|
+
}
|
|
281
|
+
.smrt-activity-item__title {
|
|
282
|
+
min-inline-size: 0;
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
text-overflow: ellipsis;
|
|
285
|
+
white-space: nowrap;
|
|
286
|
+
}
|
|
287
|
+
.smrt-activity-item__detail {
|
|
288
|
+
display: -webkit-box;
|
|
65
289
|
margin: 0;
|
|
290
|
+
overflow: hidden;
|
|
291
|
+
overflow-wrap: anywhere;
|
|
292
|
+
-webkit-box-orient: vertical;
|
|
293
|
+
-webkit-line-clamp: 2;
|
|
294
|
+
line-clamp: 2;
|
|
66
295
|
}
|
|
67
296
|
.smrt-activity-item progress {
|
|
68
297
|
width: min(16rem, 100%);
|
|
69
298
|
}
|
|
70
299
|
.smrt-activity-item__actions {
|
|
71
300
|
display: flex;
|
|
72
|
-
flex-
|
|
73
|
-
|
|
301
|
+
flex-shrink: 0;
|
|
302
|
+
align-items: center;
|
|
74
303
|
justify-content: flex-end;
|
|
304
|
+
gap: var(--smrt-spacing-1);
|
|
305
|
+
white-space: nowrap;
|
|
75
306
|
}
|
|
76
307
|
}
|
|
77
308
|
|
|
@@ -79,13 +310,71 @@ const { t } = useI18n();
|
|
|
79
310
|
.smrt-activity-item {
|
|
80
311
|
border-block-end: var(--smrt-hairline);
|
|
81
312
|
}
|
|
82
|
-
.smrt-activity-item
|
|
313
|
+
.smrt-activity-item:last-child {
|
|
314
|
+
border-block-end: 0;
|
|
315
|
+
}
|
|
316
|
+
.smrt-activity-item--dismissed {
|
|
317
|
+
background: var(--smrt-color-surface-container-low);
|
|
318
|
+
border-radius: var(--smrt-radius-sm);
|
|
319
|
+
}
|
|
320
|
+
.smrt-activity-item__source {
|
|
321
|
+
color: var(--smrt-color-on-surface-variant);
|
|
322
|
+
font-size: var(--smrt-typography-label-medium-size);
|
|
323
|
+
font-weight: var(--smrt-typography-weight-semibold);
|
|
324
|
+
}
|
|
325
|
+
.smrt-activity-item__context {
|
|
326
|
+
background: var(--smrt-color-surface-container);
|
|
327
|
+
color: var(--smrt-color-on-surface-variant);
|
|
328
|
+
border: var(--smrt-hairline);
|
|
329
|
+
border-color: var(--smrt-color-outline-variant);
|
|
330
|
+
border-radius: var(--smrt-radius-full);
|
|
331
|
+
font: var(--smrt-typography-label-medium-font);
|
|
332
|
+
text-decoration: none;
|
|
333
|
+
}
|
|
334
|
+
.smrt-activity-item__context--link {
|
|
335
|
+
color: var(--smrt-color-primary);
|
|
336
|
+
}
|
|
337
|
+
.smrt-activity-item__context--link:hover {
|
|
338
|
+
text-decoration: underline;
|
|
339
|
+
}
|
|
340
|
+
.smrt-activity-item__context--link:focus-visible {
|
|
341
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
342
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
343
|
+
}
|
|
344
|
+
.smrt-activity-item__job-status {
|
|
83
345
|
color: var(--smrt-color-on-surface-variant);
|
|
84
346
|
font-size: var(--smrt-typography-body-small-size);
|
|
85
347
|
text-transform: uppercase;
|
|
86
348
|
}
|
|
87
|
-
.smrt-activity-
|
|
349
|
+
.smrt-activity-item__meta-text,
|
|
350
|
+
.smrt-activity-item__time {
|
|
351
|
+
color: var(--smrt-color-on-surface-variant);
|
|
352
|
+
font-size: var(--smrt-typography-body-small-size);
|
|
353
|
+
}
|
|
354
|
+
.smrt-activity-item__time {
|
|
355
|
+
font-variant-numeric: tabular-nums;
|
|
356
|
+
}
|
|
357
|
+
.smrt-activity-item__code {
|
|
358
|
+
background: var(--smrt-color-surface-container);
|
|
359
|
+
color: var(--smrt-color-on-surface-variant);
|
|
360
|
+
border-radius: var(--smrt-radius-sm);
|
|
361
|
+
font-family: var(--smrt-font-family-mono);
|
|
362
|
+
font-size: var(--smrt-typography-label-medium-size);
|
|
363
|
+
}
|
|
364
|
+
.smrt-activity-item__title {
|
|
365
|
+
color: var(--smrt-color-on-surface);
|
|
366
|
+
font-size: var(--smrt-typography-body-medium-size);
|
|
367
|
+
font-weight: var(--smrt-typography-weight-semibold);
|
|
368
|
+
line-height: var(--smrt-typography-body-medium-line-height);
|
|
369
|
+
}
|
|
370
|
+
.smrt-activity-item--dismissed .smrt-activity-item__title {
|
|
371
|
+
color: var(--smrt-color-on-surface-variant);
|
|
372
|
+
font-weight: var(--smrt-typography-weight-medium);
|
|
373
|
+
}
|
|
374
|
+
.smrt-activity-item__detail {
|
|
88
375
|
color: var(--smrt-color-on-surface-variant);
|
|
376
|
+
font-size: var(--smrt-typography-body-medium-size);
|
|
377
|
+
line-height: var(--smrt-typography-body-medium-line-height);
|
|
89
378
|
}
|
|
90
379
|
}
|
|
91
380
|
</style>
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
import type { ActivityListEntry } from '../../activity/types.js';
|
|
1
2
|
import type { ShellActivity } from './types.js';
|
|
2
|
-
interface Props {
|
|
3
|
-
/**
|
|
4
|
-
activity
|
|
3
|
+
export interface Props {
|
|
4
|
+
/** Shell background activity record (job status, progress, and cancel handler). */
|
|
5
|
+
activity?: ShellActivity;
|
|
6
|
+
/** Authorized domain activity feed entry (enriched metadata and dismissal). */
|
|
7
|
+
entry?: ActivityListEntry;
|
|
8
|
+
/** Callback invoked when the user dismisses `entry`. */
|
|
9
|
+
onDismiss?: (id: string) => void | Promise<void>;
|
|
10
|
+
/** Callback invoked when the user restores a dismissed `entry`. */
|
|
11
|
+
onRestore?: (id: string) => void | Promise<void>;
|
|
12
|
+
/** Shared reference epoch (ms) for deterministic relative timestamp rendering across SSR and hydration. */
|
|
13
|
+
now?: number;
|
|
14
|
+
/** IANA time zone for timestamp tooltips and absolute fallbacks (defaults to `'UTC'`). */
|
|
15
|
+
timeZone?: string;
|
|
16
|
+
/** Optional BCP-47 locale override for timestamp formatting. */
|
|
17
|
+
locale?: string;
|
|
5
18
|
}
|
|
6
19
|
declare const ActivityItem: import("svelte").Component<Props, {}, "">;
|
|
7
20
|
type ActivityItem = ReturnType<typeof ActivityItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityItem.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ActivityItem.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActivityItem.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ActivityItem.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,MAAM,WAAW,KAAK;IACpB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,wDAAwD;IACxD,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,mEAAmE;IACnE,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,2GAA2G;IAC3G,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA4KD,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -63,6 +63,8 @@ export declare const M: {
|
|
|
63
63
|
readonly 'ui.overview.widget.shortcuts.description': "ui.overview.widget.shortcuts.description";
|
|
64
64
|
readonly 'ui.overview.widget.note.title': "ui.overview.widget.note.title";
|
|
65
65
|
readonly 'ui.overview.widget.note.description': "ui.overview.widget.note.description";
|
|
66
|
+
readonly 'ui.overview.widget.activity.title': "ui.overview.widget.activity.title";
|
|
67
|
+
readonly 'ui.overview.widget.activity.description': "ui.overview.widget.activity.description";
|
|
66
68
|
readonly 'ui.overview.opt.title': "ui.overview.opt.title";
|
|
67
69
|
readonly 'ui.overview.opt.title_help': "ui.overview.opt.title_help";
|
|
68
70
|
readonly 'ui.overview.opt.model': "ui.overview.opt.model";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.overview.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.overview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"strings.overview.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.overview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiLZ,CAAC"}
|
|
@@ -70,6 +70,8 @@ export const M = defineMessages({
|
|
|
70
70
|
'ui.overview.widget.shortcuts.description': 'Cards that link to a section’s pages.',
|
|
71
71
|
'ui.overview.widget.note.title': 'Note',
|
|
72
72
|
'ui.overview.widget.note.description': 'Text with simple formatting.',
|
|
73
|
+
'ui.overview.widget.activity.title': 'Activity',
|
|
74
|
+
'ui.overview.widget.activity.description': 'Recent activity across your workspace.',
|
|
73
75
|
// Core widgets: options
|
|
74
76
|
'ui.overview.opt.title': 'Title',
|
|
75
77
|
'ui.overview.opt.title_help': 'Shown above the widget. Leave empty for the default.',
|
|
@@ -60,7 +60,20 @@ export declare const M: {
|
|
|
60
60
|
readonly 'ui.activity_toasts.dismiss_action': "ui.activity_toasts.dismiss_action";
|
|
61
61
|
readonly 'ui.activity_item.view': "ui.activity_item.view";
|
|
62
62
|
readonly 'ui.activity_item.cancel': "ui.activity_item.cancel";
|
|
63
|
+
readonly 'ui.activity_item.just_now': "ui.activity_item.just_now";
|
|
64
|
+
readonly 'ui.activity_item.dismiss_item': "ui.activity_item.dismiss_item";
|
|
65
|
+
readonly 'ui.activity_item.restore': "ui.activity_item.restore";
|
|
66
|
+
readonly 'ui.activity_item.restore_item': "ui.activity_item.restore_item";
|
|
63
67
|
readonly 'ui.activity_list.empty': "ui.activity_list.empty";
|
|
68
|
+
readonly 'ui.activity_list.no_activity': "ui.activity_list.no_activity";
|
|
69
|
+
readonly 'ui.activity_list.caught_up': "ui.activity_list.caught_up";
|
|
70
|
+
readonly 'ui.activity_list.no_matching_activity': "ui.activity_list.no_matching_activity";
|
|
71
|
+
readonly 'ui.activity_list.filter_all': "ui.activity_list.filter_all";
|
|
72
|
+
readonly 'ui.activity_list.filter_by_source': "ui.activity_list.filter_by_source";
|
|
73
|
+
readonly 'ui.activity_list.dismiss_visible': "ui.activity_list.dismiss_visible";
|
|
74
|
+
readonly 'ui.activity_list.undo': "ui.activity_list.undo";
|
|
75
|
+
readonly 'ui.activity_list.show_dismissed': "ui.activity_list.show_dismissed";
|
|
76
|
+
readonly 'ui.activity_list.hide_dismissed': "ui.activity_list.hide_dismissed";
|
|
64
77
|
readonly 'ui.activity_ticker.label': "ui.activity_ticker.label";
|
|
65
78
|
readonly 'ui.activity_ticker.empty': "ui.activity_ticker.empty";
|
|
66
79
|
readonly 'ui.activity_ticker.pause': "ui.activity_ticker.pause";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.workspace.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"strings.workspace.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoRZ,CAAC"}
|
|
@@ -65,7 +65,20 @@ export const M = defineMessages({
|
|
|
65
65
|
'ui.activity_toasts.dismiss_action': 'Dismiss',
|
|
66
66
|
'ui.activity_item.view': 'View',
|
|
67
67
|
'ui.activity_item.cancel': 'Cancel',
|
|
68
|
+
'ui.activity_item.just_now': 'just now',
|
|
69
|
+
'ui.activity_item.dismiss_item': 'Dismiss {title}',
|
|
70
|
+
'ui.activity_item.restore': 'Restore',
|
|
71
|
+
'ui.activity_item.restore_item': 'Restore {title}',
|
|
68
72
|
'ui.activity_list.empty': 'No activities',
|
|
73
|
+
'ui.activity_list.no_activity': 'No activity.',
|
|
74
|
+
'ui.activity_list.caught_up': "You're all caught up.",
|
|
75
|
+
'ui.activity_list.no_matching_activity': 'No matching activity.',
|
|
76
|
+
'ui.activity_list.filter_all': 'All',
|
|
77
|
+
'ui.activity_list.filter_by_source': 'Filter activity by source',
|
|
78
|
+
'ui.activity_list.dismiss_visible': 'Dismiss visible',
|
|
79
|
+
'ui.activity_list.undo': 'Undo',
|
|
80
|
+
'ui.activity_list.show_dismissed': 'Show dismissed ({count})',
|
|
81
|
+
'ui.activity_list.hide_dismissed': 'Hide dismissed ({count})',
|
|
69
82
|
'ui.activity_ticker.label': 'Running processes',
|
|
70
83
|
'ui.activity_ticker.empty': 'No active processes',
|
|
71
84
|
'ui.activity_ticker.pause': 'Pause scrolling activities',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-svelte",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.1",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Svelte 5 components for SMRT user management - auth, users, tenants, roles, permissions, groups",
|
|
6
6
|
"type": "module",
|
|
@@ -242,18 +242,18 @@
|
|
|
242
242
|
},
|
|
243
243
|
"dependencies": {
|
|
244
244
|
"@happyvertical/logger": "^0.116.6",
|
|
245
|
-
"@happyvertical/smrt-core": "0.73.
|
|
246
|
-
"@happyvertical/smrt-fields": "0.73.
|
|
247
|
-
"@happyvertical/smrt-languages": "0.73.
|
|
248
|
-
"@happyvertical/smrt-mcp-apps": "0.73.
|
|
249
|
-
"@happyvertical/smrt-types": "0.73.
|
|
250
|
-
"@happyvertical/smrt-ui": "0.73.
|
|
251
|
-
"@happyvertical/smrt-web": "0.73.
|
|
245
|
+
"@happyvertical/smrt-core": "0.73.1",
|
|
246
|
+
"@happyvertical/smrt-fields": "0.73.1",
|
|
247
|
+
"@happyvertical/smrt-languages": "0.73.1",
|
|
248
|
+
"@happyvertical/smrt-mcp-apps": "0.73.1",
|
|
249
|
+
"@happyvertical/smrt-types": "0.73.1",
|
|
250
|
+
"@happyvertical/smrt-ui": "0.73.1",
|
|
251
|
+
"@happyvertical/smrt-web": "0.73.1",
|
|
252
252
|
"@tanstack/db": "^1.0.0-rc.1",
|
|
253
253
|
"@tanstack/svelte-db": "^1.0.0-rc.1",
|
|
254
254
|
"esm-env": "^1.2.2",
|
|
255
|
-
"@happyvertical/smrt-chat": "0.73.
|
|
256
|
-
"@happyvertical/smrt-inference": "0.73.
|
|
255
|
+
"@happyvertical/smrt-chat": "0.73.1",
|
|
256
|
+
"@happyvertical/smrt-inference": "0.73.1"
|
|
257
257
|
},
|
|
258
258
|
"peerDependencies": {
|
|
259
259
|
"@happyvertical/speech": ">=0.102.5",
|
|
@@ -285,12 +285,12 @@
|
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
"devDependencies": {
|
|
288
|
-
"@happyvertical/smrt-agents": "0.73.
|
|
289
|
-
"@happyvertical/smrt-content": "0.73.
|
|
290
|
-
"@happyvertical/smrt-reports": "0.73.
|
|
291
|
-
"@happyvertical/smrt-scanner": "0.73.
|
|
292
|
-
"@happyvertical/smrt-tenancy": "0.73.
|
|
293
|
-
"@happyvertical/smrt-users": "0.73.
|
|
288
|
+
"@happyvertical/smrt-agents": "0.73.1",
|
|
289
|
+
"@happyvertical/smrt-content": "0.73.1",
|
|
290
|
+
"@happyvertical/smrt-reports": "0.73.1",
|
|
291
|
+
"@happyvertical/smrt-scanner": "0.73.1",
|
|
292
|
+
"@happyvertical/smrt-tenancy": "0.73.1",
|
|
293
|
+
"@happyvertical/smrt-users": "0.73.1",
|
|
294
294
|
"@happyvertical/speech": "^0.116.6",
|
|
295
295
|
"@sveltejs/package": "^2.5.8",
|
|
296
296
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|