@aparte/n8n-chat 1.0.1 → 1.0.2
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/LICENSE +21 -21
- package/README.md +614 -598
- package/dist/cdn/chunks/{highlight-IMZBI6FV.js → highlight-KR6IJJGG.js} +1 -1
- package/dist/cdn/chunks/{highlight-IMZBI6FV.js.map → highlight-KR6IJJGG.js.map} +1 -1
- package/dist/cdn/latest.js +11 -0
- package/dist/cdn/n8n-chat.js +1 -1
- package/dist/cdn/n8n-chat.js.map +1 -1
- package/dist/highlight-DDyMJYBk.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/style.css +409 -409
- package/dist/theme.css +409 -409
- package/package.json +83 -83
package/dist/theme.css
CHANGED
|
@@ -1,409 +1,409 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The n8n theme: aparté's chat in the look of n8n's chat widget, on anything inside
|
|
3
|
-
* `.aparte-n8n` — the widget `createChat()` mounts, or a chat you compose yourself.
|
|
4
|
-
*
|
|
5
|
-
* It reads n8n's main `--chat--*` variables — the colors, the fonts, the radii, the window's
|
|
6
|
-
* size and its button — so a page that set them for n8n's widget keeps them. Their defaults
|
|
7
|
-
* are n8n's, but for one: the green behind white text is n8n's darkened just enough to read
|
|
8
|
-
* (#178272, 4.7:1, where n8n's #20b69e gives 2.55:1). The input's and buttons' own variables,
|
|
9
|
-
* and rules written against n8n's `.chat-*` classes, do not carry over.
|
|
10
|
-
*
|
|
11
|
-
* To restyle with aparté's variables instead: the palette (`--aparte-primary`, `--aparte-bg`,
|
|
12
|
-
* `--aparte-text`…) on `.aparte-n8n`; a message's own tokens (`--aparte-message-content-*`)
|
|
13
|
-
* on `.aparte-n8n aparte-chat`, where core derives them.
|
|
14
|
-
*
|
|
15
|
-
* Light by default like n8n's widget, whatever the visitor's system: a chat half in the
|
|
16
|
-
* page's colors is worse than one in its own. Dark is `colorScheme: 'dark'` (or
|
|
17
|
-
* `data-aparte-theme="dark"`), or the visitor's own with `colorScheme: 'auto'`.
|
|
18
|
-
*
|
|
19
|
-
* One color is enough: `--chat--color--secondary` alone also colors the button in the corner
|
|
20
|
-
* (n8n's `--primary`, when the page leaves it unset), every hover is derived from the color it
|
|
21
|
-
* darkens, and dark keeps the page's header and tints its surfaces with that color. Unset,
|
|
22
|
-
* each falls back to n8n's own.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
.aparte-n8n {
|
|
26
|
-
color-scheme: light;
|
|
27
|
-
font-family: var(--aparte-font-family);
|
|
28
|
-
color: var(--aparte-text);
|
|
29
|
-
|
|
30
|
-
--aparte-font-family: var(--chat--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif);
|
|
31
|
-
--aparte-code-font-family: var(--chat--font-family--monospace, ui-monospace, Menlo, Consolas, 'DejaVu Sans Mono', monospace);
|
|
32
|
-
|
|
33
|
-
/* The palette: literal, on the root, inherited by everything inside. */
|
|
34
|
-
--aparte-bg: var(--chat--body--background, var(--chat--color-light, #f2f4f8));
|
|
35
|
-
--aparte-surface-1: var(--chat--color-white, #fff);
|
|
36
|
-
--aparte-surface-2: var(--chat--color-light-shade-50, #e6e9f1);
|
|
37
|
-
--aparte-text: var(--chat--color-dark, #101330);
|
|
38
|
-
--aparte-text-muted: #5b5f7a;
|
|
39
|
-
--aparte-neutral: #5b5f7a;
|
|
40
|
-
--aparte-border: var(--chat--color-light-shade-50, #e6e9f1);
|
|
41
|
-
--aparte-primary: var(--chat--color--secondary, #178272);
|
|
42
|
-
/* Derived, not n8n's fixed shade: a page that set its own color would hover back to n8n's green. */
|
|
43
|
-
--aparte-primary-hover: var(--chat--color-secondary-shade-50, color-mix(in oklab, var(--aparte-primary) 85%, #000));
|
|
44
|
-
--aparte-on-primary: var(--chat--color-white, #fff);
|
|
45
|
-
--aparte-message-content-text-user: var(--chat--message--user--color, var(--chat--color-white, #fff));
|
|
46
|
-
--aparte-message-content-bg-assistant: var(--chat--message--bot--background, var(--chat--color-white, #fff));
|
|
47
|
-
--aparte-message-content-text-assistant: var(--chat--message--bot--color, var(--chat--color-dark, #101330));
|
|
48
|
-
--aparte-message-content-padding-assistant: var(--chat--message--padding, var(--chat--spacing, 1rem));
|
|
49
|
-
|
|
50
|
-
/* What core derives on the chat's own anchors, kept here and handed down below. */
|
|
51
|
-
--aparte-n8n-accent: var(--chat--color--primary, var(--chat--color--secondary, #e74266));
|
|
52
|
-
--aparte-n8n-user-bg: var(--chat--message--user--background, var(--aparte-primary));
|
|
53
|
-
--aparte-n8n-radius: var(--chat--message--border-radius, var(--chat--border-radius, 0.25rem));
|
|
54
|
-
--aparte-n8n-code-bg: var(--chat--message--pre--background, rgba(0, 0, 0, 0.05));
|
|
55
|
-
--aparte-n8n-input-bg: var(--chat--input--background, var(--chat--color-white, #fff));
|
|
56
|
-
--aparte-n8n-message-padding: var(--chat--message--padding, var(--chat--spacing, 1rem));
|
|
57
|
-
|
|
58
|
-
/* The window and the button in the corner, read by the launcher, which is this element. */
|
|
59
|
-
--aparte-launcher-width: var(--chat--window--width, 400px);
|
|
60
|
-
--aparte-launcher-height: var(--chat--window--height, 600px);
|
|
61
|
-
--aparte-launcher-offset: var(--chat--window--bottom, var(--chat--spacing, 1rem));
|
|
62
|
-
--aparte-launcher-gap: var(--chat--window--margin-bottom, var(--chat--spacing, 1rem));
|
|
63
|
-
--aparte-launcher-radius: var(--chat--window--border-radius, var(--chat--border-radius, 0.25rem));
|
|
64
|
-
|
|
65
|
-
/* The header, the footer and the button, drawn by this theme. */
|
|
66
|
-
--aparte-n8n-header-bg: var(--chat--header--background, var(--chat--color-dark, #101330));
|
|
67
|
-
--aparte-n8n-header-color: var(--chat--header--color, var(--chat--color-light, #f2f4f8));
|
|
68
|
-
--aparte-n8n-footer-bg: var(--chat--footer--background, var(--chat--color-light, #f2f4f8));
|
|
69
|
-
--aparte-n8n-footer-color: var(--chat--footer--color, var(--chat--color-dark, #101330));
|
|
70
|
-
/* The page's one color when it set no --primary: a green chat behind a pink button reads as a bug. */
|
|
71
|
-
--aparte-n8n-toggle-bg: var(--chat--toggle--background, var(--chat--color--primary, var(--chat--color--secondary, #e74266)));
|
|
72
|
-
--aparte-n8n-toggle-hover-bg: var(--chat--toggle--hover--background, var(--chat--color--primary-shade-50, color-mix(in oklab, var(--aparte-n8n-toggle-bg) 88%, #000)));
|
|
73
|
-
--aparte-n8n-toggle-color: var(--chat--toggle--color, var(--chat--color-white, #fff));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/*
|
|
77
|
-
* On the chat's own anchors, where core derives these tokens from its own: as references to
|
|
78
|
-
* the root's, so the root's values — and a page's `--chat--*` — reach the messages.
|
|
79
|
-
*/
|
|
80
|
-
.aparte-n8n :is(aparte-chat, [data-aparte-host]) {
|
|
81
|
-
--aparte-accent: var(--aparte-n8n-accent);
|
|
82
|
-
--aparte-message-content-bg-user: var(--aparte-n8n-user-bg);
|
|
83
|
-
--aparte-radius-bubble: var(--aparte-n8n-radius);
|
|
84
|
-
--aparte-message-content-radius: var(--aparte-n8n-radius);
|
|
85
|
-
--aparte-code-bg: var(--aparte-n8n-code-bg);
|
|
86
|
-
--aparte-prose-code-bg: var(--aparte-n8n-code-bg);
|
|
87
|
-
--aparte-input-bg: var(--aparte-n8n-input-bg);
|
|
88
|
-
--aparte-message-content-padding: var(--aparte-n8n-message-padding);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* n8n pads the bot's message too, and core caps the message at its column's width without
|
|
92
|
-
counting padding: the message ran past the column and the bubble clipped its right edge —
|
|
93
|
-
unseen in wrapped text, plain on a card that fills the width. A card is 100% wide plus its
|
|
94
|
-
border, the same way. */
|
|
95
|
-
.aparte-n8n :is(.aparte-message-content, .aparte-rich-card) {
|
|
96
|
-
box-sizing: border-box;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* Dark: n8n's own navy, which its widget never had. */
|
|
100
|
-
.aparte-n8n[data-aparte-theme='dark'] {
|
|
101
|
-
color-scheme: dark;
|
|
102
|
-
/* n8n's navy, tinted with the page's color when it set one (unset, the navy itself). */
|
|
103
|
-
--aparte-bg: color-mix(in oklab, var(--chat--color--secondary, #0b0d24) 7%, #0b0d24);
|
|
104
|
-
--aparte-surface-1: color-mix(in oklab, var(--chat--color--secondary, #151937) 9%, #151937);
|
|
105
|
-
--aparte-surface-2: color-mix(in oklab, var(--chat--color--secondary, #1d2246) 10%, #1d2246);
|
|
106
|
-
--aparte-text: #eef0f6;
|
|
107
|
-
--aparte-text-muted: #a3a7c2;
|
|
108
|
-
--aparte-neutral: #a3a7c2;
|
|
109
|
-
--aparte-border: color-mix(in oklab, var(--chat--color--secondary, #262b52) 16%, #262b52);
|
|
110
|
-
--aparte-message-content-bg-assistant: color-mix(in oklab, var(--chat--color--secondary, #171b3d) 9%, #171b3d);
|
|
111
|
-
--aparte-message-content-text-assistant: #eef0f6;
|
|
112
|
-
--aparte-n8n-code-bg: rgba(255, 255, 255, 0.06);
|
|
113
|
-
/* Read from the surfaces, so a page that sets them in dark sets the field and the footer too. */
|
|
114
|
-
--aparte-n8n-input-bg: var(--aparte-surface-1);
|
|
115
|
-
/* The page's header color, kept in dark: a brand bar does not turn navy at night. */
|
|
116
|
-
--aparte-n8n-header-bg: var(--chat--header--background, #060716);
|
|
117
|
-
--aparte-n8n-footer-bg: var(--aparte-bg);
|
|
118
|
-
--aparte-n8n-footer-color: #eef0f6;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@media (prefers-color-scheme: dark) {
|
|
122
|
-
.aparte-n8n:not([data-aparte-theme]) {
|
|
123
|
-
color-scheme: dark;
|
|
124
|
-
/* n8n's navy, tinted with the page's color when it set one (unset, the navy itself). */
|
|
125
|
-
--aparte-bg: color-mix(in oklab, var(--chat--color--secondary, #0b0d24) 7%, #0b0d24);
|
|
126
|
-
--aparte-surface-1: color-mix(in oklab, var(--chat--color--secondary, #151937) 9%, #151937);
|
|
127
|
-
--aparte-surface-2: color-mix(in oklab, var(--chat--color--secondary, #1d2246) 10%, #1d2246);
|
|
128
|
-
--aparte-text: #eef0f6;
|
|
129
|
-
--aparte-text-muted: #a3a7c2;
|
|
130
|
-
--aparte-neutral: #a3a7c2;
|
|
131
|
-
--aparte-border: color-mix(in oklab, var(--chat--color--secondary, #262b52) 16%, #262b52);
|
|
132
|
-
--aparte-message-content-bg-assistant: color-mix(in oklab, var(--chat--color--secondary, #171b3d) 9%, #171b3d);
|
|
133
|
-
--aparte-message-content-text-assistant: #eef0f6;
|
|
134
|
-
--aparte-n8n-code-bg: rgba(255, 255, 255, 0.06);
|
|
135
|
-
/* Read from the surfaces, so a page that sets them in dark sets the field and the footer too. */
|
|
136
|
-
--aparte-n8n-input-bg: var(--aparte-surface-1);
|
|
137
|
-
/* The page's header color, kept in dark: a brand bar does not turn navy at night. */
|
|
138
|
-
--aparte-n8n-header-bg: var(--chat--header--background, #060716);
|
|
139
|
-
--aparte-n8n-footer-bg: var(--aparte-bg);
|
|
140
|
-
--aparte-n8n-footer-color: #eef0f6;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* ── The window ─────────────────────────────────────────────────────────────────────── */
|
|
145
|
-
|
|
146
|
-
.aparte-n8n__window {
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-direction: column;
|
|
149
|
-
min-block-size: 0;
|
|
150
|
-
background: var(--aparte-bg);
|
|
151
|
-
border: var(--chat--window--border, 1px solid var(--aparte-border));
|
|
152
|
-
border-radius: var(--aparte-launcher-radius);
|
|
153
|
-
overflow: hidden;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.aparte-n8n--fullscreen,
|
|
157
|
-
.aparte-n8n--fullscreen > .aparte-n8n__window {
|
|
158
|
-
block-size: 100%;
|
|
159
|
-
inline-size: 100%;
|
|
160
|
-
box-sizing: border-box;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.aparte-n8n--fullscreen > .aparte-n8n__window {
|
|
164
|
-
border: 0;
|
|
165
|
-
border-radius: 0;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.aparte-n8n__header {
|
|
169
|
-
/* The focus ring in the header's own ink: core's would be lost on its navy. */
|
|
170
|
-
--aparte-border-focus: var(--aparte-n8n-header-color);
|
|
171
|
-
display: flex;
|
|
172
|
-
align-items: flex-start;
|
|
173
|
-
gap: var(--aparte-space-2, 0.5rem);
|
|
174
|
-
padding: var(--chat--header--padding, var(--chat--spacing, 1rem));
|
|
175
|
-
background: var(--aparte-n8n-header-bg);
|
|
176
|
-
color: var(--aparte-n8n-header-color);
|
|
177
|
-
border-block-start: var(--chat--header--border-top, none);
|
|
178
|
-
border-block-end: var(--chat--header--border-bottom, none);
|
|
179
|
-
flex: none;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.aparte-n8n__heading {
|
|
183
|
-
flex: 1 1 auto;
|
|
184
|
-
min-inline-size: 0;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.aparte-n8n__title {
|
|
188
|
-
margin: 0;
|
|
189
|
-
font-size: var(--chat--heading--font-size, 2em);
|
|
190
|
-
font-weight: 700;
|
|
191
|
-
line-height: 1.2;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.aparte-n8n__subtitle {
|
|
195
|
-
margin: 0.5rem 0 0;
|
|
196
|
-
font-size: var(--chat--subtitle--font-size, inherit);
|
|
197
|
-
line-height: var(--chat--subtitle--line-height, 1.8);
|
|
198
|
-
opacity: 0.9;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.aparte-n8n__close {
|
|
202
|
-
--aparte-btn-intent: var(--aparte-n8n-header-color);
|
|
203
|
-
--aparte-btn-intent-ink: var(--aparte-n8n-header-color);
|
|
204
|
-
flex: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.aparte-n8n__close:hover {
|
|
208
|
-
--aparte-btn-intent-ink: var(--chat--close--button--color-hover, var(--chat--color--primary, #e74266));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.aparte-n8n__chat {
|
|
212
|
-
flex: 1 1 auto;
|
|
213
|
-
min-block-size: 0;
|
|
214
|
-
/* The Powered by line sits right under the composer, so the chat's own gap below it
|
|
215
|
-
(aparté's 16px, for a chat that ends at the composer) shrinks to a breath: the
|
|
216
|
-
composer comes down to the line. */
|
|
217
|
-
--aparte-chat-bottom-gap: var(--aparte-space-3, 0.375rem);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.aparte-n8n__welcome {
|
|
221
|
-
flex: 1 1 auto;
|
|
222
|
-
display: grid;
|
|
223
|
-
place-items: center;
|
|
224
|
-
padding: var(--chat--spacing, 1rem);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/* "Powered by aparté": one small grey line under the input, not a band; "aparté" is the
|
|
228
|
-
link, underlined so it reads as one. */
|
|
229
|
-
.aparte-n8n__powered {
|
|
230
|
-
margin: 0;
|
|
231
|
-
flex: none;
|
|
232
|
-
padding: 0 1rem 0.375rem;
|
|
233
|
-
text-align: center;
|
|
234
|
-
color: var(--aparte-text-muted);
|
|
235
|
-
font-size: 0.6875rem;
|
|
236
|
-
line-height: 1.4;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.aparte-n8n__powered a {
|
|
240
|
-
color: inherit;
|
|
241
|
-
font-weight: 600;
|
|
242
|
-
text-decoration: underline;
|
|
243
|
-
text-underline-offset: 2px;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.aparte-n8n__powered a:hover,
|
|
247
|
-
.aparte-n8n__powered a:focus-visible {
|
|
248
|
-
color: var(--aparte-text);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.aparte-n8n__footer {
|
|
252
|
-
margin: 0;
|
|
253
|
-
flex: none;
|
|
254
|
-
padding: var(--chat--footer--padding, 0.5rem 1rem);
|
|
255
|
-
background: var(--aparte-n8n-footer-bg);
|
|
256
|
-
color: var(--aparte-n8n-footer-color);
|
|
257
|
-
border-block-start: var(--chat--footer--border-top, 1px solid var(--chat--color-light-shade-100, #c2c5cc));
|
|
258
|
-
font-size: var(--aparte-font-size-sm, 0.875rem);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/* ── The messages ───────────────────────────────────────────────────────────────────── */
|
|
262
|
-
|
|
263
|
-
/* n8n's rhythm: bubbles a line apart, not turns a paragraph apart. On the message, where
|
|
264
|
-
the narrow-container measures are declared (responsive.css), so this wins over them. */
|
|
265
|
-
.aparte-n8n .aparte-message {
|
|
266
|
-
--aparte-message-padding-block: var(--aparte-space-2);
|
|
267
|
-
--aparte-message-gap: var(--aparte-space-4);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/* n8n's bubbles: as wide as their text, the corner on the speaker's side squared. */
|
|
271
|
-
.aparte-n8n .aparte-message .aparte-message-content {
|
|
272
|
-
font-size: var(--chat--message--font-size, 1rem);
|
|
273
|
-
line-height: var(--chat--message-line-height, 1.5);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.aparte-n8n .aparte-message[data-role='assistant'] .aparte-message-content {
|
|
277
|
-
width: fit-content;
|
|
278
|
-
max-width: 100%;
|
|
279
|
-
border-radius: var(--aparte-message-content-radius);
|
|
280
|
-
border-end-start-radius: 0;
|
|
281
|
-
/* Transparent, not none: under Windows' high contrast the edge is drawn, and the bubble keeps it. */
|
|
282
|
-
border: var(--chat--message--bot--border, 1px solid transparent);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/* A turn that is only an error is the error card alone: n8n's white bubble around it drew
|
|
286
|
-
two boxes, one inside the other. A turn with words before its error keeps its bubble. */
|
|
287
|
-
.aparte-n8n .aparte-message[data-role='assistant'][data-error] .aparte-message-content:not(:has(.aparte-segment-text, .aparte-segment-code)) {
|
|
288
|
-
background: none;
|
|
289
|
-
padding: 0;
|
|
290
|
-
border: 0;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.aparte-n8n .aparte-message[data-role='user'] .aparte-message-content {
|
|
294
|
-
border-end-end-radius: 0;
|
|
295
|
-
border: var(--chat--message--user--border, 1px solid transparent);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/* The person's messages on the far side, as in n8n's widget (and any messenger): their
|
|
299
|
-
files, their words and their actions together. `end`, so a right-to-left page mirrors it. */
|
|
300
|
-
.aparte-n8n .aparte-message[data-role='user'] .aparte-body {
|
|
301
|
-
display: flex;
|
|
302
|
-
flex-direction: column;
|
|
303
|
-
align-items: end;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* `createChat`'s first messages are the widget's greeting, not an answer: nothing to copy. */
|
|
307
|
-
.aparte-n8n aparte-chat-bubble[message-id^='n8n-initial-'] .aparte-action-bar {
|
|
308
|
-
display: none;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/* n8n names no one and shows no time. Hidden from the eye only: a screen reader still
|
|
312
|
-
hears who is speaking, which n8n's widget never said. */
|
|
313
|
-
.aparte-n8n .aparte-message > .aparte-body > .aparte-header {
|
|
314
|
-
position: absolute;
|
|
315
|
-
inline-size: 1px;
|
|
316
|
-
block-size: 1px;
|
|
317
|
-
overflow: hidden;
|
|
318
|
-
clip-path: inset(50%);
|
|
319
|
-
white-space: nowrap;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/* ── Files ──────────────────────────────────────────────────────────────────────────── */
|
|
323
|
-
|
|
324
|
-
/* A file as n8n draws it: a chip with its name, waiting in the composer and sent in the
|
|
325
|
-
conversation. Core's square tile shows the name on hover alone, so a visitor on a phone,
|
|
326
|
-
or on the keyboard, never saw which invoice they were sending. The ✕ stays in sight. */
|
|
327
|
-
.aparte-n8n .aparte-thumb {
|
|
328
|
-
--aparte-thumbnail-size: auto;
|
|
329
|
-
--aparte-thumbnail-radius: 0.25rem;
|
|
330
|
-
--aparte-thumbnail-bg: var(--aparte-surface-1);
|
|
331
|
-
--aparte-thumbnail-border: var(--aparte-border);
|
|
332
|
-
--aparte-thumb-name-color: var(--aparte-text);
|
|
333
|
-
--aparte-thumb-remove-bg: transparent;
|
|
334
|
-
--aparte-thumb-remove-bg-hover: var(--aparte-bg);
|
|
335
|
-
--aparte-thumb-remove-color: var(--aparte-text-muted);
|
|
336
|
-
max-inline-size: 15rem;
|
|
337
|
-
justify-content: flex-start;
|
|
338
|
-
gap: 0.375rem;
|
|
339
|
-
padding: 0.375rem 0.5rem;
|
|
340
|
-
font-size: 0.75rem;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.aparte-n8n .aparte-thumb .aparte-thumbnail__image {
|
|
344
|
-
inline-size: 1.5rem;
|
|
345
|
-
block-size: 1.5rem;
|
|
346
|
-
flex: none;
|
|
347
|
-
border-radius: 0.125rem;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.aparte-n8n .aparte-thumb__name,
|
|
351
|
-
.aparte-n8n .aparte-thumb__remove {
|
|
352
|
-
position: static;
|
|
353
|
-
opacity: 1;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.aparte-n8n .aparte-thumb__name {
|
|
357
|
-
padding: 0;
|
|
358
|
-
background: none;
|
|
359
|
-
font-size: inherit;
|
|
360
|
-
min-inline-size: 0;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.aparte-n8n .aparte-thumb__remove {
|
|
364
|
-
flex: none;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/* ── The button in the corner ───────────────────────────────────────────────────────── */
|
|
368
|
-
|
|
369
|
-
.aparte-n8n .aparte-launcher__button {
|
|
370
|
-
--aparte-btn-size-lg: var(--chat--toggle--size, 64px);
|
|
371
|
-
/* Half the button, as n8n draws it. */
|
|
372
|
-
--aparte-btn-icon-size: calc(var(--chat--toggle--size, 64px) / 2);
|
|
373
|
-
--aparte-primary: var(--aparte-n8n-toggle-bg);
|
|
374
|
-
--aparte-primary-hover: var(--aparte-n8n-toggle-hover-bg);
|
|
375
|
-
--aparte-on-primary: var(--aparte-n8n-toggle-color);
|
|
376
|
-
/* Open, it stays n8n's color, as n8n's does, rather than the recipe's neutral. */
|
|
377
|
-
--aparte-btn-bg-toggled: var(--aparte-n8n-toggle-bg);
|
|
378
|
-
--aparte-btn-color-toggled: var(--aparte-n8n-toggle-color);
|
|
379
|
-
inline-size: var(--chat--toggle--width, var(--chat--toggle--size, 64px));
|
|
380
|
-
block-size: var(--chat--toggle--height, var(--chat--toggle--size, 64px));
|
|
381
|
-
border-radius: var(--chat--toggle--border-radius, 50%);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/* The button floats over a page that is not ours: a ring in two tones, light then dark,
|
|
385
|
-
that shows on any ground and on the button's own color. */
|
|
386
|
-
.aparte-n8n .aparte-launcher__button:focus-visible {
|
|
387
|
-
outline: 3px solid var(--aparte-n8n-header-bg);
|
|
388
|
-
outline-offset: 2px;
|
|
389
|
-
box-shadow: 0 0 0 2px #fff, var(--aparte-popover-shadow);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/* A short window — a phone held sideways, a page zoomed in: the header gives the room
|
|
393
|
-
back to the conversation. */
|
|
394
|
-
@media (max-height: 34rem) {
|
|
395
|
-
.aparte-n8n__title {
|
|
396
|
-
font-size: 1.25em;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.aparte-n8n__subtitle {
|
|
400
|
-
display: none;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/* n8n's `transparent` history message: its words without the bubble around them. */
|
|
405
|
-
.aparte-n8n aparte-chat-bubble[data-n8n-transparent] .aparte-message-content {
|
|
406
|
-
background: none;
|
|
407
|
-
border-color: transparent;
|
|
408
|
-
padding-inline: 0;
|
|
409
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* The n8n theme: aparté's chat in the look of n8n's chat widget, on anything inside
|
|
3
|
+
* `.aparte-n8n` — the widget `createChat()` mounts, or a chat you compose yourself.
|
|
4
|
+
*
|
|
5
|
+
* It reads n8n's main `--chat--*` variables — the colors, the fonts, the radii, the window's
|
|
6
|
+
* size and its button — so a page that set them for n8n's widget keeps them. Their defaults
|
|
7
|
+
* are n8n's, but for one: the green behind white text is n8n's darkened just enough to read
|
|
8
|
+
* (#178272, 4.7:1, where n8n's #20b69e gives 2.55:1). The input's and buttons' own variables,
|
|
9
|
+
* and rules written against n8n's `.chat-*` classes, do not carry over.
|
|
10
|
+
*
|
|
11
|
+
* To restyle with aparté's variables instead: the palette (`--aparte-primary`, `--aparte-bg`,
|
|
12
|
+
* `--aparte-text`…) on `.aparte-n8n`; a message's own tokens (`--aparte-message-content-*`)
|
|
13
|
+
* on `.aparte-n8n aparte-chat`, where core derives them.
|
|
14
|
+
*
|
|
15
|
+
* Light by default like n8n's widget, whatever the visitor's system: a chat half in the
|
|
16
|
+
* page's colors is worse than one in its own. Dark is `colorScheme: 'dark'` (or
|
|
17
|
+
* `data-aparte-theme="dark"`), or the visitor's own with `colorScheme: 'auto'`.
|
|
18
|
+
*
|
|
19
|
+
* One color is enough: `--chat--color--secondary` alone also colors the button in the corner
|
|
20
|
+
* (n8n's `--primary`, when the page leaves it unset), every hover is derived from the color it
|
|
21
|
+
* darkens, and dark keeps the page's header and tints its surfaces with that color. Unset,
|
|
22
|
+
* each falls back to n8n's own.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
.aparte-n8n {
|
|
26
|
+
color-scheme: light;
|
|
27
|
+
font-family: var(--aparte-font-family);
|
|
28
|
+
color: var(--aparte-text);
|
|
29
|
+
|
|
30
|
+
--aparte-font-family: var(--chat--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif);
|
|
31
|
+
--aparte-code-font-family: var(--chat--font-family--monospace, ui-monospace, Menlo, Consolas, 'DejaVu Sans Mono', monospace);
|
|
32
|
+
|
|
33
|
+
/* The palette: literal, on the root, inherited by everything inside. */
|
|
34
|
+
--aparte-bg: var(--chat--body--background, var(--chat--color-light, #f2f4f8));
|
|
35
|
+
--aparte-surface-1: var(--chat--color-white, #fff);
|
|
36
|
+
--aparte-surface-2: var(--chat--color-light-shade-50, #e6e9f1);
|
|
37
|
+
--aparte-text: var(--chat--color-dark, #101330);
|
|
38
|
+
--aparte-text-muted: #5b5f7a;
|
|
39
|
+
--aparte-neutral: #5b5f7a;
|
|
40
|
+
--aparte-border: var(--chat--color-light-shade-50, #e6e9f1);
|
|
41
|
+
--aparte-primary: var(--chat--color--secondary, #178272);
|
|
42
|
+
/* Derived, not n8n's fixed shade: a page that set its own color would hover back to n8n's green. */
|
|
43
|
+
--aparte-primary-hover: var(--chat--color-secondary-shade-50, color-mix(in oklab, var(--aparte-primary) 85%, #000));
|
|
44
|
+
--aparte-on-primary: var(--chat--color-white, #fff);
|
|
45
|
+
--aparte-message-content-text-user: var(--chat--message--user--color, var(--chat--color-white, #fff));
|
|
46
|
+
--aparte-message-content-bg-assistant: var(--chat--message--bot--background, var(--chat--color-white, #fff));
|
|
47
|
+
--aparte-message-content-text-assistant: var(--chat--message--bot--color, var(--chat--color-dark, #101330));
|
|
48
|
+
--aparte-message-content-padding-assistant: var(--chat--message--padding, var(--chat--spacing, 1rem));
|
|
49
|
+
|
|
50
|
+
/* What core derives on the chat's own anchors, kept here and handed down below. */
|
|
51
|
+
--aparte-n8n-accent: var(--chat--color--primary, var(--chat--color--secondary, #e74266));
|
|
52
|
+
--aparte-n8n-user-bg: var(--chat--message--user--background, var(--aparte-primary));
|
|
53
|
+
--aparte-n8n-radius: var(--chat--message--border-radius, var(--chat--border-radius, 0.25rem));
|
|
54
|
+
--aparte-n8n-code-bg: var(--chat--message--pre--background, rgba(0, 0, 0, 0.05));
|
|
55
|
+
--aparte-n8n-input-bg: var(--chat--input--background, var(--chat--color-white, #fff));
|
|
56
|
+
--aparte-n8n-message-padding: var(--chat--message--padding, var(--chat--spacing, 1rem));
|
|
57
|
+
|
|
58
|
+
/* The window and the button in the corner, read by the launcher, which is this element. */
|
|
59
|
+
--aparte-launcher-width: var(--chat--window--width, 400px);
|
|
60
|
+
--aparte-launcher-height: var(--chat--window--height, 600px);
|
|
61
|
+
--aparte-launcher-offset: var(--chat--window--bottom, var(--chat--spacing, 1rem));
|
|
62
|
+
--aparte-launcher-gap: var(--chat--window--margin-bottom, var(--chat--spacing, 1rem));
|
|
63
|
+
--aparte-launcher-radius: var(--chat--window--border-radius, var(--chat--border-radius, 0.25rem));
|
|
64
|
+
|
|
65
|
+
/* The header, the footer and the button, drawn by this theme. */
|
|
66
|
+
--aparte-n8n-header-bg: var(--chat--header--background, var(--chat--color-dark, #101330));
|
|
67
|
+
--aparte-n8n-header-color: var(--chat--header--color, var(--chat--color-light, #f2f4f8));
|
|
68
|
+
--aparte-n8n-footer-bg: var(--chat--footer--background, var(--chat--color-light, #f2f4f8));
|
|
69
|
+
--aparte-n8n-footer-color: var(--chat--footer--color, var(--chat--color-dark, #101330));
|
|
70
|
+
/* The page's one color when it set no --primary: a green chat behind a pink button reads as a bug. */
|
|
71
|
+
--aparte-n8n-toggle-bg: var(--chat--toggle--background, var(--chat--color--primary, var(--chat--color--secondary, #e74266)));
|
|
72
|
+
--aparte-n8n-toggle-hover-bg: var(--chat--toggle--hover--background, var(--chat--color--primary-shade-50, color-mix(in oklab, var(--aparte-n8n-toggle-bg) 88%, #000)));
|
|
73
|
+
--aparte-n8n-toggle-color: var(--chat--toggle--color, var(--chat--color-white, #fff));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*
|
|
77
|
+
* On the chat's own anchors, where core derives these tokens from its own: as references to
|
|
78
|
+
* the root's, so the root's values — and a page's `--chat--*` — reach the messages.
|
|
79
|
+
*/
|
|
80
|
+
.aparte-n8n :is(aparte-chat, [data-aparte-host]) {
|
|
81
|
+
--aparte-accent: var(--aparte-n8n-accent);
|
|
82
|
+
--aparte-message-content-bg-user: var(--aparte-n8n-user-bg);
|
|
83
|
+
--aparte-radius-bubble: var(--aparte-n8n-radius);
|
|
84
|
+
--aparte-message-content-radius: var(--aparte-n8n-radius);
|
|
85
|
+
--aparte-code-bg: var(--aparte-n8n-code-bg);
|
|
86
|
+
--aparte-prose-code-bg: var(--aparte-n8n-code-bg);
|
|
87
|
+
--aparte-input-bg: var(--aparte-n8n-input-bg);
|
|
88
|
+
--aparte-message-content-padding: var(--aparte-n8n-message-padding);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* n8n pads the bot's message too, and core caps the message at its column's width without
|
|
92
|
+
counting padding: the message ran past the column and the bubble clipped its right edge —
|
|
93
|
+
unseen in wrapped text, plain on a card that fills the width. A card is 100% wide plus its
|
|
94
|
+
border, the same way. */
|
|
95
|
+
.aparte-n8n :is(.aparte-message-content, .aparte-rich-card) {
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Dark: n8n's own navy, which its widget never had. */
|
|
100
|
+
.aparte-n8n[data-aparte-theme='dark'] {
|
|
101
|
+
color-scheme: dark;
|
|
102
|
+
/* n8n's navy, tinted with the page's color when it set one (unset, the navy itself). */
|
|
103
|
+
--aparte-bg: color-mix(in oklab, var(--chat--color--secondary, #0b0d24) 7%, #0b0d24);
|
|
104
|
+
--aparte-surface-1: color-mix(in oklab, var(--chat--color--secondary, #151937) 9%, #151937);
|
|
105
|
+
--aparte-surface-2: color-mix(in oklab, var(--chat--color--secondary, #1d2246) 10%, #1d2246);
|
|
106
|
+
--aparte-text: #eef0f6;
|
|
107
|
+
--aparte-text-muted: #a3a7c2;
|
|
108
|
+
--aparte-neutral: #a3a7c2;
|
|
109
|
+
--aparte-border: color-mix(in oklab, var(--chat--color--secondary, #262b52) 16%, #262b52);
|
|
110
|
+
--aparte-message-content-bg-assistant: color-mix(in oklab, var(--chat--color--secondary, #171b3d) 9%, #171b3d);
|
|
111
|
+
--aparte-message-content-text-assistant: #eef0f6;
|
|
112
|
+
--aparte-n8n-code-bg: rgba(255, 255, 255, 0.06);
|
|
113
|
+
/* Read from the surfaces, so a page that sets them in dark sets the field and the footer too. */
|
|
114
|
+
--aparte-n8n-input-bg: var(--aparte-surface-1);
|
|
115
|
+
/* The page's header color, kept in dark: a brand bar does not turn navy at night. */
|
|
116
|
+
--aparte-n8n-header-bg: var(--chat--header--background, #060716);
|
|
117
|
+
--aparte-n8n-footer-bg: var(--aparte-bg);
|
|
118
|
+
--aparte-n8n-footer-color: #eef0f6;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (prefers-color-scheme: dark) {
|
|
122
|
+
.aparte-n8n:not([data-aparte-theme]) {
|
|
123
|
+
color-scheme: dark;
|
|
124
|
+
/* n8n's navy, tinted with the page's color when it set one (unset, the navy itself). */
|
|
125
|
+
--aparte-bg: color-mix(in oklab, var(--chat--color--secondary, #0b0d24) 7%, #0b0d24);
|
|
126
|
+
--aparte-surface-1: color-mix(in oklab, var(--chat--color--secondary, #151937) 9%, #151937);
|
|
127
|
+
--aparte-surface-2: color-mix(in oklab, var(--chat--color--secondary, #1d2246) 10%, #1d2246);
|
|
128
|
+
--aparte-text: #eef0f6;
|
|
129
|
+
--aparte-text-muted: #a3a7c2;
|
|
130
|
+
--aparte-neutral: #a3a7c2;
|
|
131
|
+
--aparte-border: color-mix(in oklab, var(--chat--color--secondary, #262b52) 16%, #262b52);
|
|
132
|
+
--aparte-message-content-bg-assistant: color-mix(in oklab, var(--chat--color--secondary, #171b3d) 9%, #171b3d);
|
|
133
|
+
--aparte-message-content-text-assistant: #eef0f6;
|
|
134
|
+
--aparte-n8n-code-bg: rgba(255, 255, 255, 0.06);
|
|
135
|
+
/* Read from the surfaces, so a page that sets them in dark sets the field and the footer too. */
|
|
136
|
+
--aparte-n8n-input-bg: var(--aparte-surface-1);
|
|
137
|
+
/* The page's header color, kept in dark: a brand bar does not turn navy at night. */
|
|
138
|
+
--aparte-n8n-header-bg: var(--chat--header--background, #060716);
|
|
139
|
+
--aparte-n8n-footer-bg: var(--aparte-bg);
|
|
140
|
+
--aparte-n8n-footer-color: #eef0f6;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* ── The window ─────────────────────────────────────────────────────────────────────── */
|
|
145
|
+
|
|
146
|
+
.aparte-n8n__window {
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
min-block-size: 0;
|
|
150
|
+
background: var(--aparte-bg);
|
|
151
|
+
border: var(--chat--window--border, 1px solid var(--aparte-border));
|
|
152
|
+
border-radius: var(--aparte-launcher-radius);
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.aparte-n8n--fullscreen,
|
|
157
|
+
.aparte-n8n--fullscreen > .aparte-n8n__window {
|
|
158
|
+
block-size: 100%;
|
|
159
|
+
inline-size: 100%;
|
|
160
|
+
box-sizing: border-box;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.aparte-n8n--fullscreen > .aparte-n8n__window {
|
|
164
|
+
border: 0;
|
|
165
|
+
border-radius: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.aparte-n8n__header {
|
|
169
|
+
/* The focus ring in the header's own ink: core's would be lost on its navy. */
|
|
170
|
+
--aparte-border-focus: var(--aparte-n8n-header-color);
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: flex-start;
|
|
173
|
+
gap: var(--aparte-space-2, 0.5rem);
|
|
174
|
+
padding: var(--chat--header--padding, var(--chat--spacing, 1rem));
|
|
175
|
+
background: var(--aparte-n8n-header-bg);
|
|
176
|
+
color: var(--aparte-n8n-header-color);
|
|
177
|
+
border-block-start: var(--chat--header--border-top, none);
|
|
178
|
+
border-block-end: var(--chat--header--border-bottom, none);
|
|
179
|
+
flex: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.aparte-n8n__heading {
|
|
183
|
+
flex: 1 1 auto;
|
|
184
|
+
min-inline-size: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.aparte-n8n__title {
|
|
188
|
+
margin: 0;
|
|
189
|
+
font-size: var(--chat--heading--font-size, 2em);
|
|
190
|
+
font-weight: 700;
|
|
191
|
+
line-height: 1.2;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.aparte-n8n__subtitle {
|
|
195
|
+
margin: 0.5rem 0 0;
|
|
196
|
+
font-size: var(--chat--subtitle--font-size, inherit);
|
|
197
|
+
line-height: var(--chat--subtitle--line-height, 1.8);
|
|
198
|
+
opacity: 0.9;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.aparte-n8n__close {
|
|
202
|
+
--aparte-btn-intent: var(--aparte-n8n-header-color);
|
|
203
|
+
--aparte-btn-intent-ink: var(--aparte-n8n-header-color);
|
|
204
|
+
flex: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.aparte-n8n__close:hover {
|
|
208
|
+
--aparte-btn-intent-ink: var(--chat--close--button--color-hover, var(--chat--color--primary, #e74266));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.aparte-n8n__chat {
|
|
212
|
+
flex: 1 1 auto;
|
|
213
|
+
min-block-size: 0;
|
|
214
|
+
/* The Powered by line sits right under the composer, so the chat's own gap below it
|
|
215
|
+
(aparté's 16px, for a chat that ends at the composer) shrinks to a breath: the
|
|
216
|
+
composer comes down to the line. */
|
|
217
|
+
--aparte-chat-bottom-gap: var(--aparte-space-3, 0.375rem);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.aparte-n8n__welcome {
|
|
221
|
+
flex: 1 1 auto;
|
|
222
|
+
display: grid;
|
|
223
|
+
place-items: center;
|
|
224
|
+
padding: var(--chat--spacing, 1rem);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* "Powered by aparté": one small grey line under the input, not a band; "aparté" is the
|
|
228
|
+
link, underlined so it reads as one. */
|
|
229
|
+
.aparte-n8n__powered {
|
|
230
|
+
margin: 0;
|
|
231
|
+
flex: none;
|
|
232
|
+
padding: 0 1rem 0.375rem;
|
|
233
|
+
text-align: center;
|
|
234
|
+
color: var(--aparte-text-muted);
|
|
235
|
+
font-size: 0.6875rem;
|
|
236
|
+
line-height: 1.4;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.aparte-n8n__powered a {
|
|
240
|
+
color: inherit;
|
|
241
|
+
font-weight: 600;
|
|
242
|
+
text-decoration: underline;
|
|
243
|
+
text-underline-offset: 2px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.aparte-n8n__powered a:hover,
|
|
247
|
+
.aparte-n8n__powered a:focus-visible {
|
|
248
|
+
color: var(--aparte-text);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.aparte-n8n__footer {
|
|
252
|
+
margin: 0;
|
|
253
|
+
flex: none;
|
|
254
|
+
padding: var(--chat--footer--padding, 0.5rem 1rem);
|
|
255
|
+
background: var(--aparte-n8n-footer-bg);
|
|
256
|
+
color: var(--aparte-n8n-footer-color);
|
|
257
|
+
border-block-start: var(--chat--footer--border-top, 1px solid var(--chat--color-light-shade-100, #c2c5cc));
|
|
258
|
+
font-size: var(--aparte-font-size-sm, 0.875rem);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* ── The messages ───────────────────────────────────────────────────────────────────── */
|
|
262
|
+
|
|
263
|
+
/* n8n's rhythm: bubbles a line apart, not turns a paragraph apart. On the message, where
|
|
264
|
+
the narrow-container measures are declared (responsive.css), so this wins over them. */
|
|
265
|
+
.aparte-n8n .aparte-message {
|
|
266
|
+
--aparte-message-padding-block: var(--aparte-space-2);
|
|
267
|
+
--aparte-message-gap: var(--aparte-space-4);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* n8n's bubbles: as wide as their text, the corner on the speaker's side squared. */
|
|
271
|
+
.aparte-n8n .aparte-message .aparte-message-content {
|
|
272
|
+
font-size: var(--chat--message--font-size, 1rem);
|
|
273
|
+
line-height: var(--chat--message-line-height, 1.5);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.aparte-n8n .aparte-message[data-role='assistant'] .aparte-message-content {
|
|
277
|
+
width: fit-content;
|
|
278
|
+
max-width: 100%;
|
|
279
|
+
border-radius: var(--aparte-message-content-radius);
|
|
280
|
+
border-end-start-radius: 0;
|
|
281
|
+
/* Transparent, not none: under Windows' high contrast the edge is drawn, and the bubble keeps it. */
|
|
282
|
+
border: var(--chat--message--bot--border, 1px solid transparent);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* A turn that is only an error is the error card alone: n8n's white bubble around it drew
|
|
286
|
+
two boxes, one inside the other. A turn with words before its error keeps its bubble. */
|
|
287
|
+
.aparte-n8n .aparte-message[data-role='assistant'][data-error] .aparte-message-content:not(:has(.aparte-segment-text, .aparte-segment-code)) {
|
|
288
|
+
background: none;
|
|
289
|
+
padding: 0;
|
|
290
|
+
border: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.aparte-n8n .aparte-message[data-role='user'] .aparte-message-content {
|
|
294
|
+
border-end-end-radius: 0;
|
|
295
|
+
border: var(--chat--message--user--border, 1px solid transparent);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* The person's messages on the far side, as in n8n's widget (and any messenger): their
|
|
299
|
+
files, their words and their actions together. `end`, so a right-to-left page mirrors it. */
|
|
300
|
+
.aparte-n8n .aparte-message[data-role='user'] .aparte-body {
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-direction: column;
|
|
303
|
+
align-items: end;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* `createChat`'s first messages are the widget's greeting, not an answer: nothing to copy. */
|
|
307
|
+
.aparte-n8n aparte-chat-bubble[message-id^='n8n-initial-'] .aparte-action-bar {
|
|
308
|
+
display: none;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* n8n names no one and shows no time. Hidden from the eye only: a screen reader still
|
|
312
|
+
hears who is speaking, which n8n's widget never said. */
|
|
313
|
+
.aparte-n8n .aparte-message > .aparte-body > .aparte-header {
|
|
314
|
+
position: absolute;
|
|
315
|
+
inline-size: 1px;
|
|
316
|
+
block-size: 1px;
|
|
317
|
+
overflow: hidden;
|
|
318
|
+
clip-path: inset(50%);
|
|
319
|
+
white-space: nowrap;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* ── Files ──────────────────────────────────────────────────────────────────────────── */
|
|
323
|
+
|
|
324
|
+
/* A file as n8n draws it: a chip with its name, waiting in the composer and sent in the
|
|
325
|
+
conversation. Core's square tile shows the name on hover alone, so a visitor on a phone,
|
|
326
|
+
or on the keyboard, never saw which invoice they were sending. The ✕ stays in sight. */
|
|
327
|
+
.aparte-n8n .aparte-thumb {
|
|
328
|
+
--aparte-thumbnail-size: auto;
|
|
329
|
+
--aparte-thumbnail-radius: 0.25rem;
|
|
330
|
+
--aparte-thumbnail-bg: var(--aparte-surface-1);
|
|
331
|
+
--aparte-thumbnail-border: var(--aparte-border);
|
|
332
|
+
--aparte-thumb-name-color: var(--aparte-text);
|
|
333
|
+
--aparte-thumb-remove-bg: transparent;
|
|
334
|
+
--aparte-thumb-remove-bg-hover: var(--aparte-bg);
|
|
335
|
+
--aparte-thumb-remove-color: var(--aparte-text-muted);
|
|
336
|
+
max-inline-size: 15rem;
|
|
337
|
+
justify-content: flex-start;
|
|
338
|
+
gap: 0.375rem;
|
|
339
|
+
padding: 0.375rem 0.5rem;
|
|
340
|
+
font-size: 0.75rem;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.aparte-n8n .aparte-thumb .aparte-thumbnail__image {
|
|
344
|
+
inline-size: 1.5rem;
|
|
345
|
+
block-size: 1.5rem;
|
|
346
|
+
flex: none;
|
|
347
|
+
border-radius: 0.125rem;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.aparte-n8n .aparte-thumb__name,
|
|
351
|
+
.aparte-n8n .aparte-thumb__remove {
|
|
352
|
+
position: static;
|
|
353
|
+
opacity: 1;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.aparte-n8n .aparte-thumb__name {
|
|
357
|
+
padding: 0;
|
|
358
|
+
background: none;
|
|
359
|
+
font-size: inherit;
|
|
360
|
+
min-inline-size: 0;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.aparte-n8n .aparte-thumb__remove {
|
|
364
|
+
flex: none;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/* ── The button in the corner ───────────────────────────────────────────────────────── */
|
|
368
|
+
|
|
369
|
+
.aparte-n8n .aparte-launcher__button {
|
|
370
|
+
--aparte-btn-size-lg: var(--chat--toggle--size, 64px);
|
|
371
|
+
/* Half the button, as n8n draws it. */
|
|
372
|
+
--aparte-btn-icon-size: calc(var(--chat--toggle--size, 64px) / 2);
|
|
373
|
+
--aparte-primary: var(--aparte-n8n-toggle-bg);
|
|
374
|
+
--aparte-primary-hover: var(--aparte-n8n-toggle-hover-bg);
|
|
375
|
+
--aparte-on-primary: var(--aparte-n8n-toggle-color);
|
|
376
|
+
/* Open, it stays n8n's color, as n8n's does, rather than the recipe's neutral. */
|
|
377
|
+
--aparte-btn-bg-toggled: var(--aparte-n8n-toggle-bg);
|
|
378
|
+
--aparte-btn-color-toggled: var(--aparte-n8n-toggle-color);
|
|
379
|
+
inline-size: var(--chat--toggle--width, var(--chat--toggle--size, 64px));
|
|
380
|
+
block-size: var(--chat--toggle--height, var(--chat--toggle--size, 64px));
|
|
381
|
+
border-radius: var(--chat--toggle--border-radius, 50%);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* The button floats over a page that is not ours: a ring in two tones, light then dark,
|
|
385
|
+
that shows on any ground and on the button's own color. */
|
|
386
|
+
.aparte-n8n .aparte-launcher__button:focus-visible {
|
|
387
|
+
outline: 3px solid var(--aparte-n8n-header-bg);
|
|
388
|
+
outline-offset: 2px;
|
|
389
|
+
box-shadow: 0 0 0 2px #fff, var(--aparte-popover-shadow);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/* A short window — a phone held sideways, a page zoomed in: the header gives the room
|
|
393
|
+
back to the conversation. */
|
|
394
|
+
@media (max-height: 34rem) {
|
|
395
|
+
.aparte-n8n__title {
|
|
396
|
+
font-size: 1.25em;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.aparte-n8n__subtitle {
|
|
400
|
+
display: none;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* n8n's `transparent` history message: its words without the bubble around them. */
|
|
405
|
+
.aparte-n8n aparte-chat-bubble[data-n8n-transparent] .aparte-message-content {
|
|
406
|
+
background: none;
|
|
407
|
+
border-color: transparent;
|
|
408
|
+
padding-inline: 0;
|
|
409
|
+
}
|