@fieldia/chatter 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/package.json +39 -0
  4. package/src/index.d.mts +6 -0
  5. package/src/index.d.ts +6 -0
  6. package/src/index.js +10 -0
  7. package/src/index.js.map +1 -0
  8. package/src/index.mjs +7 -0
  9. package/src/index.mjs.map +1 -0
  10. package/src/lib/activities.d.mts +19 -0
  11. package/src/lib/activities.d.ts +19 -0
  12. package/src/lib/activities.js +145 -0
  13. package/src/lib/activities.js.map +1 -0
  14. package/src/lib/activities.mjs +140 -0
  15. package/src/lib/activities.mjs.map +1 -0
  16. package/src/lib/attachments.d.mts +19 -0
  17. package/src/lib/attachments.d.ts +19 -0
  18. package/src/lib/attachments.js +93 -0
  19. package/src/lib/attachments.js.map +1 -0
  20. package/src/lib/attachments.mjs +89 -0
  21. package/src/lib/attachments.mjs.map +1 -0
  22. package/src/lib/chatter.d.mts +45 -0
  23. package/src/lib/chatter.d.ts +45 -0
  24. package/src/lib/chatter.js +222 -0
  25. package/src/lib/chatter.js.map +1 -0
  26. package/src/lib/chatter.mjs +217 -0
  27. package/src/lib/chatter.mjs.map +1 -0
  28. package/src/lib/followers.d.mts +15 -0
  29. package/src/lib/followers.d.ts +15 -0
  30. package/src/lib/followers.js +96 -0
  31. package/src/lib/followers.js.map +1 -0
  32. package/src/lib/followers.mjs +93 -0
  33. package/src/lib/followers.mjs.map +1 -0
  34. package/src/lib/labels.d.mts +43 -0
  35. package/src/lib/labels.d.ts +43 -0
  36. package/src/lib/labels.js +166 -0
  37. package/src/lib/labels.js.map +1 -0
  38. package/src/lib/labels.mjs +163 -0
  39. package/src/lib/labels.mjs.map +1 -0
  40. package/src/lib/memory.d.mts +22 -0
  41. package/src/lib/memory.d.ts +22 -0
  42. package/src/lib/memory.js +131 -0
  43. package/src/lib/memory.js.map +1 -0
  44. package/src/lib/memory.mjs +128 -0
  45. package/src/lib/memory.mjs.map +1 -0
  46. package/src/lib/mentions.d.mts +18 -0
  47. package/src/lib/mentions.d.ts +18 -0
  48. package/src/lib/mentions.js +94 -0
  49. package/src/lib/mentions.js.map +1 -0
  50. package/src/lib/mentions.mjs +90 -0
  51. package/src/lib/mentions.mjs.map +1 -0
  52. package/src/lib/reactions.d.mts +10 -0
  53. package/src/lib/reactions.d.ts +10 -0
  54. package/src/lib/reactions.js +53 -0
  55. package/src/lib/reactions.js.map +1 -0
  56. package/src/lib/reactions.mjs +49 -0
  57. package/src/lib/reactions.mjs.map +1 -0
  58. package/src/lib/slot.d.mts +17 -0
  59. package/src/lib/slot.d.ts +17 -0
  60. package/src/lib/slot.js +37 -0
  61. package/src/lib/slot.js.map +1 -0
  62. package/src/lib/slot.mjs +34 -0
  63. package/src/lib/slot.mjs.map +1 -0
  64. package/src/lib/source.d.mts +114 -0
  65. package/src/lib/source.d.ts +114 -0
  66. package/src/lib/source.js +9 -0
  67. package/src/lib/source.js.map +1 -0
  68. package/src/lib/source.mjs +8 -0
  69. package/src/lib/source.mjs.map +1 -0
  70. package/src/lib/styles.d.mts +4 -0
  71. package/src/lib/styles.d.ts +4 -0
  72. package/src/lib/styles.js +108 -0
  73. package/src/lib/styles.js.map +1 -0
  74. package/src/lib/styles.mjs +104 -0
  75. package/src/lib/styles.mjs.map +1 -0
