@happyvertical/smrt-messages 0.60.16 → 0.60.17
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/dist/chunks/{AccountCollection-BqxfVklR.js → AccountCollection-Jn3jKg1h.js} +2 -2
- package/dist/chunks/{AccountCollection-BqxfVklR.js.map → AccountCollection-Jn3jKg1h.js.map} +1 -1
- package/dist/chunks/{Email-pFuK_41u.js → Email-Ddhzl5pT.js} +3 -3
- package/dist/chunks/{Email-pFuK_41u.js.map → Email-Ddhzl5pT.js.map} +1 -1
- package/dist/chunks/{EmailFolder-BgQXYiFu.js → EmailFolder-DFj8EDOE.js} +2 -2
- package/dist/chunks/{EmailFolder-BgQXYiFu.js.map → EmailFolder-DFj8EDOE.js.map} +1 -1
- package/dist/chunks/{Message-CN0p80pA.js → Message-C92Sna6i.js} +4 -4
- package/dist/chunks/{Message-CN0p80pA.js.map → Message-C92Sna6i.js.map} +1 -1
- package/dist/chunks/{MessageCollection-BugOEL4f.js → MessageCollection-DTcvlo_u.js} +2 -2
- package/dist/chunks/{MessageCollection-BugOEL4f.js.map → MessageCollection-DTcvlo_u.js.map} +1 -1
- package/dist/chunks/{__smrt-register__-D5RmYQK6.js → __smrt-register__-C4I1owMm.js} +2 -2
- package/dist/chunks/{__smrt-register__-D5RmYQK6.js.map → __smrt-register__-C4I1owMm.js.map} +1 -1
- package/dist/index.js +9 -9
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/AccountAvatar.svelte +34 -30
- package/dist/svelte/components/AccountCard.svelte +72 -63
- package/dist/svelte/components/AccountList.svelte +15 -9
- package/dist/svelte/components/AttachmentChip.svelte +54 -39
- package/dist/svelte/components/AttachmentUpload.svelte +55 -48
- package/dist/svelte/components/ComposeForm.svelte +105 -83
- package/dist/svelte/components/EmailAccountManager.svelte +245 -230
- package/dist/svelte/components/EmailFilterManager.svelte +250 -228
- package/dist/svelte/components/FolderNav.svelte +60 -50
- package/dist/svelte/components/ForwardForm.svelte +40 -34
- package/dist/svelte/components/MessageCard.svelte +116 -110
- package/dist/svelte/components/MessageDetail.svelte +107 -92
- package/dist/svelte/components/MessageFilters.svelte +73 -48
- package/dist/svelte/components/MessageList.svelte +20 -13
- package/dist/svelte/components/MessageStatusIndicator.svelte +24 -22
- package/dist/svelte/components/MessageToolbar.svelte +48 -36
- package/dist/svelte/components/MessageTypeBadge.svelte +8 -5
- package/dist/svelte/components/MessagingSettingsPanel.svelte +97 -32
- package/dist/svelte/components/RecipientInput.svelte +63 -43
- package/dist/svelte/components/ReplyForm.svelte +40 -34
- package/dist/svelte/components/SendStatusBadge.svelte +21 -14
- package/dist/svelte/components/ThreadView.svelte +68 -55
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunks/rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import "./chunks/__smrt-register__-
|
|
2
|
+
import "./chunks/__smrt-register__-C4I1owMm.js";
|
|
3
3
|
import { a as registerMessagingProvider, n as getMessagingProvider, o as ZulipSender, r as listMessagingProviders, s as TelegramSender, t as ensureBuiltinMessagingProvidersRegistered } from "./chunks/providers-4iLula-V.js";
|
|
4
4
|
import { buildSqliteRebuildStatements, isDeepStrictEqual, normalizeIdentityEmail, queryGlobal, queryWithGlobals, readNotificationProfile, withSystemContext, withTenant } from "./host.js";
|
|
5
|
-
import { r as Account, t as AccountCollection } from "./chunks/AccountCollection-
|
|
5
|
+
import { r as Account, t as AccountCollection } from "./chunks/AccountCollection-Jn3jKg1h.js";
|
|
6
6
|
import { d as withProtectedNotificationHandoff, f as PROFILE_NOTIFICATION_POLICY_PREFIX, l as protectedNotificationMetadata, m as profileNotificationPolicy, n as assertProtectedEmailAdmission, p as assertNotificationRecipientIdentity, r as assertProtectedEmailHandoff, t as ProtectedNotificationHandoffError } from "./chunks/protected-notification-handoff-mvaEZVp7.js";
|
|
7
|
-
import { t as Message } from "./chunks/Message-
|
|
8
|
-
import { t as MessageCollection } from "./chunks/MessageCollection-
|
|
9
|
-
import { t as Email } from "./chunks/Email-
|
|
10
|
-
import { t as EmailFolder } from "./chunks/EmailFolder-
|
|
7
|
+
import { t as Message } from "./chunks/Message-C92Sna6i.js";
|
|
8
|
+
import { t as MessageCollection } from "./chunks/MessageCollection-DTcvlo_u.js";
|
|
9
|
+
import { t as Email } from "./chunks/Email-Ddhzl5pT.js";
|
|
10
|
+
import { t as EmailFolder } from "./chunks/EmailFolder-DFj8EDOE.js";
|
|
11
11
|
import { t as SlackSender } from "./chunks/SlackSender-CjSvwY1K.js";
|
|
12
12
|
import { t as TweetSender } from "./chunks/TweetSender-CcLPNNi1.js";
|
|
13
13
|
import { GlobalInterceptors, SmrtCollection, SmrtObject, SmrtRecipe, crossPackageRef, detectEngine, field, foreignKey, importOptionalDependency, isUniqueViolationError, smrt, usesEmbeddedRevisionFallback, withEmbeddedWriteQueue } from "@happyvertical/smrt-core";
|
|
@@ -109,7 +109,7 @@ var Attachment = class extends SmrtObject {
|
|
|
109
109
|
*/
|
|
110
110
|
async getMessage() {
|
|
111
111
|
if (!this.messageId) return null;
|
|
112
|
-
const { MessageCollection } = await import("./chunks/MessageCollection-
|
|
112
|
+
const { MessageCollection } = await import("./chunks/MessageCollection-DTcvlo_u.js").then((n) => n.n);
|
|
113
113
|
return await (await MessageCollection.create(this.options)).get({ id: this.messageId });
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -1056,7 +1056,7 @@ var EmailAccount = class extends Account {
|
|
|
1056
1056
|
for (const folderName of foldersToSync) try {
|
|
1057
1057
|
let folder = await folderCollection.getByPath(accountId, folderName);
|
|
1058
1058
|
if (!folder) {
|
|
1059
|
-
const { EmailFolder } = await import("./chunks/EmailFolder-
|
|
1059
|
+
const { EmailFolder } = await import("./chunks/EmailFolder-DFj8EDOE.js").then((n) => n.n);
|
|
1060
1060
|
folder = new EmailFolder({
|
|
1061
1061
|
...this.childOptions(),
|
|
1062
1062
|
accountId,
|
|
@@ -1081,7 +1081,7 @@ var EmailAccount = class extends Account {
|
|
|
1081
1081
|
result.messagesSkipped++;
|
|
1082
1082
|
continue;
|
|
1083
1083
|
}
|
|
1084
|
-
const { Email } = await import("./chunks/Email-
|
|
1084
|
+
const { Email } = await import("./chunks/Email-Ddhzl5pT.js").then((n) => n.n);
|
|
1085
1085
|
let email = existingEmail;
|
|
1086
1086
|
if (!email) {
|
|
1087
1087
|
email = new Email({
|
package/dist/manifest.json
CHANGED
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-messages",
|
|
6
|
-
"packageVersion": "0.60.
|
|
6
|
+
"packageVersion": "0.60.17",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "8b04307b30c982ad1a7f65ecc9e7e08893ede5e5c26fbef93ef1fa5ba8ebe168",
|
|
11
|
+
"packageJson": "075b77bb345681965fe02cb737cdb92accd1e82c4ec8a6e3a33914dd055d368b",
|
|
12
12
|
"agents": "982506bdb93396f2cba5ca381c00b3e016199c2852e8f05eec27dc2de40ea106",
|
|
13
13
|
"moduleDoc:agents/notification-outbox.md": "0e9a870c4b2d5f0fec47af0dff6e61d216fb0121d384d99bccfc506beb6e38ad",
|
|
14
14
|
"moduleDoc:agents/profile-recipients.md": "1b6710bf646ddeafd6836df8270fcbb8e29226dceda716a693d945cc2e914606"
|
|
@@ -40,74 +40,78 @@ const _icon = $derived.by(() => {
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<span
|
|
43
|
-
class="
|
|
44
|
-
class:
|
|
45
|
-
class:
|
|
46
|
-
class:
|
|
43
|
+
class="smrt-account-avatar__root smrt-account-avatar__{size}"
|
|
44
|
+
class:smrt-account-avatar__email={['imap', 'smtp', 'pop3', 'gmail'].includes(providerType)}
|
|
45
|
+
class:smrt-account-avatar__slack={providerType === 'slack'}
|
|
46
|
+
class:smrt-account-avatar__twitter={providerType === 'twitter'}
|
|
47
47
|
title={name}
|
|
48
48
|
aria-label={`${name} (${providerType})`} data-smrt-component="AccountAvatar"
|
|
49
49
|
>
|
|
50
50
|
{#if _icon}
|
|
51
|
-
<span class="icon">{_icon}</span>
|
|
51
|
+
<span class="smrt-account-avatar__icon" data-smrt-part="icon">{_icon}</span>
|
|
52
52
|
{:else}
|
|
53
|
-
<span class="
|
|
53
|
+
<span class="smrt-account-avatar__initials" data-smrt-part="label">{_initials}</span>
|
|
54
54
|
{/if}
|
|
55
55
|
</span>
|
|
56
56
|
|
|
57
57
|
<style>
|
|
58
58
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
59
|
-
@layer smrt.
|
|
60
|
-
.
|
|
59
|
+
@layer smrt.structure {
|
|
60
|
+
.smrt-account-avatar__root {
|
|
61
61
|
display: inline-flex;
|
|
62
62
|
align-items: center;
|
|
63
63
|
justify-content: center;
|
|
64
|
-
border-radius: var(--smrt-radius-full);
|
|
65
|
-
background: var(--smrt-color-secondary-container);
|
|
66
|
-
color: var(--smrt-color-on-secondary-container);
|
|
67
|
-
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
68
64
|
flex-shrink: 0;
|
|
69
65
|
}
|
|
70
|
-
|
|
71
|
-
.avatar--sm {
|
|
66
|
+
.smrt-account-avatar__sm {
|
|
72
67
|
width: 1.5rem;
|
|
73
68
|
height: 1.5rem;
|
|
74
|
-
font-size: var(--smrt-typography-label-small-size, 0.625rem);
|
|
75
69
|
}
|
|
76
|
-
|
|
77
|
-
.avatar--md {
|
|
70
|
+
.smrt-account-avatar__md {
|
|
78
71
|
width: 2rem;
|
|
79
72
|
height: 2rem;
|
|
80
|
-
font-size: var(--smrt-typography-label-medium-size, 0.75rem);
|
|
81
73
|
}
|
|
82
|
-
|
|
83
|
-
.avatar--lg {
|
|
74
|
+
.smrt-account-avatar__lg {
|
|
84
75
|
width: 2.5rem;
|
|
85
76
|
height: 2.5rem;
|
|
86
|
-
font-size: var(--smrt-typography-label-large-size, 0.875rem);
|
|
87
77
|
}
|
|
78
|
+
}
|
|
88
79
|
|
|
89
|
-
|
|
80
|
+
@layer smrt.theme {
|
|
81
|
+
.smrt-account-avatar__root {
|
|
82
|
+
border-radius: var(--smrt-radius-full);
|
|
83
|
+
background: var(--smrt-color-secondary-container);
|
|
84
|
+
color: var(--smrt-color-on-secondary-container);
|
|
85
|
+
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
86
|
+
}
|
|
87
|
+
.smrt-account-avatar__sm {
|
|
88
|
+
font-size: var(--smrt-typography-label-small-size, 0.625rem);
|
|
89
|
+
}
|
|
90
|
+
.smrt-account-avatar__md {
|
|
91
|
+
font-size: var(--smrt-typography-label-medium-size, 0.75rem);
|
|
92
|
+
}
|
|
93
|
+
.smrt-account-avatar__lg {
|
|
94
|
+
font-size: var(--smrt-typography-label-large-size, 0.875rem);
|
|
95
|
+
}
|
|
96
|
+
.smrt-account-avatar__email {
|
|
90
97
|
background: var(--smrt-color-primary-container);
|
|
91
98
|
color: var(--smrt-color-on-primary-container);
|
|
92
99
|
}
|
|
93
|
-
|
|
94
|
-
.avatar--slack {
|
|
100
|
+
.smrt-account-avatar__slack {
|
|
95
101
|
background: var(--smrt-color-tertiary-container);
|
|
96
102
|
color: var(--smrt-color-on-tertiary-container);
|
|
97
103
|
}
|
|
98
|
-
|
|
99
|
-
.avatar--twitter {
|
|
104
|
+
.smrt-account-avatar__twitter {
|
|
100
105
|
background: var(--smrt-color-secondary-container);
|
|
101
106
|
color: var(--smrt-color-on-secondary-container);
|
|
102
107
|
}
|
|
103
|
-
|
|
104
|
-
.icon {
|
|
108
|
+
.smrt-account-avatar__icon {
|
|
105
109
|
font-size: 1.1em;
|
|
106
110
|
}
|
|
107
|
-
|
|
108
|
-
.initials {
|
|
111
|
+
.smrt-account-avatar__initials {
|
|
109
112
|
text-transform: uppercase;
|
|
110
113
|
letter-spacing: 0.02em;
|
|
111
114
|
}
|
|
112
115
|
}
|
|
116
|
+
|
|
113
117
|
</style>
|
|
@@ -32,29 +32,29 @@ const _lastSyncFormatted = $derived.by(() => {
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<Card>
|
|
35
|
-
<div class="account-
|
|
36
|
-
<div class="account-
|
|
35
|
+
<div class="smrt-account-card__body" data-smrt-part="body">
|
|
36
|
+
<div class="smrt-account-card__header" data-smrt-part="header">
|
|
37
37
|
<AccountAvatar providerType={account.providerType} name={account.name} size="lg" />
|
|
38
|
-
<div class="
|
|
39
|
-
<h3 class="
|
|
38
|
+
<div class="smrt-account-card__content" data-smrt-part="body">
|
|
39
|
+
<h3 class="smrt-account-card__name" data-smrt-part="title">{account.name}</h3>
|
|
40
40
|
{#if account.email}
|
|
41
|
-
<span class="
|
|
41
|
+
<span class="smrt-account-card__email" data-smrt-part="meta">{account.email}</span>
|
|
42
42
|
{/if}
|
|
43
|
-
<span class="
|
|
43
|
+
<span class="smrt-account-card__provider" data-smrt-part="meta">{account.providerType}</span>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
|
-
<div class="
|
|
48
|
-
<span class="
|
|
47
|
+
<div class="smrt-account-card__meta" data-smrt-part="meta">
|
|
48
|
+
<span class="smrt-account-card__status" class:smrt-account-card__status--active={account.isActive} class:smrt-account-card__status--inactive={!account.isActive} data-smrt-part="badge">
|
|
49
49
|
{account.isActive ? 'Active' : 'Inactive'}
|
|
50
50
|
</span>
|
|
51
|
-
<span class="
|
|
51
|
+
<span class="smrt-account-card__sync-time" data-smrt-part="time">{_lastSyncFormatted}</span>
|
|
52
52
|
{#if account.unreadCount !== undefined}
|
|
53
|
-
<span class="
|
|
53
|
+
<span class="smrt-account-card__unread-count" data-smrt-part="count">{account.unreadCount} unread</span>
|
|
54
54
|
{/if}
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
|
-
<div class="actions">
|
|
57
|
+
<div class="smrt-account-card__actions" data-smrt-part="actions">
|
|
58
58
|
{#if onsync && account.isActive}
|
|
59
59
|
<Button variant="ghost" size="sm" class="action-btn" onclick={() => onsync?.(account)}>
|
|
60
60
|
Sync
|
|
@@ -81,110 +81,119 @@ const _lastSyncFormatted = $derived.by(() => {
|
|
|
81
81
|
|
|
82
82
|
<style>
|
|
83
83
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
84
|
-
@layer smrt.
|
|
85
|
-
.account-
|
|
84
|
+
@layer smrt.structure {
|
|
85
|
+
.smrt-account-card__body {
|
|
86
86
|
display: flex;
|
|
87
87
|
flex-direction: column;
|
|
88
88
|
gap: 0.75rem;
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
.account-info {
|
|
90
|
+
.smrt-account-card__header {
|
|
92
91
|
display: flex;
|
|
93
92
|
align-items: center;
|
|
94
93
|
gap: 0.75rem;
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
.details {
|
|
95
|
+
.smrt-account-card__content {
|
|
98
96
|
display: flex;
|
|
99
97
|
flex-direction: column;
|
|
100
98
|
gap: 0.125rem;
|
|
101
99
|
min-width: 0;
|
|
102
100
|
}
|
|
103
|
-
|
|
104
|
-
.name {
|
|
101
|
+
.smrt-account-card__name {
|
|
105
102
|
margin: 0;
|
|
106
|
-
font: var(--smrt-typography-title-medium-font, 500 1rem / 1.25 sans-serif);
|
|
107
|
-
color: var(--smrt-color-on-surface);
|
|
108
103
|
}
|
|
109
|
-
|
|
110
|
-
.email {
|
|
111
|
-
font: var(--smrt-typography-body-small-font, 0.75rem / 1.33 sans-serif);
|
|
112
|
-
color: var(--smrt-color-on-surface-variant);
|
|
104
|
+
.smrt-account-card__email {
|
|
113
105
|
overflow: hidden;
|
|
114
106
|
text-overflow: ellipsis;
|
|
115
107
|
white-space: nowrap;
|
|
116
108
|
}
|
|
109
|
+
.smrt-account-card__meta {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 0.75rem;
|
|
113
|
+
}
|
|
114
|
+
.smrt-account-card__status {
|
|
115
|
+
padding: 0.125rem 0.375rem;
|
|
116
|
+
}
|
|
117
|
+
.smrt-account-card__actions {
|
|
118
|
+
display: flex;
|
|
119
|
+
gap: 0.375rem;
|
|
120
|
+
}
|
|
121
|
+
/*
|
|
122
|
+
* The action buttons now render through smrt-ui's <Button variant="ghost">.
|
|
123
|
+
* Svelte scopes `.action-btn` to this component, but the <button> is emitted
|
|
124
|
+
* inside the Button child, so a plain `.action-btn {}` rule would not match —
|
|
125
|
+
* `.smrt-account-card__actions :global(.action-btn)` anchors on `.smrt-account-card__actions` (a real element here)
|
|
126
|
+
* and pierces into the child (issue #1589). These overrides keep the original
|
|
127
|
+
* outlined-surface look (border/radius/color); the modifier class is
|
|
128
|
+
* `action-btn--danger`, NOT `danger`, so it never collides with Button's own
|
|
129
|
+
* `.danger` variant class.
|
|
130
|
+
*/
|
|
131
|
+
.smrt-account-card__actions :global(.action-btn) {
|
|
132
|
+
padding: 0.375rem 0.75rem;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
117
135
|
|
|
118
|
-
|
|
136
|
+
@layer smrt.theme {
|
|
137
|
+
.smrt-account-card__name {
|
|
138
|
+
font: var(--smrt-typography-title-medium-font, 500 1rem / 1.25 sans-serif);
|
|
139
|
+
color: var(--smrt-color-on-surface);
|
|
140
|
+
}
|
|
141
|
+
.smrt-account-card__email {
|
|
142
|
+
font: var(--smrt-typography-body-small-font, 0.75rem / 1.33 sans-serif);
|
|
143
|
+
color: var(--smrt-color-on-surface-variant);
|
|
144
|
+
}
|
|
145
|
+
.smrt-account-card__provider {
|
|
119
146
|
font: var(--smrt-typography-label-small-font, 500 0.6875rem / 1 sans-serif);
|
|
120
147
|
color: var(--smrt-color-on-surface-variant);
|
|
121
148
|
text-transform: uppercase;
|
|
122
149
|
letter-spacing: 0.05em;
|
|
123
150
|
}
|
|
124
|
-
|
|
125
|
-
.status-row {
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
gap: 0.75rem;
|
|
151
|
+
.smrt-account-card__meta {
|
|
129
152
|
font: var(--smrt-typography-body-small-font, 0.75rem / 1.33 sans-serif);
|
|
130
153
|
}
|
|
131
|
-
|
|
132
|
-
.status {
|
|
133
|
-
padding: 0.125rem 0.375rem;
|
|
154
|
+
.smrt-account-card__status {
|
|
134
155
|
border-radius: var(--smrt-radius-small, 0.25rem);
|
|
135
156
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
136
157
|
}
|
|
137
|
-
|
|
138
|
-
.status--active {
|
|
158
|
+
.smrt-account-card__status--active {
|
|
139
159
|
background: var(--smrt-color-tertiary-container);
|
|
140
160
|
color: var(--smrt-color-on-tertiary-container);
|
|
141
161
|
}
|
|
142
|
-
|
|
143
|
-
.status--inactive {
|
|
162
|
+
.smrt-account-card__status--inactive {
|
|
144
163
|
background: var(--smrt-color-surface-variant);
|
|
145
164
|
color: var(--smrt-color-on-surface-variant);
|
|
146
165
|
}
|
|
147
|
-
|
|
148
|
-
.sync-time {
|
|
166
|
+
.smrt-account-card__sync-time {
|
|
149
167
|
color: var(--smrt-color-on-surface-variant);
|
|
150
168
|
}
|
|
151
|
-
|
|
152
|
-
.unread-count {
|
|
169
|
+
.smrt-account-card__unread-count {
|
|
153
170
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
154
171
|
color: var(--smrt-color-primary);
|
|
155
172
|
}
|
|
156
|
-
|
|
157
|
-
.actions {
|
|
158
|
-
display: flex;
|
|
159
|
-
gap: 0.375rem;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
173
|
/*
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
.
|
|
173
|
-
padding: 0.375rem 0.75rem;
|
|
174
|
+
* The action buttons now render through smrt-ui's <Button variant="ghost">.
|
|
175
|
+
* Svelte scopes `.action-btn` to this component, but the <button> is emitted
|
|
176
|
+
* inside the Button child, so a plain `.action-btn {}` rule would not match —
|
|
177
|
+
* `.smrt-account-card__actions :global(.action-btn)` anchors on `.smrt-account-card__actions` (a real element here)
|
|
178
|
+
* and pierces into the child (issue #1589). These overrides keep the original
|
|
179
|
+
* outlined-surface look (border/radius/color); the modifier class is
|
|
180
|
+
* `action-btn--danger`, NOT `danger`, so it never collides with Button's own
|
|
181
|
+
* `.danger` variant class.
|
|
182
|
+
*/
|
|
183
|
+
.smrt-account-card__actions :global(.action-btn) {
|
|
174
184
|
border: var(--smrt-hairline-strong);
|
|
175
185
|
border-radius: var(--smrt-radius-small, 0.25rem);
|
|
176
186
|
background: var(--smrt-color-surface);
|
|
177
187
|
color: var(--smrt-color-on-surface);
|
|
178
188
|
font: var(--smrt-typography-label-medium-font, 500 0.75rem / 1.33 sans-serif);
|
|
179
189
|
}
|
|
180
|
-
|
|
181
|
-
.actions :global(.action-btn):hover {
|
|
190
|
+
.smrt-account-card__actions :global(.action-btn):hover {
|
|
182
191
|
background: var(--smrt-color-surface-variant);
|
|
183
192
|
}
|
|
184
|
-
|
|
185
|
-
.actions :global(.action-btn--danger) {
|
|
193
|
+
.smrt-account-card__actions :global(.action-btn--danger) {
|
|
186
194
|
color: var(--smrt-color-error);
|
|
187
195
|
border-color: var(--smrt-color-error);
|
|
188
196
|
}
|
|
189
197
|
}
|
|
198
|
+
|
|
190
199
|
</style>
|
|
@@ -56,13 +56,13 @@ function handleAccountKeydown(event: KeyboardEvent, account: AccountData) {
|
|
|
56
56
|
}
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
|
-
<div class="account-
|
|
59
|
+
<div class="smrt-account-list__root" role="list" aria-label={t(M['messages.account_list.accounts'])} data-smrt-component="AccountList">
|
|
60
60
|
{#if loading}
|
|
61
|
-
<div class="
|
|
61
|
+
<div class="smrt-account-list__message" role="status" aria-live="polite" data-smrt-part="message">
|
|
62
62
|
<p>{t(M['messages.account_list.loading'])}</p>
|
|
63
63
|
</div>
|
|
64
64
|
{:else if accounts.length === 0}
|
|
65
|
-
<div class="
|
|
65
|
+
<div class="smrt-account-list__empty" role="status" aria-live="polite" data-smrt-part="empty">
|
|
66
66
|
<p>{t(M['messages.account_list.empty'])}</p>
|
|
67
67
|
</div>
|
|
68
68
|
{:else}
|
|
@@ -91,17 +91,23 @@ function handleAccountKeydown(event: KeyboardEvent, account: AccountData) {
|
|
|
91
91
|
|
|
92
92
|
<style>
|
|
93
93
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
94
|
+
@layer smrt.structure {
|
|
95
|
+
.smrt-account-list__message,
|
|
96
|
+
.smrt-account-list__empty {
|
|
97
|
+
padding: var(--smrt-spacing-3xl, 3rem);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
94
101
|
@layer smrt.theme {
|
|
95
|
-
.
|
|
96
|
-
.
|
|
102
|
+
.smrt-account-list__message,
|
|
103
|
+
.smrt-account-list__empty {
|
|
97
104
|
text-align: center;
|
|
98
|
-
padding: var(--smrt-spacing-3xl, 3rem);
|
|
99
105
|
color: var(--smrt-color-on-surface-variant);
|
|
100
106
|
}
|
|
101
|
-
|
|
102
|
-
.
|
|
103
|
-
.empty p {
|
|
107
|
+
.smrt-account-list__message p,
|
|
108
|
+
.smrt-account-list__empty p {
|
|
104
109
|
font: var(--smrt-typography-body-large-font, 1.125rem / 1.5 sans-serif);
|
|
105
110
|
}
|
|
106
111
|
}
|
|
112
|
+
|
|
107
113
|
</style>
|
|
@@ -42,82 +42,97 @@ const _formattedSize = $derived.by(() => {
|
|
|
42
42
|
onclick={() => onclick?.(attachment)}
|
|
43
43
|
title={`${attachment.filename} (${_formattedSize})`}
|
|
44
44
|
>
|
|
45
|
-
<span class="icon">{_icon}</span>
|
|
46
|
-
<span class="
|
|
47
|
-
<span class="
|
|
45
|
+
<span class="smrt-attachment-chip__icon" data-smrt-part="icon">{_icon}</span>
|
|
46
|
+
<span class="smrt-attachment-chip__name" data-smrt-part="title">{attachment.filename}</span>
|
|
47
|
+
<span class="smrt-attachment-chip__size" data-smrt-part="meta">{_formattedSize}</span>
|
|
48
48
|
</Button>
|
|
49
49
|
{:else}
|
|
50
|
-
<span class="
|
|
51
|
-
<span class="icon">{_icon}</span>
|
|
52
|
-
<span class="
|
|
53
|
-
<span class="
|
|
50
|
+
<span class="smrt-attachment-chip__root" title={`${attachment.filename} (${_formattedSize})`} data-smrt-component="AttachmentChip">
|
|
51
|
+
<span class="smrt-attachment-chip__icon" data-smrt-part="icon">{_icon}</span>
|
|
52
|
+
<span class="smrt-attachment-chip__name" data-smrt-part="title">{attachment.filename}</span>
|
|
53
|
+
<span class="smrt-attachment-chip__size" data-smrt-part="meta">{_formattedSize}</span>
|
|
54
54
|
</span>
|
|
55
55
|
{/if}
|
|
56
56
|
|
|
57
57
|
<style>
|
|
58
58
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
59
|
-
@layer smrt.
|
|
60
|
-
.
|
|
59
|
+
@layer smrt.structure {
|
|
60
|
+
.smrt-attachment-chip__root {
|
|
61
61
|
display: inline-flex;
|
|
62
62
|
align-items: center;
|
|
63
63
|
gap: 0.375rem;
|
|
64
64
|
padding: 0.25rem 0.625rem;
|
|
65
|
-
border-radius: var(--smrt-radius-small, 0.25rem);
|
|
66
|
-
background: var(--smrt-color-surface-variant);
|
|
67
|
-
color: var(--smrt-color-on-surface-variant);
|
|
68
|
-
font: var(--smrt-typography-label-medium-font, 500 0.75rem / 1.33 sans-serif);
|
|
69
|
-
border: none;
|
|
70
65
|
cursor: default;
|
|
71
66
|
max-width: 200px;
|
|
72
67
|
}
|
|
73
|
-
|
|
74
68
|
/*
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
* The interactive chip now renders through smrt-ui's <Button variant="ghost">.
|
|
70
|
+
* The <button> is emitted inside the Button child carrying Button's scope hash,
|
|
71
|
+
* so the local `.smrt-attachment-chip__root` rule above no longer reaches it. `:global(.chip--button)`
|
|
72
|
+
* pierces that scope to give the button the same chip styling plus the
|
|
73
|
+
* pressable affordances; `chip--button` is a non-colliding modifier (issue
|
|
74
|
+
* #1589). The non-interactive `<span class="smrt-attachment-chip__root">` branch still uses the
|
|
75
|
+
* scoped `.smrt-attachment-chip__root` rule above.
|
|
76
|
+
*/
|
|
83
77
|
:global(.chip.chip--button) {
|
|
84
78
|
display: inline-flex;
|
|
85
79
|
align-items: center;
|
|
86
80
|
gap: 0.375rem;
|
|
87
81
|
padding: 0.25rem 0.625rem;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
max-width: 200px;
|
|
84
|
+
}
|
|
85
|
+
.smrt-attachment-chip__icon {
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
}
|
|
88
|
+
.smrt-attachment-chip__name {
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
}
|
|
93
|
+
.smrt-attachment-chip__size {
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@layer smrt.theme {
|
|
99
|
+
.smrt-attachment-chip__root {
|
|
100
|
+
border-radius: var(--smrt-radius-small, 0.25rem);
|
|
101
|
+
background: var(--smrt-color-surface-variant);
|
|
102
|
+
color: var(--smrt-color-on-surface-variant);
|
|
103
|
+
font: var(--smrt-typography-label-medium-font, 500 0.75rem / 1.33 sans-serif);
|
|
104
|
+
border: none;
|
|
105
|
+
}
|
|
106
|
+
/*
|
|
107
|
+
* The interactive chip now renders through smrt-ui's <Button variant="ghost">.
|
|
108
|
+
* The <button> is emitted inside the Button child carrying Button's scope hash,
|
|
109
|
+
* so the local `.smrt-attachment-chip__root` rule above no longer reaches it. `:global(.chip--button)`
|
|
110
|
+
* pierces that scope to give the button the same chip styling plus the
|
|
111
|
+
* pressable affordances; `chip--button` is a non-colliding modifier (issue
|
|
112
|
+
* #1589). The non-interactive `<span class="smrt-attachment-chip__root">` branch still uses the
|
|
113
|
+
* scoped `.smrt-attachment-chip__root` rule above.
|
|
114
|
+
*/
|
|
115
|
+
:global(.chip.chip--button) {
|
|
88
116
|
border-radius: var(--smrt-radius-small, 0.25rem);
|
|
89
117
|
background: var(--smrt-color-surface-variant);
|
|
90
118
|
color: var(--smrt-color-on-surface-variant);
|
|
91
119
|
font: var(--smrt-typography-label-medium-font, 500 0.75rem / 1.33 sans-serif);
|
|
92
|
-
cursor: pointer;
|
|
93
|
-
max-width: 200px;
|
|
94
120
|
transition: background var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
|
|
95
121
|
}
|
|
96
|
-
|
|
97
122
|
:global(.chip.chip--button):hover {
|
|
98
123
|
background: color-mix(in srgb, var(--smrt-color-surface-variant) 92%, var(--smrt-color-shadow));
|
|
99
124
|
}
|
|
100
|
-
|
|
101
125
|
:global(.chip.chip--button):focus-visible {
|
|
102
126
|
outline: 2px solid var(--smrt-color-primary);
|
|
103
127
|
outline-offset: 1px;
|
|
104
128
|
}
|
|
105
|
-
|
|
106
|
-
.icon {
|
|
107
|
-
flex-shrink: 0;
|
|
129
|
+
.smrt-attachment-chip__icon {
|
|
108
130
|
font-size: var(--smrt-typography-label-large-size, 0.875rem);
|
|
109
131
|
}
|
|
110
|
-
|
|
111
|
-
.name {
|
|
112
|
-
overflow: hidden;
|
|
113
|
-
text-overflow: ellipsis;
|
|
114
|
-
white-space: nowrap;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.size {
|
|
118
|
-
flex-shrink: 0;
|
|
132
|
+
.smrt-attachment-chip__size {
|
|
119
133
|
opacity: 0.7;
|
|
120
134
|
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
121
135
|
}
|
|
122
136
|
}
|
|
137
|
+
|
|
123
138
|
</style>
|