@tulipfarm/sprout 0.1.0 → 0.2.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.
- package/dist/components/attachment.js +2 -2
- package/dist/components/brand-icon.js +4 -0
- package/dist/components/canvas.js +2 -2
- package/dist/components/chat-input.d.ts +94 -0
- package/dist/components/chat-input.js +279 -0
- package/dist/components/code-block.js +2 -33
- package/dist/components/file-explorer.d.ts +27 -0
- package/dist/components/file-explorer.js +300 -0
- package/dist/components/file-viewer.d.ts +18 -1
- package/dist/components/file-viewer.js +35 -8
- package/dist/components/questionnaire.js +2 -1
- package/dist/components/search-dialog.js +5 -4
- package/dist/components/state-panel.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/internal/brand-glyphs.d.ts +28 -0
- package/dist/internal/brand-glyphs.js +24 -0
- package/dist/internal/code-tokens.d.ts +4 -0
- package/dist/internal/code-tokens.js +34 -0
- package/dist/styles/accordion.css +2 -2
- package/dist/styles/alert-dialog.css +2 -2
- package/dist/styles/alert.css +2 -2
- package/dist/styles/attachment.css +4 -24
- package/dist/styles/badge.css +2 -2
- package/dist/styles/brand-icon.css +2 -2
- package/dist/styles/breadcrumb.css +2 -2
- package/dist/styles/button.css +2 -2
- package/dist/styles/calendar.css +3 -3
- package/dist/styles/canvas.css +4 -18
- package/dist/styles/carousel.css +2 -2
- package/dist/styles/chart.css +2 -2
- package/dist/styles/chat-confirmation.css +2 -2
- package/dist/styles/chat-input.css +240 -0
- package/dist/styles/chat-sources.css +2 -2
- package/dist/styles/checkbox.css +2 -3
- package/dist/styles/choice-list.css +2 -2
- package/dist/styles/code-block.css +2 -2
- package/dist/styles/collapsible.css +2 -2
- package/dist/styles/combobox.css +6 -6
- package/dist/styles/command.css +2 -2
- package/dist/styles/context-menu.css +3 -3
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/dropdown-menu.css +1 -1
- package/dist/styles/field.css +2 -3
- package/dist/styles/file-explorer.css +517 -0
- package/dist/styles/file-viewer.css +113 -16
- package/dist/styles/hover-card.css +2 -2
- package/dist/styles/index.css +6 -0
- package/dist/styles/input-group.css +6 -11
- package/dist/styles/input-otp.css +2 -2
- package/dist/styles/input.css +3 -4
- package/dist/styles/mention-list.css +1 -1
- package/dist/styles/menubar.css +3 -3
- package/dist/styles/message-response.css +4 -4
- package/dist/styles/message-scroller.css +2 -2
- package/dist/styles/message.css +4 -4
- package/dist/styles/navigation-menu.css +2 -2
- package/dist/styles/page-header.css +4 -4
- package/dist/styles/plan-outline.css +6 -6
- package/dist/styles/prompt-list.css +2 -2
- package/dist/styles/questionnaire.css +2 -17
- package/dist/styles/radio-group.css +2 -3
- package/dist/styles/reasoning-effort.css +2 -2
- package/dist/styles/review-card.css +2 -2
- package/dist/styles/rich-text-editor.css +2 -2
- package/dist/styles/schema-diagram.css +4 -4
- package/dist/styles/scroll-area.css +2 -2
- package/dist/styles/search-dialog.css +0 -83
- package/dist/styles/select.css +3 -3
- package/dist/styles/separator.css +2 -2
- package/dist/styles/sheet.css +2 -2
- package/dist/styles/sidebar.css +2 -2
- package/dist/styles/slider.css +1 -1
- package/dist/styles/state-panel.css +1 -10
- package/dist/styles/switch.css +2 -2
- package/dist/styles/table.css +10 -10
- package/dist/styles/tabs.css +4 -4
- package/dist/styles/textarea.css +3 -4
- package/dist/styles/themes/tulipfarm.css +89 -99
- package/dist/styles/toast.css +2 -2
- package/dist/styles/toggle-group.css +2 -2
- package/dist/styles/toggle.css +2 -2
- package/dist/styles/tool-activity.css +5 -5
- package/package.json +10 -1
|
@@ -34,6 +34,30 @@ export const brandGlyphs = {
|
|
|
34
34
|
{ "d": "M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z", "evenOdd": true },
|
|
35
35
|
],
|
|
36
36
|
},
|
|
37
|
+
"gemini": {
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
paths: [
|
|
40
|
+
{ "d": "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z", "evenOdd": true },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
"mistral": {
|
|
44
|
+
viewBox: "0 0 24 24",
|
|
45
|
+
paths: [
|
|
46
|
+
{ "d": "M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z", "evenOdd": true },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
"meta": {
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
paths: [
|
|
52
|
+
{ "d": "M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z", "evenOdd": true },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
"qwen": {
|
|
56
|
+
viewBox: "0 0 24 24",
|
|
57
|
+
paths: [
|
|
58
|
+
{ "d": "M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z", "evenOdd": true },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
37
61
|
"google": {
|
|
38
62
|
viewBox: "0 0 24 24",
|
|
39
63
|
paths: [
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ThemedToken } from "shiki/core";
|
|
2
|
+
import type { CodeLanguage } from "./languages.js";
|
|
3
|
+
export declare function useCodeTokens(code: string, language: CodeLanguage | null): ThemedToken[][] | null;
|
|
4
|
+
export declare function tokenClass(token: ThemedToken): string | undefined;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import { codeTokens, embeddedLanguages, isLanguageReady, loadCodeLanguage, maxHighlightedLength, } from "./syntax.js";
|
|
3
|
+
export function useCodeTokens(code, language) {
|
|
4
|
+
const [loaded, setLoaded] = useState(0);
|
|
5
|
+
const highlightable = language !== null && code.length <= maxHighlightedLength;
|
|
6
|
+
const needed = useMemo(() => highlightable ? [language, ...embeddedLanguages(code, language)] : [], [code, language, highlightable]);
|
|
7
|
+
const missing = needed.filter((name) => !isLanguageReady(name));
|
|
8
|
+
const key = missing.join(" ");
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!key)
|
|
11
|
+
return;
|
|
12
|
+
let live = true;
|
|
13
|
+
void Promise.all(key.split(" ").map((name) => loadCodeLanguage(name))).then(() => live && setLoaded((value) => value + 1), () => undefined);
|
|
14
|
+
return () => {
|
|
15
|
+
live = false;
|
|
16
|
+
};
|
|
17
|
+
}, [key]);
|
|
18
|
+
return useMemo(() => (highlightable ? codeTokens(code, language) : null),
|
|
19
|
+
// `loaded` and `key` re-run this once the grammars arrive.
|
|
20
|
+
[code, language, highlightable, loaded, key]);
|
|
21
|
+
}
|
|
22
|
+
const fontStyleClasses = [
|
|
23
|
+
[1, "sprout-syntax-italic"],
|
|
24
|
+
[2, "sprout-syntax-bold"],
|
|
25
|
+
[4, "sprout-syntax-underline"],
|
|
26
|
+
];
|
|
27
|
+
export function tokenClass(token) {
|
|
28
|
+
const role = /--sprout-syntax-(?:token-)?([a-z-]+)/.exec(token.color ?? "")?.[1];
|
|
29
|
+
const classes = role && role !== "foreground" ? [`sprout-syntax-${role}`] : [];
|
|
30
|
+
for (const [flag, name] of fontStyleClasses)
|
|
31
|
+
if ((token.fontStyle ?? 0) & flag)
|
|
32
|
+
classes.push(name);
|
|
33
|
+
return classes.length ? classes.join(" ") : undefined;
|
|
34
|
+
}
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
text-decoration-line: underline;
|
|
41
41
|
}
|
|
42
42
|
.sprout-accordion-trigger:focus-visible {
|
|
43
|
-
outline:
|
|
44
|
-
outline-offset:
|
|
43
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
44
|
+
outline-offset: 0;
|
|
45
45
|
}
|
|
46
46
|
.sprout-accordion-trigger[data-disabled] {
|
|
47
47
|
cursor: not-allowed;
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
text-underline-offset: 3px;
|
|
99
99
|
}
|
|
100
100
|
.sprout-alert-dialog-description a:not([data-slot]):focus-visible {
|
|
101
|
-
outline:
|
|
102
|
-
outline-offset:
|
|
101
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
102
|
+
outline-offset: 0;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.sprout-alert-dialog-footer {
|
package/dist/styles/alert.css
CHANGED
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
}
|
|
89
89
|
:is(.sprout-alert-title, .sprout-alert-description)
|
|
90
90
|
a:not([data-slot]):focus-visible {
|
|
91
|
-
outline:
|
|
92
|
-
outline-offset:
|
|
91
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
92
|
+
outline-offset: 0;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.sprout-alert-action {
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
.sprout-attachment:has(> .sprout-attachment-trigger:focus-visible) {
|
|
55
|
-
outline:
|
|
56
|
-
outline-offset:
|
|
55
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
56
|
+
outline-offset: 0;
|
|
57
57
|
}
|
|
58
58
|
.sprout-attachment[data-state="idle"] {
|
|
59
59
|
border-style: dashed;
|
|
@@ -320,18 +320,6 @@
|
|
|
320
320
|
);
|
|
321
321
|
}
|
|
322
322
|
.sprout-attachment-carousel-arrow {
|
|
323
|
-
display: flex;
|
|
324
|
-
align-items: center;
|
|
325
|
-
justify-content: center;
|
|
326
|
-
width: 24px;
|
|
327
|
-
height: 24px;
|
|
328
|
-
padding: 0;
|
|
329
|
-
border: 1px solid var(--sprout-line);
|
|
330
|
-
border-radius: 8px;
|
|
331
|
-
background: var(--sprout-surface);
|
|
332
|
-
box-shadow: var(--sprout-shadow-control);
|
|
333
|
-
color: var(--sprout-muted);
|
|
334
|
-
cursor: pointer;
|
|
335
323
|
opacity: 0;
|
|
336
324
|
pointer-events: auto;
|
|
337
325
|
}
|
|
@@ -346,14 +334,6 @@
|
|
|
346
334
|
opacity: 1;
|
|
347
335
|
}
|
|
348
336
|
}
|
|
349
|
-
.sprout-attachment-carousel-arrow:hover {
|
|
350
|
-
background: var(--sprout-hover);
|
|
351
|
-
color: var(--sprout-text);
|
|
352
|
-
}
|
|
353
|
-
.sprout-attachment-carousel-arrow:focus-visible {
|
|
354
|
-
outline: 2px solid var(--sprout-focus);
|
|
355
|
-
outline-offset: 1px;
|
|
356
|
-
}
|
|
357
337
|
|
|
358
338
|
/* File type icon */
|
|
359
339
|
.sprout-file-type-icon {
|
|
@@ -486,8 +466,8 @@
|
|
|
486
466
|
}
|
|
487
467
|
.sprout-file-attachment-open:focus-visible,
|
|
488
468
|
.sprout-file-attachment-preview:focus-visible {
|
|
489
|
-
outline:
|
|
490
|
-
outline-offset:
|
|
469
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
470
|
+
outline-offset: 0;
|
|
491
471
|
}
|
|
492
472
|
.sprout-file-attachment:has(
|
|
493
473
|
button.sprout-file-attachment-open:not(:disabled)
|
package/dist/styles/badge.css
CHANGED
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
pointer-events: none;
|
|
37
37
|
}
|
|
38
38
|
.sprout-badge:focus-visible {
|
|
39
|
-
outline:
|
|
40
|
-
outline-offset:
|
|
39
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
40
|
+
outline-offset: 0;
|
|
41
41
|
}
|
|
42
42
|
.sprout-badge[aria-invalid="true"] {
|
|
43
43
|
border-color: var(--sprout-danger);
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
background: var(--sprout-hover);
|
|
51
51
|
}
|
|
52
52
|
.sprout-brand-tile[data-size]:is(button, a):focus-visible {
|
|
53
|
-
outline:
|
|
54
|
-
outline-offset:
|
|
53
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
54
|
+
outline-offset: 0;
|
|
55
55
|
}
|
|
56
56
|
.sprout-brand-tile[data-size]:is(button, a):disabled {
|
|
57
57
|
cursor: not-allowed;
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
color: var(--sprout-text);
|
|
55
55
|
}
|
|
56
56
|
.sprout-breadcrumb-link:focus-visible {
|
|
57
|
-
outline:
|
|
58
|
-
outline-offset:
|
|
57
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
58
|
+
outline-offset: 0;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.sprout-breadcrumb-page {
|
package/dist/styles/button.css
CHANGED
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
height: var(--sprout-button-icon);
|
|
34
34
|
}
|
|
35
35
|
.sprout-button:focus-visible {
|
|
36
|
-
outline:
|
|
37
|
-
outline-offset:
|
|
36
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
37
|
+
outline-offset: 0;
|
|
38
38
|
}
|
|
39
39
|
.sprout-button:disabled,
|
|
40
40
|
.sprout-button[data-disabled],
|
package/dist/styles/calendar.css
CHANGED
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
}
|
|
222
222
|
.sprout-calendar-day-button.sprout-button:focus-visible {
|
|
223
223
|
z-index: 2;
|
|
224
|
-
outline-offset:
|
|
224
|
+
outline-offset: 0;
|
|
225
225
|
}
|
|
226
226
|
.sprout-calendar-day-button > span {
|
|
227
227
|
font-size: 0.625rem;
|
|
@@ -282,11 +282,11 @@
|
|
|
282
282
|
.sprout-calendar-day-button[data-range-start="true"],
|
|
283
283
|
.sprout-calendar-day-button[data-range-end="true"] {
|
|
284
284
|
outline: 2px solid Highlight;
|
|
285
|
-
outline-offset: -
|
|
285
|
+
outline-offset: -1px;
|
|
286
286
|
}
|
|
287
287
|
.sprout-calendar-day-button[data-range-middle="true"] {
|
|
288
288
|
outline: 1px dashed Highlight;
|
|
289
|
-
outline-offset: -
|
|
289
|
+
outline-offset: -1px;
|
|
290
290
|
}
|
|
291
291
|
.sprout-calendar-today .sprout-calendar-day-button {
|
|
292
292
|
text-decoration: underline;
|
package/dist/styles/canvas.css
CHANGED
|
@@ -152,16 +152,13 @@
|
|
|
152
152
|
}
|
|
153
153
|
.sprout-canvas-tab:focus-visible,
|
|
154
154
|
.sprout-canvas-tab-close:focus-visible {
|
|
155
|
-
outline:
|
|
156
|
-
outline-offset: -
|
|
155
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
156
|
+
outline-offset: -1px;
|
|
157
157
|
}
|
|
158
158
|
.sprout-canvas-tab-icon {
|
|
159
159
|
display: inline-flex;
|
|
160
160
|
flex-shrink: 0;
|
|
161
161
|
}
|
|
162
|
-
.sprout-canvas-tab-spinner {
|
|
163
|
-
flex-shrink: 0;
|
|
164
|
-
}
|
|
165
162
|
.sprout-canvas-tab-title {
|
|
166
163
|
min-width: 0;
|
|
167
164
|
overflow: hidden;
|
|
@@ -178,8 +175,8 @@
|
|
|
178
175
|
outline: none;
|
|
179
176
|
}
|
|
180
177
|
.sprout-canvas-body:focus-visible {
|
|
181
|
-
outline:
|
|
182
|
-
outline-offset: -
|
|
178
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
179
|
+
outline-offset: -1px;
|
|
183
180
|
}
|
|
184
181
|
|
|
185
182
|
.sprout-canvas-toggle-count {
|
|
@@ -295,11 +292,6 @@
|
|
|
295
292
|
}
|
|
296
293
|
}
|
|
297
294
|
|
|
298
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
299
|
-
.sprout-canvas-tab-spinner {
|
|
300
|
-
animation: sprout-canvas-spin 1s linear infinite;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
295
|
@media (prefers-reduced-motion: reduce) {
|
|
304
296
|
.sprout-canvas-tab,
|
|
305
297
|
.sprout-canvas-tab-close,
|
|
@@ -319,9 +311,3 @@
|
|
|
319
311
|
}
|
|
320
312
|
}
|
|
321
313
|
}
|
|
322
|
-
|
|
323
|
-
@keyframes sprout-canvas-spin {
|
|
324
|
-
to {
|
|
325
|
-
transform: rotate(360deg);
|
|
326
|
-
}
|
|
327
|
-
}
|
package/dist/styles/carousel.css
CHANGED
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
user-select: none;
|
|
38
38
|
}
|
|
39
39
|
.sprout-carousel-content:focus-visible {
|
|
40
|
-
outline:
|
|
41
|
-
outline-offset: -
|
|
40
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
41
|
+
outline-offset: -1px;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.sprout-carousel-track {
|
package/dist/styles/chart.css
CHANGED
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
border-radius: var(--sprout-radius-control);
|
|
88
88
|
}
|
|
89
89
|
.sprout-chart .recharts-surface:focus-visible {
|
|
90
|
-
outline:
|
|
91
|
-
outline-offset:
|
|
90
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
91
|
+
outline-offset: 0;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.sprout-chart-tooltip {
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.sprout-chat-input {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 12px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
font-family: var(--sprout-font);
|
|
10
|
+
}
|
|
11
|
+
.sprout-chat-input-form {
|
|
12
|
+
position: relative;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sprout-chat-input-attachments.sprout-input-group-addon {
|
|
17
|
+
flex-wrap: nowrap;
|
|
18
|
+
justify-content: flex-start;
|
|
19
|
+
gap: 6px;
|
|
20
|
+
padding: 4px 4px 0;
|
|
21
|
+
overflow-x: auto;
|
|
22
|
+
overscroll-behavior-x: contain;
|
|
23
|
+
scrollbar-width: none;
|
|
24
|
+
cursor: default;
|
|
25
|
+
}
|
|
26
|
+
.sprout-chat-input-attachments::-webkit-scrollbar {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
.sprout-chat-input-attachments > * {
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sprout-chat-input-editor .sprout-rich-text-editor-body {
|
|
34
|
+
min-height: 4.5rem;
|
|
35
|
+
}
|
|
36
|
+
.sprout-chat-input-editor .sprout-rich-text-editor-content {
|
|
37
|
+
font-size: var(--sprout-text-sm);
|
|
38
|
+
line-height: 1.25rem;
|
|
39
|
+
}
|
|
40
|
+
.sprout-chat-input-reference {
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
padding: 0 6px;
|
|
44
|
+
border-radius: var(--sprout-radius-control);
|
|
45
|
+
background: var(--sprout-hover);
|
|
46
|
+
color: var(--sprout-text);
|
|
47
|
+
font-size: 0.9375em;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
}
|
|
51
|
+
.sprout-chat-input-reference[data-chat-reference="agent"] {
|
|
52
|
+
background: var(--sprout-info-subtle);
|
|
53
|
+
color: var(--sprout-info);
|
|
54
|
+
}
|
|
55
|
+
.sprout-chat-input-reference.ProseMirror-selectednode {
|
|
56
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
57
|
+
outline-offset: 0;
|
|
58
|
+
}
|
|
59
|
+
.sprout-chat-input-editor .sprout-rich-text-editor-content a {
|
|
60
|
+
color: var(--sprout-info);
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
text-underline-offset: 2px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sprout-chat-input-bar {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex: 1;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
gap: 8px;
|
|
71
|
+
min-width: 0;
|
|
72
|
+
}
|
|
73
|
+
.sprout-chat-input-bar-start,
|
|
74
|
+
.sprout-chat-input-bar-end {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 2px;
|
|
78
|
+
min-width: 0;
|
|
79
|
+
}
|
|
80
|
+
.sprout-chat-input-bar-end {
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
gap: 6px;
|
|
83
|
+
}
|
|
84
|
+
.sprout-chat-input-divider {
|
|
85
|
+
align-self: center;
|
|
86
|
+
width: 1px;
|
|
87
|
+
height: 20px;
|
|
88
|
+
margin-inline: 6px;
|
|
89
|
+
background: var(--sprout-line);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sprout-chat-input-bar .sprout-input-group-button[data-variant="ghost"] {
|
|
93
|
+
color: var(--sprout-muted);
|
|
94
|
+
}
|
|
95
|
+
.sprout-chat-input-bar
|
|
96
|
+
.sprout-input-group-button[data-variant="ghost"]:hover {
|
|
97
|
+
color: var(--sprout-text);
|
|
98
|
+
}
|
|
99
|
+
.sprout-chat-input-picker-label {
|
|
100
|
+
min-width: 0;
|
|
101
|
+
max-width: 10rem;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
.sprout-chat-input-bar .sprout-chat-input-mode {
|
|
107
|
+
color: var(--sprout-text);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.sprout-chat-input[data-mode-color]
|
|
111
|
+
.sprout-input-group.sprout-chat-input-box {
|
|
112
|
+
border-color: var(--sprout-chat-input-mode);
|
|
113
|
+
box-shadow: 0 0 0 3px
|
|
114
|
+
color-mix(in oklab, var(--sprout-chat-input-mode) 14%, transparent);
|
|
115
|
+
}
|
|
116
|
+
.sprout-chat-input[data-mode-color]
|
|
117
|
+
.sprout-chat-input-bar
|
|
118
|
+
.sprout-chat-input-mode {
|
|
119
|
+
background: color-mix(
|
|
120
|
+
in oklab,
|
|
121
|
+
var(--sprout-chat-input-mode) 14%,
|
|
122
|
+
transparent
|
|
123
|
+
);
|
|
124
|
+
color: var(--sprout-chat-input-mode);
|
|
125
|
+
}
|
|
126
|
+
.sprout-chat-input[data-mode-color]
|
|
127
|
+
.sprout-chat-input-bar
|
|
128
|
+
.sprout-chat-input-mode:hover {
|
|
129
|
+
background: color-mix(
|
|
130
|
+
in oklab,
|
|
131
|
+
var(--sprout-chat-input-mode) 22%,
|
|
132
|
+
transparent
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
.sprout-chat-input-mode-option > :is(svg, .sprout-brand-icon) {
|
|
136
|
+
color: var(--sprout-chat-input-mode);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.sprout-dropdown-menu-content.sprout-chat-input-menu {
|
|
140
|
+
width: 18rem;
|
|
141
|
+
}
|
|
142
|
+
.sprout-chat-input-menu
|
|
143
|
+
:is(.sprout-dropdown-menu-item, .sprout-command-item):has(
|
|
144
|
+
.sprout-chat-input-option-text
|
|
145
|
+
) {
|
|
146
|
+
align-items: flex-start;
|
|
147
|
+
padding-block: 6px;
|
|
148
|
+
}
|
|
149
|
+
.sprout-chat-input-menu
|
|
150
|
+
:is(.sprout-dropdown-menu-item, .sprout-command-item):has(
|
|
151
|
+
.sprout-chat-input-option-text
|
|
152
|
+
)
|
|
153
|
+
> :is(svg, .sprout-brand-icon) {
|
|
154
|
+
margin-top: 2px;
|
|
155
|
+
}
|
|
156
|
+
.sprout-chat-input-option-text {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
gap: 2px;
|
|
160
|
+
min-width: 0;
|
|
161
|
+
}
|
|
162
|
+
.sprout-chat-input-option-description {
|
|
163
|
+
color: var(--sprout-muted);
|
|
164
|
+
font-size: var(--sprout-text-xs);
|
|
165
|
+
line-height: 1rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.sprout-chat-input-panel {
|
|
169
|
+
position: absolute;
|
|
170
|
+
inset-inline: 0;
|
|
171
|
+
bottom: calc(100% + 8px);
|
|
172
|
+
z-index: 20;
|
|
173
|
+
}
|
|
174
|
+
.sprout-chat-input-panel[data-side="bottom"] {
|
|
175
|
+
top: calc(100% + 8px);
|
|
176
|
+
bottom: auto;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.sprout-chat-input-prompts {
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-wrap: wrap;
|
|
182
|
+
gap: 8px;
|
|
183
|
+
}
|
|
184
|
+
.sprout-chat-input-stop {
|
|
185
|
+
width: 10px;
|
|
186
|
+
height: 10px;
|
|
187
|
+
border-radius: 2px;
|
|
188
|
+
background: currentColor;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.sprout-button.sprout-chat-input-prompt {
|
|
192
|
+
font-weight: 400;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (pointer: coarse) {
|
|
196
|
+
.sprout-chat-input-picker-label {
|
|
197
|
+
max-width: 6rem;
|
|
198
|
+
}
|
|
199
|
+
/* Keep the 44px tap target but paint the fill at the desktop 28px size. */
|
|
200
|
+
.sprout-chat-input .sprout-button.sprout-chat-input-send {
|
|
201
|
+
border: 8px solid transparent;
|
|
202
|
+
border-radius: calc(var(--sprout-radius-control) + 8px);
|
|
203
|
+
background-clip: padding-box;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
@media (max-width: 480px) {
|
|
207
|
+
.sprout-chat-input-bar .sprout-chat-input-picker-label {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
213
|
+
.sprout-chat-input[data-status="streaming"]
|
|
214
|
+
.sprout-rich-text-editor-content
|
|
215
|
+
.is-editor-empty:first-child::before {
|
|
216
|
+
animation: sprout-chat-input-pulse 1.6s ease-in-out infinite alternate;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
@keyframes sprout-chat-input-pulse {
|
|
220
|
+
to {
|
|
221
|
+
opacity: 0.4;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
226
|
+
.sprout-input-group.sprout-chat-input-box {
|
|
227
|
+
transition:
|
|
228
|
+
border-color var(--sprout-motion-normal) var(--sprout-motion-ease),
|
|
229
|
+
box-shadow var(--sprout-motion-normal) var(--sprout-motion-ease);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@media (forced-colors: active) {
|
|
234
|
+
.sprout-chat-input[data-status="streaming"]
|
|
235
|
+
.sprout-rich-text-editor-content
|
|
236
|
+
.is-editor-empty:first-child::before {
|
|
237
|
+
color: GrayText;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
color: var(--sprout-primary-hover);
|
|
95
95
|
}
|
|
96
96
|
.sprout-chat-sources-link:focus-visible {
|
|
97
|
-
outline:
|
|
98
|
-
outline-offset:
|
|
97
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
98
|
+
outline-offset: 0;
|
|
99
99
|
}
|
|
100
100
|
.sprout-chat-sources-retry {
|
|
101
101
|
margin-top: 4px;
|
package/dist/styles/checkbox.css
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
vertical-align: middle;
|
|
18
18
|
cursor: pointer;
|
|
19
19
|
outline: 0 solid transparent;
|
|
20
|
-
outline-offset:
|
|
20
|
+
outline-offset: 0;
|
|
21
21
|
-webkit-tap-highlight-color: transparent;
|
|
22
22
|
}
|
|
23
23
|
/* A 40 x 32px hit area around the 16px box. */
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
.sprout-checkbox:focus-visible {
|
|
39
|
-
|
|
40
|
-
outline: 2px solid var(--sprout-focus);
|
|
39
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
41
40
|
}
|
|
42
41
|
.sprout-checkbox[data-checked],
|
|
43
42
|
.sprout-checkbox[data-indeterminate] {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
font-size: var(--sprout-text-sm);
|
|
49
49
|
line-height: 1.25rem;
|
|
50
50
|
outline: 0 solid transparent;
|
|
51
|
-
outline-offset:
|
|
51
|
+
outline-offset: 0;
|
|
52
52
|
}
|
|
53
53
|
.sprout-choice-list-option {
|
|
54
54
|
align-items: center;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
.sprout-choice-list-option:has(.sprout-choice-list-input:focus-visible),
|
|
69
69
|
.sprout-choice-list-text:focus-within {
|
|
70
|
-
outline:
|
|
70
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
71
71
|
}
|
|
72
72
|
.sprout-choice-list-option[data-checked],
|
|
73
73
|
.sprout-choice-list-text[data-checked] {
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
min-height: 0;
|
|
81
81
|
}
|
|
82
82
|
.sprout-code-block-viewport:focus-visible {
|
|
83
|
-
outline:
|
|
84
|
-
outline-offset: -
|
|
83
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
84
|
+
outline-offset: -1px;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.sprout-code-block-gutter,
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
-webkit-tap-highlight-color: transparent;
|
|
11
11
|
}
|
|
12
12
|
:where(.sprout-collapsible-trigger:not(.sprout-button)):focus-visible {
|
|
13
|
-
outline:
|
|
14
|
-
outline-offset:
|
|
13
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
14
|
+
outline-offset: 0;
|
|
15
15
|
}
|
|
16
16
|
:where(.sprout-collapsible-trigger:not(.sprout-button))[data-disabled] {
|
|
17
17
|
cursor: not-allowed;
|
package/dist/styles/combobox.css
CHANGED
|
@@ -182,15 +182,15 @@
|
|
|
182
182
|
font-size: var(--sprout-text-sm);
|
|
183
183
|
line-height: 20px;
|
|
184
184
|
outline: 0 solid transparent;
|
|
185
|
-
outline-offset:
|
|
185
|
+
outline-offset: 0;
|
|
186
186
|
cursor: text;
|
|
187
187
|
}
|
|
188
188
|
.sprout-combobox-chips:has([data-slot="combobox-chip"]) {
|
|
189
189
|
padding-inline: 4px;
|
|
190
190
|
}
|
|
191
191
|
.sprout-combobox-chips:focus-within {
|
|
192
|
-
border-color: var(--sprout-
|
|
193
|
-
outline:
|
|
192
|
+
border-color: var(--sprout-border);
|
|
193
|
+
outline: var(--sprout-focus-width) solid transparent;
|
|
194
194
|
}
|
|
195
195
|
.sprout-combobox-chips:has([aria-invalid="true"]),
|
|
196
196
|
.sprout-combobox-chips:has([data-invalid]) {
|
|
@@ -225,8 +225,8 @@
|
|
|
225
225
|
}
|
|
226
226
|
.sprout-combobox-chip:focus-visible,
|
|
227
227
|
.sprout-combobox-chip[data-highlighted] {
|
|
228
|
-
outline:
|
|
229
|
-
outline-offset:
|
|
228
|
+
outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
|
|
229
|
+
outline-offset: 0;
|
|
230
230
|
}
|
|
231
231
|
.sprout-combobox-chip:has(:disabled),
|
|
232
232
|
.sprout-combobox-chip[data-disabled] {
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
@media (forced-colors: active) {
|
|
302
302
|
.sprout-combobox-item[data-highlighted] {
|
|
303
303
|
outline: 2px solid Highlight;
|
|
304
|
-
outline-offset: -
|
|
304
|
+
outline-offset: -1px;
|
|
305
305
|
}
|
|
306
306
|
.sprout-combobox-chips:focus-within {
|
|
307
307
|
outline-color: Highlight;
|