@@ -0,0 +1,114 @@
1
+ /**
2
+ * How the chatter reaches the server: an object the app writes for its own
3
+ * backend, as it writes a data source. Reading and posting messages are all a
4
+ * chatter needs; each other method adds a part (uploads, reactions, mentions,
5
+ * activities, followers), and a part whose method is missing is not shown.
6
+ */
7
+ export type ChatterId = string | number;
8
+ /** The record the conversation is about. */
9
+ export interface RecordRef {
10
+ model: string;
11
+ id: ChatterId;
12
+ }
13
+ export interface Person {
14
+ id: ChatterId;
15
+ name: string;
16
+ /** An image address; without one, the person's initials stand in. */
17
+ avatar?: string | null;
18
+ }
19
+ export interface Attachment {
20
+ id: ChatterId;
21
+ name: string;
22
+ /** Its media type, such as `image/png`: an image gets a preview. */
23
+ type: string;
24
+ size: number;
25
+ /** Where to open or download it. */
26
+ url?: string | null;
27
+ }
28
+ export interface Reaction {
29
+ emoji: string;
30
+ count: number;
31
+ /** Whether the person using the chatter is among those who reacted. */
32
+ mine: boolean;
33
+ }
34
+ /** A field's change, as a record's history keeps it. */
35
+ export interface TrackedChange {
36
+ field: string;
37
+ label: string;
38
+ from: string | null;
39
+ to: string | null;
40
+ }
41
+ export interface ChatterMessage {
42
+ id: ChatterId;
43
+ /** A message the record's followers get, a note for the team only, or an event such as a tracked change. */
44
+ kind: 'message' | 'note' | 'event';
45
+ author: Person | null;
46
+ /** When it was posted, as an ISO date and time. */
47
+ date: string;
48
+ /** HTML. The chatter cleans it before it shows it. */
49
+ body: string;
50
+ tracking?: TrackedChange[];
51
+ attachments?: Attachment[];
52
+ reactions?: Reaction[];
53
+ /** The message this one answers. */
54
+ parentId?: ChatterId | null;
55
+ /** The people it @mentions. */
56
+ mentions?: Person[];
57
+ }
58
+ export interface NewMessage {
59
+ kind: 'message' | 'note';
60
+ /** HTML made from what was typed, every character escaped. */
61
+ body: string;
62
+ attachments?: Attachment[];
63
+ parentId?: ChatterId | null;
64
+ /** The people @mentioned. */
65
+ mentions?: Person[];
66
+ }
67
+ export interface ActivityType {
68
+ id: ChatterId;
69
+ name: string;
70
+ /** An icon by name, one of Fieldia's own or the app's. */
71
+ icon?: string;
72
+ /** Days from today an activity of this type is due, unless a date is chosen. */
73
+ daysUntilDue?: number;
74
+ }
75
+ export interface Activity {
76
+ id: ChatterId;
77
+ type: ActivityType;
78
+ summary?: string | null;
79
+ note?: string | null;
80
+ /** The day it is due: `YYYY-MM-DD`. */
81
+ due: string;
82
+ assignee: Person;
83
+ }
84
+ export interface NewActivity {
85
+ typeId: ChatterId;
86
+ summary?: string;
87
+ note?: string;
88
+ due: string;
89
+ assigneeId: ChatterId;
90
+ }
91
+ export interface Follower {
92
+ id: ChatterId;
93
+ person: Person;
94
+ }
95
+ export interface ChatterSource {
96
+ /** The record's messages, notes and events, newest first. */
97
+ messages(record: RecordRef): Promise<ChatterMessage[]>;
98
+ post(record: RecordRef, message: NewMessage): Promise<ChatterMessage>;
99
+ /** Store a file, to send with a message. */
100
+ upload?(record: RecordRef, file: File): Promise<Attachment>;
101
+ /** Add the person's reaction, or take it away when it is there already. Returns the message's reactions. */
102
+ react?(record: RecordRef, messageId: ChatterId, emoji: string): Promise<Reaction[]>;
103
+ /** People to @mention, to give an activity to, or to add as followers. */
104
+ people?(query: string): Promise<Person[]>;
105
+ activityTypes?(): Promise<ActivityType[]>;
106
+ activities?(record: RecordRef): Promise<Activity[]>;
107
+ schedule?(record: RecordRef, activity: NewActivity): Promise<Activity>;
108
+ /** Done, with what came of it: the backend usually posts it as a message. */
109
+ markDone?(record: RecordRef, activityId: ChatterId, feedback?: string): Promise<void>;
110
+ cancel?(record: RecordRef, activityId: ChatterId): Promise<void>;
111
+ followers?(record: RecordRef): Promise<Follower[]>;
112
+ follow?(record: RecordRef, personId: ChatterId): Promise<Follower>;
113
+ unfollow?(record: RecordRef, followerId: ChatterId): Promise<void>;
114
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * How the chatter reaches the server: an object the app writes for its own
4
+ * backend, as it writes a data source. Reading and posting messages are all a
5
+ * chatter needs; each other method adds a part (uploads, reactions, mentions,
6
+ * activities, followers), and a part whose method is missing is not shown.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../../libs/chatter/src/lib/source.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * How the chatter reaches the server: an object the app writes for its own
3
+ * backend, as it writes a data source. Reading and posting messages are all a
4
+ * chatter needs; each other method adds a part (uploads, reactions, mentions,
5
+ * activities, followers), and a part whose method is missing is not shown.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=source.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.mjs","sourceRoot":"","sources":["../../../../../libs/chatter/src/lib/source.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,4 @@
1
+ /** The chatter's look, on the same tokens as the form beside it. */
2
+ export declare const CHATTER_STYLES = "\n.fd-chatter { display: grid; gap: 14px; font-family: var(--fd-font); color: var(--fd-text); font-size: 14px; min-width: 0; }\n.fd-chatter [hidden] { display: none !important; }\n.fd-chatter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }\n.fd-chatter-bar .fd-spacer { flex: 1; }\n.fd-chatter-waiting, .fd-chatter-empty { margin: 0; color: var(--fd-muted); }\n.fd-composer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-composer textarea { resize: vertical; min-height: 64px; font: inherit; }\n.fd-composer-note { background: var(--fd-warning-soft); }\n.fd-composer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }\n.fd-chatter-problem { margin: 0; color: var(--fd-error); font-size: 13px; }\n.fd-chatter-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }\n.fd-message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: var(--fd-radius); }\n.fd-message-note { background: var(--fd-warning-soft); }\n.fd-message-event { color: var(--fd-muted); font-size: 13px; }\n.fd-avatar-image, .fd-avatar-initials { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }\n.fd-avatar-initials { display: grid; place-items: center; background: var(--fd-accent-soft); color: var(--fd-accent); font-weight: 650; font-size: 13px; }\n.fd-message-content { display: grid; gap: 4px; min-width: 0; }\n.fd-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }\n.fd-message-author { font-weight: 650; }\n.fd-message-head time { color: var(--fd-muted); font-size: 12.5px; }\n.fd-message-kind { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fd-warning); }\n.fd-message-body { overflow-wrap: anywhere; line-height: 1.5; }\n.fd-message-body p { margin: 0 0 6px; }\n.fd-message-body p:last-child { margin-bottom: 0; }\n.fd-message-body img { max-width: 100%; height: auto; }\n.fd-tracking { margin: 0; padding-inline-start: 18px; color: var(--fd-text); }\n.fd-composer-actions .fd-spacer { flex: 1; }\n.fd-attach .fd-icon { width: 1.1em; height: 1.1em; margin-inline-end: 0.35em; vertical-align: -0.2em; }\n.fd-attachments { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }\n.fd-attachment { position: relative; display: flex; align-items: center; gap: 4px; }\n.fd-attachment-image img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: var(--fd-radius); border: 1px solid var(--fd-border); }\n.fd-attachment-file {\n display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius);\n background: var(--fd-surface); color: var(--fd-text); text-decoration: none; max-width: 240px;\n}\na.fd-attachment-file:hover { border-color: var(--fd-accent); }\n.fd-attachment-file .fd-icon { width: 20px; height: 20px; color: var(--fd-muted); flex: none; }\n.fd-attachment-words { display: grid; min-width: 0; }\n.fd-attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }\n.fd-attachment-size { color: var(--fd-muted); font-size: 12px; }\n.fd-attachment-remove { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }\n.fd-attachment-remove:hover { color: var(--fd-text); background: var(--fd-page); }\n.fd-replying, .fd-message-parent { margin: 0; color: var(--fd-muted); font-size: 12.5px; }\n.fd-message-parent::before, .fd-replying::before { content: \"\u21A9 \"; }\n.fd-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }\n.fd-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; }\n.fd-reaction, .fd-reaction-add, .fd-message-reply, .fd-reaction-picker button {\n font: inherit; font-size: 13px; line-height: 1; padding: 4px 8px; border-radius: 999px; cursor: pointer;\n border: 1px solid var(--fd-border); background: var(--fd-surface); color: var(--fd-muted);\n}\n.fd-reaction[aria-pressed=\"true\"] { border-color: var(--fd-accent); background: var(--fd-accent-soft); color: var(--fd-text); }\n.fd-reaction-add, .fd-message-reply { opacity: 0.75; }\n.fd-message:hover .fd-reaction-add, .fd-message:hover .fd-message-reply, .fd-reaction-add:focus-visible, .fd-message-reply:focus-visible { opacity: 1; }\n.fd-reaction-picker { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--fd-border); border-radius: 999px; background: var(--fd-surface); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }\n.fd-reaction-picker button { border: none; padding: 4px 6px; font-size: 16px; }\n.fd-reaction-picker button:hover { background: var(--fd-page); }\n.fd-mentions { list-style: none; margin: 0; padding: 4px 0; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); max-width: 280px; box-shadow: 0 6px 18px rgba(0,0,0,0.1); }\n.fd-mentions [role=option] { padding: 6px 12px; cursor: pointer; }\n.fd-mentions [role=option].fd-active, .fd-mentions [role=option]:hover { background: var(--fd-accent-soft); }\n.fd-mentions .fd-empty { padding: 6px 12px; color: var(--fd-muted); }\n.fd-activities { display: grid; gap: 8px; }\n.fd-activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }\n.fd-activity { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-activity-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--fd-success); }\n.fd-activity[data-when=\"overdue\"] .fd-activity-icon { background: var(--fd-error); }\n.fd-activity[data-when=\"today\"] .fd-activity-icon { background: #d97706; }\n.fd-activity-icon .fd-icon { width: 16px; height: 16px; }\n.fd-activity-content { display: grid; min-width: 0; }\n.fd-activity-summary { font-weight: 600; }\n.fd-activity-meta { color: var(--fd-muted); font-size: 12.5px; }\n.fd-activity[data-when=\"overdue\"] .fd-activity-due { color: var(--fd-error); font-weight: 600; }\n.fd-activity[data-when=\"today\"] .fd-activity-due { color: #b45309; font-weight: 600; }\n/* Under the summary, where a narrow side panel has room for them. */\n.fd-activity-actions { grid-column: 2; display: flex; gap: 2px 12px; flex-wrap: wrap; }\n.fd-activity-actions .fd-button-link { padding: 0; min-height: 0; font-size: 13px; }\n.fd-activity-finish { grid-column: 2; display: grid; gap: 6px; margin-block-start: 4px; }\n.fd-activity-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-activity-form .fd-composer-actions { grid-column: 1 / -1; }\n.fd-activity-field { display: grid; gap: 4px; font-size: 13px; color: var(--fd-muted); }\n.fd-followers-toggle { display: inline-flex; align-items: center; gap: 6px; }\n.fd-followers-toggle .fd-icon { width: 1.1em; height: 1.1em; }\n.fd-followers { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-follower-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }\n.fd-follower { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }\n.fd-followers-none { margin: 0; color: var(--fd-muted); }\n.fd-followers-add { display: grid; gap: 6px; border-block-start: 1px solid var(--fd-border); padding-block-start: 8px; }\n.fd-followers-add-title { font-size: 12.5px; color: var(--fd-muted); }\n.fd-follower-candidates { list-style: none; margin: 0; padding: 0; }\n.fd-follower-candidates [role=option] { padding: 6px 8px; border-radius: 4px; cursor: pointer; }\n.fd-follower-candidates [role=option]:hover { background: var(--fd-accent-soft); }\n.fd-follower-candidates .fd-empty { padding: 6px 8px; color: var(--fd-muted); }\n";
3
+ /** Puts the chatter's look in the document once. */
4
+ export declare function installChatterStyles(doc: Document): void;
@@ -0,0 +1,4 @@
1
+ /** The chatter's look, on the same tokens as the form beside it. */
2
+ export declare const CHATTER_STYLES = "\n.fd-chatter { display: grid; gap: 14px; font-family: var(--fd-font); color: var(--fd-text); font-size: 14px; min-width: 0; }\n.fd-chatter [hidden] { display: none !important; }\n.fd-chatter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }\n.fd-chatter-bar .fd-spacer { flex: 1; }\n.fd-chatter-waiting, .fd-chatter-empty { margin: 0; color: var(--fd-muted); }\n.fd-composer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-composer textarea { resize: vertical; min-height: 64px; font: inherit; }\n.fd-composer-note { background: var(--fd-warning-soft); }\n.fd-composer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }\n.fd-chatter-problem { margin: 0; color: var(--fd-error); font-size: 13px; }\n.fd-chatter-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }\n.fd-message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: var(--fd-radius); }\n.fd-message-note { background: var(--fd-warning-soft); }\n.fd-message-event { color: var(--fd-muted); font-size: 13px; }\n.fd-avatar-image, .fd-avatar-initials { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }\n.fd-avatar-initials { display: grid; place-items: center; background: var(--fd-accent-soft); color: var(--fd-accent); font-weight: 650; font-size: 13px; }\n.fd-message-content { display: grid; gap: 4px; min-width: 0; }\n.fd-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }\n.fd-message-author { font-weight: 650; }\n.fd-message-head time { color: var(--fd-muted); font-size: 12.5px; }\n.fd-message-kind { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fd-warning); }\n.fd-message-body { overflow-wrap: anywhere; line-height: 1.5; }\n.fd-message-body p { margin: 0 0 6px; }\n.fd-message-body p:last-child { margin-bottom: 0; }\n.fd-message-body img { max-width: 100%; height: auto; }\n.fd-tracking { margin: 0; padding-inline-start: 18px; color: var(--fd-text); }\n.fd-composer-actions .fd-spacer { flex: 1; }\n.fd-attach .fd-icon { width: 1.1em; height: 1.1em; margin-inline-end: 0.35em; vertical-align: -0.2em; }\n.fd-attachments { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }\n.fd-attachment { position: relative; display: flex; align-items: center; gap: 4px; }\n.fd-attachment-image img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: var(--fd-radius); border: 1px solid var(--fd-border); }\n.fd-attachment-file {\n display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius);\n background: var(--fd-surface); color: var(--fd-text); text-decoration: none; max-width: 240px;\n}\na.fd-attachment-file:hover { border-color: var(--fd-accent); }\n.fd-attachment-file .fd-icon { width: 20px; height: 20px; color: var(--fd-muted); flex: none; }\n.fd-attachment-words { display: grid; min-width: 0; }\n.fd-attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }\n.fd-attachment-size { color: var(--fd-muted); font-size: 12px; }\n.fd-attachment-remove { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }\n.fd-attachment-remove:hover { color: var(--fd-text); background: var(--fd-page); }\n.fd-replying, .fd-message-parent { margin: 0; color: var(--fd-muted); font-size: 12.5px; }\n.fd-message-parent::before, .fd-replying::before { content: \"\u21A9 \"; }\n.fd-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }\n.fd-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; }\n.fd-reaction, .fd-reaction-add, .fd-message-reply, .fd-reaction-picker button {\n font: inherit; font-size: 13px; line-height: 1; padding: 4px 8px; border-radius: 999px; cursor: pointer;\n border: 1px solid var(--fd-border); background: var(--fd-surface); color: var(--fd-muted);\n}\n.fd-reaction[aria-pressed=\"true\"] { border-color: var(--fd-accent); background: var(--fd-accent-soft); color: var(--fd-text); }\n.fd-reaction-add, .fd-message-reply { opacity: 0.75; }\n.fd-message:hover .fd-reaction-add, .fd-message:hover .fd-message-reply, .fd-reaction-add:focus-visible, .fd-message-reply:focus-visible { opacity: 1; }\n.fd-reaction-picker { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--fd-border); border-radius: 999px; background: var(--fd-surface); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }\n.fd-reaction-picker button { border: none; padding: 4px 6px; font-size: 16px; }\n.fd-reaction-picker button:hover { background: var(--fd-page); }\n.fd-mentions { list-style: none; margin: 0; padding: 4px 0; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); max-width: 280px; box-shadow: 0 6px 18px rgba(0,0,0,0.1); }\n.fd-mentions [role=option] { padding: 6px 12px; cursor: pointer; }\n.fd-mentions [role=option].fd-active, .fd-mentions [role=option]:hover { background: var(--fd-accent-soft); }\n.fd-mentions .fd-empty { padding: 6px 12px; color: var(--fd-muted); }\n.fd-activities { display: grid; gap: 8px; }\n.fd-activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }\n.fd-activity { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-activity-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--fd-success); }\n.fd-activity[data-when=\"overdue\"] .fd-activity-icon { background: var(--fd-error); }\n.fd-activity[data-when=\"today\"] .fd-activity-icon { background: #d97706; }\n.fd-activity-icon .fd-icon { width: 16px; height: 16px; }\n.fd-activity-content { display: grid; min-width: 0; }\n.fd-activity-summary { font-weight: 600; }\n.fd-activity-meta { color: var(--fd-muted); font-size: 12.5px; }\n.fd-activity[data-when=\"overdue\"] .fd-activity-due { color: var(--fd-error); font-weight: 600; }\n.fd-activity[data-when=\"today\"] .fd-activity-due { color: #b45309; font-weight: 600; }\n/* Under the summary, where a narrow side panel has room for them. */\n.fd-activity-actions { grid-column: 2; display: flex; gap: 2px 12px; flex-wrap: wrap; }\n.fd-activity-actions .fd-button-link { padding: 0; min-height: 0; font-size: 13px; }\n.fd-activity-finish { grid-column: 2; display: grid; gap: 6px; margin-block-start: 4px; }\n.fd-activity-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-activity-form .fd-composer-actions { grid-column: 1 / -1; }\n.fd-activity-field { display: grid; gap: 4px; font-size: 13px; color: var(--fd-muted); }\n.fd-followers-toggle { display: inline-flex; align-items: center; gap: 6px; }\n.fd-followers-toggle .fd-icon { width: 1.1em; height: 1.1em; }\n.fd-followers { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }\n.fd-follower-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }\n.fd-follower { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }\n.fd-followers-none { margin: 0; color: var(--fd-muted); }\n.fd-followers-add { display: grid; gap: 6px; border-block-start: 1px solid var(--fd-border); padding-block-start: 8px; }\n.fd-followers-add-title { font-size: 12.5px; color: var(--fd-muted); }\n.fd-follower-candidates { list-style: none; margin: 0; padding: 0; }\n.fd-follower-candidates [role=option] { padding: 6px 8px; border-radius: 4px; cursor: pointer; }\n.fd-follower-candidates [role=option]:hover { background: var(--fd-accent-soft); }\n.fd-follower-candidates .fd-empty { padding: 6px 8px; color: var(--fd-muted); }\n";
3
+ /** Puts the chatter's look in the document once. */
4
+ export declare function installChatterStyles(doc: Document): void;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHATTER_STYLES = void 0;
4
+ exports.installChatterStyles = installChatterStyles;
5
+ /** The chatter's look, on the same tokens as the form beside it. */
6
+ exports.CHATTER_STYLES = `
7
+ .fd-chatter { display: grid; gap: 14px; font-family: var(--fd-font); color: var(--fd-text); font-size: 14px; min-width: 0; }
8
+ .fd-chatter [hidden] { display: none !important; }
9
+ .fd-chatter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
10
+ .fd-chatter-bar .fd-spacer { flex: 1; }
11
+ .fd-chatter-waiting, .fd-chatter-empty { margin: 0; color: var(--fd-muted); }
12
+ .fd-composer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
13
+ .fd-composer textarea { resize: vertical; min-height: 64px; font: inherit; }
14
+ .fd-composer-note { background: var(--fd-warning-soft); }
15
+ .fd-composer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
16
+ .fd-chatter-problem { margin: 0; color: var(--fd-error); font-size: 13px; }
17
+ .fd-chatter-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
18
+ .fd-message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: var(--fd-radius); }
19
+ .fd-message-note { background: var(--fd-warning-soft); }
20
+ .fd-message-event { color: var(--fd-muted); font-size: 13px; }
21
+ .fd-avatar-image, .fd-avatar-initials { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
22
+ .fd-avatar-initials { display: grid; place-items: center; background: var(--fd-accent-soft); color: var(--fd-accent); font-weight: 650; font-size: 13px; }
23
+ .fd-message-content { display: grid; gap: 4px; min-width: 0; }
24
+ .fd-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
25
+ .fd-message-author { font-weight: 650; }
26
+ .fd-message-head time { color: var(--fd-muted); font-size: 12.5px; }
27
+ .fd-message-kind { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fd-warning); }
28
+ .fd-message-body { overflow-wrap: anywhere; line-height: 1.5; }
29
+ .fd-message-body p { margin: 0 0 6px; }
30
+ .fd-message-body p:last-child { margin-bottom: 0; }
31
+ .fd-message-body img { max-width: 100%; height: auto; }
32
+ .fd-tracking { margin: 0; padding-inline-start: 18px; color: var(--fd-text); }
33
+ .fd-composer-actions .fd-spacer { flex: 1; }
34
+ .fd-attach .fd-icon { width: 1.1em; height: 1.1em; margin-inline-end: 0.35em; vertical-align: -0.2em; }
35
+ .fd-attachments { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
36
+ .fd-attachment { position: relative; display: flex; align-items: center; gap: 4px; }
37
+ .fd-attachment-image img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: var(--fd-radius); border: 1px solid var(--fd-border); }
38
+ .fd-attachment-file {
39
+ display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius);
40
+ background: var(--fd-surface); color: var(--fd-text); text-decoration: none; max-width: 240px;
41
+ }
42
+ a.fd-attachment-file:hover { border-color: var(--fd-accent); }
43
+ .fd-attachment-file .fd-icon { width: 20px; height: 20px; color: var(--fd-muted); flex: none; }
44
+ .fd-attachment-words { display: grid; min-width: 0; }
45
+ .fd-attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
46
+ .fd-attachment-size { color: var(--fd-muted); font-size: 12px; }
47
+ .fd-attachment-remove { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
48
+ .fd-attachment-remove:hover { color: var(--fd-text); background: var(--fd-page); }
49
+ .fd-replying, .fd-message-parent { margin: 0; color: var(--fd-muted); font-size: 12.5px; }
50
+ .fd-message-parent::before, .fd-replying::before { content: "↩ "; }
51
+ .fd-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
52
+ .fd-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; }
53
+ .fd-reaction, .fd-reaction-add, .fd-message-reply, .fd-reaction-picker button {
54
+ font: inherit; font-size: 13px; line-height: 1; padding: 4px 8px; border-radius: 999px; cursor: pointer;
55
+ border: 1px solid var(--fd-border); background: var(--fd-surface); color: var(--fd-muted);
56
+ }
57
+ .fd-reaction[aria-pressed="true"] { border-color: var(--fd-accent); background: var(--fd-accent-soft); color: var(--fd-text); }
58
+ .fd-reaction-add, .fd-message-reply { opacity: 0.75; }
59
+ .fd-message:hover .fd-reaction-add, .fd-message:hover .fd-message-reply, .fd-reaction-add:focus-visible, .fd-message-reply:focus-visible { opacity: 1; }
60
+ .fd-reaction-picker { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--fd-border); border-radius: 999px; background: var(--fd-surface); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
61
+ .fd-reaction-picker button { border: none; padding: 4px 6px; font-size: 16px; }
62
+ .fd-reaction-picker button:hover { background: var(--fd-page); }
63
+ .fd-mentions { list-style: none; margin: 0; padding: 4px 0; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); max-width: 280px; box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
64
+ .fd-mentions [role=option] { padding: 6px 12px; cursor: pointer; }
65
+ .fd-mentions [role=option].fd-active, .fd-mentions [role=option]:hover { background: var(--fd-accent-soft); }
66
+ .fd-mentions .fd-empty { padding: 6px 12px; color: var(--fd-muted); }
67
+ .fd-activities { display: grid; gap: 8px; }
68
+ .fd-activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
69
+ .fd-activity { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
70
+ .fd-activity-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--fd-success); }
71
+ .fd-activity[data-when="overdue"] .fd-activity-icon { background: var(--fd-error); }
72
+ .fd-activity[data-when="today"] .fd-activity-icon { background: #d97706; }
73
+ .fd-activity-icon .fd-icon { width: 16px; height: 16px; }
74
+ .fd-activity-content { display: grid; min-width: 0; }
75
+ .fd-activity-summary { font-weight: 600; }
76
+ .fd-activity-meta { color: var(--fd-muted); font-size: 12.5px; }
77
+ .fd-activity[data-when="overdue"] .fd-activity-due { color: var(--fd-error); font-weight: 600; }
78
+ .fd-activity[data-when="today"] .fd-activity-due { color: #b45309; font-weight: 600; }
79
+ /* Under the summary, where a narrow side panel has room for them. */
80
+ .fd-activity-actions { grid-column: 2; display: flex; gap: 2px 12px; flex-wrap: wrap; }
81
+ .fd-activity-actions .fd-button-link { padding: 0; min-height: 0; font-size: 13px; }
82
+ .fd-activity-finish { grid-column: 2; display: grid; gap: 6px; margin-block-start: 4px; }
83
+ .fd-activity-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
84
+ .fd-activity-form .fd-composer-actions { grid-column: 1 / -1; }
85
+ .fd-activity-field { display: grid; gap: 4px; font-size: 13px; color: var(--fd-muted); }
86
+ .fd-followers-toggle { display: inline-flex; align-items: center; gap: 6px; }
87
+ .fd-followers-toggle .fd-icon { width: 1.1em; height: 1.1em; }
88
+ .fd-followers { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
89
+ .fd-follower-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
90
+ .fd-follower { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
91
+ .fd-followers-none { margin: 0; color: var(--fd-muted); }
92
+ .fd-followers-add { display: grid; gap: 6px; border-block-start: 1px solid var(--fd-border); padding-block-start: 8px; }
93
+ .fd-followers-add-title { font-size: 12.5px; color: var(--fd-muted); }
94
+ .fd-follower-candidates { list-style: none; margin: 0; padding: 0; }
95
+ .fd-follower-candidates [role=option] { padding: 6px 8px; border-radius: 4px; cursor: pointer; }
96
+ .fd-follower-candidates [role=option]:hover { background: var(--fd-accent-soft); }
97
+ .fd-follower-candidates .fd-empty { padding: 6px 8px; color: var(--fd-muted); }
98
+ `;
99
+ /** Puts the chatter's look in the document once. */
100
+ function installChatterStyles(doc) {
101
+ if (doc.getElementById('fd-chatter-styles'))
102
+ return;
103
+ const style = doc.createElement('style');
104
+ style.id = 'fd-chatter-styles';
105
+ style.textContent = exports.CHATTER_STYLES;
106
+ doc.head.append(style);
107
+ }
108
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../libs/chatter/src/lib/styles.ts"],"names":[],"mappings":";;;AAgGA,oDAMC;AAtGD,oEAAoE;AACvD,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F7B,CAAC;AAEF,oDAAoD;AACpD,SAAgB,oBAAoB,CAAC,GAAa;IAChD,IAAI,GAAG,CAAC,cAAc,CAAC,mBAAmB,CAAC;QAAE,OAAO;IACpD,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,GAAG,mBAAmB,CAAC;IAC/B,KAAK,CAAC,WAAW,GAAG,sBAAc,CAAC;IACnC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,104 @@
1
+ /** The chatter's look, on the same tokens as the form beside it. */
2
+ export const CHATTER_STYLES = `
3
+ .fd-chatter { display: grid; gap: 14px; font-family: var(--fd-font); color: var(--fd-text); font-size: 14px; min-width: 0; }
4
+ .fd-chatter [hidden] { display: none !important; }
5
+ .fd-chatter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
6
+ .fd-chatter-bar .fd-spacer { flex: 1; }
7
+ .fd-chatter-waiting, .fd-chatter-empty { margin: 0; color: var(--fd-muted); }
8
+ .fd-composer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
9
+ .fd-composer textarea { resize: vertical; min-height: 64px; font: inherit; }
10
+ .fd-composer-note { background: var(--fd-warning-soft); }
11
+ .fd-composer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
12
+ .fd-chatter-problem { margin: 0; color: var(--fd-error); font-size: 13px; }
13
+ .fd-chatter-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
14
+ .fd-message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: var(--fd-radius); }
15
+ .fd-message-note { background: var(--fd-warning-soft); }
16
+ .fd-message-event { color: var(--fd-muted); font-size: 13px; }
17
+ .fd-avatar-image, .fd-avatar-initials { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
18
+ .fd-avatar-initials { display: grid; place-items: center; background: var(--fd-accent-soft); color: var(--fd-accent); font-weight: 650; font-size: 13px; }
19
+ .fd-message-content { display: grid; gap: 4px; min-width: 0; }
20
+ .fd-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
21
+ .fd-message-author { font-weight: 650; }
22
+ .fd-message-head time { color: var(--fd-muted); font-size: 12.5px; }
23
+ .fd-message-kind { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fd-warning); }
24
+ .fd-message-body { overflow-wrap: anywhere; line-height: 1.5; }
25
+ .fd-message-body p { margin: 0 0 6px; }
26
+ .fd-message-body p:last-child { margin-bottom: 0; }
27
+ .fd-message-body img { max-width: 100%; height: auto; }
28
+ .fd-tracking { margin: 0; padding-inline-start: 18px; color: var(--fd-text); }
29
+ .fd-composer-actions .fd-spacer { flex: 1; }
30
+ .fd-attach .fd-icon { width: 1.1em; height: 1.1em; margin-inline-end: 0.35em; vertical-align: -0.2em; }
31
+ .fd-attachments { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
32
+ .fd-attachment { position: relative; display: flex; align-items: center; gap: 4px; }
33
+ .fd-attachment-image img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: var(--fd-radius); border: 1px solid var(--fd-border); }
34
+ .fd-attachment-file {
35
+ display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius);
36
+ background: var(--fd-surface); color: var(--fd-text); text-decoration: none; max-width: 240px;
37
+ }
38
+ a.fd-attachment-file:hover { border-color: var(--fd-accent); }
39
+ .fd-attachment-file .fd-icon { width: 20px; height: 20px; color: var(--fd-muted); flex: none; }
40
+ .fd-attachment-words { display: grid; min-width: 0; }
41
+ .fd-attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
42
+ .fd-attachment-size { color: var(--fd-muted); font-size: 12px; }
43
+ .fd-attachment-remove { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
44
+ .fd-attachment-remove:hover { color: var(--fd-text); background: var(--fd-page); }
45
+ .fd-replying, .fd-message-parent { margin: 0; color: var(--fd-muted); font-size: 12.5px; }
46
+ .fd-message-parent::before, .fd-replying::before { content: "↩ "; }
47
+ .fd-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
48
+ .fd-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; }
49
+ .fd-reaction, .fd-reaction-add, .fd-message-reply, .fd-reaction-picker button {
50
+ font: inherit; font-size: 13px; line-height: 1; padding: 4px 8px; border-radius: 999px; cursor: pointer;
51
+ border: 1px solid var(--fd-border); background: var(--fd-surface); color: var(--fd-muted);
52
+ }
53
+ .fd-reaction[aria-pressed="true"] { border-color: var(--fd-accent); background: var(--fd-accent-soft); color: var(--fd-text); }
54
+ .fd-reaction-add, .fd-message-reply { opacity: 0.75; }
55
+ .fd-message:hover .fd-reaction-add, .fd-message:hover .fd-message-reply, .fd-reaction-add:focus-visible, .fd-message-reply:focus-visible { opacity: 1; }
56
+ .fd-reaction-picker { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--fd-border); border-radius: 999px; background: var(--fd-surface); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
57
+ .fd-reaction-picker button { border: none; padding: 4px 6px; font-size: 16px; }
58
+ .fd-reaction-picker button:hover { background: var(--fd-page); }
59
+ .fd-mentions { list-style: none; margin: 0; padding: 4px 0; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); max-width: 280px; box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
60
+ .fd-mentions [role=option] { padding: 6px 12px; cursor: pointer; }
61
+ .fd-mentions [role=option].fd-active, .fd-mentions [role=option]:hover { background: var(--fd-accent-soft); }
62
+ .fd-mentions .fd-empty { padding: 6px 12px; color: var(--fd-muted); }
63
+ .fd-activities { display: grid; gap: 8px; }
64
+ .fd-activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
65
+ .fd-activity { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
66
+ .fd-activity-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--fd-success); }
67
+ .fd-activity[data-when="overdue"] .fd-activity-icon { background: var(--fd-error); }
68
+ .fd-activity[data-when="today"] .fd-activity-icon { background: #d97706; }
69
+ .fd-activity-icon .fd-icon { width: 16px; height: 16px; }
70
+ .fd-activity-content { display: grid; min-width: 0; }
71
+ .fd-activity-summary { font-weight: 600; }
72
+ .fd-activity-meta { color: var(--fd-muted); font-size: 12.5px; }
73
+ .fd-activity[data-when="overdue"] .fd-activity-due { color: var(--fd-error); font-weight: 600; }
74
+ .fd-activity[data-when="today"] .fd-activity-due { color: #b45309; font-weight: 600; }
75
+ /* Under the summary, where a narrow side panel has room for them. */
76
+ .fd-activity-actions { grid-column: 2; display: flex; gap: 2px 12px; flex-wrap: wrap; }
77
+ .fd-activity-actions .fd-button-link { padding: 0; min-height: 0; font-size: 13px; }
78
+ .fd-activity-finish { grid-column: 2; display: grid; gap: 6px; margin-block-start: 4px; }
79
+ .fd-activity-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
80
+ .fd-activity-form .fd-composer-actions { grid-column: 1 / -1; }
81
+ .fd-activity-field { display: grid; gap: 4px; font-size: 13px; color: var(--fd-muted); }
82
+ .fd-followers-toggle { display: inline-flex; align-items: center; gap: 6px; }
83
+ .fd-followers-toggle .fd-icon { width: 1.1em; height: 1.1em; }
84
+ .fd-followers { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
85
+ .fd-follower-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
86
+ .fd-follower { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
87
+ .fd-followers-none { margin: 0; color: var(--fd-muted); }
88
+ .fd-followers-add { display: grid; gap: 6px; border-block-start: 1px solid var(--fd-border); padding-block-start: 8px; }
89
+ .fd-followers-add-title { font-size: 12.5px; color: var(--fd-muted); }
90
+ .fd-follower-candidates { list-style: none; margin: 0; padding: 0; }
91
+ .fd-follower-candidates [role=option] { padding: 6px 8px; border-radius: 4px; cursor: pointer; }
92
+ .fd-follower-candidates [role=option]:hover { background: var(--fd-accent-soft); }
93
+ .fd-follower-candidates .fd-empty { padding: 6px 8px; color: var(--fd-muted); }
94
+ `;
95
+ /** Puts the chatter's look in the document once. */
96
+ export function installChatterStyles(doc) {
97
+ if (doc.getElementById('fd-chatter-styles'))
98
+ return;
99
+ const style = doc.createElement('style');
100
+ style.id = 'fd-chatter-styles';
101
+ style.textContent = CHATTER_STYLES;
102
+ doc.head.append(style);
103
+ }
104
+ //# sourceMappingURL=styles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.mjs","sourceRoot":"","sources":["../../../../../libs/chatter/src/lib/styles.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F7B,CAAC;AAEF,oDAAoD;AACpD,MAAM,UAAU,oBAAoB,CAAC,GAAa;IAChD,IAAI,GAAG,CAAC,cAAc,CAAC,mBAAmB,CAAC;QAAE,OAAO;IACpD,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,GAAG,mBAAmB,CAAC;IAC/B,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC;IACnC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}