@aparte/n8n-chat 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +161 -18
  2. package/dist/cards.d.ts +25 -1
  3. package/dist/cdn/chunks/{chunk-CZ5742JA.js → chunk-37ODPEBD.js} +1 -1
  4. package/dist/cdn/chunks/{chunk-CZ5742JA.js.map → chunk-37ODPEBD.js.map} +1 -1
  5. package/dist/cdn/chunks/{chunk-7JR7KL6J.js → chunk-DEOOTEDD.js} +2 -2
  6. package/dist/cdn/chunks/{chunk-7JR7KL6J.js.map → chunk-DEOOTEDD.js.map} +1 -1
  7. package/dist/cdn/chunks/{chunk-VTTH7HGO.js → chunk-NKYV5B7Q.js} +2 -2
  8. package/dist/cdn/chunks/{chunk-VTTH7HGO.js.map → chunk-NKYV5B7Q.js.map} +3 -3
  9. package/dist/cdn/chunks/{chunk-OJFRNS5M.js → chunk-RDVTD2YO.js} +2 -2
  10. package/dist/cdn/chunks/{chunk-OJFRNS5M.js.map → chunk-RDVTD2YO.js.map} +1 -1
  11. package/dist/cdn/chunks/{chunk-IPWLCOPM.js → chunk-U6354LAY.js} +2 -2
  12. package/dist/cdn/chunks/{chunk-IPWLCOPM.js.map → chunk-U6354LAY.js.map} +1 -1
  13. package/dist/cdn/chunks/{chunk-IWAJFJNA.js → chunk-ZNUFBTZ7.js} +8 -5
  14. package/dist/cdn/chunks/chunk-ZNUFBTZ7.js.map +7 -0
  15. package/dist/cdn/chunks/{de-JS3CQEVR.js → de-BCWJVDW5.js} +1 -1
  16. package/dist/cdn/chunks/{de-JS3CQEVR.js.map → de-BCWJVDW5.js.map} +1 -1
  17. package/dist/cdn/chunks/{es-OHKGLFEF.js → es-72JNODLG.js} +1 -1
  18. package/dist/cdn/chunks/{es-OHKGLFEF.js.map → es-72JNODLG.js.map} +1 -1
  19. package/dist/cdn/chunks/{fr-6S44XMU5.js → fr-ZKACSOY5.js} +1 -1
  20. package/dist/cdn/chunks/{fr-6S44XMU5.js.map → fr-ZKACSOY5.js.map} +1 -1
  21. package/dist/cdn/chunks/{highlight-FGIKUPIF.js → highlight-DG2OVLBT.js} +2 -2
  22. package/dist/cdn/chunks/{highlight-FGIKUPIF.js.map → highlight-DG2OVLBT.js.map} +1 -1
  23. package/dist/cdn/chunks/{it-K4WYXXDJ.js → it-SSBBMSGX.js} +1 -1
  24. package/dist/cdn/chunks/{it-K4WYXXDJ.js.map → it-SSBBMSGX.js.map} +1 -1
  25. package/dist/cdn/chunks/{items-S4LF2DJA.js → items-MITCIPF3.js} +3 -3
  26. package/dist/cdn/chunks/{items-S4LF2DJA.js.map → items-MITCIPF3.js.map} +1 -1
  27. package/dist/cdn/chunks/{ja-BN7TZW62.js → ja-NCV4Z63H.js} +1 -1
  28. package/dist/cdn/chunks/{ja-BN7TZW62.js.map → ja-NCV4Z63H.js.map} +1 -1
  29. package/dist/cdn/chunks/{ko-ARHO7UI3.js → ko-VCNS24WV.js} +1 -1
  30. package/dist/cdn/chunks/{ko-ARHO7UI3.js.map → ko-VCNS24WV.js.map} +1 -1
  31. package/dist/cdn/chunks/{link-C46K5O7X.js → link-7JYKZK3A.js} +2 -2
  32. package/dist/cdn/chunks/{link-C46K5O7X.js.map → link-7JYKZK3A.js.map} +1 -1
  33. package/dist/cdn/chunks/{media-QI5BPERX.js → media-7CZBXNEK.js} +2 -2
  34. package/dist/cdn/chunks/{media-QI5BPERX.js.map → media-7CZBXNEK.js.map} +1 -1
  35. package/dist/cdn/chunks/{order-YISYH73K.js → order-CPY2L7MI.js} +2 -2
  36. package/dist/cdn/chunks/{order-YISYH73K.js.map → order-CPY2L7MI.js.map} +1 -1
  37. package/dist/cdn/chunks/{place-UFCH3NQE.js → place-KQ3IA5IV.js} +43 -4
  38. package/dist/cdn/chunks/place-KQ3IA5IV.js.map +7 -0
  39. package/dist/cdn/chunks/{plan-KQWF73QI.js → plan-OKXEPKPV.js} +2 -2
  40. package/dist/cdn/chunks/{plan-KQWF73QI.js.map → plan-OKXEPKPV.js.map} +1 -1
  41. package/dist/cdn/chunks/{product-7UBLOMZ7.js → product-ONQRJRDO.js} +24 -4
  42. package/dist/cdn/chunks/product-ONQRJRDO.js.map +7 -0
  43. package/dist/cdn/chunks/{pt-BR-R7ZRM3GG.js → pt-BR-73MNA3YX.js} +1 -1
  44. package/dist/cdn/chunks/{pt-BR-R7ZRM3GG.js.map → pt-BR-73MNA3YX.js.map} +1 -1
  45. package/dist/cdn/chunks/{ru-FJNIMGMU.js → ru-SCEGVTR4.js} +1 -1
  46. package/dist/cdn/chunks/{ru-FJNIMGMU.js.map → ru-SCEGVTR4.js.map} +1 -1
  47. package/dist/cdn/chunks/{score-O2KEAYDS.js → score-QF27XJUE.js} +2 -2
  48. package/dist/cdn/chunks/{score-O2KEAYDS.js.map → score-QF27XJUE.js.map} +1 -1
  49. package/dist/cdn/chunks/{stats-GSXFRGYZ.js → stats-2W3GFI4P.js} +2 -2
  50. package/dist/cdn/chunks/{stats-GSXFRGYZ.js.map → stats-2W3GFI4P.js.map} +1 -1
  51. package/dist/cdn/chunks/{stock-53NVFLC3.js → stock-RCVJOOH4.js} +2 -2
  52. package/dist/cdn/chunks/{stock-53NVFLC3.js.map → stock-RCVJOOH4.js.map} +1 -1
  53. package/dist/cdn/chunks/{weather-VI2RCU4X.js → weather-NQGN2JOS.js} +2 -2
  54. package/dist/cdn/chunks/{weather-VI2RCU4X.js.map → weather-NQGN2JOS.js.map} +1 -1
  55. package/dist/cdn/chunks/{zh-CN-DUCWBXJP.js → zh-CN-4K6QPBRT.js} +1 -1
  56. package/dist/cdn/chunks/{zh-CN-DUCWBXJP.js.map → zh-CN-4K6QPBRT.js.map} +1 -1
  57. package/dist/cdn/n8n-chat.js +57 -57
  58. package/dist/cdn/n8n-chat.js.map +4 -4
  59. package/dist/create-chat.d.ts +39 -6
  60. package/dist/index.d.ts +3 -0
  61. package/dist/index.js +74 -42
  62. package/dist/index.js.map +1 -1
  63. package/dist/strings.d.ts +1 -1
  64. package/dist/style.css +383 -370
  65. package/dist/theme.css +381 -368
  66. package/package.json +7 -7
  67. package/dist/cdn/chunks/chunk-IWAJFJNA.js.map +0 -7
  68. package/dist/cdn/chunks/place-UFCH3NQE.js.map +0 -7
  69. package/dist/cdn/chunks/product-7UBLOMZ7.js.map +0 -7
