@sybilion/uilib 1.3.82 → 1.3.84
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/esm/components/ui/Chat/ChatChrome/ChatChrome.js +17 -4
- package/dist/esm/components/ui/Chat/ChatMessage/AgentMessageContent.js +3 -2
- package/dist/esm/components/ui/Chat/ChatMessage/ChatMessage.js +2 -2
- package/dist/esm/components/ui/Chat/ChatMessage/ChatMessage.styl.js +2 -2
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +1 -1
- package/dist/esm/components/ui/Page/AppBanner/AppBanner.js +11 -0
- package/dist/esm/components/ui/Page/AppBanner/AppBanner.styl.js +7 -0
- package/dist/esm/components/ui/Page/AppShell/AppShell.js +2 -2
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +1 -1
- package/dist/esm/components/widgets/DriversComparisonChart/DriversComparisonChart.js +4 -1
- package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +3 -2
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.js +2 -2
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +2 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/types/src/components/ui/Chat/Chat.types.d.ts +14 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/ChatChrome.d.ts +1 -1
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/ChatChrome.types.d.ts +5 -1
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/AgentMessageContent.d.ts +2 -1
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/esm/types/src/components/ui/Chat/index.d.ts +1 -1
- package/dist/esm/types/src/components/ui/Page/AppBanner/AppBanner.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Page/index.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/SybilionAppHeader/SybilionAppHeader.d.ts +1 -3
- package/package.json +1 -1
- package/src/components/ui/Chat/Chat.types.ts +16 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +23 -3
- package/src/components/ui/Chat/ChatChrome/ChatChrome.types.ts +6 -0
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.tsx +4 -1
- package/src/components/ui/Chat/ChatMessage/ChatMessage.styl +5 -3
- package/src/components/ui/Chat/ChatMessage/ChatMessage.styl.d.ts +1 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.tsx +8 -3
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +2 -2
- package/src/components/ui/Chat/index.ts +3 -0
- package/src/components/ui/Page/AppBanner/AppBanner.styl +39 -0
- package/src/components/ui/Page/AppBanner/AppBanner.styl.d.ts +9 -0
- package/src/components/ui/Page/AppBanner/AppBanner.tsx +31 -0
- package/src/components/ui/Page/AppShell/AppShell.tsx +4 -2
- package/src/components/ui/Page/index.ts +1 -0
- package/src/components/ui/Sidebar/Sidebar.styl +6 -7
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl +0 -7
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.d.ts +0 -1
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.tsx +1 -10
- package/src/docs/App/App.tsx +92 -3
- package/src/docs/DocsShell.styl +26 -0
- package/src/docs/DocsShell.styl.d.ts +4 -0
- package/dist/esm/types/src/docs/DocsShell.d.ts +0 -1
- package/src/docs/DocsShell.tsx +0 -55
|
@@ -15,7 +15,7 @@ import { filterToTextAttachments, isAttachmentsDropzoneEnabled, buildAcceptAttr
|
|
|
15
15
|
import { extractChatAttachmentItems } from '../chatAttachmentExtract.js';
|
|
16
16
|
import S from './ChatChrome.styl.js';
|
|
17
17
|
|
|
18
|
-
function ChatChrome({ variant = 'default', showResizeHandle, resizeHandle, onClose, isEmpty, renderPresets, messages, onQuickReply, suppressedQuickReplyKeys, isLoading, loadingLabel, scriptContinueLabel, onScriptContinue, renderMessageChart, renderSystemMessage, showSyntheticBranchButtons, unusedBranchKeys, showInlinePresets, isLastMessageFromUser, scrollRef, effectiveScopeId, onPromptSubmit, onChatDeleted, onNewChat, promptPrefill, footerClassName, emptyState, allowedAttachments, allowPdfAttachments = false, onAttachmentsDropped, slashCommandItems, onSlashItemCommand, promptPlaceholder, hideChatSelector = false, }) {
|
|
18
|
+
function ChatChrome({ variant = 'default', showResizeHandle, resizeHandle, onClose, isEmpty, renderPresets, messages, onQuickReply, suppressedQuickReplyKeys, isLoading, loadingLabel, scriptContinueLabel, onScriptContinue, renderMessageChart, renderSystemMessage, showSyntheticBranchButtons, unusedBranchKeys, showInlinePresets, isLastMessageFromUser, scrollRef, effectiveScopeId, onPromptSubmit, onChatDeleted, onNewChat, promptPrefill, footerClassName, messageClassNames, messageTextClassNames, emptyState, allowedAttachments, allowPdfAttachments = false, onAttachmentsDropped, slashCommandItems, onSlashItemCommand, promptPlaceholder, hideChatSelector = false, }) {
|
|
19
19
|
const filteredAllowedAttachments = useMemo(() => filterToTextAttachments(allowedAttachments), [allowedAttachments]);
|
|
20
20
|
const attachmentsDropzoneEnabled = isAttachmentsDropzoneEnabled(allowedAttachments, allowPdfAttachments);
|
|
21
21
|
const attachmentAccept = useMemo(() => buildAcceptAttr(filteredAllowedAttachments, allowPdfAttachments), [filteredAllowedAttachments, allowPdfAttachments]);
|
|
@@ -79,7 +79,21 @@ function ChatChrome({ variant = 'default', showResizeHandle, resizeHandle, onClo
|
|
|
79
79
|
const isClean = variant === 'clean';
|
|
80
80
|
return (jsxs("div", { className: cn(S.root, isClean && S.rootClean), children: [showResizeHandle && resizeHandle ? (jsx(PanelResizeHandle, { edge: "leading", isActive: resizeHandle.isActive, startWidthPx: resizeHandle.startWidthPx, getShellWidth: resizeHandle.getShellWidth, onDragWidth: resizeHandle.onDragWidth, onDragComplete: resizeHandle.onDragComplete, className: cn(SidebarStem.sidebarResizeHandle, S.chatResizeHandle) })) : null, jsx("div", { className: S.panelHeader, children: onClose ? (jsx(Button, { type: "button", variant: "ghost", icon: true, className: S.panelClose, "aria-label": "Close chat", onClick: onClose, children: jsx(X, { className: "size-4" }) })) : null }), jsxs("div", { className: S.content, children: [attachmentsDropzoneEnabled ? (jsx(DropZone, { accept: attachmentAccept, label: "Drop text files to attach", multiple: true, ghost: true, overlayScope: "container", disabled: promptDisabled, className: S.attachmentDropzone, onFiles: handleAttachmentFiles })) : null, jsxs(Chat, { className: isClean ? S.chatClean : undefined, isEmpty: isEmpty, scopeId: effectiveScopeId, onChatDeleted: onChatDeleted, onNewChat: onNewChat, hideChatSelector: hideChatSelector, children: [isEmpty ? (jsx("div", { className: S.emptyBody, children: jsx(Chat.EmptyState, { ...emptyState }) })) : (jsx("div", { className: S.scrollWrapper, children: jsxs(Scroll, { y: true, yScrollbarClassName: S.scrollbar, className: S.scroll, innerClassName: S.scrollInner, offset: { y: { before: 56, after: 24 } }, fadeSize: "m", autoHide: true, ref: scrollRef, children: [messages.map((msg, index, arr) => {
|
|
81
81
|
const isLast = index === arr.length - 1;
|
|
82
|
-
|
|
82
|
+
const messageClassName = messageClassNames
|
|
83
|
+
? {
|
|
84
|
+
[MessageRole.USER]: messageClassNames.user,
|
|
85
|
+
[MessageRole.ASSISTANT]: messageClassNames.assistant,
|
|
86
|
+
[MessageRole.SYSTEM]: messageClassNames.system,
|
|
87
|
+
}[msg.role]
|
|
88
|
+
: undefined;
|
|
89
|
+
const messageTextClassName = messageTextClassNames
|
|
90
|
+
? {
|
|
91
|
+
[MessageRole.USER]: messageTextClassNames.user,
|
|
92
|
+
[MessageRole.ASSISTANT]: messageTextClassNames.assistant,
|
|
93
|
+
[MessageRole.SYSTEM]: messageTextClassNames.system,
|
|
94
|
+
}[msg.role]
|
|
95
|
+
: undefined;
|
|
96
|
+
return (jsx(Chat.Message, { message: msg, className: messageClassName, textClassName: messageTextClassName, role: msg.role, text: msg.text, inProgress: msg.inProgress, userTextFileAttachments: msg.userTextFileAttachments, onQuickReply: onQuickReply, suppressedQuickReplyKeys: suppressedQuickReplyKeys, quickReplyDisabled: isLoading, quickReplyHidden: Boolean(loadingLabel), isLastMessage: isLast, scriptContinue: isLast && scriptContinueLabel
|
|
83
97
|
? { label: scriptContinueLabel }
|
|
84
98
|
: undefined, onScriptContinue: isLast && scriptContinueLabel
|
|
85
99
|
? onScriptContinue
|
|
@@ -88,8 +102,7 @@ function ChatChrome({ variant = 'default', showResizeHandle, resizeHandle, onClo
|
|
|
88
102
|
const label = displayLabelForBranchKeyFromMessages(key, messages) ??
|
|
89
103
|
humanizeBranchKey(key);
|
|
90
104
|
return (jsx("span", { className: S.branchBtnWrap, children: jsxs(Button, { type: "button", variant: "outline", size: "sm", disabled: isLoading, onClick: () => onQuickReply(key, label), children: [jsx(PaperPlaneRightIcon, {}), label] }) }, key));
|
|
91
|
-
}) })) : null, showInlinePresets &&
|
|
92
|
-
renderPresets('inline', { variant }), isLoading &&
|
|
105
|
+
}) })) : null, showInlinePresets && renderPresets('inline', { variant }), isLoading &&
|
|
93
106
|
!hasInProgressSystemMessage &&
|
|
94
107
|
(isLastMessageFromUser || loadingLabel) && (jsx(TextShimmer, { duration: 1, spread: 5, className: S.loader, children: loadingLabel ?? 'Thinking...' }))] }) })), isEmpty ? (jsx("div", { className: S.fixedPresets, children: renderPresets('fixed', { variant }) })) : null, isEmpty ? (jsx("div", { className: S.notice, children: "Forecast Assistant can make mistakes." })) : null, jsx("div", { className: cn(S.footer, isClean && S.footerClean, footerClassName), children: jsx(Chat.Prompt, { className: isClean ? S.promptClean : undefined, onSubmit: handlePromptSubmitWithAttachments, disabled: promptDisabled, attachments: pendingAttachments, onRemoveAttachment: handleRemoveAttachment, prefillMessage: promptPrefill ?? undefined, placeholder: promptPlaceholder, slashCommandItems: slashCommandItems, onSlashItemCommand: onSlashItemCommand, attachmentAccept: attachmentsDropzoneEnabled ? attachmentAccept : undefined, onAttachmentFiles: attachmentsDropzoneEnabled ? handleAttachmentFiles : undefined }) })] })] })] }));
|
|
95
108
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
2
3
|
import { useState, useMemo } from 'react';
|
|
3
4
|
import { Button } from '../../Button/Button.js';
|
|
4
5
|
import { InteractiveContent } from '../../InteractiveContent/InteractiveContent.js';
|
|
@@ -13,7 +14,7 @@ import S from './ChatMessage.styl.js';
|
|
|
13
14
|
import { DocIcon } from './icons/DocIcon.js';
|
|
14
15
|
import { XlsIcon } from './icons/XlsIcon.js';
|
|
15
16
|
|
|
16
|
-
function AgentMessageContent({ text, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage = true, scriptContinue, onScriptContinue, renderMessageChart, }) {
|
|
17
|
+
function AgentMessageContent({ text, textClassName, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage = true, scriptContinue, onScriptContinue, renderMessageChart, }) {
|
|
17
18
|
const [showRaw, setShowRaw] = useState(false);
|
|
18
19
|
const parts = useMemo(() => {
|
|
19
20
|
// Convert markdown tables to HTML first
|
|
@@ -125,7 +126,7 @@ function AgentMessageContent({ text, onQuickReply, suppressedQuickReplyKeys, qui
|
|
|
125
126
|
isLastMessage,
|
|
126
127
|
renderMessageChart,
|
|
127
128
|
]);
|
|
128
|
-
return (jsxs("div", { className: S.text, children: [showRaw ? text : parts, !showRaw &&
|
|
129
|
+
return (jsxs("div", { className: cn(S.text, textClassName), children: [showRaw ? text : parts, !showRaw &&
|
|
129
130
|
!quickReplyHidden &&
|
|
130
131
|
isLastMessage &&
|
|
131
132
|
scriptContinue &&
|
|
@@ -10,13 +10,13 @@ import { AgentMessageContent } from './AgentMessageContent.js';
|
|
|
10
10
|
import S from './ChatMessage.styl.js';
|
|
11
11
|
import { UserTextFileAttachmentBubble } from './UserTextFileAttachmentBubble.js';
|
|
12
12
|
|
|
13
|
-
function ChatMessage({ role, text, inProgress, userTextFileAttachments, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage = true, scriptContinue, onScriptContinue, renderMessageChart, message, renderSystemMessage, }) {
|
|
13
|
+
function ChatMessage({ role, text, inProgress, userTextFileAttachments, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage = true, scriptContinue, onScriptContinue, renderMessageChart, message, renderSystemMessage, className, textClassName, }) {
|
|
14
14
|
const fileAttachments = userTextFileAttachmentsFromMessage({
|
|
15
15
|
userTextFileAttachments,
|
|
16
16
|
});
|
|
17
17
|
const isAssistant = role === MessageRole.ASSISTANT;
|
|
18
18
|
const isSystem = role === MessageRole.SYSTEM;
|
|
19
|
-
return (jsx("div", { className: cn(S.root, S[`role-${role}`]), children: isSystem ? (jsx("div", { className: S.text, children: inProgress ? (jsx(TextShimmer, { as: "span", children: text })) : renderSystemMessage && message ? (renderSystemMessage(message)) : (text) })) : isAssistant ? (jsx(AgentMessageContent, { text: text, onQuickReply: onQuickReply, suppressedQuickReplyKeys: suppressedQuickReplyKeys, quickReplyDisabled: quickReplyDisabled, quickReplyHidden: quickReplyHidden, isLastMessage: isLastMessage, scriptContinue: scriptContinue, onScriptContinue: onScriptContinue, renderMessageChart: renderMessageChart })) : (jsxs("div", { className: S.userColumn, children: [jsx("div", { className: S.text, children: jsx(InteractiveContent, { text: text }) }), fileAttachments.map(attachment => (jsx(UserTextFileAttachmentBubble, { attachment: attachment }, `${attachment.displayName}:${attachment.filename}`)))] })) }));
|
|
19
|
+
return (jsx("div", { className: cn(S.root, S[`role-${role}`], className), children: isSystem ? (jsx("div", { className: cn(S.text, textClassName), children: inProgress ? (jsx(TextShimmer, { as: "span", children: text })) : renderSystemMessage && message ? (renderSystemMessage(message)) : (text) })) : isAssistant ? (jsx(AgentMessageContent, { text: text, textClassName: textClassName, onQuickReply: onQuickReply, suppressedQuickReplyKeys: suppressedQuickReplyKeys, quickReplyDisabled: quickReplyDisabled, quickReplyHidden: quickReplyHidden, isLastMessage: isLastMessage, scriptContinue: scriptContinue, onScriptContinue: onScriptContinue, renderMessageChart: renderMessageChart })) : (jsxs("div", { className: S.userColumn, children: [jsx("div", { className: cn(S.text, textClassName && S.textCustom, textClassName), children: jsx(InteractiveContent, { text: text }) }), fileAttachments.map(attachment => (jsx(UserTextFileAttachmentBubble, { attachment: attachment }, `${attachment.displayName}:${attachment.filename}`)))] })) }));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export { ChatMessage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".ChatMessage_root__6rnsF{background:var(--bg-secondary);display:flex;flex-direction:column;gap:var(--p-1);padding:var(--p-4);padding-bottom:var(--p-1)}.ChatMessage_text__Y1XNR{color:var(--text-secondary);font-size:var(--text-sm);max-width:100%;min-width:0;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;width:-moz-fit-content;width:fit-content;word-break:break-word}.ChatMessage_role-assistant__wketE+.ChatMessage_role-assistant__wketE,.ChatMessage_role-system__g13OP+.ChatMessage_role-system__g13OP,.ChatMessage_role-user__u4JPV+.ChatMessage_role-user__u4JPV{padding-top:var(--p-1)}.ChatMessage_role-user__u4JPV{align-items:flex-end;max-width:100%;min-width:0}.ChatMessage_role-user__u4JPV .ChatMessage_userColumn__cQM6-{align-items:flex-end;display:flex;flex-direction:column;gap:var(--p-2);max-width:100%;min-width:0}.ChatMessage_role-user__u4JPV .ChatMessage_text__Y1XNR{
|
|
4
|
-
var S = {"root":"ChatMessage_root__6rnsF","text":"ChatMessage_text__Y1XNR","role-user":"ChatMessage_role-user__u4JPV","role-assistant":"ChatMessage_role-assistant__wketE","role-system":"ChatMessage_role-system__g13OP","userColumn":"ChatMessage_userColumn__cQM6-","bullet":"ChatMessage_bullet__6vAhq","scrollHorizontal":"ChatMessage_scrollHorizontal__Rms9n","datasetAppLink":"ChatMessage_datasetAppLink__Pxy-T","datasetAppLinkLabel":"ChatMessage_datasetAppLinkLabel__PMU7e","quickReplyWrap":"ChatMessage_quickReplyWrap__1UFyD","downloadButtons":"ChatMessage_downloadButtons__RygM-","downloadCard":"ChatMessage_downloadCard__NsNRa","downloadCardIcon":"ChatMessage_downloadCardIcon__jkxDJ","downloadCardContent":"ChatMessage_downloadCardContent__PTPwz","downloadCardTitle":"ChatMessage_downloadCardTitle__K1wqr","downloadCardSubtitle":"ChatMessage_downloadCardSubtitle__fVeF2"};
|
|
3
|
+
var css_248z = ".ChatMessage_root__6rnsF{background:var(--bg-secondary);display:flex;flex-direction:column;gap:var(--p-1);padding:var(--p-4);padding-bottom:var(--p-1)}.ChatMessage_text__Y1XNR{color:var(--text-secondary);font-size:var(--text-sm);max-width:100%;min-width:0;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;width:-moz-fit-content;width:fit-content;word-break:break-word}.ChatMessage_role-assistant__wketE+.ChatMessage_role-assistant__wketE,.ChatMessage_role-system__g13OP+.ChatMessage_role-system__g13OP,.ChatMessage_role-user__u4JPV+.ChatMessage_role-user__u4JPV{padding-top:var(--p-1)}.ChatMessage_role-user__u4JPV{align-items:flex-end;max-width:100%;min-width:0}.ChatMessage_role-user__u4JPV .ChatMessage_userColumn__cQM6-{align-items:flex-end;display:flex;flex-direction:column;gap:var(--p-2);max-width:100%;min-width:0}.ChatMessage_role-user__u4JPV .ChatMessage_text__Y1XNR{border-radius:var(--p-4);border-bottom-right-radius:0;box-sizing:border-box;overflow:hidden;padding:var(--p-3) var(--p-4);white-space:pre-wrap}.ChatMessage_role-user__u4JPV .ChatMessage_text__Y1XNR:not(.ChatMessage_textCustom__C8Tts){background-color:var(--sb-slate-100)}.dark .ChatMessage_role-user__u4JPV .ChatMessage_text__Y1XNR:not(.ChatMessage_textCustom__C8Tts){background-color:var(--sb-gray-900)}.ChatMessage_role-system__g13OP{align-items:center}.ChatMessage_role-system__g13OP .ChatMessage_text__Y1XNR{color:var(--muted-foreground);width:100%}.ChatMessage_role-assistant__wketE .ChatMessage_text__Y1XNR{width:100%}.ChatMessage_role-assistant__wketE h3{line-height:2.4}.ChatMessage_role-assistant__wketE h4{font-size:1.1em;font-weight:600;line-height:2.2}.ChatMessage_role-assistant__wketE .ChatMessage_bullet__6vAhq{display:inline-block;margin-left:4px;margin-right:6px}.ChatMessage_role-assistant__wketE .ChatMessage_bullet__6vAhq:before{color:var(--text-secondary);content:\"•\";display:inline-block}.ChatMessage_role-assistant__wketE .ChatMessage_scrollHorizontal__Rms9n{max-width:100%}.ChatMessage_role-assistant__wketE table{border:1px solid var(--border);border-collapse:collapse;border-radius:var(--p-2);border-spacing:0;margin:var(--p-4) 0;overflow:hidden}.ChatMessage_role-assistant__wketE table td,.ChatMessage_role-assistant__wketE table th{border:1px solid var(--border);min-width:100px;padding:var(--p-1)}.ChatMessage_role-assistant__wketE table th{text-align:left}.ChatMessage_role-assistant__wketE ol,.ChatMessage_role-assistant__wketE ul{padding-left:var(--p-4)}.ChatMessage_role-assistant__wketE ul{list-style-type:disc}.ChatMessage_role-assistant__wketE ol{list-style-type:decimal}.ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T{align-items:center;border:1px dashed var(--sb-slate-300);border-radius:8px;color:var(--foreground);display:inline-flex;font-size:var(--text-xs);gap:6px;margin:1px;max-width:100%;padding:2px 6px 2px 4px;text-decoration:none;vertical-align:middle}.ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T:hover{background-color:var(--sb-slate-50);border-color:var(--sb-slate-400);border-style:solid}.dark .ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T{border-color:var(--sb-gray-600)}.dark .ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLink__Pxy-T:hover{background-color:var(--sb-gray-900)}.ChatMessage_role-assistant__wketE .ChatMessage_datasetAppLinkLabel__PMU7e{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ChatMessage_role-assistant__wketE .ChatMessage_quickReplyWrap__1UFyD{display:inline-block;margin:var(--p-1) var(--p-1) var(--p-1) 0;vertical-align:middle;width:100%}.ChatMessage_role-assistant__wketE .ChatMessage_downloadButtons__RygM-{display:flex;gap:var(--p-2);margin-top:var(--p-4)}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa{align-items:center;background-color:var(--background);border-radius:var(--p-3);box-shadow:0 0 0 1px var(--border);cursor:pointer;display:flex;gap:var(--p-4);margin-top:var(--p-3);padding:var(--p-3);padding-right:var(--p-4);transition:all .15s;width:-moz-fit-content;width:fit-content}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa:hover{background-color:var(--sb-gray-50);border-color:var(--border)}.dark .ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa{background-color:var(--sb-gray-900);border-color:var(--border)}.dark .ChatMessage_role-assistant__wketE .ChatMessage_downloadCard__NsNRa:hover{background-color:var(--sb-gray-800)}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardIcon__jkxDJ{align-items:center;border-radius:var(--p-2);display:flex;flex-shrink:0;height:32px;justify-content:center;width:32px}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardContent__PTPwz{display:flex;flex:1;flex-direction:column;min-width:0}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardTitle__K1wqr{font-size:var(--text-base);font-weight:600;line-height:1.4}.ChatMessage_role-assistant__wketE .ChatMessage_downloadCardSubtitle__fVeF2{color:var(--muted-foreground);font-size:var(--text-sm);line-height:1.4}";
|
|
4
|
+
var S = {"root":"ChatMessage_root__6rnsF","text":"ChatMessage_text__Y1XNR","role-user":"ChatMessage_role-user__u4JPV","role-assistant":"ChatMessage_role-assistant__wketE","role-system":"ChatMessage_role-system__g13OP","userColumn":"ChatMessage_userColumn__cQM6-","textCustom":"ChatMessage_textCustom__C8Tts","bullet":"ChatMessage_bullet__6vAhq","scrollHorizontal":"ChatMessage_scrollHorizontal__Rms9n","datasetAppLink":"ChatMessage_datasetAppLink__Pxy-T","datasetAppLinkLabel":"ChatMessage_datasetAppLinkLabel__PMU7e","quickReplyWrap":"ChatMessage_quickReplyWrap__1UFyD","downloadButtons":"ChatMessage_downloadButtons__RygM-","downloadCard":"ChatMessage_downloadCard__NsNRa","downloadCardIcon":"ChatMessage_downloadCardIcon__jkxDJ","downloadCardContent":"ChatMessage_downloadCardContent__PTPwz","downloadCardTitle":"ChatMessage_downloadCardTitle__K1wqr","downloadCardSubtitle":"ChatMessage_downloadCardSubtitle__fVeF2"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.ChatPrompt_root__5G5bq{align-items:stretch;display:flex;flex-direction:column;gap:var(--p-2);padding:var(--p-
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.ChatPrompt_root__5G5bq{align-items:stretch;display:flex;flex-direction:column;gap:var(--p-2);padding:var(--p-3);position:relative}.ChatPrompt_composer__H3c3N{align-items:flex-end;display:flex;flex-direction:row;gap:var(--p-3);position:relative;width:100%}.ChatPrompt_fileInput__xdgPn{display:none}.ChatPrompt_attachButton__gi-qF{align-self:flex-end;flex-shrink:0}.ChatPrompt_editorWrap__Q7gat{align-self:stretch;flex:1;min-width:0}.ChatPrompt_editorMount__Phh4D{background:transparent;border:none;border-radius:0!important;box-shadow:none!important;display:flex;flex:1;flex-direction:column;max-height:200px;min-height:40px;min-width:0;padding:0!important}.ChatPrompt_editorMount__Phh4D:focus-within{box-shadow:none!important}.ChatPrompt_editorMount__Phh4D .ProseMirror{border:none!important;box-shadow:none!important;flex:1;margin:0;max-height:200px!important;min-height:40px!important;outline:none!important;overflow-x:hidden!important;overflow-y:auto!important;padding:var(--p-2) 0 0!important;resize:none!important;white-space:pre-wrap;word-break:break-word}.ChatPrompt_editorMount__Phh4D .ProseMirror p.is-empty.is-editor-empty:before{color:var(--muted-foreground);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ChatPrompt_editorMount__Phh4D .ProseMirror .chat-prompt-command-chip,.ChatPrompt_editorMount__Phh4D .ProseMirror .slash-mention{align-items:center;background:var(--muted);border-radius:var(--radius-sm);display:inline-flex;font-size:.875em;line-height:1.4;padding:0 var(--p-1);-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:baseline;white-space:nowrap}.ChatPrompt_editorMount__Phh4D .ProseMirror .chat-prompt-command-chip{color:var(--foreground)}.ChatPrompt_submitColumn__0rY1R{align-items:center;display:flex;flex-direction:column;flex-shrink:0;justify-content:flex-end;margin-top:-4px}.ChatPrompt_submitColumn__0rY1R>button:focus{box-shadow:0 0 0 2px var(--brand-color-500)!important}.ChatPrompt_submitColumn__0rY1R>button:first-child{border:none;position:relative;transition:all .2s}.ChatPrompt_submitColumn__0rY1R>button:first-child:focus{transform:scale(1.2)}.ChatPrompt_submitColumn__0rY1R>button:first-child:before{bottom:-100%;content:\"\";left:-100%;position:absolute;right:-100%;top:-100%}.ChatPrompt_attachments__KG-fG{display:flex;flex-wrap:wrap;gap:var(--p-2);margin-bottom:var(--p-2)}.ChatPrompt_attachmentItem__QJk7J{flex:1 1 300px;max-width:300px;min-width:0}";
|
|
4
4
|
var S = {"root":"ChatPrompt_root__5G5bq","composer":"ChatPrompt_composer__H3c3N","fileInput":"ChatPrompt_fileInput__xdgPn","attachButton":"ChatPrompt_attachButton__gi-qF","editorWrap":"ChatPrompt_editorWrap__Q7gat","editorMount":"ChatPrompt_editorMount__Phh4D","submitColumn":"ChatPrompt_submitColumn__0rY1R","attachments":"ChatPrompt_attachments__KG-fG","attachmentItem":"ChatPrompt_attachmentItem__QJk7J"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '../../Button/Button.js';
|
|
3
|
+
import S from './AppBanner.styl.js';
|
|
4
|
+
import { XIcon } from 'lucide-react';
|
|
5
|
+
import cn from 'classnames';
|
|
6
|
+
|
|
7
|
+
function AppBanner({ children, className, onDismiss }) {
|
|
8
|
+
return (jsxs("div", { className: cn(S.root, className), "data-slot": "app-banner", role: "status", children: [jsx("div", { className: S.message, children: children }), onDismiss && (jsx(Button, { variant: "ghost", icon: true, type: "button", onClick: onDismiss, className: S.dismiss, "aria-label": "Dismiss banner", children: jsx(XIcon, { size: 16, "aria-hidden": true }) }))] }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { AppBanner };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.AppBanner_root__tsEbC{align-items:center;background-color:var(--muted);box-sizing:border-box;color:var(--foreground);display:flex;flex-shrink:0;gap:var(--p-2);justify-content:center;min-height:44px;padding:var(--p-2) var(--p-4);width:100%}.AppBanner_root__tsEbC a{color:inherit;text-decoration:underline;white-space:nowrap}.AppBanner_root__tsEbC a:hover{opacity:.85}.AppBanner_message__dE5Ke{flex:1;font-size:var(--text-sm);line-height:1.25;text-align:center}.AppBanner_dismiss__-WCmr{color:inherit;flex-shrink:0;opacity:.7}.AppBanner_dismiss__-WCmr:hover{opacity:1}";
|
|
4
|
+
var S = {"root":"AppBanner_root__tsEbC","message":"AppBanner_message__dE5Ke","dismiss":"AppBanner_dismiss__-WCmr"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -7,8 +7,8 @@ import S from './AppShell.styl.js';
|
|
|
7
7
|
function AppShellMainContent({ className, bodyClassName, children, header, footer, }) {
|
|
8
8
|
return (jsxs("div", { className: cn(S.mainColumn, className), children: [header, jsx("div", { className: cn(S.mainBody, bodyClassName), children: children }), footer] }));
|
|
9
9
|
}
|
|
10
|
-
const AppShell = forwardRef(function AppShell({ className, ...props }, ref) {
|
|
11
|
-
return (jsx("div", { ref: ref, "data-slot": "app-shell", className: cn(S.root, className), ...props }));
|
|
10
|
+
const AppShell = forwardRef(function AppShell({ className, children, ...props }, ref) {
|
|
11
|
+
return (jsx("div", { ref: ref, "data-slot": "app-shell", className: cn(S.root, className), ...props, children: children }));
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
export { AppShell, AppShellMainContent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarWrapper__DGm4P{align-items:stretch;display:flex;flex-direction:row;--welcome-alert-height:44px;height:calc(100% - 44px);height:calc(100% - var(--welcome-alert-height));min-height:0;width:100%}.Sidebar_sidebarWrapper__DGm4P #page-sidebar-actions{min-height:100%}@media (max-width:768px){.Sidebar_sidebarWrapper__DGm4P{flex-direction:column;height:100dvh;max-height:100dvh}}.Sidebar_sidebarMainShell__pSWDC{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.Sidebar_chatPanelMount__1Zctx{background:var(--background);border-left:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-width,0px);min-height:0;min-width:0;overflow:hidden;width:0;width:var(--chat-panel-width,0)}@media (max-width:768px){.Sidebar_chatPanelMount__1Zctx{border-left:none;border-top:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-height,0px);height:0;height:var(--chat-panel-height,0);transition:flex-basis .2s ease,height .2s ease;width:100%}}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:var(--gap-top);width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100% - var(--gap-top));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_sidebarTrigger__ipx2C{cursor:pointer;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarTrigger__ipx2C svg{height:20px;width:20px}.Sidebar_sidebarRail__uvSpl{position:absolute;inset-y:0;display:hidden;transition:all ease-out;width:1rem;z-index:20}.Sidebar_sidebarRail__uvSpl:hover:after{background-color:var(--sidebar-border)}.Sidebar_sidebarRail__uvSpl[data-side=left]{right:-1rem}.Sidebar_sidebarRail__uvSpl[data-side=right]{left:0}.Sidebar_sidebarRail__uvSpl:after{content:\"\";position:absolute;inset-y:0;left:50%;width:2px}@media (min-width:640px){.Sidebar_sidebarRail__uvSpl{display:flex}}.Sidebar_sidebarRail__uvSpl[data-side=left]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-side=left][data-state=collapsed],.Sidebar_sidebarRail__uvSpl[data-side=right]{cursor:e-resize}.Sidebar_sidebarRail__uvSpl[data-side=right][data-state=collapsed]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]{transform:translateX(0)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:hover{background-color:var(--sidebar)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:after{left:100%}.Sidebar_sidebarRail__uvSpl[data-side=left][data-collapsible=offcanvas]{right:-.5rem}.Sidebar_sidebarRail__uvSpl[data-side=right][data-collapsible=offcanvas]{left:-.5rem}.Sidebar_sidebarResizeHandle__kuD6t{background-color:transparent;background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);opacity:0;position:absolute;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.Sidebar_sidebarResizeHandle__kuD6t:before{content:\"\";cursor:col-resize;height:100%;position:absolute;right:0;width:30px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=left]{right:2px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=right]{left:0}.Sidebar_sidebarResizeHandle__kuD6t:hover{opacity:1}.Sidebar_sidebarResizeHandle__kuD6t:active{opacity:0}.Sidebar_fullHeightResizer__jZXnw .Sidebar_sidebarResizeHandle__kuD6t{height:calc(100vh - var(--gap-top)*-1);top:-80px}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarFooter__V3O-l,.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebarSeparator__oUkYG{background-color:var(--sidebar-border);margin-left:0;margin-right:0;width:auto}.Sidebar_sidebarContent__Ywe1o{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100%;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.Sidebar_sidebarContent__Ywe1o{height:calc(100vh - var(--gap-top))}}.Sidebar_sidebarContent__Ywe1o[data-collapsible=icon]{overflow:hidden}.Sidebar_sidebarGroup__7Mhg2{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}.Sidebar_sidebarGroupAction__OhVZq{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.Sidebar_sidebarGroupAction__OhVZq:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarGroupAction__OhVZq:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupAction__OhVZq>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupAction__OhVZq:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarGroupAction__OhVZq:after{display:none}}.Sidebar_sidebarGroupAction__OhVZq[data-collapsible=icon]{display:none}.Sidebar_sidebarMenu__hYXIo{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.Sidebar_sidebarMenu__hYXIo{padding-right:var(--p-8)}}.Sidebar_sidebarMenuItem__CRhM8{cursor:pointer;position:relative}.Sidebar_sidebarMenuBadge__ttvCR{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-size:.75rem;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar_sidebarMenuBadge__ttvCR[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=md]{top:.375rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuBadge__ttvCR[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSkeleton__u2KoI{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.Sidebar_sidebarMenuSkeletonIcon__-1tvv{border-radius:.375rem;height:1rem;width:1rem}.Sidebar_sidebarMenuSkeletonText__dWzWo{flex:1;height:1rem;max-width:var(--skeleton-width)}.Sidebar_sidebarMenuSub__gh8Rn{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-2);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.Sidebar_sidebarMenuSub__gh8Rn:before{background:var(--sidebar-border);bottom:26px;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar_sidebarMenuSub__gh8Rn[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubItem__fTHJa{margin-left:var(--p-6);position:relative}.Sidebar_sidebarMenuSubItem__fTHJa:before{border-bottom:1px solid var(--sidebar-border);border-bottom-left-radius:var(--p-2);border-left:1px solid var(--sidebar-border);bottom:0;content:\"\";height:var(--p-3);left:calc(var(--p-1)*-1);position:absolute;top:var(--p-2);width:var(--p-3)}.Sidebar_sidebarMenuSubItem__fTHJa a:hover{text-decoration:none}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sidebarMenuButton__vIEh->span,.Sidebar_sidebarMenuSubButton__c9flh>span{min-width:0;text-transform:capitalize}.Sidebar_sidebarMenuButton__vIEh->span:first-child,.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{flex-grow:1}.Sidebar_sidebarMenuButton__vIEh-{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;font-size:.875rem;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.Sidebar_sidebarMenuButton__vIEh-:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuButton__vIEh-:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa[data-state=open] .Sidebar_sidebarMenuButton__vIEh-{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButton__vIEh-:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuButton__vIEh-:disabled,.Sidebar_sidebarMenuButton__vIEh-[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuButton__vIEh-[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.Sidebar_sidebarMenuButton__vIEh-[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.Sidebar_sidebarMenuButton__vIEh->span{flex-grow:1;line-height:20px;overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuButton__vIEh->svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-sm__7aIbu{font-size:.75rem;height:1.75rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-md__rcjmO{font-size:.875rem;height:var(--p-12)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S{font-size:.875rem;height:3rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S[data-collapsible=icon]{padding:0!important}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButtonCta__dQAhv{display:flex;justify-content:flex-start;text-align:left;width:100%}.Sidebar_sidebarMenuButtonCta__dQAhv>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuAction__mFZa1{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.Sidebar_sidebarMenuAction__mFZa1:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuAction__mFZa1{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuAction__mFZa1>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.Sidebar_sidebarMenuAction__mFZa1:hover>svg{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1:after{display:none}}.Sidebar_sidebarMenuAction__mFZa1[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=md]{top:.375rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuAction__mFZa1[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-active=true]{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-state=open]{opacity:1}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA{opacity:0}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:focus-within,.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:hover{opacity:1}}.Sidebar_sidebarMenuSubButton__c9flh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-1) var(--p-2);text-decoration:none;transform:translateX(-1px)}.Sidebar_sidebarMenuSubButton__c9flh:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuSubButton__c9flh,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuSubButton__c9flh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuSubButton__c9flh:disabled,.Sidebar_sidebarMenuSubButton__c9flh[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuSubButton__c9flh>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-sm__7aIbu{font-size:.75rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-md__rcjmO{font-size:.875rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-lg__1k76S{font-size:1rem}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarWrapper__DGm4P{align-items:stretch;display:flex;flex-direction:row;height:100%;min-height:0;width:100%}.Sidebar_sidebarWrapper__DGm4P #page-sidebar-actions{min-height:100%}@media (max-width:768px){.Sidebar_sidebarWrapper__DGm4P{flex-direction:column;height:100dvh;max-height:100dvh}}.Sidebar_sidebarMainShell__pSWDC{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.Sidebar_chatPanelMount__1Zctx{background:var(--background);border-left:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-width,0px);min-height:0;min-width:0;overflow:hidden;width:0;width:var(--chat-panel-width,0)}@media (max-width:768px){.Sidebar_chatPanelMount__1Zctx{border-left:none;border-top:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-height,0px);height:0;height:var(--chat-panel-height,0);transition:flex-basis .2s ease,height .2s ease;width:100%}}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:calc(var(--gap-top));top:calc(var(--gap-top) + var(--app-banner-height, 0px));width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_sidebarTrigger__ipx2C{cursor:pointer;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarTrigger__ipx2C svg{height:20px;width:20px}.Sidebar_sidebarRail__uvSpl{position:absolute;inset-y:0;display:hidden;transition:all ease-out;width:1rem;z-index:20}.Sidebar_sidebarRail__uvSpl:hover:after{background-color:var(--sidebar-border)}.Sidebar_sidebarRail__uvSpl[data-side=left]{right:-1rem}.Sidebar_sidebarRail__uvSpl[data-side=right]{left:0}.Sidebar_sidebarRail__uvSpl:after{content:\"\";position:absolute;inset-y:0;left:50%;width:2px}@media (min-width:640px){.Sidebar_sidebarRail__uvSpl{display:flex}}.Sidebar_sidebarRail__uvSpl[data-side=left]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-side=left][data-state=collapsed],.Sidebar_sidebarRail__uvSpl[data-side=right]{cursor:e-resize}.Sidebar_sidebarRail__uvSpl[data-side=right][data-state=collapsed]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]{transform:translateX(0)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:hover{background-color:var(--sidebar)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:after{left:100%}.Sidebar_sidebarRail__uvSpl[data-side=left][data-collapsible=offcanvas]{right:-.5rem}.Sidebar_sidebarRail__uvSpl[data-side=right][data-collapsible=offcanvas]{left:-.5rem}.Sidebar_sidebarResizeHandle__kuD6t{background-color:transparent;background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);height:calc(100vh + 200px - var(--app-banner-height, 0px));opacity:0;position:absolute;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.Sidebar_sidebarResizeHandle__kuD6t:before{content:\"\";cursor:col-resize;height:100%;position:absolute;right:0;width:30px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=left]{right:2px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=right]{left:0}.Sidebar_sidebarResizeHandle__kuD6t:hover{opacity:1}.Sidebar_sidebarResizeHandle__kuD6t:active{opacity:0}.Sidebar_fullHeightResizer__jZXnw .Sidebar_sidebarResizeHandle__kuD6t{height:calc(100vh - var(--gap-top)*-1);height:calc(100vh - var(--gap-top)*-1 - var(--app-banner-height, 0px));top:-80px}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarFooter__V3O-l,.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebarSeparator__oUkYG{background-color:var(--sidebar-border);margin-left:0;margin-right:0;width:auto}.Sidebar_sidebarContent__Ywe1o{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100%;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.Sidebar_sidebarContent__Ywe1o{height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))}}.Sidebar_sidebarContent__Ywe1o[data-collapsible=icon]{overflow:hidden}.Sidebar_sidebarGroup__7Mhg2{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}.Sidebar_sidebarGroupAction__OhVZq{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.Sidebar_sidebarGroupAction__OhVZq:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarGroupAction__OhVZq:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupAction__OhVZq>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupAction__OhVZq:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarGroupAction__OhVZq:after{display:none}}.Sidebar_sidebarGroupAction__OhVZq[data-collapsible=icon]{display:none}.Sidebar_sidebarMenu__hYXIo{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.Sidebar_sidebarMenu__hYXIo{padding-right:var(--p-8)}}.Sidebar_sidebarMenuItem__CRhM8{cursor:pointer;position:relative}.Sidebar_sidebarMenuBadge__ttvCR{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-size:.75rem;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar_sidebarMenuBadge__ttvCR[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=md]{top:.375rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuBadge__ttvCR[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSkeleton__u2KoI{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.Sidebar_sidebarMenuSkeletonIcon__-1tvv{border-radius:.375rem;height:1rem;width:1rem}.Sidebar_sidebarMenuSkeletonText__dWzWo{flex:1;height:1rem;max-width:var(--skeleton-width)}.Sidebar_sidebarMenuSub__gh8Rn{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-2);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.Sidebar_sidebarMenuSub__gh8Rn:before{background:var(--sidebar-border);bottom:26px;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar_sidebarMenuSub__gh8Rn[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubItem__fTHJa{margin-left:var(--p-6);position:relative}.Sidebar_sidebarMenuSubItem__fTHJa:before{border-bottom:1px solid var(--sidebar-border);border-bottom-left-radius:var(--p-2);border-left:1px solid var(--sidebar-border);bottom:0;content:\"\";height:var(--p-3);left:calc(var(--p-1)*-1);position:absolute;top:var(--p-2);width:var(--p-3)}.Sidebar_sidebarMenuSubItem__fTHJa a:hover{text-decoration:none}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sidebarMenuButton__vIEh->span,.Sidebar_sidebarMenuSubButton__c9flh>span{min-width:0;text-transform:capitalize}.Sidebar_sidebarMenuButton__vIEh->span:first-child,.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{flex-grow:1}.Sidebar_sidebarMenuButton__vIEh-{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;font-size:.875rem;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.Sidebar_sidebarMenuButton__vIEh-:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuButton__vIEh-:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa[data-state=open] .Sidebar_sidebarMenuButton__vIEh-{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButton__vIEh-:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuButton__vIEh-:disabled,.Sidebar_sidebarMenuButton__vIEh-[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuButton__vIEh-[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.Sidebar_sidebarMenuButton__vIEh-[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.Sidebar_sidebarMenuButton__vIEh->span{flex-grow:1;line-height:20px;overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuButton__vIEh->svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-sm__7aIbu{font-size:.75rem;height:1.75rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-md__rcjmO{font-size:.875rem;height:var(--p-12)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S{font-size:.875rem;height:3rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S[data-collapsible=icon]{padding:0!important}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButtonCta__dQAhv{display:flex;justify-content:flex-start;text-align:left;width:100%}.Sidebar_sidebarMenuButtonCta__dQAhv>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuAction__mFZa1{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.Sidebar_sidebarMenuAction__mFZa1:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuAction__mFZa1{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuAction__mFZa1>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.Sidebar_sidebarMenuAction__mFZa1:hover>svg{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1:after{display:none}}.Sidebar_sidebarMenuAction__mFZa1[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=md]{top:.375rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuAction__mFZa1[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-active=true]{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-state=open]{opacity:1}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA{opacity:0}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:focus-within,.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:hover{opacity:1}}.Sidebar_sidebarMenuSubButton__c9flh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-1) var(--p-2);text-decoration:none;transform:translateX(-1px)}.Sidebar_sidebarMenuSubButton__c9flh:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuSubButton__c9flh,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuSubButton__c9flh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuSubButton__c9flh:disabled,.Sidebar_sidebarMenuSubButton__c9flh[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuSubButton__c9flh>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-sm__7aIbu{font-size:.75rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-md__rcjmO{font-size:.875rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-lg__1k76S{font-size:1rem}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
4
4
|
var SidebarStem = {"sidebarWrapper":"Sidebar_sidebarWrapper__DGm4P","sidebarMainShell":"Sidebar_sidebarMainShell__pSWDC","chatPanelMount":"Sidebar_chatPanelMount__1Zctx","sidebar":"Sidebar_sidebar__0vqNZ","sidebarTrigger":"Sidebar_sidebarTrigger__ipx2C","sidebarRail":"Sidebar_sidebarRail__uvSpl","sidebarResizeHandle":"Sidebar_sidebarResizeHandle__kuD6t","fullHeightResizer":"Sidebar_fullHeightResizer__jZXnw","sidebarInput":"Sidebar_sidebarInput__ujQLX","sidebarHeader":"Sidebar_sidebarHeader__X33ii","sidebarFooter":"Sidebar_sidebarFooter__V3O-l","sidebarSeparator":"Sidebar_sidebarSeparator__oUkYG","sidebarContent":"Sidebar_sidebarContent__Ywe1o","sidebarGroup":"Sidebar_sidebarGroup__7Mhg2","sidebarGroupAction":"Sidebar_sidebarGroupAction__OhVZq","sidebarMenu":"Sidebar_sidebarMenu__hYXIo","sidebarMenuItem":"Sidebar_sidebarMenuItem__CRhM8","sidebarMenuBadge":"Sidebar_sidebarMenuBadge__ttvCR","sidebarMenuSkeleton":"Sidebar_sidebarMenuSkeleton__u2KoI","sidebarMenuSkeletonIcon":"Sidebar_sidebarMenuSkeletonIcon__-1tvv","sidebarMenuSkeletonText":"Sidebar_sidebarMenuSkeletonText__dWzWo","sidebarMenuSub":"Sidebar_sidebarMenuSub__gh8Rn","sidebarMenuSubItem":"Sidebar_sidebarMenuSubItem__fTHJa","sheetContentSidebar":"Sidebar_sheetContentSidebar__cM2h2","sheetSidebarInner":"Sidebar_sheetSidebarInner__U-SMQ","sidebarNone":"Sidebar_sidebarNone__crRsF","variant-floating":"Sidebar_variant-floating__-qvkJ","variant-inset":"Sidebar_variant-inset__oTfrV","variant-sidebar":"Sidebar_variant-sidebar__fAe77","sidebarMenuButton":"Sidebar_sidebarMenuButton__vIEh-","sidebarMenuSubButton":"Sidebar_sidebarMenuSubButton__c9flh","size-sm":"Sidebar_size-sm__7aIbu","size-md":"Sidebar_size-md__rcjmO","size-lg":"Sidebar_size-lg__1k76S","variant-outline":"Sidebar_variant-outline__UmtAz","sidebarMenuButtonCta":"Sidebar_sidebarMenuButtonCta__dQAhv","sidebarMenuAction":"Sidebar_sidebarMenuAction__mFZa1","showOnHover":"Sidebar_showOnHover__itXsA","sidebarVtOld":"Sidebar_sidebarVtOld__hlKqn","sidebarVtNew":"Sidebar_sidebarVtNew__FFhYU"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -4,10 +4,13 @@ import { useState, useCallback, useMemo, useRef, useEffect } from 'react';
|
|
|
4
4
|
import { ChartEmptyState } from '../../ui/Chart/components/ChartEmptyState/ChartEmptyState.js';
|
|
5
5
|
import { ChartAreaInteractive } from '../../ui/ChartAreaInteractive/ChartAreaInteractive.js';
|
|
6
6
|
import { getForecastColor } from '../../ui/ChartAreaInteractive/ChartLines.js';
|
|
7
|
+
import '@radix-ui/react-slot';
|
|
8
|
+
import '../../ui/Button/Button.styl.js';
|
|
9
|
+
import '../../ui/Page/AppBanner/AppBanner.styl.js';
|
|
10
|
+
import { InfoIcon } from 'lucide-react';
|
|
7
11
|
import '../../ui/Page/AppShell/AppShell.js';
|
|
8
12
|
import 'react-router-dom';
|
|
9
13
|
import '../../ui/Sidebar/Sidebar.js';
|
|
10
|
-
import { InfoIcon } from 'lucide-react';
|
|
11
14
|
import '../../ui/Page/Breadcrumbs/Breadcrumbs.styl.js';
|
|
12
15
|
import '../../ui/Page/pageContext.js';
|
|
13
16
|
import { Tooltip, TooltipTrigger, TooltipContent } from '../../ui/Tooltip/Tooltip.js';
|
|
@@ -2,11 +2,12 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default, { useMemo, useRef } from 'react';
|
|
3
3
|
import { Button } from '../../ui/Button/Button.js';
|
|
4
4
|
import { FORECAST_LINE_COLORS } from '../../ui/ChartAreaInteractive/ChartLines.js';
|
|
5
|
-
import '../../ui/Page/
|
|
5
|
+
import '../../ui/Page/AppBanner/AppBanner.styl.js';
|
|
6
|
+
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
6
7
|
import 'classnames';
|
|
8
|
+
import '../../ui/Page/AppShell/AppShell.js';
|
|
7
9
|
import 'react-router-dom';
|
|
8
10
|
import '../../ui/Sidebar/Sidebar.js';
|
|
9
|
-
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
10
11
|
import '../../ui/Page/Breadcrumbs/Breadcrumbs.styl.js';
|
|
11
12
|
import '../../ui/Page/pageContext.js';
|
|
12
13
|
import { Tooltip, TooltipTrigger, TooltipContent } from '../../ui/Tooltip/Tooltip.js';
|
|
@@ -11,8 +11,8 @@ import '@phosphor-icons/react';
|
|
|
11
11
|
import 'lucide-react';
|
|
12
12
|
import S from './SybilionAppHeader.styl.js';
|
|
13
13
|
|
|
14
|
-
function SybilionAppHeader({ pageHeaderId, actionsAnchorId = PAGE_HEADER_ACTIONS_ID, actionsAnchorClassName, actionsStart, actionsEnd, pathname, onNavigate, authenticated, defaultApps, appsStorageKey, logo, logoAreaClassName,
|
|
15
|
-
return (jsxs(AppHeaderPortal, { pageHeaderId: pageHeaderId, children: [jsx("div", { className: cn(S.logoArea,
|
|
14
|
+
function SybilionAppHeader({ pageHeaderId, actionsAnchorId = PAGE_HEADER_ACTIONS_ID, actionsAnchorClassName, actionsStart, actionsEnd, pathname, onNavigate, authenticated, defaultApps, appsStorageKey, logo, logoAreaClassName, ...navUserHeaderProps }) {
|
|
15
|
+
return (jsxs(AppHeaderPortal, { pageHeaderId: pageHeaderId, children: [jsx("div", { className: cn(S.logoArea, logoAreaClassName), children: jsx(Link, { to: "/", className: S.logoLink, children: logo ?? jsx(Logo, { size: "md", "aria-hidden": true }) }) }), jsx(WorkspaceAppSwitcher, { pathname: pathname, onNavigate: onNavigate, authenticated: authenticated, defaultApps: defaultApps, appsStorageKey: appsStorageKey }), jsx(Gap, {}), jsxs("div", { className: cn(S.actionsAnchor, actionsAnchorClassName), children: [jsx("div", { id: actionsAnchorId, className: S.pageActionsPortal }), actionsStart, jsx(NavUserHeader, { ...navUserHeaderProps }), actionsEnd] })] }));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { SybilionAppHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SybilionAppHeader_actionsAnchor__ress2,.SybilionAppHeader_pageActionsPortal__9C5ww{align-items:center;display:flex;flex-shrink:0;gap:var(--p-4)}.SybilionAppHeader_pageActionsPortal__9C5ww:empty{display:none}.SybilionAppHeader_logoArea__3HAhG{align-items:center;display:flex;gap:var(--p-2);left:40px;position:absolute;top:22px;z-index:10}@media (max-width:768px){.SybilionAppHeader_logoArea__3HAhG{left:32px}}@media (min-width:768px){[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:calc(var(--sidebar-width)*-1 + 52px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=expanded] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:calc(var(--sidebar-width)*-1 + 44px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=collapsed] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:var(--p-8);position:absolute}}.
|
|
4
|
-
var S = {"actionsAnchor":"SybilionAppHeader_actionsAnchor__ress2","pageActionsPortal":"SybilionAppHeader_pageActionsPortal__9C5ww","logoArea":"SybilionAppHeader_logoArea__3HAhG","
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SybilionAppHeader_actionsAnchor__ress2,.SybilionAppHeader_pageActionsPortal__9C5ww{align-items:center;display:flex;flex-shrink:0;gap:var(--p-4)}.SybilionAppHeader_pageActionsPortal__9C5ww:empty{display:none}.SybilionAppHeader_logoArea__3HAhG{align-items:center;display:flex;gap:var(--p-2);left:40px;position:absolute;top:22px;z-index:10}@media (max-width:768px){.SybilionAppHeader_logoArea__3HAhG{left:32px}}@media (min-width:768px){[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:calc(var(--sidebar-width)*-1 + 52px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=expanded] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:calc(var(--sidebar-width)*-1 + 44px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=collapsed] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:var(--p-8);position:absolute}}.SybilionAppHeader_logoLink__bH-KX{align-items:center;color:var(--color-foreground);display:flex;font-size:1.5rem;font-weight:400;gap:.5rem;text-decoration:none;white-space:nowrap;width:-moz-fit-content;width:fit-content}.SybilionAppHeader_logoLink__bH-KX svg{display:inline-flex;flex-shrink:0;height:32px;transition:transform .1s ease-in-out;width:auto}.SybilionAppHeader_logoLink__bH-KX:hover svg{transform:scale(1.05)}";
|
|
4
|
+
var S = {"actionsAnchor":"SybilionAppHeader_actionsAnchor__ress2","pageActionsPortal":"SybilionAppHeader_pageActionsPortal__9C5ww","logoArea":"SybilionAppHeader_logoArea__3HAhG","logoLink":"SybilionAppHeader_logoLink__bH-KX"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -63,6 +63,7 @@ export { Logo } from './components/ui/Logo/Logo.js';
|
|
|
63
63
|
export { MobileAdaptiveSelector } from './components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.js';
|
|
64
64
|
export { NavUserHeader } from './components/ui/NavUserHeader/NavUserHeader.js';
|
|
65
65
|
export { NumberControl } from './components/ui/NumberControl/NumberControl.js';
|
|
66
|
+
export { AppBanner } from './components/ui/Page/AppBanner/AppBanner.js';
|
|
66
67
|
export { AppShell, AppShellMainContent } from './components/ui/Page/AppShell/AppShell.js';
|
|
67
68
|
export { PageHeader } from './components/ui/Page/PageHeader/PageHeader.js';
|
|
68
69
|
export { PageEmptyCanvas } from './components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.js';
|
|
@@ -97,9 +97,23 @@ export interface ChatPromptProps {
|
|
|
97
97
|
/** Custom slash pick handler; return true to skip default mention insert and insert via composer API. */
|
|
98
98
|
onSlashItemCommand?: SlashOnItemCommand;
|
|
99
99
|
}
|
|
100
|
+
export type ChatMessageClassNames = {
|
|
101
|
+
user?: string;
|
|
102
|
+
assistant?: string;
|
|
103
|
+
system?: string;
|
|
104
|
+
};
|
|
105
|
+
export type ChatMessageTextClassNames = {
|
|
106
|
+
user?: string;
|
|
107
|
+
assistant?: string;
|
|
108
|
+
system?: string;
|
|
109
|
+
};
|
|
100
110
|
export interface ChatMessageProps {
|
|
101
111
|
role: MessageRole;
|
|
102
112
|
text: string;
|
|
113
|
+
/** Extra class on the message root wrapper (role layout + defaults still apply). */
|
|
114
|
+
className?: string;
|
|
115
|
+
/** Extra class on the inner text bubble (merged with built-in `.text` styles). */
|
|
116
|
+
textClassName?: string;
|
|
103
117
|
inProgress?: boolean;
|
|
104
118
|
userTextFileAttachments?: UserTextFileAttachment[];
|
|
105
119
|
onQuickReply?: (branchKey: string, displayLabel: string) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ChatChromeProps } from './ChatChrome.types';
|
|
2
|
-
export declare function ChatChrome({ variant, showResizeHandle, resizeHandle, onClose, isEmpty, renderPresets, messages, onQuickReply, suppressedQuickReplyKeys, isLoading, loadingLabel, scriptContinueLabel, onScriptContinue, renderMessageChart, renderSystemMessage, showSyntheticBranchButtons, unusedBranchKeys, showInlinePresets, isLastMessageFromUser, scrollRef, effectiveScopeId, onPromptSubmit, onChatDeleted, onNewChat, promptPrefill, footerClassName, emptyState, allowedAttachments, allowPdfAttachments, onAttachmentsDropped, slashCommandItems, onSlashItemCommand, promptPlaceholder, hideChatSelector, }: ChatChromeProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ChatChrome({ variant, showResizeHandle, resizeHandle, onClose, isEmpty, renderPresets, messages, onQuickReply, suppressedQuickReplyKeys, isLoading, loadingLabel, scriptContinueLabel, onScriptContinue, renderMessageChart, renderSystemMessage, showSyntheticBranchButtons, unusedBranchKeys, showInlinePresets, isLastMessageFromUser, scrollRef, effectiveScopeId, onPromptSubmit, onChatDeleted, onNewChat, promptPrefill, footerClassName, messageClassNames, messageTextClassNames, emptyState, allowedAttachments, allowPdfAttachments, onAttachmentsDropped, slashCommandItems, onSlashItemCommand, promptPlaceholder, hideChatSelector, }: ChatChromeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
-
import type { ChatAttachmentDropItem, Message } from '#uilib/components/ui/Chat/Chat.types';
|
|
2
|
+
import type { ChatAttachmentDropItem, ChatMessageClassNames, ChatMessageTextClassNames, Message } from '#uilib/components/ui/Chat/Chat.types';
|
|
3
3
|
import type { ChatEmptyStateProps } from '#uilib/components/ui/Chat/ChatEmptyState/ChatEmptyState.types';
|
|
4
4
|
import type { ChatPresetsLayout } from '#uilib/components/ui/Chat/ChatPresets';
|
|
5
5
|
import type { SlashCommandItem, SlashOnItemCommand } from '#uilib/tiptap/slash-mention/types';
|
|
@@ -48,6 +48,10 @@ export interface ChatChromeProps {
|
|
|
48
48
|
/** `?prompt=` deep link text for one-shot composer pre-fill. */
|
|
49
49
|
promptPrefill?: string | null;
|
|
50
50
|
footerClassName?: string;
|
|
51
|
+
/** Per-role extra classes on message root wrappers (merged with built-in role styles). */
|
|
52
|
+
messageClassNames?: ChatMessageClassNames;
|
|
53
|
+
/** Per-role extra classes on inner text bubbles (merged with built-in `.text` styles). */
|
|
54
|
+
messageTextClassNames?: ChatMessageTextClassNames;
|
|
51
55
|
emptyState?: ChatEmptyStateProps;
|
|
52
56
|
/** MIME types / extensions (filtered to text-only allowlist). Enables dropzone when non-empty. */
|
|
53
57
|
allowedAttachments?: readonly string[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
export declare function AgentMessageContent({ text, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage, scriptContinue, onScriptContinue, renderMessageChart, }: {
|
|
2
|
+
export declare function AgentMessageContent({ text, textClassName, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage, scriptContinue, onScriptContinue, renderMessageChart, }: {
|
|
3
3
|
text: string;
|
|
4
|
+
textClassName?: string;
|
|
4
5
|
onQuickReply?: (branchKey: string, displayLabel: string) => void;
|
|
5
6
|
suppressedQuickReplyKeys?: ReadonlySet<string>;
|
|
6
7
|
quickReplyDisabled?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type ChatMessageProps } from '../Chat.types';
|
|
2
|
-
export declare function ChatMessage({ role, text, inProgress, userTextFileAttachments, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage, scriptContinue, onScriptContinue, renderMessageChart, message, renderSystemMessage, }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ChatMessage({ role, text, inProgress, userTextFileAttachments, onQuickReply, suppressedQuickReplyKeys, quickReplyDisabled, quickReplyHidden, isLastMessage, scriptContinue, onScriptContinue, renderMessageChart, message, renderSystemMessage, className, textClassName, }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,7 +18,7 @@ export { CHAT_PROMPT_COMMAND_CHIP_CLASS, chatPromptChipHtml, createChatPromptCom
|
|
|
18
18
|
export type { ChatPromptComposerInsertOptions } from './ChatPrompt/ChatPromptComposer.types';
|
|
19
19
|
export { ChatPresets } from './ChatPresets';
|
|
20
20
|
export type { ChatEmptyStateConfig, ChatEmptyStateContext, ChatEmptyStateProps, } from './ChatEmptyState/ChatEmptyState.types';
|
|
21
|
-
export type { Chat as ChatType, ChatAttachmentDropItem, ChatMeta, ChatMetaValue, ChatSendMessagePayload, ChatProps, ChatPreset as ChatPresetType, Message, UserTextFileAttachment, } from './Chat.types';
|
|
21
|
+
export type { Chat as ChatType, ChatAttachmentDropItem, ChatMessageClassNames, ChatMessageTextClassNames, ChatMeta, ChatMetaValue, ChatSendMessagePayload, ChatMessageProps, ChatProps, ChatPreset as ChatPresetType, Message, UserTextFileAttachment, } from './Chat.types';
|
|
22
22
|
export { MessageRole } from './Chat.types';
|
|
23
23
|
export type { SlashCommandItem, SlashItemCommandContext, SlashOnItemCommand, } from '#uilib/tiptap/slash-mention/types';
|
|
24
24
|
export { CsvIcon } from '../../icons/CsvIcon/CsvIcon';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface AppBannerProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function AppBanner({ children, className, onDismiss }: AppBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { AppBanner, type AppBannerProps } from './AppBanner/AppBanner';
|
|
1
2
|
export { AppShell, AppShellMainContent, type AppShellMainContentProps, type AppShellProps, } from './AppShell/AppShell';
|
|
2
3
|
export { PageHeader } from './PageHeader/PageHeader';
|
|
3
4
|
export { PageEmptyCanvas } from './PageEmptyCanvas/PageEmptyCanvas';
|
|
@@ -12,7 +12,5 @@ export type SybilionAppHeaderProps = WorkspaceAppSwitcherProps & NavUserHeaderPr
|
|
|
12
12
|
/** Branded markup; omit for default lucide tile + «Sybilion». */
|
|
13
13
|
logo?: ReactNode;
|
|
14
14
|
logoAreaClassName?: string;
|
|
15
|
-
/** Applies vertical offset when a welcome banner consumes top space (CSS `--welcome-banner-height` on shell). */
|
|
16
|
-
welcomeBannerOffset?: boolean;
|
|
17
15
|
};
|
|
18
|
-
export declare function SybilionAppHeader({ pageHeaderId, actionsAnchorId, actionsAnchorClassName, actionsStart, actionsEnd, pathname, onNavigate, authenticated, defaultApps, appsStorageKey, logo, logoAreaClassName,
|
|
16
|
+
export declare function SybilionAppHeader({ pageHeaderId, actionsAnchorId, actionsAnchorClassName, actionsStart, actionsEnd, pathname, onNavigate, authenticated, defaultApps, appsStorageKey, logo, logoAreaClassName, ...navUserHeaderProps }: SybilionAppHeaderProps): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -114,9 +114,25 @@ export interface ChatPromptProps {
|
|
|
114
114
|
onSlashItemCommand?: SlashOnItemCommand;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
export type ChatMessageClassNames = {
|
|
118
|
+
user?: string;
|
|
119
|
+
assistant?: string;
|
|
120
|
+
system?: string;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export type ChatMessageTextClassNames = {
|
|
124
|
+
user?: string;
|
|
125
|
+
assistant?: string;
|
|
126
|
+
system?: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
117
129
|
export interface ChatMessageProps {
|
|
118
130
|
role: MessageRole;
|
|
119
131
|
text: string;
|
|
132
|
+
/** Extra class on the message root wrapper (role layout + defaults still apply). */
|
|
133
|
+
className?: string;
|
|
134
|
+
/** Extra class on the inner text bubble (merged with built-in `.text` styles). */
|
|
135
|
+
textClassName?: string;
|
|
120
136
|
inProgress?: boolean;
|
|
121
137
|
userTextFileAttachments?: UserTextFileAttachment[];
|
|
122
138
|
onQuickReply?: (branchKey: string, displayLabel: string) => void;
|
|
@@ -51,6 +51,8 @@ export function ChatChrome({
|
|
|
51
51
|
onNewChat,
|
|
52
52
|
promptPrefill,
|
|
53
53
|
footerClassName,
|
|
54
|
+
messageClassNames,
|
|
55
|
+
messageTextClassNames,
|
|
54
56
|
emptyState,
|
|
55
57
|
allowedAttachments,
|
|
56
58
|
allowPdfAttachments = false,
|
|
@@ -219,10 +221,27 @@ export function ChatChrome({
|
|
|
219
221
|
>
|
|
220
222
|
{messages.map((msg, index, arr) => {
|
|
221
223
|
const isLast = index === arr.length - 1;
|
|
224
|
+
const messageClassName = messageClassNames
|
|
225
|
+
? {
|
|
226
|
+
[MessageRole.USER]: messageClassNames.user,
|
|
227
|
+
[MessageRole.ASSISTANT]: messageClassNames.assistant,
|
|
228
|
+
[MessageRole.SYSTEM]: messageClassNames.system,
|
|
229
|
+
}[msg.role]
|
|
230
|
+
: undefined;
|
|
231
|
+
const messageTextClassName = messageTextClassNames
|
|
232
|
+
? {
|
|
233
|
+
[MessageRole.USER]: messageTextClassNames.user,
|
|
234
|
+
[MessageRole.ASSISTANT]:
|
|
235
|
+
messageTextClassNames.assistant,
|
|
236
|
+
[MessageRole.SYSTEM]: messageTextClassNames.system,
|
|
237
|
+
}[msg.role]
|
|
238
|
+
: undefined;
|
|
222
239
|
return (
|
|
223
240
|
<Chat.Message
|
|
224
241
|
key={msg.id}
|
|
225
242
|
message={msg}
|
|
243
|
+
className={messageClassName}
|
|
244
|
+
textClassName={messageTextClassName}
|
|
226
245
|
role={msg.role}
|
|
227
246
|
text={msg.text}
|
|
228
247
|
inProgress={msg.inProgress}
|
|
@@ -272,8 +291,7 @@ export function ChatChrome({
|
|
|
272
291
|
</div>
|
|
273
292
|
) : null}
|
|
274
293
|
|
|
275
|
-
{showInlinePresets &&
|
|
276
|
-
renderPresets('inline', { variant })}
|
|
294
|
+
{showInlinePresets && renderPresets('inline', { variant })}
|
|
277
295
|
|
|
278
296
|
{isLoading &&
|
|
279
297
|
!hasInProgressSystemMessage &&
|
|
@@ -298,7 +316,9 @@ export function ChatChrome({
|
|
|
298
316
|
</div>
|
|
299
317
|
) : null}
|
|
300
318
|
|
|
301
|
-
<div
|
|
319
|
+
<div
|
|
320
|
+
className={cn(S.footer, isClean && S.footerClean, footerClassName)}
|
|
321
|
+
>
|
|
302
322
|
<Chat.Prompt
|
|
303
323
|
className={isClean ? S.promptClean : undefined}
|
|
304
324
|
onSubmit={handlePromptSubmitWithAttachments}
|
|
@@ -2,6 +2,8 @@ import type { RefObject } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
ChatAttachmentDropItem,
|
|
5
|
+
ChatMessageClassNames,
|
|
6
|
+
ChatMessageTextClassNames,
|
|
5
7
|
Message,
|
|
6
8
|
} from '#uilib/components/ui/Chat/Chat.types';
|
|
7
9
|
import type { ChatEmptyStateProps } from '#uilib/components/ui/Chat/ChatEmptyState/ChatEmptyState.types';
|
|
@@ -66,6 +68,10 @@ export interface ChatChromeProps {
|
|
|
66
68
|
/** `?prompt=` deep link text for one-shot composer pre-fill. */
|
|
67
69
|
promptPrefill?: string | null;
|
|
68
70
|
footerClassName?: string;
|
|
71
|
+
/** Per-role extra classes on message root wrappers (merged with built-in role styles). */
|
|
72
|
+
messageClassNames?: ChatMessageClassNames;
|
|
73
|
+
/** Per-role extra classes on inner text bubbles (merged with built-in `.text` styles). */
|
|
74
|
+
messageTextClassNames?: ChatMessageTextClassNames;
|
|
69
75
|
emptyState?: ChatEmptyStateProps;
|
|
70
76
|
/** MIME types / extensions (filtered to text-only allowlist). Enables dropzone when non-empty. */
|
|
71
77
|
allowedAttachments?: readonly string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import cn from 'classnames';
|
|
1
2
|
import { type ReactNode, useMemo, useState } from 'react';
|
|
2
3
|
|
|
3
4
|
import { Button } from '#uilib/components/ui/Button';
|
|
@@ -15,6 +16,7 @@ import { XlsIcon } from './icons/XlsIcon';
|
|
|
15
16
|
|
|
16
17
|
export function AgentMessageContent({
|
|
17
18
|
text,
|
|
19
|
+
textClassName,
|
|
18
20
|
onQuickReply,
|
|
19
21
|
suppressedQuickReplyKeys,
|
|
20
22
|
quickReplyDisabled,
|
|
@@ -25,6 +27,7 @@ export function AgentMessageContent({
|
|
|
25
27
|
renderMessageChart,
|
|
26
28
|
}: {
|
|
27
29
|
text: string;
|
|
30
|
+
textClassName?: string;
|
|
28
31
|
onQuickReply?: (branchKey: string, displayLabel: string) => void;
|
|
29
32
|
suppressedQuickReplyKeys?: ReadonlySet<string>;
|
|
30
33
|
quickReplyDisabled?: boolean;
|
|
@@ -211,7 +214,7 @@ export function AgentMessageContent({
|
|
|
211
214
|
|
|
212
215
|
return (
|
|
213
216
|
<div
|
|
214
|
-
className={S.text}
|
|
217
|
+
className={cn(S.text, textClassName)}
|
|
215
218
|
// onClick={() => setShowRaw(!showRaw)}
|
|
216
219
|
>
|
|
217
220
|
{showRaw ? text : parts}
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
.text
|
|
40
40
|
padding var(--p-3) var(--p-4)
|
|
41
41
|
|
|
42
|
-
background-color var(--sb-slate-100)
|
|
43
42
|
border-radius var(--p-4)
|
|
44
43
|
border-bottom-right-radius 0
|
|
45
44
|
|
|
@@ -47,8 +46,11 @@
|
|
|
47
46
|
overflow hidden
|
|
48
47
|
box-sizing border-box
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
background-color var(--sb-
|
|
49
|
+
&:not(.textCustom)
|
|
50
|
+
background-color var(--sb-slate-100)
|
|
51
|
+
|
|
52
|
+
:global(.dark) &
|
|
53
|
+
background-color var(--sb-gray-900)
|
|
52
54
|
|
|
53
55
|
.role-system
|
|
54
56
|
align-items center
|
|
@@ -24,6 +24,8 @@ export function ChatMessage({
|
|
|
24
24
|
renderMessageChart,
|
|
25
25
|
message,
|
|
26
26
|
renderSystemMessage,
|
|
27
|
+
className,
|
|
28
|
+
textClassName,
|
|
27
29
|
}: ChatMessageProps) {
|
|
28
30
|
const fileAttachments = userTextFileAttachmentsFromMessage({
|
|
29
31
|
userTextFileAttachments,
|
|
@@ -32,9 +34,9 @@ export function ChatMessage({
|
|
|
32
34
|
const isSystem = role === MessageRole.SYSTEM;
|
|
33
35
|
|
|
34
36
|
return (
|
|
35
|
-
<div className={cn(S.root, S[`role-${role}`])}>
|
|
37
|
+
<div className={cn(S.root, S[`role-${role}`], className)}>
|
|
36
38
|
{isSystem ? (
|
|
37
|
-
<div className={S.text}>
|
|
39
|
+
<div className={cn(S.text, textClassName)}>
|
|
38
40
|
{inProgress ? (
|
|
39
41
|
<TextShimmer as="span">{text}</TextShimmer>
|
|
40
42
|
) : renderSystemMessage && message ? (
|
|
@@ -46,6 +48,7 @@ export function ChatMessage({
|
|
|
46
48
|
) : isAssistant ? (
|
|
47
49
|
<AgentMessageContent
|
|
48
50
|
text={text}
|
|
51
|
+
textClassName={textClassName}
|
|
49
52
|
onQuickReply={onQuickReply}
|
|
50
53
|
suppressedQuickReplyKeys={suppressedQuickReplyKeys}
|
|
51
54
|
quickReplyDisabled={quickReplyDisabled}
|
|
@@ -57,7 +60,9 @@ export function ChatMessage({
|
|
|
57
60
|
/>
|
|
58
61
|
) : (
|
|
59
62
|
<div className={S.userColumn}>
|
|
60
|
-
<div
|
|
63
|
+
<div
|
|
64
|
+
className={cn(S.text, textClassName && S.textCustom, textClassName)}
|
|
65
|
+
>
|
|
61
66
|
<InteractiveContent text={text} />
|
|
62
67
|
</div>
|
|
63
68
|
{fileAttachments.map(attachment => (
|
|
@@ -8,8 +8,7 @@ INPUT_MAX_HEIGHT = 200px
|
|
|
8
8
|
flex-direction column
|
|
9
9
|
gap var(--p-2)
|
|
10
10
|
align-items stretch
|
|
11
|
-
padding var(--p-
|
|
12
|
-
padding-top var(--p-5)
|
|
11
|
+
padding var(--p-3)
|
|
13
12
|
|
|
14
13
|
.composer
|
|
15
14
|
position relative
|
|
@@ -100,6 +99,7 @@ INPUT_MAX_HEIGHT = 200px
|
|
|
100
99
|
flex-shrink 0
|
|
101
100
|
align-items center
|
|
102
101
|
justify-content flex-end
|
|
102
|
+
margin-top -4px
|
|
103
103
|
|
|
104
104
|
& > button:focus
|
|
105
105
|
box-shadow 0 0 0 2px var(--brand-color-500) !important
|
|
@@ -48,9 +48,12 @@ export type {
|
|
|
48
48
|
export type {
|
|
49
49
|
Chat as ChatType,
|
|
50
50
|
ChatAttachmentDropItem,
|
|
51
|
+
ChatMessageClassNames,
|
|
52
|
+
ChatMessageTextClassNames,
|
|
51
53
|
ChatMeta,
|
|
52
54
|
ChatMetaValue,
|
|
53
55
|
ChatSendMessagePayload,
|
|
56
|
+
ChatMessageProps,
|
|
54
57
|
ChatProps,
|
|
55
58
|
ChatPreset as ChatPresetType,
|
|
56
59
|
Message,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import 'lib/theme.styl'
|
|
2
|
+
|
|
3
|
+
APP_BANNER_HEIGHT = 44px
|
|
4
|
+
|
|
5
|
+
.root
|
|
6
|
+
display flex
|
|
7
|
+
align-items center
|
|
8
|
+
justify-content center
|
|
9
|
+
gap var(--p-2)
|
|
10
|
+
width 100%
|
|
11
|
+
box-sizing border-box
|
|
12
|
+
min-height APP_BANNER_HEIGHT
|
|
13
|
+
padding var(--p-2) var(--p-4)
|
|
14
|
+
flex-shrink 0
|
|
15
|
+
|
|
16
|
+
background-color var(--muted)
|
|
17
|
+
color var(--foreground)
|
|
18
|
+
|
|
19
|
+
a
|
|
20
|
+
color inherit
|
|
21
|
+
text-decoration underline
|
|
22
|
+
white-space nowrap
|
|
23
|
+
|
|
24
|
+
&:hover
|
|
25
|
+
opacity 0.85
|
|
26
|
+
|
|
27
|
+
.message
|
|
28
|
+
flex 1
|
|
29
|
+
text-align center
|
|
30
|
+
font-size var(--text-sm)
|
|
31
|
+
line-height 1.25
|
|
32
|
+
|
|
33
|
+
.dismiss
|
|
34
|
+
flex-shrink 0
|
|
35
|
+
color inherit
|
|
36
|
+
opacity 0.7
|
|
37
|
+
|
|
38
|
+
&:hover
|
|
39
|
+
opacity 1
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Button } from '#uilib/components/ui/Button';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import S from './AppBanner.styl';
|
|
4
|
+
import { XIcon } from 'lucide-react';
|
|
5
|
+
import cn from 'classnames';
|
|
6
|
+
|
|
7
|
+
export interface AppBannerProps {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function AppBanner({ children, className, onDismiss }: AppBannerProps) {
|
|
14
|
+
return (
|
|
15
|
+
<div className={cn(S.root, className)} data-slot="app-banner" role="status">
|
|
16
|
+
<div className={S.message}>{children}</div>
|
|
17
|
+
{onDismiss && (
|
|
18
|
+
<Button
|
|
19
|
+
variant="ghost"
|
|
20
|
+
icon
|
|
21
|
+
type="button"
|
|
22
|
+
onClick={onDismiss}
|
|
23
|
+
className={S.dismiss}
|
|
24
|
+
aria-label="Dismiss banner"
|
|
25
|
+
>
|
|
26
|
+
<XIcon size={16} aria-hidden />
|
|
27
|
+
</Button>
|
|
28
|
+
)}
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -32,14 +32,16 @@ export function AppShellMainContent({
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export const AppShell = forwardRef<HTMLDivElement, AppShellProps>(
|
|
35
|
-
function AppShell({ className, ...props }, ref) {
|
|
35
|
+
function AppShell({ className, children, ...props }, ref) {
|
|
36
36
|
return (
|
|
37
37
|
<div
|
|
38
38
|
ref={ref}
|
|
39
39
|
data-slot="app-shell"
|
|
40
40
|
className={cn(S.root, className)}
|
|
41
41
|
{...props}
|
|
42
|
-
|
|
42
|
+
>
|
|
43
|
+
{children}
|
|
44
|
+
</div>
|
|
43
45
|
);
|
|
44
46
|
},
|
|
45
47
|
);
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
display flex
|
|
6
6
|
flex-direction row
|
|
7
7
|
align-items stretch
|
|
8
|
-
|
|
9
|
-
height calc(100% - var(--welcome-alert-height))
|
|
8
|
+
height 100%
|
|
10
9
|
width 100%
|
|
11
10
|
min-height 0
|
|
12
11
|
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
height 0
|
|
52
51
|
--top-offset: -10px
|
|
53
52
|
--gap-top: calc(var(--header-height) + var(--top-offset))
|
|
54
|
-
top var(--gap-top)
|
|
53
|
+
top calc(var(--gap-top) + var(--app-banner-height, 0px))
|
|
55
54
|
align-self flex-start
|
|
56
55
|
display none
|
|
57
56
|
flex-direction column
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
@media (min-width MOBILE)
|
|
65
64
|
&[data-state="expanded"]
|
|
66
65
|
display flex
|
|
67
|
-
height calc(
|
|
66
|
+
height calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))
|
|
68
67
|
min-height 0
|
|
69
68
|
|
|
70
69
|
&[data-collapsible="offcanvas"]
|
|
@@ -129,7 +128,7 @@
|
|
|
129
128
|
position absolute
|
|
130
129
|
top -200px
|
|
131
130
|
// bottom 40px
|
|
132
|
-
height calc(100vh + 200px)
|
|
131
|
+
height calc(100vh + 200px - var(--app-banner-height, 0px))
|
|
133
132
|
z-index 30
|
|
134
133
|
width 5px
|
|
135
134
|
border-radius 2.5px
|
|
@@ -159,7 +158,7 @@
|
|
|
159
158
|
|
|
160
159
|
.fullHeightResizer &
|
|
161
160
|
top -80px
|
|
162
|
-
height calc(100vh - var(--gap-top) * -1)
|
|
161
|
+
height calc(100vh - var(--gap-top) * -1 - var(--app-banner-height, 0px))
|
|
163
162
|
|
|
164
163
|
// Sidebar input
|
|
165
164
|
.sidebarInput
|
|
@@ -204,7 +203,7 @@
|
|
|
204
203
|
max-height 100%
|
|
205
204
|
|
|
206
205
|
@media (min-width MOBILE)
|
|
207
|
-
height calc(100vh - var(--gap-top))
|
|
206
|
+
height calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))
|
|
208
207
|
|
|
209
208
|
&[data-collapsible="icon"]
|
|
210
209
|
overflow hidden
|
|
@@ -43,13 +43,6 @@
|
|
|
43
43
|
position absolute
|
|
44
44
|
left var(--p-8)
|
|
45
45
|
|
|
46
|
-
.logoAreaWithBanner
|
|
47
|
-
top calc(22px + var(--welcome-banner-height, 0px))
|
|
48
|
-
|
|
49
|
-
@media (min-width MOBILE)
|
|
50
|
-
:global([data-slot='sidebar-wrapper'][data-state='collapsed']:not([data-slot='app-shell'] [data-slot='sidebar-wrapper']) [data-slot='app-shell']:not([data-slot='app-shell'] [data-slot='app-shell'])) &
|
|
51
|
-
top 22px
|
|
52
|
-
|
|
53
46
|
.logoLink
|
|
54
47
|
display flex
|
|
55
48
|
align-items center
|
|
@@ -27,8 +27,6 @@ export type SybilionAppHeaderProps = WorkspaceAppSwitcherProps &
|
|
|
27
27
|
/** Branded markup; omit for default lucide tile + «Sybilion». */
|
|
28
28
|
logo?: ReactNode;
|
|
29
29
|
logoAreaClassName?: string;
|
|
30
|
-
/** Applies vertical offset when a welcome banner consumes top space (CSS `--welcome-banner-height` on shell). */
|
|
31
|
-
welcomeBannerOffset?: boolean;
|
|
32
30
|
};
|
|
33
31
|
|
|
34
32
|
export function SybilionAppHeader({
|
|
@@ -44,18 +42,11 @@ export function SybilionAppHeader({
|
|
|
44
42
|
appsStorageKey,
|
|
45
43
|
logo,
|
|
46
44
|
logoAreaClassName,
|
|
47
|
-
welcomeBannerOffset,
|
|
48
45
|
...navUserHeaderProps
|
|
49
46
|
}: SybilionAppHeaderProps) {
|
|
50
47
|
return (
|
|
51
48
|
<AppHeaderPortal pageHeaderId={pageHeaderId}>
|
|
52
|
-
<div
|
|
53
|
-
className={cn(
|
|
54
|
-
S.logoArea,
|
|
55
|
-
welcomeBannerOffset && S.logoAreaWithBanner,
|
|
56
|
-
logoAreaClassName,
|
|
57
|
-
)}
|
|
58
|
-
>
|
|
49
|
+
<div className={cn(S.logoArea, logoAreaClassName)}>
|
|
59
50
|
<Link to="/" className={S.logoLink}>
|
|
60
51
|
{logo ?? <Logo size="md" aria-hidden />}
|
|
61
52
|
</Link>
|
package/src/docs/App/App.tsx
CHANGED
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import cn from 'classnames';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
Link,
|
|
5
|
+
Navigate,
|
|
6
|
+
Outlet,
|
|
7
|
+
Route,
|
|
8
|
+
Routes,
|
|
9
|
+
useLocation,
|
|
10
|
+
useNavigate,
|
|
11
|
+
} from 'react-router-dom';
|
|
2
12
|
|
|
13
|
+
import { AppHeaderHost } from '#uilib/components/ui/AppHeader';
|
|
14
|
+
import { Button } from '#uilib/components/ui/Button';
|
|
15
|
+
import {
|
|
16
|
+
AppBanner,
|
|
17
|
+
AppShell,
|
|
18
|
+
AppShellMainContent,
|
|
19
|
+
} from '#uilib/components/ui/Page';
|
|
20
|
+
import { PageFooter } from '#uilib/components/ui/Page/PageFooter/PageFooter';
|
|
21
|
+
import { PageScroll } from '#uilib/components/ui/Page/PageScroll/PageScroll';
|
|
3
22
|
import { SidebarProvider } from '#uilib/components/ui/Sidebar/Sidebar';
|
|
23
|
+
import { SybilionAppHeader } from '#uilib/components/widgets/SybilionAppHeader';
|
|
4
24
|
import { ChatProvider } from '#uilib/contexts/chat-context';
|
|
25
|
+
import { DocsSidebar } from '#uilib/docs/components/DocsSidebar/DocsSidebar';
|
|
5
26
|
import type { ChatResponse } from '#uilib/types/chat-api.types';
|
|
6
27
|
|
|
7
28
|
import { DocPage } from '../DocPage';
|
|
8
|
-
import
|
|
29
|
+
import S from '../DocsShell.styl';
|
|
9
30
|
import {
|
|
10
31
|
DOCS_CHAT_USER_KEY,
|
|
11
32
|
DOCS_SIDEBAR_WIDTH_LS_KEY,
|
|
12
33
|
} from '../docsConstants';
|
|
13
34
|
import { DOC_DEFAULT_SLUG } from '../registry';
|
|
35
|
+
import { ThemeToggle } from './ThemeToggle';
|
|
14
36
|
|
|
15
37
|
async function mockDocsSendChatMessage(
|
|
16
38
|
message: string,
|
|
@@ -25,6 +47,73 @@ async function mockDocsSendChatMessage(
|
|
|
25
47
|
};
|
|
26
48
|
}
|
|
27
49
|
|
|
50
|
+
function DocsLayout() {
|
|
51
|
+
const location = useLocation();
|
|
52
|
+
const navigate = useNavigate();
|
|
53
|
+
const [bannerVisible, setBannerVisible] = useState(false);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<div className={cn(S.viewport, bannerVisible && S.viewportWithBanner)}>
|
|
57
|
+
{bannerVisible ? (
|
|
58
|
+
<div className={S.welcomeBannerOuter}>
|
|
59
|
+
<AppBanner onDismiss={() => setBannerVisible(false)}>
|
|
60
|
+
Welcome, %userNname% 🎉 Your account is active! Make the most of
|
|
61
|
+
Sybilion, <Link to="/docs/button">explore features →</Link>
|
|
62
|
+
</AppBanner>
|
|
63
|
+
</div>
|
|
64
|
+
) : null}
|
|
65
|
+
<div className={S.pageScrollSlot}>
|
|
66
|
+
<PageScroll className={S.root}>
|
|
67
|
+
<AppShell>
|
|
68
|
+
<DocsSidebar />
|
|
69
|
+
|
|
70
|
+
<AppShellMainContent
|
|
71
|
+
header={<AppHeaderHost sticky />}
|
|
72
|
+
footer={
|
|
73
|
+
<PageFooter versionLink="/releases" versionLabel="1.0.0-docs" />
|
|
74
|
+
}
|
|
75
|
+
>
|
|
76
|
+
<SybilionAppHeader
|
|
77
|
+
pathname={location.pathname}
|
|
78
|
+
onNavigate={href => {
|
|
79
|
+
void navigate(href);
|
|
80
|
+
}}
|
|
81
|
+
authenticated
|
|
82
|
+
isAuthenticated={false}
|
|
83
|
+
onLogout={() => undefined}
|
|
84
|
+
signInSlot={<ThemeToggle />}
|
|
85
|
+
actionsEnd={
|
|
86
|
+
<Button
|
|
87
|
+
type="button"
|
|
88
|
+
variant="outline"
|
|
89
|
+
size="sm"
|
|
90
|
+
onClick={() => setBannerVisible(current => !current)}
|
|
91
|
+
>
|
|
92
|
+
{bannerVisible ? 'Hide banner' : 'Show banner'}
|
|
93
|
+
</Button>
|
|
94
|
+
}
|
|
95
|
+
defaultApps={[
|
|
96
|
+
{
|
|
97
|
+
id: 'docs-home',
|
|
98
|
+
displayName: 'Home',
|
|
99
|
+
subtitle: 'Home',
|
|
100
|
+
iconKey: 'grid-four',
|
|
101
|
+
accent: '#0d9488',
|
|
102
|
+
accentMuted: 'rgba(13, 148, 136, 0.12)',
|
|
103
|
+
href: '/',
|
|
104
|
+
matchPathPrefixes: ['/'],
|
|
105
|
+
},
|
|
106
|
+
]}
|
|
107
|
+
/>
|
|
108
|
+
<Outlet />
|
|
109
|
+
</AppShellMainContent>
|
|
110
|
+
</AppShell>
|
|
111
|
+
</PageScroll>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
28
117
|
export default function App() {
|
|
29
118
|
return (
|
|
30
119
|
<SidebarProvider
|
|
@@ -40,7 +129,7 @@ export default function App() {
|
|
|
40
129
|
path="/"
|
|
41
130
|
element={<Navigate to={`/docs/${DOC_DEFAULT_SLUG}`} replace />}
|
|
42
131
|
/>
|
|
43
|
-
<Route path="/docs" element={<
|
|
132
|
+
<Route path="/docs" element={<DocsLayout />}>
|
|
44
133
|
<Route index element={<Navigate to={DOC_DEFAULT_SLUG} replace />} />
|
|
45
134
|
<Route path=":slug" element={<DocPage />} />
|
|
46
135
|
</Route>
|
package/src/docs/DocsShell.styl
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
@import '../lib/theme.styl'
|
|
2
2
|
|
|
3
|
+
.viewport
|
|
4
|
+
position relative
|
|
5
|
+
display flex
|
|
6
|
+
flex-direction column
|
|
7
|
+
height 100vh
|
|
8
|
+
width 100%
|
|
9
|
+
overflow hidden
|
|
10
|
+
|
|
11
|
+
.viewportWithBanner
|
|
12
|
+
--app-banner-height: 44px
|
|
13
|
+
--welcome-banner-height: 44px
|
|
14
|
+
|
|
15
|
+
.welcomeBannerOuter
|
|
16
|
+
flex-shrink 0
|
|
17
|
+
width 100%
|
|
18
|
+
z-index 20
|
|
19
|
+
|
|
20
|
+
.pageScrollSlot
|
|
21
|
+
flex 1
|
|
22
|
+
min-height 0
|
|
23
|
+
width 100%
|
|
24
|
+
|
|
25
|
+
> *
|
|
26
|
+
height 100%
|
|
27
|
+
min-height 0
|
|
28
|
+
|
|
3
29
|
.root
|
|
4
30
|
display flex
|
|
5
31
|
flex-direction column
|
|
@@ -5,7 +5,11 @@ interface CssExports {
|
|
|
5
5
|
'loading': string;
|
|
6
6
|
'mainContent': string;
|
|
7
7
|
'mainHeaderBar': string;
|
|
8
|
+
'pageScrollSlot': string;
|
|
8
9
|
'root': string;
|
|
10
|
+
'viewport': string;
|
|
11
|
+
'viewportWithBanner': string;
|
|
12
|
+
'welcomeBannerOuter': string;
|
|
9
13
|
}
|
|
10
14
|
export const cssExports: CssExports;
|
|
11
15
|
export default cssExports;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function DocsShell(): import("react/jsx-runtime").JSX.Element;
|
package/src/docs/DocsShell.tsx
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Outlet, useLocation, useNavigate } from 'react-router-dom';
|
|
2
|
-
|
|
3
|
-
import { AppHeaderHost } from '#uilib/components/ui/AppHeader';
|
|
4
|
-
import { AppShell, AppShellMainContent } from '#uilib/components/ui/Page';
|
|
5
|
-
import { PageFooter } from '#uilib/components/ui/Page/PageFooter/PageFooter';
|
|
6
|
-
import { PageScroll } from '#uilib/components/ui/Page/PageScroll/PageScroll';
|
|
7
|
-
import { SybilionAppHeader } from '#uilib/components/widgets/SybilionAppHeader';
|
|
8
|
-
import { ThemeToggle } from '#uilib/docs/App/ThemeToggle';
|
|
9
|
-
import { DocsSidebar } from '#uilib/docs/components/DocsSidebar/DocsSidebar';
|
|
10
|
-
|
|
11
|
-
import S from './DocsShell.styl';
|
|
12
|
-
|
|
13
|
-
export function DocsShell() {
|
|
14
|
-
const location = useLocation();
|
|
15
|
-
const navigate = useNavigate();
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<PageScroll className={S.root}>
|
|
19
|
-
<AppShell>
|
|
20
|
-
<DocsSidebar />
|
|
21
|
-
|
|
22
|
-
<AppShellMainContent
|
|
23
|
-
header={<AppHeaderHost sticky />}
|
|
24
|
-
footer={
|
|
25
|
-
<PageFooter versionLink="/releases" versionLabel="1.0.0-docs" />
|
|
26
|
-
}
|
|
27
|
-
>
|
|
28
|
-
<SybilionAppHeader
|
|
29
|
-
pathname={location.pathname}
|
|
30
|
-
onNavigate={href => {
|
|
31
|
-
void navigate(href);
|
|
32
|
-
}}
|
|
33
|
-
authenticated
|
|
34
|
-
isAuthenticated={false}
|
|
35
|
-
onLogout={() => undefined}
|
|
36
|
-
signInSlot={<ThemeToggle />}
|
|
37
|
-
defaultApps={[
|
|
38
|
-
{
|
|
39
|
-
id: 'docs-home',
|
|
40
|
-
displayName: 'Home',
|
|
41
|
-
subtitle: 'Home',
|
|
42
|
-
iconKey: 'grid-four',
|
|
43
|
-
accent: '#0d9488',
|
|
44
|
-
accentMuted: 'rgba(13, 148, 136, 0.12)',
|
|
45
|
-
href: '/',
|
|
46
|
-
matchPathPrefixes: ['/'],
|
|
47
|
-
},
|
|
48
|
-
]}
|
|
49
|
-
/>
|
|
50
|
-
<Outlet />
|
|
51
|
-
</AppShellMainContent>
|
|
52
|
-
</AppShell>
|
|
53
|
-
</PageScroll>
|
|
54
|
-
);
|
|
55
|
-
}
|