package/dist/theme.css CHANGED
@@ -1,86 +1,93 @@
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
-
20
- .aparte-n8n {
21
- color-scheme: light;
22
- font-family: var(--aparte-font-family);
23
- color: var(--aparte-text);
24
-
25
- --aparte-font-family: var(--chat--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif);
26
- --aparte-code-font-family: var(--chat--font-family--monospace, ui-monospace, Menlo, Consolas, 'DejaVu Sans Mono', monospace);
27
-
28
- /* The palette: literal, on the root, inherited by everything inside. */
29
- --aparte-bg: var(--chat--body--background, var(--chat--color-light, #f2f4f8));
30
- --aparte-surface-1: var(--chat--color-white, #fff);
31
- --aparte-surface-2: var(--chat--color-light-shade-50, #e6e9f1);
32
- --aparte-text: var(--chat--color-dark, #101330);
33
- --aparte-text-muted: #5b5f7a;
34
- --aparte-neutral: #5b5f7a;
35
- --aparte-border: var(--chat--color-light-shade-50, #e6e9f1);
36
- --aparte-primary: var(--chat--color--secondary, #178272);
37
- --aparte-primary-hover: var(--chat--color-secondary-shade-50, #126a5d);
38
- --aparte-on-primary: var(--chat--color-white, #fff);
39
- --aparte-message-content-text-user: var(--chat--message--user--color, var(--chat--color-white, #fff));
40
- --aparte-message-content-bg-assistant: var(--chat--message--bot--background, var(--chat--color-white, #fff));
41
- --aparte-message-content-text-assistant: var(--chat--message--bot--color, var(--chat--color-dark, #101330));
42
- --aparte-message-content-padding-assistant: var(--chat--message--padding, var(--chat--spacing, 1rem));
43
-
44
- /* What core derives on the chat's own anchors, kept here and handed down below. */
45
- --aparte-n8n-accent: var(--chat--color--primary, #e74266);
46
- --aparte-n8n-user-bg: var(--chat--message--user--background, var(--aparte-primary));
47
- --aparte-n8n-radius: var(--chat--message--border-radius, var(--chat--border-radius, 0.25rem));
48
- --aparte-n8n-code-bg: var(--chat--message--pre--background, rgba(0, 0, 0, 0.05));
49
- --aparte-n8n-input-bg: var(--chat--input--background, var(--chat--color-white, #fff));
50
- --aparte-n8n-message-padding: var(--chat--message--padding, var(--chat--spacing, 1rem));
51
-
52
- /* The window and the button in the corner, read by the launcher, which is this element. */
53
- --aparte-launcher-width: var(--chat--window--width, 400px);
54
- --aparte-launcher-height: var(--chat--window--height, 600px);
55
- --aparte-launcher-offset: var(--chat--window--bottom, var(--chat--spacing, 1rem));
56
- --aparte-launcher-gap: var(--chat--window--margin-bottom, var(--chat--spacing, 1rem));
57
- --aparte-launcher-radius: var(--chat--window--border-radius, var(--chat--border-radius, 0.25rem));
58
-
59
- /* The header, the footer and the button, drawn by this theme. */
60
- --aparte-n8n-header-bg: var(--chat--header--background, var(--chat--color-dark, #101330));
61
- --aparte-n8n-header-color: var(--chat--header--color, var(--chat--color-light, #f2f4f8));
62
- --aparte-n8n-footer-bg: var(--chat--footer--background, var(--chat--color-light, #f2f4f8));
63
- --aparte-n8n-footer-color: var(--chat--footer--color, var(--chat--color-dark, #101330));
64
- --aparte-n8n-toggle-bg: var(--chat--toggle--background, var(--chat--color--primary, #e74266));
65
- --aparte-n8n-toggle-hover-bg: var(--chat--toggle--hover--background, var(--chat--color--primary-shade-50, #db4061));
66
- --aparte-n8n-toggle-color: var(--chat--toggle--color, var(--chat--color-white, #fff));
67
- }
68
-
69
- /*
70
- * On the chat's own anchors, where core derives these tokens from its own: as references to
71
- * the root's, so the root's values — and a page's `--chat--*` — reach the messages.
72
- */
73
- .aparte-n8n :is(aparte-chat, [data-aparte-host]) {
74
- --aparte-accent: var(--aparte-n8n-accent);
75
- --aparte-message-content-bg-user: var(--aparte-n8n-user-bg);
76
- --aparte-radius-bubble: var(--aparte-n8n-radius);
77
- --aparte-message-content-radius: var(--aparte-n8n-radius);
78
- --aparte-code-bg: var(--aparte-n8n-code-bg);
79
- --aparte-prose-code-bg: var(--aparte-n8n-code-bg);
80
- --aparte-input-bg: var(--aparte-n8n-input-bg);
81
- --aparte-message-content-padding: var(--aparte-n8n-message-padding);
82
- }
83
-
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
+
84
91
  /* n8n pads the bot's message too, and core caps the message at its column's width without
85
92
  counting padding: the message ran past the column and the bubble clipped its right edge —
86
93
  unseen in wrapped text, plain on a card that fills the width. A card is 100% wide plus its
@@ -89,288 +96,294 @@
89
96
  box-sizing: border-box;
90
97
  }
91
98
 
92
- /* Dark: n8n's own navy, which its widget never had. */
93
- .aparte-n8n[data-aparte-theme='dark'] {
94
- color-scheme: dark;
95
- --aparte-bg: #0b0d24;
96
- --aparte-surface-1: #151937;
97
- --aparte-surface-2: #1d2246;
98
- --aparte-text: #eef0f6;
99
- --aparte-text-muted: #a3a7c2;
100
- --aparte-neutral: #a3a7c2;
101
- --aparte-border: #262b52;
102
- --aparte-message-content-bg-assistant: #171b3d;
103
- --aparte-message-content-text-assistant: #eef0f6;
104
- --aparte-n8n-code-bg: rgba(255, 255, 255, 0.06);
105
- --aparte-n8n-input-bg: #151937;
106
- --aparte-n8n-header-bg: #060716;
107
- --aparte-n8n-footer-bg: #0b0d24;
108
- --aparte-n8n-footer-color: #eef0f6;
109
- }
110
-
111
- @media (prefers-color-scheme: dark) {
112
- .aparte-n8n:not([data-aparte-theme]) {
113
- color-scheme: dark;
114
- --aparte-bg: #0b0d24;
115
- --aparte-surface-1: #151937;
116
- --aparte-surface-2: #1d2246;
117
- --aparte-text: #eef0f6;
118
- --aparte-text-muted: #a3a7c2;
119
- --aparte-neutral: #a3a7c2;
120
- --aparte-border: #262b52;
121
- --aparte-message-content-bg-assistant: #171b3d;
122
- --aparte-message-content-text-assistant: #eef0f6;
123
- --aparte-n8n-code-bg: rgba(255, 255, 255, 0.06);
124
- --aparte-n8n-input-bg: #151937;
125
- --aparte-n8n-header-bg: #060716;
126
- --aparte-n8n-footer-bg: #0b0d24;
127
- --aparte-n8n-footer-color: #eef0f6;
128
- }
129
- }
130
-
131
- /* ── The window ─────────────────────────────────────────────────────────────────────── */
132
-
133
- .aparte-n8n__window {
134
- display: flex;
135
- flex-direction: column;
136
- min-block-size: 0;
137
- background: var(--aparte-bg);
138
- border: var(--chat--window--border, 1px solid var(--aparte-border));
139
- border-radius: var(--aparte-launcher-radius);
140
- overflow: hidden;
141
- }
142
-
143
- .aparte-n8n--fullscreen,
144
- .aparte-n8n--fullscreen > .aparte-n8n__window {
145
- block-size: 100%;
146
- inline-size: 100%;
147
- box-sizing: border-box;
148
- }
149
-
150
- .aparte-n8n--fullscreen > .aparte-n8n__window {
151
- border: 0;
152
- border-radius: 0;
153
- }
154
-
155
- .aparte-n8n__header {
156
- /* The focus ring in the header's own ink: core's would be lost on its navy. */
157
- --aparte-border-focus: var(--aparte-n8n-header-color);
158
- display: flex;
159
- align-items: flex-start;
160
- gap: var(--aparte-space-2, 0.5rem);
161
- padding: var(--chat--header--padding, var(--chat--spacing, 1rem));
162
- background: var(--aparte-n8n-header-bg);
163
- color: var(--aparte-n8n-header-color);
164
- border-block-start: var(--chat--header--border-top, none);
165
- border-block-end: var(--chat--header--border-bottom, none);
166
- flex: none;
167
- }
168
-
169
- .aparte-n8n__heading {
170
- flex: 1 1 auto;
171
- min-inline-size: 0;
172
- }
173
-
174
- .aparte-n8n__title {
175
- margin: 0;
176
- font-size: var(--chat--heading--font-size, 2em);
177
- font-weight: 700;
178
- line-height: 1.2;
179
- }
180
-
181
- .aparte-n8n__subtitle {
182
- margin: 0.5rem 0 0;
183
- font-size: var(--chat--subtitle--font-size, inherit);
184
- line-height: var(--chat--subtitle--line-height, 1.8);
185
- opacity: 0.9;
186
- }
187
-
188
- .aparte-n8n__close {
189
- --aparte-btn-intent: var(--aparte-n8n-header-color);
190
- --aparte-btn-intent-ink: var(--aparte-n8n-header-color);
191
- flex: none;
192
- }
193
-
194
- .aparte-n8n__close:hover {
195
- --aparte-btn-intent-ink: var(--chat--close--button--color-hover, var(--chat--color--primary, #e74266));
196
- }
197
-
198
- .aparte-n8n__chat {
199
- flex: 1 1 auto;
200
- min-block-size: 0;
201
- }
202
-
203
- .aparte-n8n__welcome {
204
- flex: 1 1 auto;
205
- display: grid;
206
- place-items: center;
207
- padding: var(--chat--spacing, 1rem);
208
- }
209
-
210
- .aparte-n8n__footer {
211
- margin: 0;
212
- flex: none;
213
- padding: var(--chat--footer--padding, 0.5rem 1rem);
214
- background: var(--aparte-n8n-footer-bg);
215
- color: var(--aparte-n8n-footer-color);
216
- border-block-start: var(--chat--footer--border-top, 1px solid var(--chat--color-light-shade-100, #c2c5cc));
217
- font-size: var(--aparte-font-size-sm, 0.875rem);
218
- }
219
-
220
- /* ── The messages ───────────────────────────────────────────────────────────────────── */
221
-
222
- /* n8n's rhythm: bubbles a line apart, not turns a paragraph apart. On the message, where
223
- the narrow-container measures are declared (responsive.css), so this wins over them. */
224
- .aparte-n8n .aparte-message {
225
- --aparte-message-padding-block: var(--aparte-space-2);
226
- --aparte-message-gap: var(--aparte-space-4);
227
- }
228
-
229
- /* n8n's bubbles: as wide as their text, the corner on the speaker's side squared. */
230
- .aparte-n8n .aparte-message .aparte-message-content {
231
- font-size: var(--chat--message--font-size, 1rem);
232
- line-height: var(--chat--message-line-height, 1.5);
233
- }
234
-
235
- .aparte-n8n .aparte-message[data-role='assistant'] .aparte-message-content {
236
- width: fit-content;
237
- max-width: 100%;
238
- border-radius: var(--aparte-message-content-radius);
239
- border-end-start-radius: 0;
240
- /* Transparent, not none: under Windows' high contrast the edge is drawn, and the bubble keeps it. */
241
- border: var(--chat--message--bot--border, 1px solid transparent);
242
- }
243
-
244
- /* A turn that is only an error is the error card alone: n8n's white bubble around it drew
245
- two boxes, one inside the other. A turn with words before its error keeps its bubble. */
246
- .aparte-n8n .aparte-message[data-role='assistant'][data-error] .aparte-message-content:not(:has(.aparte-segment-text, .aparte-segment-code)) {
247
- background: none;
248
- padding: 0;
249
- border: 0;
250
- }
251
-
252
- .aparte-n8n .aparte-message[data-role='user'] .aparte-message-content {
253
- border-end-end-radius: 0;
254
- border: var(--chat--message--user--border, 1px solid transparent);
255
- }
256
-
257
- /* The person's messages on the far side, as in n8n's widget (and any messenger): their
258
- files, their words and their actions together. `end`, so a right-to-left page mirrors it. */
259
- .aparte-n8n .aparte-message[data-role='user'] .aparte-body {
260
- display: flex;
261
- flex-direction: column;
262
- align-items: end;
263
- }
264
-
265
- /* `createChat`'s first messages are the widget's greeting, not an answer: nothing to copy. */
266
- .aparte-n8n aparte-chat-bubble[message-id^='n8n-initial-'] .aparte-action-bar {
267
- display: none;
268
- }
269
-
270
- /* n8n names no one and shows no time. Hidden from the eye only: a screen reader still
271
- hears who is speaking, which n8n's widget never said. */
272
- .aparte-n8n .aparte-message > .aparte-body > .aparte-header {
273
- position: absolute;
274
- inline-size: 1px;
275
- block-size: 1px;
276
- overflow: hidden;
277
- clip-path: inset(50%);
278
- white-space: nowrap;
279
- }
280
-
281
- /* ── Files ──────────────────────────────────────────────────────────────────────────── */
282
-
283
- /* A file as n8n draws it: a chip with its name, waiting in the composer and sent in the
284
- conversation. Core's square tile shows the name on hover alone, so a visitor on a phone,
285
- or on the keyboard, never saw which invoice they were sending. The ✕ stays in sight. */
286
- .aparte-n8n .aparte-thumb {
287
- --aparte-thumbnail-size: auto;
288
- --aparte-thumbnail-radius: 0.25rem;
289
- --aparte-thumbnail-bg: var(--aparte-surface-1);
290
- --aparte-thumbnail-border: var(--aparte-border);
291
- --aparte-thumb-name-color: var(--aparte-text);
292
- --aparte-thumb-remove-bg: transparent;
293
- --aparte-thumb-remove-bg-hover: var(--aparte-bg);
294
- --aparte-thumb-remove-color: var(--aparte-text-muted);
295
- max-inline-size: 15rem;
296
- justify-content: flex-start;
297
- gap: 0.375rem;
298
- padding: 0.375rem 0.5rem;
299
- font-size: 0.75rem;
300
- }
301
-
302
- .aparte-n8n .aparte-thumb .aparte-thumbnail__image {
303
- inline-size: 1.5rem;
304
- block-size: 1.5rem;
305
- flex: none;
306
- border-radius: 0.125rem;
307
- }
308
-
309
- .aparte-n8n .aparte-thumb__name,
310
- .aparte-n8n .aparte-thumb__remove {
311
- position: static;
312
- opacity: 1;
313
- }
314
-
315
- .aparte-n8n .aparte-thumb__name {
316
- padding: 0;
317
- background: none;
318
- font-size: inherit;
319
- min-inline-size: 0;
320
- }
321
-
322
- .aparte-n8n .aparte-thumb__remove {
323
- flex: none;
324
- }
325
-
326
- /* ── The button in the corner ───────────────────────────────────────────────────────── */
327
-
328
- .aparte-n8n .aparte-launcher__button {
329
- --aparte-btn-size-lg: var(--chat--toggle--size, 64px);
330
- /* Half the button, as n8n draws it. */
331
- --aparte-btn-icon-size: calc(var(--chat--toggle--size, 64px) / 2);
332
- --aparte-primary: var(--aparte-n8n-toggle-bg);
333
- --aparte-primary-hover: var(--aparte-n8n-toggle-hover-bg);
334
- --aparte-on-primary: var(--aparte-n8n-toggle-color);
335
- /* Open, it stays n8n's color, as n8n's does, rather than the recipe's neutral. */
336
- --aparte-btn-bg-toggled: var(--aparte-n8n-toggle-bg);
337
- --aparte-btn-color-toggled: var(--aparte-n8n-toggle-color);
338
- inline-size: var(--chat--toggle--width, var(--chat--toggle--size, 64px));
339
- block-size: var(--chat--toggle--height, var(--chat--toggle--size, 64px));
340
- border-radius: var(--chat--toggle--border-radius, 50%);
341
- }
342
-
343
- /* The button floats over a page that is not ours: a ring in two tones, light then dark,
344
- that shows on any ground and on the button's own color. */
345
- .aparte-n8n .aparte-launcher__button:focus-visible {
346
- outline: 3px solid var(--aparte-n8n-header-bg);
347
- outline-offset: 2px;
348
- box-shadow: 0 0 0 2px #fff, var(--aparte-popover-shadow);
349
- }
350
-
351
- /* A short window — a phone held sideways, a page zoomed in: the header gives the room
352
- back to the conversation. */
353
- @media (max-height: 34rem) {
354
- .aparte-n8n__title {
355
- font-size: 1.25em;
356
- }
357
-
358
- .aparte-n8n__subtitle {
359
- display: none;
360
- }
361
- }
362
-
363
- /* What the workflow itself said went wrong, under the sentence: smaller, and quieter. */
364
- .aparte-n8n .aparte-n8n__error-detail {
365
- margin: var(--aparte-space-1) 0 0;
366
- font-size: var(--aparte-font-size-sm);
367
- color: var(--aparte-text-muted);
368
- overflow-wrap: anywhere;
369
- }
370
-
371
- /* n8n's `transparent` history message: its words without the bubble around them. */
372
- .aparte-n8n aparte-chat-bubble[data-n8n-transparent] .aparte-message-content {
373
- background: none;
374
- border-color: transparent;
375
- padding-inline: 0;
376
- }
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
+ }
215
+
216
+ .aparte-n8n__welcome {
217
+ flex: 1 1 auto;
218
+ display: grid;
219
+ place-items: center;
220
+ padding: var(--chat--spacing, 1rem);
221
+ }
222
+
223
+ .aparte-n8n__footer {
224
+ margin: 0;
225
+ flex: none;
226
+ padding: var(--chat--footer--padding, 0.5rem 1rem);
227
+ background: var(--aparte-n8n-footer-bg);
228
+ color: var(--aparte-n8n-footer-color);
229
+ border-block-start: var(--chat--footer--border-top, 1px solid var(--chat--color-light-shade-100, #c2c5cc));
230
+ font-size: var(--aparte-font-size-sm, 0.875rem);
231
+ }
232
+
233
+ /* ── The messages ───────────────────────────────────────────────────────────────────── */
234
+
235
+ /* n8n's rhythm: bubbles a line apart, not turns a paragraph apart. On the message, where
236
+ the narrow-container measures are declared (responsive.css), so this wins over them. */
237
+ .aparte-n8n .aparte-message {
238
+ --aparte-message-padding-block: var(--aparte-space-2);
239
+ --aparte-message-gap: var(--aparte-space-4);
240
+ }
241
+
242
+ /* n8n's bubbles: as wide as their text, the corner on the speaker's side squared. */
243
+ .aparte-n8n .aparte-message .aparte-message-content {
244
+ font-size: var(--chat--message--font-size, 1rem);
245
+ line-height: var(--chat--message-line-height, 1.5);
246
+ }
247
+
248
+ .aparte-n8n .aparte-message[data-role='assistant'] .aparte-message-content {
249
+ width: fit-content;
250
+ max-width: 100%;
251
+ border-radius: var(--aparte-message-content-radius);
252
+ border-end-start-radius: 0;
253
+ /* Transparent, not none: under Windows' high contrast the edge is drawn, and the bubble keeps it. */
254
+ border: var(--chat--message--bot--border, 1px solid transparent);
255
+ }
256
+
257
+ /* A turn that is only an error is the error card alone: n8n's white bubble around it drew
258
+ two boxes, one inside the other. A turn with words before its error keeps its bubble. */
259
+ .aparte-n8n .aparte-message[data-role='assistant'][data-error] .aparte-message-content:not(:has(.aparte-segment-text, .aparte-segment-code)) {
260
+ background: none;
261
+ padding: 0;
262
+ border: 0;
263
+ }
264
+
265
+ .aparte-n8n .aparte-message[data-role='user'] .aparte-message-content {
266
+ border-end-end-radius: 0;
267
+ border: var(--chat--message--user--border, 1px solid transparent);
268
+ }
269
+
270
+ /* The person's messages on the far side, as in n8n's widget (and any messenger): their
271
+ files, their words and their actions together. `end`, so a right-to-left page mirrors it. */
272
+ .aparte-n8n .aparte-message[data-role='user'] .aparte-body {
273
+ display: flex;
274
+ flex-direction: column;
275
+ align-items: end;
276
+ }
277
+
278
+ /* `createChat`'s first messages are the widget's greeting, not an answer: nothing to copy. */
279
+ .aparte-n8n aparte-chat-bubble[message-id^='n8n-initial-'] .aparte-action-bar {
280
+ display: none;
281
+ }
282
+
283
+ /* n8n names no one and shows no time. Hidden from the eye only: a screen reader still
284
+ hears who is speaking, which n8n's widget never said. */
285
+ .aparte-n8n .aparte-message > .aparte-body > .aparte-header {
286
+ position: absolute;
287
+ inline-size: 1px;
288
+ block-size: 1px;
289
+ overflow: hidden;
290
+ clip-path: inset(50%);
291
+ white-space: nowrap;
292
+ }
293
+
294
+ /* ── Files ──────────────────────────────────────────────────────────────────────────── */
295
+
296
+ /* A file as n8n draws it: a chip with its name, waiting in the composer and sent in the
297
+ conversation. Core's square tile shows the name on hover alone, so a visitor on a phone,
298
+ or on the keyboard, never saw which invoice they were sending. The ✕ stays in sight. */
299
+ .aparte-n8n .aparte-thumb {
300
+ --aparte-thumbnail-size: auto;
301
+ --aparte-thumbnail-radius: 0.25rem;
302
+ --aparte-thumbnail-bg: var(--aparte-surface-1);
303
+ --aparte-thumbnail-border: var(--aparte-border);
304
+ --aparte-thumb-name-color: var(--aparte-text);
305
+ --aparte-thumb-remove-bg: transparent;
306
+ --aparte-thumb-remove-bg-hover: var(--aparte-bg);
307
+ --aparte-thumb-remove-color: var(--aparte-text-muted);
308
+ max-inline-size: 15rem;
309
+ justify-content: flex-start;
310
+ gap: 0.375rem;
311
+ padding: 0.375rem 0.5rem;
312
+ font-size: 0.75rem;
313
+ }
314
+
315
+ .aparte-n8n .aparte-thumb .aparte-thumbnail__image {
316
+ inline-size: 1.5rem;
317
+ block-size: 1.5rem;
318
+ flex: none;
319
+ border-radius: 0.125rem;
320
+ }
321
+
322
+ .aparte-n8n .aparte-thumb__name,
323
+ .aparte-n8n .aparte-thumb__remove {
324
+ position: static;
325
+ opacity: 1;
326
+ }
327
+
328
+ .aparte-n8n .aparte-thumb__name {
329
+ padding: 0;
330
+ background: none;
331
+ font-size: inherit;
332
+ min-inline-size: 0;
333
+ }
334
+
335
+ .aparte-n8n .aparte-thumb__remove {
336
+ flex: none;
337
+ }
338
+
339
+ /* ── The button in the corner ───────────────────────────────────────────────────────── */
340
+
341
+ .aparte-n8n .aparte-launcher__button {
342
+ --aparte-btn-size-lg: var(--chat--toggle--size, 64px);
343
+ /* Half the button, as n8n draws it. */
344
+ --aparte-btn-icon-size: calc(var(--chat--toggle--size, 64px) / 2);
345
+ --aparte-primary: var(--aparte-n8n-toggle-bg);
346
+ --aparte-primary-hover: var(--aparte-n8n-toggle-hover-bg);
347
+ --aparte-on-primary: var(--aparte-n8n-toggle-color);
348
+ /* Open, it stays n8n's color, as n8n's does, rather than the recipe's neutral. */
349
+ --aparte-btn-bg-toggled: var(--aparte-n8n-toggle-bg);
350
+ --aparte-btn-color-toggled: var(--aparte-n8n-toggle-color);
351
+ inline-size: var(--chat--toggle--width, var(--chat--toggle--size, 64px));
352
+ block-size: var(--chat--toggle--height, var(--chat--toggle--size, 64px));
353
+ border-radius: var(--chat--toggle--border-radius, 50%);
354
+ }
355
+
356
+ /* The button floats over a page that is not ours: a ring in two tones, light then dark,
357
+ that shows on any ground and on the button's own color. */
358
+ .aparte-n8n .aparte-launcher__button:focus-visible {
359
+ outline: 3px solid var(--aparte-n8n-header-bg);
360
+ outline-offset: 2px;
361
+ box-shadow: 0 0 0 2px #fff, var(--aparte-popover-shadow);
362
+ }
363
+
364
+ /* A short window — a phone held sideways, a page zoomed in: the header gives the room
365
+ back to the conversation. */
366
+ @media (max-height: 34rem) {
367
+ .aparte-n8n__title {
368
+ font-size: 1.25em;
369
+ }
370
+
371
+ .aparte-n8n__subtitle {
372
+ display: none;
373
+ }
374
+ }
375
+
376
+ /* What the workflow itself said went wrong, under the sentence: smaller, and quieter. */
377
+ .aparte-n8n .aparte-n8n__error-detail {
378
+ margin: var(--aparte-space-1) 0 0;
379
+ font-size: var(--aparte-font-size-sm);
380
+ color: var(--aparte-text-muted);
381
+ overflow-wrap: anywhere;
382
+ }
383
+
384
+ /* n8n's `transparent` history message: its words without the bubble around them. */
385
+ .aparte-n8n aparte-chat-bubble[data-n8n-transparent] .aparte-message-content {
386
+ background: none;
387
+ border-color: transparent;
388
+ padding-inline: 0;
389
+ }