doccupine 0.0.145 → 0.0.147
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/README.md +11 -2
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +41 -0
- package/dist/generator/generated-page-publisher.d.ts +21 -0
- package/dist/generator/generated-page-publisher.js +124 -0
- package/dist/generator/generated-route-manager.d.ts +3 -0
- package/dist/generator/generated-route-manager.js +21 -8
- package/dist/generator/mdx-pass-builder.d.ts +31 -0
- package/dist/generator/mdx-pass-builder.js +45 -0
- package/dist/generator/mdx-reconciliation-coordinator.d.ts +83 -0
- package/dist/generator/mdx-reconciliation-coordinator.js +471 -0
- package/dist/generator/openapi-refresh-coordinator.d.ts +42 -0
- package/dist/generator/openapi-refresh-coordinator.js +211 -0
- package/dist/generator/page-renderer.js +18 -13
- package/dist/generator/section-index-generator.d.ts +10 -0
- package/dist/generator/section-index-generator.js +68 -0
- package/dist/generator/secure-source-fs.js +5 -4
- package/dist/generator/site-artifacts.js +2 -2
- package/dist/generator/watch-coordinator.d.ts +8 -0
- package/dist/generator/watch-coordinator.js +131 -53
- package/dist/index.js +8 -2
- package/dist/lib/layout.js +18 -10
- package/dist/lib/openapi-rendering.d.ts +17 -0
- package/dist/lib/openapi-rendering.js +193 -0
- package/dist/lib/openapi.d.ts +1 -7
- package/dist/lib/openapi.js +2 -192
- package/dist/lib/output-safety.js +10 -3
- package/dist/lib/structures.js +4 -0
- package/dist/lib/utils.d.ts +14 -0
- package/dist/lib/utils.js +30 -8
- package/dist/mdx-to-nextjs-generator.d.ts +7 -65
- package/dist/mdx-to-nextjs-generator.js +94 -783
- package/dist/templates/components/Chat.d.ts +1 -1
- package/dist/templates/components/Chat.js +20 -691
- package/dist/templates/components/ChatStyles.d.ts +1 -0
- package/dist/templates/components/ChatStyles.js +695 -0
- package/dist/templates/components/layout/ApiPlayground.d.ts +1 -1
- package/dist/templates/components/layout/ApiPlayground.js +14 -148
- package/dist/templates/mdx/platform/analytics.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/analytics.mdx.js +13 -0
- package/dist/templates/mdx/platform/fonts-settings.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/fonts-settings.mdx.js +16 -0
- package/dist/templates/mdx/platform/publishing.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/publishing.mdx.js +16 -1
- package/dist/templates/mdx/platform/self-updating-docs.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/self-updating-docs.mdx.js +17 -5
- package/dist/templates/package.js +3 -2
- package/dist/templates/prettierignore.d.ts +1 -1
- package/dist/templates/prettierignore.js +11 -0
- package/dist/templates/utils/apiPlayground.d.ts +1 -0
- package/dist/templates/utils/apiPlayground.js +149 -0
- package/dist/templates/utils/orderNavItems.d.ts +1 -1
- package/dist/templates/utils/orderNavItems.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chatStylesTemplate = "import styled, { css, keyframes } from \"styled-components\";\nimport { Button } from \"cherry-styled-components\";\nimport Link from \"next/link\";\nimport { mq, Theme } from \"@/app/theme\";\nimport {\n styledAnchor,\n styledTable,\n stylesLists,\n StyledSmallButton,\n interactiveStyles,\n thinScrollbar,\n} from \"@/components/layout/SharedStyled\";\n\nconst styledText = css<{ theme: Theme }>`\n font-size: ${({ theme }) => theme.fontSizes.text.xs};\n line-height: ${({ theme }) => theme.lineHeights.text.xs};\n\n ${mq(\"lg\")} {\n font-size: ${({ theme }) => theme.fontSizes.small.lg};\n line-height: ${({ theme }) => theme.lineHeights.small.lg};\n }\n`;\n\nexport const StyledChatSurface = styled.div<{ $isVisible: boolean }>`\n position: fixed;\n inset: 0;\n z-index: 1000;\n pointer-events: none;\n\n & > * {\n pointer-events: auto;\n }\n\n ${({ $isVisible }) =>\n !$isVisible &&\n css`\n visibility: hidden;\n\n & > * {\n pointer-events: none;\n }\n `}\n`;\n\nexport const StyledChat = styled.div<{ theme: Theme; $isVisible: boolean }>`\n margin: 0;\n position: fixed;\n top: 0;\n right: 0;\n width: 100%;\n height: calc(100dvh - 90px);\n overflow-y: scroll;\n overflow-x: hidden;\n z-index: 1000;\n padding: 0 20px;\n /* See StyledChatForm: visibility snaps open and is delayed on close, so the\n panel is focusable as soon as it opens. */\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0s;\n transform: translateX(0);\n background: ${({ theme }) => theme.colors.light};\n -webkit-overflow-scrolling: touch;\n opacity: 1;\n visibility: visible;\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n ${({ $isVisible }) =>\n !$isVisible &&\n css`\n transform: translateX(100%);\n opacity: 0;\n visibility: hidden;\n transition-delay: 0s, 0s, 0.3s;\n `}\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n ${mq(\"lg\")} {\n width: 420px;\n border-left: solid 1px ${({ theme }) => theme.colors.grayLight};\n }\n`;\n\nconst loadingAnimation = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nconst rotateGradient = keyframes`\n 0% {\n --gradient-angle: 0deg;\n }\n 100% {\n --gradient-angle: 360deg;\n }\n`;\n\nconst pulseGlow = keyframes`\n 0%, 100% {\n opacity: 0.5;\n filter: blur(16px);\n }\n 50% {\n opacity: 1;\n filter: blur(22px);\n }\n`;\n\nconst sparkleFloat = keyframes`\n 0%, 100% {\n opacity: 0;\n transform: translateY(0) scale(0);\n }\n 50% {\n opacity: 0.9;\n transform: translateY(-20px) scale(1);\n }\n`;\n\nconst shimmer = keyframes`\n 0% {\n background-position: 0% center;\n }\n 50% {\n background-position: 100% center;\n }\n 100% {\n background-position: 0% center;\n }\n`;\n\nexport const StyledRainbowInputWrapper = styled.div<{\n theme: Theme;\n $isActive: boolean;\n}>`\n @property --gradient-angle {\n syntax: \"<angle>\";\n initial-value: 0deg;\n inherits: false;\n }\n\n position: relative;\n flex: 1;\n\n &::before {\n content: \"\";\n position: absolute;\n inset: -2px;\n border-radius: 14px;\n background: conic-gradient(\n from var(--gradient-angle),\n #cc5555,\n #d9a745,\n #3ab0cc,\n #cc7fc2,\n #4380cc,\n #4c1fa3,\n #cc5555\n );\n opacity: 0;\n transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n animation: ${rotateGradient} 3s linear infinite;\n z-index: 0;\n }\n\n &::after {\n content: \"\";\n position: absolute;\n inset: -10px;\n border-radius: 20px;\n background: conic-gradient(\n from var(--gradient-angle),\n #ff6b6b66,\n #feca5766,\n #48dbfb66,\n #ff9ff366,\n #54a0ff66,\n #5f27cd66,\n #ff6b6b66\n );\n opacity: 0;\n transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n animation:\n ${rotateGradient} 3s linear infinite,\n ${pulseGlow} 2s ease-in-out infinite;\n z-index: -1;\n pointer-events: none;\n }\n\n &:hover::before,\n &:focus-within::before {\n opacity: 1;\n }\n\n &:hover::after,\n &:focus-within::after {\n opacity: 1;\n }\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n &::before {\n opacity: 1;\n }\n &::after {\n opacity: 1;\n }\n `}\n`;\n\nexport const StyledSparkleContainer = styled.div<{ $isActive: boolean }>`\n position: absolute;\n inset: -30px;\n pointer-events: none;\n overflow: hidden;\n border-radius: 30px;\n z-index: -2;\n opacity: 0;\n transition: opacity 0.4s ease;\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n opacity: 1;\n `}\n`;\n\nexport const StyledSparkle = styled.div<{\n $color: string;\n $left: number;\n $top: number;\n $delay: number;\n}>`\n position: absolute;\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background: ${({ $color }) => $color};\n box-shadow: 0 0 6px ${({ $color }) => $color};\n left: ${({ $left }) => $left}%;\n top: ${({ $top }) => $top}%;\n animation: ${sparkleFloat} 2s ease-in-out infinite;\n animation-delay: ${({ $delay }) => $delay}s;\n`;\n\nexport const StyledRainbowInput = styled.input<{ theme: Theme }>`\n position: relative;\n z-index: 1;\n width: 100%;\n background: ${({ theme }) => theme.colors.light};\n border: 1px solid ${({ theme }) => theme.colors.grayLight};\n border-radius: 12px;\n padding: 12px 18px;\n font-size: ${({ theme }) => theme.fontSizes.text.lg};\n font-family: inherit;\n color: ${({ theme }) => theme.colors.dark};\n outline: none;\n transition:\n border-color 0.3s ease,\n box-shadow 0.3s ease;\n\n ${mq(\"lg\")} {\n font-size: ${({ theme }) => theme.fontSizes.small.lg};\n }\n\n &::placeholder {\n color: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.dark} 40%, transparent)`};\n transition: color 0.3s ease;\n }\n\n &:focus::placeholder {\n color: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.dark} 60%, transparent)`};\n }\n\n &:focus {\n border-color: transparent;\n }\n`;\n\nexport const StyledRainbowButton = styled(Button)<{\n theme: Theme;\n $hasContent: boolean;\n}>`\n padding-top: 10px;\n padding-bottom: 10px;\n position: relative;\n overflow: hidden;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;\n color: ${({ theme }) => theme.colors.surface};\n\n &::before {\n content: \"\";\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 135deg,\n #ff6b6b,\n #feca57,\n #48dbfb,\n #ff9ff3,\n #54a0ff\n );\n background-size: 300% 300%;\n opacity: 0;\n transition: opacity 0.3s ease;\n z-index: 0;\n animation: ${shimmer} 3s linear infinite;\n width: 200%;\n }\n\n ${({ $hasContent }) =>\n $hasContent &&\n css`\n &::before {\n opacity: 1;\n }\n `}\n\n &:hover::before {\n opacity: 1;\n }\n\n &:hover {\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n }\n\n & svg {\n position: relative;\n z-index: 1;\n transition: transform 0.3s ease;\n }\n\n &:disabled,\n &:disabled:hover {\n background: ${({ theme }) => theme.colors.primaryDark};\n transform: none;\n box-shadow: none;\n\n &::before {\n opacity: 0;\n }\n }\n`;\n\nexport const StyledChatForm = styled.form<{\n theme: Theme;\n $isVisible: boolean;\n}>`\n display: flex;\n gap: 10px;\n justify-content: center;\n align-items: center;\n background: ${({ theme }) => theme.colors.light};\n padding: 20px;\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 1000;\n width: 100%;\n border-top: solid 1px ${({ theme }) => theme.colors.grayLight};\n /* visibility is animatable, so transitioning \"all\" keeps this hidden for the\n whole slide-in - long enough for the focus() that follows opening to be a\n silent no-op. Snap it on open (transition-delay below) and delay it on\n close so the slide-out stays visible while it animates. */\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n transform: translateX(100%);\n opacity: 0;\n visibility: hidden;\n\n ${mq(\"lg\")} {\n width: 420px;\n border-left: solid 1px ${({ theme }) => theme.colors.grayLight};\n }\n\n ${({ $isVisible }) =>\n $isVisible &&\n css`\n opacity: 1;\n transform: translateX(0);\n visibility: visible;\n transition-delay: 0s;\n `}\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n & .loading {\n animation: ${loadingAnimation} 1s linear infinite;\n }\n`;\n\nexport const StyledGlowSmallButton = styled(StyledSmallButton)<{\n theme: Theme;\n $hasContent: boolean;\n}>`\n @property --gradient-angle {\n syntax: \"<angle>\";\n initial-value: 0deg;\n inherits: false;\n }\n\n position: relative;\n isolation: isolate;\n margin-right: 0;\n background: ${({ theme }) => theme.colors.light};\n padding: 0;\n\n &::before {\n content: \"\";\n inset: -2px;\n border-radius: 8px;\n background: conic-gradient(\n from var(--gradient-angle),\n #cc5555,\n #d9a745,\n #3ab0cc,\n #cc7fc2,\n #4380cc,\n #4c1fa3,\n #cc5555\n );\n opacity: 0;\n transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n animation: ${rotateGradient} 3s linear infinite;\n z-index: -1;\n position: absolute;\n top: -2px;\n left: -2px;\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n }\n\n &::after {\n content: \"\";\n position: absolute;\n inset: -8px;\n border-radius: 14px;\n background: conic-gradient(\n from var(--gradient-angle),\n #ff6b6b66,\n #feca5766,\n #48dbfb66,\n #ff9ff366,\n #54a0ff66,\n #5f27cd66,\n #ff6b6b66\n );\n opacity: 0;\n transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n animation:\n ${rotateGradient} 3s linear infinite,\n ${pulseGlow} 2s ease-in-out infinite;\n z-index: -2;\n pointer-events: none;\n }\n\n &:hover::before,\n &:hover::after {\n opacity: 1;\n }\n\n & span {\n padding: 6px 8px;\n display: flex;\n background: ${({ theme }) => theme.colors.light};\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n gap: 6px;\n }\n\n ${({ $hasContent }) =>\n $hasContent &&\n css`\n &::before {\n opacity: 1;\n }\n &::after {\n opacity: 1;\n }\n `}\n`;\n\nexport const StyledError = styled.div`\n margin: 20px 0;\n width: 100%;\n`;\n\nconst loadingDotAnimation = keyframes`\n 0% {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n`;\n\nexport const StyledLoading = styled.div<{ theme: Theme }>`\n overflow-x: auto;\n ${thinScrollbar};\n margin: 20px 0;\n width: 100%;\n font-weight: 600;\n ${styledText};\n color: ${({ theme }) => theme.colors.dark};\n\n & span {\n &:nth-child(1) {\n animation: ${loadingDotAnimation} 1s ease infinite;\n }\n &:nth-child(2) {\n animation: ${loadingDotAnimation} 1s ease infinite;\n animation-delay: 0.2s;\n }\n &:nth-child(3) {\n animation: ${loadingDotAnimation} 1s ease infinite;\n animation-delay: 0.4s;\n }\n }\n`;\n\nexport const StyledAnswer = styled.div<{ theme: Theme; $isAnswer: boolean }>`\n overflow-x: auto;\n ${thinScrollbar};\n background: ${({ theme }) => theme.colors.primary};\n color: ${({ theme }) => theme.colors.surface};\n padding: 9px 14px;\n border-radius: 16px 16px 4px 16px;\n margin: 20px 0 20px auto;\n width: fit-content;\n max-width: min(560px, 88%);\n font-weight: 500;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n ${styledText};\n\n & p {\n ${styledText};\n }\n\n ${({ $isAnswer }) =>\n $isAnswer &&\n css`\n background: transparent;\n color: ${({ theme }) => theme.colors.dark};\n padding: 0;\n width: 100%;\n max-width: 100%;\n margin: 20px 0;\n border-radius: 0;\n font-weight: inherit;\n white-space: normal;\n `}\n\n & code:not([class]) {\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 20%, transparent)`};\n color: ${({ theme }) => theme.colors.dark};\n padding: 2px 4px;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n white-space: pre;\n }\n\n ${styledAnchor};\n ${stylesLists};\n ${styledTable};\n\n & pre,\n & .hljs {\n margin: 10px 0;\n }\n\n & .code-wrapper pre {\n margin: 0;\n ${styledText};\n }\n\n & > *:first-child {\n margin-top: 0;\n }\n\n & > *:last-child {\n margin-bottom: 0;\n\n & > *:last-child {\n margin-bottom: 0;\n }\n }\n\n & ul,\n & ol {\n & li {\n ${styledText};\n }\n }\n\n & img,\n & video,\n & iframe {\n max-width: 100%;\n border-radius: ${({ theme }) => theme.spacing.radius.lg};\n margin: 10px 0;\n display: block;\n }\n\n & h1,\n & h2,\n & h3,\n & h4,\n & h5,\n & h6 {\n margin: 10px 0;\n padding: 0;\n }\n`;\n\nexport const StyledSources = styled.div`\n display: flex;\n gap: 16px;\n flex-wrap: wrap;\n margin: -5px 0 20px;\n`;\n\nexport const StyledSourceLink = styled(Link)<{ theme: Theme }>`\n position: relative;\n text-decoration: none;\n font-size: ${({ theme }) => theme.fontSizes.small.lg};\n line-height: 1;\n color: ${({ theme }) => theme.colors.primary};\n display: flex;\n gap: 6px;\n transition: all 0.3s ease;\n font-weight: 600;\n white-space: nowrap;\n min-width: fit-content;\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 10%, transparent)`};\n padding: 6px 8px;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n ${interactiveStyles};\n\n & * {\n margin: auto 0;\n }\n\n &:hover {\n color: ${({ theme }) => theme.colors.accent};\n }\n`;\n\nexport const StyledChatTitle = styled.div<{ theme: Theme }>`\n display: flex;\n flex-wrap: nowrap;\n justify-content: space-between;\n position: sticky;\n margin: 0 -20px;\n padding: 16px 20px;\n height: 62px;\n top: 0;\n background: ${({ theme }) => theme.colors.light};\n border-bottom: solid 1px ${({ theme }) => theme.colors.grayLight};\n z-index: 1000;\n`;\n\nexport const StyledChatTitleIconWrapper = styled.span<{ theme: Theme }>`\n display: flex;\n align-items: center;\n gap: 12px;\n color: ${({ theme }) => theme.colors.dark};\n`;\n";
|
|
@@ -0,0 +1,695 @@
|
|
|
1
|
+
import { CHAT_WIDTH } from "../app/theme.js";
|
|
2
|
+
export const chatStylesTemplate = `import styled, { css, keyframes } from "styled-components";
|
|
3
|
+
import { Button } from "cherry-styled-components";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { mq, Theme } from "@/app/theme";
|
|
6
|
+
import {
|
|
7
|
+
styledAnchor,
|
|
8
|
+
styledTable,
|
|
9
|
+
stylesLists,
|
|
10
|
+
StyledSmallButton,
|
|
11
|
+
interactiveStyles,
|
|
12
|
+
thinScrollbar,
|
|
13
|
+
} from "@/components/layout/SharedStyled";
|
|
14
|
+
|
|
15
|
+
const styledText = css<{ theme: Theme }>\`
|
|
16
|
+
font-size: \${({ theme }) => theme.fontSizes.text.xs};
|
|
17
|
+
line-height: \${({ theme }) => theme.lineHeights.text.xs};
|
|
18
|
+
|
|
19
|
+
\${mq("lg")} {
|
|
20
|
+
font-size: \${({ theme }) => theme.fontSizes.small.lg};
|
|
21
|
+
line-height: \${({ theme }) => theme.lineHeights.small.lg};
|
|
22
|
+
}
|
|
23
|
+
\`;
|
|
24
|
+
|
|
25
|
+
export const StyledChatSurface = styled.div<{ $isVisible: boolean }>\`
|
|
26
|
+
position: fixed;
|
|
27
|
+
inset: 0;
|
|
28
|
+
z-index: 1000;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
|
|
31
|
+
& > * {
|
|
32
|
+
pointer-events: auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
\${({ $isVisible }) =>
|
|
36
|
+
!$isVisible &&
|
|
37
|
+
css\`
|
|
38
|
+
visibility: hidden;
|
|
39
|
+
|
|
40
|
+
& > * {
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
\`}
|
|
44
|
+
\`;
|
|
45
|
+
|
|
46
|
+
export const StyledChat = styled.div<{ theme: Theme; $isVisible: boolean }>\`
|
|
47
|
+
margin: 0;
|
|
48
|
+
position: fixed;
|
|
49
|
+
top: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: calc(100dvh - 90px);
|
|
53
|
+
overflow-y: scroll;
|
|
54
|
+
overflow-x: hidden;
|
|
55
|
+
z-index: 1000;
|
|
56
|
+
padding: 0 20px;
|
|
57
|
+
/* See StyledChatForm: visibility snaps open and is delayed on close, so the
|
|
58
|
+
panel is focusable as soon as it opens. */
|
|
59
|
+
transition:
|
|
60
|
+
transform 0.3s ease,
|
|
61
|
+
opacity 0.3s ease,
|
|
62
|
+
visibility 0s linear 0s;
|
|
63
|
+
transform: translateX(0);
|
|
64
|
+
background: \${({ theme }) => theme.colors.light};
|
|
65
|
+
-webkit-overflow-scrolling: touch;
|
|
66
|
+
opacity: 1;
|
|
67
|
+
visibility: visible;
|
|
68
|
+
|
|
69
|
+
&::-webkit-scrollbar {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
\${({ $isVisible }) =>
|
|
74
|
+
!$isVisible &&
|
|
75
|
+
css\`
|
|
76
|
+
transform: translateX(100%);
|
|
77
|
+
opacity: 0;
|
|
78
|
+
visibility: hidden;
|
|
79
|
+
transition-delay: 0s, 0s, 0.3s;
|
|
80
|
+
\`}
|
|
81
|
+
|
|
82
|
+
@media (prefers-reduced-motion: reduce) {
|
|
83
|
+
transition: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
\${mq("lg")} {
|
|
87
|
+
width: ${CHAT_WIDTH}px;
|
|
88
|
+
border-left: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
89
|
+
}
|
|
90
|
+
\`;
|
|
91
|
+
|
|
92
|
+
const loadingAnimation = keyframes\`
|
|
93
|
+
0% {
|
|
94
|
+
transform: rotate(0deg);
|
|
95
|
+
}
|
|
96
|
+
100% {
|
|
97
|
+
transform: rotate(360deg);
|
|
98
|
+
}
|
|
99
|
+
\`;
|
|
100
|
+
|
|
101
|
+
const rotateGradient = keyframes\`
|
|
102
|
+
0% {
|
|
103
|
+
--gradient-angle: 0deg;
|
|
104
|
+
}
|
|
105
|
+
100% {
|
|
106
|
+
--gradient-angle: 360deg;
|
|
107
|
+
}
|
|
108
|
+
\`;
|
|
109
|
+
|
|
110
|
+
const pulseGlow = keyframes\`
|
|
111
|
+
0%, 100% {
|
|
112
|
+
opacity: 0.5;
|
|
113
|
+
filter: blur(16px);
|
|
114
|
+
}
|
|
115
|
+
50% {
|
|
116
|
+
opacity: 1;
|
|
117
|
+
filter: blur(22px);
|
|
118
|
+
}
|
|
119
|
+
\`;
|
|
120
|
+
|
|
121
|
+
const sparkleFloat = keyframes\`
|
|
122
|
+
0%, 100% {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
transform: translateY(0) scale(0);
|
|
125
|
+
}
|
|
126
|
+
50% {
|
|
127
|
+
opacity: 0.9;
|
|
128
|
+
transform: translateY(-20px) scale(1);
|
|
129
|
+
}
|
|
130
|
+
\`;
|
|
131
|
+
|
|
132
|
+
const shimmer = keyframes\`
|
|
133
|
+
0% {
|
|
134
|
+
background-position: 0% center;
|
|
135
|
+
}
|
|
136
|
+
50% {
|
|
137
|
+
background-position: 100% center;
|
|
138
|
+
}
|
|
139
|
+
100% {
|
|
140
|
+
background-position: 0% center;
|
|
141
|
+
}
|
|
142
|
+
\`;
|
|
143
|
+
|
|
144
|
+
export const StyledRainbowInputWrapper = styled.div<{
|
|
145
|
+
theme: Theme;
|
|
146
|
+
$isActive: boolean;
|
|
147
|
+
}>\`
|
|
148
|
+
@property --gradient-angle {
|
|
149
|
+
syntax: "<angle>";
|
|
150
|
+
initial-value: 0deg;
|
|
151
|
+
inherits: false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
position: relative;
|
|
155
|
+
flex: 1;
|
|
156
|
+
|
|
157
|
+
&::before {
|
|
158
|
+
content: "";
|
|
159
|
+
position: absolute;
|
|
160
|
+
inset: -2px;
|
|
161
|
+
border-radius: 14px;
|
|
162
|
+
background: conic-gradient(
|
|
163
|
+
from var(--gradient-angle),
|
|
164
|
+
#cc5555,
|
|
165
|
+
#d9a745,
|
|
166
|
+
#3ab0cc,
|
|
167
|
+
#cc7fc2,
|
|
168
|
+
#4380cc,
|
|
169
|
+
#4c1fa3,
|
|
170
|
+
#cc5555
|
|
171
|
+
);
|
|
172
|
+
opacity: 0;
|
|
173
|
+
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
174
|
+
animation: \${rotateGradient} 3s linear infinite;
|
|
175
|
+
z-index: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&::after {
|
|
179
|
+
content: "";
|
|
180
|
+
position: absolute;
|
|
181
|
+
inset: -10px;
|
|
182
|
+
border-radius: 20px;
|
|
183
|
+
background: conic-gradient(
|
|
184
|
+
from var(--gradient-angle),
|
|
185
|
+
#ff6b6b66,
|
|
186
|
+
#feca5766,
|
|
187
|
+
#48dbfb66,
|
|
188
|
+
#ff9ff366,
|
|
189
|
+
#54a0ff66,
|
|
190
|
+
#5f27cd66,
|
|
191
|
+
#ff6b6b66
|
|
192
|
+
);
|
|
193
|
+
opacity: 0;
|
|
194
|
+
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
195
|
+
animation:
|
|
196
|
+
\${rotateGradient} 3s linear infinite,
|
|
197
|
+
\${pulseGlow} 2s ease-in-out infinite;
|
|
198
|
+
z-index: -1;
|
|
199
|
+
pointer-events: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&:hover::before,
|
|
203
|
+
&:focus-within::before {
|
|
204
|
+
opacity: 1;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:hover::after,
|
|
208
|
+
&:focus-within::after {
|
|
209
|
+
opacity: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
\${({ $isActive }) =>
|
|
213
|
+
$isActive &&
|
|
214
|
+
css\`
|
|
215
|
+
&::before {
|
|
216
|
+
opacity: 1;
|
|
217
|
+
}
|
|
218
|
+
&::after {
|
|
219
|
+
opacity: 1;
|
|
220
|
+
}
|
|
221
|
+
\`}
|
|
222
|
+
\`;
|
|
223
|
+
|
|
224
|
+
export const StyledSparkleContainer = styled.div<{ $isActive: boolean }>\`
|
|
225
|
+
position: absolute;
|
|
226
|
+
inset: -30px;
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
border-radius: 30px;
|
|
230
|
+
z-index: -2;
|
|
231
|
+
opacity: 0;
|
|
232
|
+
transition: opacity 0.4s ease;
|
|
233
|
+
|
|
234
|
+
\${({ $isActive }) =>
|
|
235
|
+
$isActive &&
|
|
236
|
+
css\`
|
|
237
|
+
opacity: 1;
|
|
238
|
+
\`}
|
|
239
|
+
\`;
|
|
240
|
+
|
|
241
|
+
export const StyledSparkle = styled.div<{
|
|
242
|
+
$color: string;
|
|
243
|
+
$left: number;
|
|
244
|
+
$top: number;
|
|
245
|
+
$delay: number;
|
|
246
|
+
}>\`
|
|
247
|
+
position: absolute;
|
|
248
|
+
width: 4px;
|
|
249
|
+
height: 4px;
|
|
250
|
+
border-radius: 50%;
|
|
251
|
+
background: \${({ $color }) => $color};
|
|
252
|
+
box-shadow: 0 0 6px \${({ $color }) => $color};
|
|
253
|
+
left: \${({ $left }) => $left}%;
|
|
254
|
+
top: \${({ $top }) => $top}%;
|
|
255
|
+
animation: \${sparkleFloat} 2s ease-in-out infinite;
|
|
256
|
+
animation-delay: \${({ $delay }) => $delay}s;
|
|
257
|
+
\`;
|
|
258
|
+
|
|
259
|
+
export const StyledRainbowInput = styled.input<{ theme: Theme }>\`
|
|
260
|
+
position: relative;
|
|
261
|
+
z-index: 1;
|
|
262
|
+
width: 100%;
|
|
263
|
+
background: \${({ theme }) => theme.colors.light};
|
|
264
|
+
border: 1px solid \${({ theme }) => theme.colors.grayLight};
|
|
265
|
+
border-radius: 12px;
|
|
266
|
+
padding: 12px 18px;
|
|
267
|
+
font-size: \${({ theme }) => theme.fontSizes.text.lg};
|
|
268
|
+
font-family: inherit;
|
|
269
|
+
color: \${({ theme }) => theme.colors.dark};
|
|
270
|
+
outline: none;
|
|
271
|
+
transition:
|
|
272
|
+
border-color 0.3s ease,
|
|
273
|
+
box-shadow 0.3s ease;
|
|
274
|
+
|
|
275
|
+
\${mq("lg")} {
|
|
276
|
+
font-size: \${({ theme }) => theme.fontSizes.small.lg};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&::placeholder {
|
|
280
|
+
color: \${({ theme }) =>
|
|
281
|
+
\`color-mix(in srgb, \${theme.colors.dark} 40%, transparent)\`};
|
|
282
|
+
transition: color 0.3s ease;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&:focus::placeholder {
|
|
286
|
+
color: \${({ theme }) =>
|
|
287
|
+
\`color-mix(in srgb, \${theme.colors.dark} 60%, transparent)\`};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&:focus {
|
|
291
|
+
border-color: transparent;
|
|
292
|
+
}
|
|
293
|
+
\`;
|
|
294
|
+
|
|
295
|
+
export const StyledRainbowButton = styled(Button)<{
|
|
296
|
+
theme: Theme;
|
|
297
|
+
$hasContent: boolean;
|
|
298
|
+
}>\`
|
|
299
|
+
padding-top: 10px;
|
|
300
|
+
padding-bottom: 10px;
|
|
301
|
+
position: relative;
|
|
302
|
+
overflow: hidden;
|
|
303
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
304
|
+
color: \${({ theme }) => theme.colors.surface};
|
|
305
|
+
|
|
306
|
+
&::before {
|
|
307
|
+
content: "";
|
|
308
|
+
position: absolute;
|
|
309
|
+
inset: 0;
|
|
310
|
+
background: linear-gradient(
|
|
311
|
+
135deg,
|
|
312
|
+
#ff6b6b,
|
|
313
|
+
#feca57,
|
|
314
|
+
#48dbfb,
|
|
315
|
+
#ff9ff3,
|
|
316
|
+
#54a0ff
|
|
317
|
+
);
|
|
318
|
+
background-size: 300% 300%;
|
|
319
|
+
opacity: 0;
|
|
320
|
+
transition: opacity 0.3s ease;
|
|
321
|
+
z-index: 0;
|
|
322
|
+
animation: \${shimmer} 3s linear infinite;
|
|
323
|
+
width: 200%;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
\${({ $hasContent }) =>
|
|
327
|
+
$hasContent &&
|
|
328
|
+
css\`
|
|
329
|
+
&::before {
|
|
330
|
+
opacity: 1;
|
|
331
|
+
}
|
|
332
|
+
\`}
|
|
333
|
+
|
|
334
|
+
&:hover::before {
|
|
335
|
+
opacity: 1;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&:hover {
|
|
339
|
+
transform: scale(1.05);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&:active {
|
|
343
|
+
transform: scale(0.95);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
& svg {
|
|
347
|
+
position: relative;
|
|
348
|
+
z-index: 1;
|
|
349
|
+
transition: transform 0.3s ease;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
&:disabled,
|
|
353
|
+
&:disabled:hover {
|
|
354
|
+
background: \${({ theme }) => theme.colors.primaryDark};
|
|
355
|
+
transform: none;
|
|
356
|
+
box-shadow: none;
|
|
357
|
+
|
|
358
|
+
&::before {
|
|
359
|
+
opacity: 0;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
\`;
|
|
363
|
+
|
|
364
|
+
export const StyledChatForm = styled.form<{
|
|
365
|
+
theme: Theme;
|
|
366
|
+
$isVisible: boolean;
|
|
367
|
+
}>\`
|
|
368
|
+
display: flex;
|
|
369
|
+
gap: 10px;
|
|
370
|
+
justify-content: center;
|
|
371
|
+
align-items: center;
|
|
372
|
+
background: \${({ theme }) => theme.colors.light};
|
|
373
|
+
padding: 20px;
|
|
374
|
+
position: fixed;
|
|
375
|
+
bottom: 0;
|
|
376
|
+
right: 0;
|
|
377
|
+
z-index: 1000;
|
|
378
|
+
width: 100%;
|
|
379
|
+
border-top: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
380
|
+
/* visibility is animatable, so transitioning "all" keeps this hidden for the
|
|
381
|
+
whole slide-in - long enough for the focus() that follows opening to be a
|
|
382
|
+
silent no-op. Snap it on open (transition-delay below) and delay it on
|
|
383
|
+
close so the slide-out stays visible while it animates. */
|
|
384
|
+
transition:
|
|
385
|
+
transform 0.3s ease,
|
|
386
|
+
opacity 0.3s ease,
|
|
387
|
+
visibility 0s linear 0.3s;
|
|
388
|
+
transform: translateX(100%);
|
|
389
|
+
opacity: 0;
|
|
390
|
+
visibility: hidden;
|
|
391
|
+
|
|
392
|
+
\${mq("lg")} {
|
|
393
|
+
width: ${CHAT_WIDTH}px;
|
|
394
|
+
border-left: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
\${({ $isVisible }) =>
|
|
398
|
+
$isVisible &&
|
|
399
|
+
css\`
|
|
400
|
+
opacity: 1;
|
|
401
|
+
transform: translateX(0);
|
|
402
|
+
visibility: visible;
|
|
403
|
+
transition-delay: 0s;
|
|
404
|
+
\`}
|
|
405
|
+
|
|
406
|
+
@media (prefers-reduced-motion: reduce) {
|
|
407
|
+
transition: none;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
& .loading {
|
|
411
|
+
animation: \${loadingAnimation} 1s linear infinite;
|
|
412
|
+
}
|
|
413
|
+
\`;
|
|
414
|
+
|
|
415
|
+
export const StyledGlowSmallButton = styled(StyledSmallButton)<{
|
|
416
|
+
theme: Theme;
|
|
417
|
+
$hasContent: boolean;
|
|
418
|
+
}>\`
|
|
419
|
+
@property --gradient-angle {
|
|
420
|
+
syntax: "<angle>";
|
|
421
|
+
initial-value: 0deg;
|
|
422
|
+
inherits: false;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
position: relative;
|
|
426
|
+
isolation: isolate;
|
|
427
|
+
margin-right: 0;
|
|
428
|
+
background: \${({ theme }) => theme.colors.light};
|
|
429
|
+
padding: 0;
|
|
430
|
+
|
|
431
|
+
&::before {
|
|
432
|
+
content: "";
|
|
433
|
+
inset: -2px;
|
|
434
|
+
border-radius: 8px;
|
|
435
|
+
background: conic-gradient(
|
|
436
|
+
from var(--gradient-angle),
|
|
437
|
+
#cc5555,
|
|
438
|
+
#d9a745,
|
|
439
|
+
#3ab0cc,
|
|
440
|
+
#cc7fc2,
|
|
441
|
+
#4380cc,
|
|
442
|
+
#4c1fa3,
|
|
443
|
+
#cc5555
|
|
444
|
+
);
|
|
445
|
+
opacity: 0;
|
|
446
|
+
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
447
|
+
animation: \${rotateGradient} 3s linear infinite;
|
|
448
|
+
z-index: -1;
|
|
449
|
+
position: absolute;
|
|
450
|
+
top: -2px;
|
|
451
|
+
left: -2px;
|
|
452
|
+
width: calc(100% + 4px);
|
|
453
|
+
height: calc(100% + 4px);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&::after {
|
|
457
|
+
content: "";
|
|
458
|
+
position: absolute;
|
|
459
|
+
inset: -8px;
|
|
460
|
+
border-radius: 14px;
|
|
461
|
+
background: conic-gradient(
|
|
462
|
+
from var(--gradient-angle),
|
|
463
|
+
#ff6b6b66,
|
|
464
|
+
#feca5766,
|
|
465
|
+
#48dbfb66,
|
|
466
|
+
#ff9ff366,
|
|
467
|
+
#54a0ff66,
|
|
468
|
+
#5f27cd66,
|
|
469
|
+
#ff6b6b66
|
|
470
|
+
);
|
|
471
|
+
opacity: 0;
|
|
472
|
+
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
473
|
+
animation:
|
|
474
|
+
\${rotateGradient} 3s linear infinite,
|
|
475
|
+
\${pulseGlow} 2s ease-in-out infinite;
|
|
476
|
+
z-index: -2;
|
|
477
|
+
pointer-events: none;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
&:hover::before,
|
|
481
|
+
&:hover::after {
|
|
482
|
+
opacity: 1;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
& span {
|
|
486
|
+
padding: 6px 8px;
|
|
487
|
+
display: flex;
|
|
488
|
+
background: \${({ theme }) => theme.colors.light};
|
|
489
|
+
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
490
|
+
gap: 6px;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
\${({ $hasContent }) =>
|
|
494
|
+
$hasContent &&
|
|
495
|
+
css\`
|
|
496
|
+
&::before {
|
|
497
|
+
opacity: 1;
|
|
498
|
+
}
|
|
499
|
+
&::after {
|
|
500
|
+
opacity: 1;
|
|
501
|
+
}
|
|
502
|
+
\`}
|
|
503
|
+
\`;
|
|
504
|
+
|
|
505
|
+
export const StyledError = styled.div\`
|
|
506
|
+
margin: 20px 0;
|
|
507
|
+
width: 100%;
|
|
508
|
+
\`;
|
|
509
|
+
|
|
510
|
+
const loadingDotAnimation = keyframes\`
|
|
511
|
+
0% {
|
|
512
|
+
opacity: 0;
|
|
513
|
+
}
|
|
514
|
+
50% {
|
|
515
|
+
opacity: 1;
|
|
516
|
+
}
|
|
517
|
+
100% {
|
|
518
|
+
opacity: 0;
|
|
519
|
+
}
|
|
520
|
+
\`;
|
|
521
|
+
|
|
522
|
+
export const StyledLoading = styled.div<{ theme: Theme }>\`
|
|
523
|
+
overflow-x: auto;
|
|
524
|
+
\${thinScrollbar};
|
|
525
|
+
margin: 20px 0;
|
|
526
|
+
width: 100%;
|
|
527
|
+
font-weight: 600;
|
|
528
|
+
\${styledText};
|
|
529
|
+
color: \${({ theme }) => theme.colors.dark};
|
|
530
|
+
|
|
531
|
+
& span {
|
|
532
|
+
&:nth-child(1) {
|
|
533
|
+
animation: \${loadingDotAnimation} 1s ease infinite;
|
|
534
|
+
}
|
|
535
|
+
&:nth-child(2) {
|
|
536
|
+
animation: \${loadingDotAnimation} 1s ease infinite;
|
|
537
|
+
animation-delay: 0.2s;
|
|
538
|
+
}
|
|
539
|
+
&:nth-child(3) {
|
|
540
|
+
animation: \${loadingDotAnimation} 1s ease infinite;
|
|
541
|
+
animation-delay: 0.4s;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
\`;
|
|
545
|
+
|
|
546
|
+
export const StyledAnswer = styled.div<{ theme: Theme; $isAnswer: boolean }>\`
|
|
547
|
+
overflow-x: auto;
|
|
548
|
+
\${thinScrollbar};
|
|
549
|
+
background: \${({ theme }) => theme.colors.primary};
|
|
550
|
+
color: \${({ theme }) => theme.colors.surface};
|
|
551
|
+
padding: 9px 14px;
|
|
552
|
+
border-radius: 16px 16px 4px 16px;
|
|
553
|
+
margin: 20px 0 20px auto;
|
|
554
|
+
width: fit-content;
|
|
555
|
+
max-width: min(560px, 88%);
|
|
556
|
+
font-weight: 500;
|
|
557
|
+
white-space: pre-wrap;
|
|
558
|
+
overflow-wrap: anywhere;
|
|
559
|
+
\${styledText};
|
|
560
|
+
|
|
561
|
+
& p {
|
|
562
|
+
\${styledText};
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
\${({ $isAnswer }) =>
|
|
566
|
+
$isAnswer &&
|
|
567
|
+
css\`
|
|
568
|
+
background: transparent;
|
|
569
|
+
color: \${({ theme }) => theme.colors.dark};
|
|
570
|
+
padding: 0;
|
|
571
|
+
width: 100%;
|
|
572
|
+
max-width: 100%;
|
|
573
|
+
margin: 20px 0;
|
|
574
|
+
border-radius: 0;
|
|
575
|
+
font-weight: inherit;
|
|
576
|
+
white-space: normal;
|
|
577
|
+
\`}
|
|
578
|
+
|
|
579
|
+
& code:not([class]) {
|
|
580
|
+
background: \${({ theme }) =>
|
|
581
|
+
\`color-mix(in srgb, \${theme.colors.primaryLight} 20%, transparent)\`};
|
|
582
|
+
color: \${({ theme }) => theme.colors.dark};
|
|
583
|
+
padding: 2px 4px;
|
|
584
|
+
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
585
|
+
white-space: pre;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
\${styledAnchor};
|
|
589
|
+
\${stylesLists};
|
|
590
|
+
\${styledTable};
|
|
591
|
+
|
|
592
|
+
& pre,
|
|
593
|
+
& .hljs {
|
|
594
|
+
margin: 10px 0;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
& .code-wrapper pre {
|
|
598
|
+
margin: 0;
|
|
599
|
+
\${styledText};
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
& > *:first-child {
|
|
603
|
+
margin-top: 0;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
& > *:last-child {
|
|
607
|
+
margin-bottom: 0;
|
|
608
|
+
|
|
609
|
+
& > *:last-child {
|
|
610
|
+
margin-bottom: 0;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
& ul,
|
|
615
|
+
& ol {
|
|
616
|
+
& li {
|
|
617
|
+
\${styledText};
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
& img,
|
|
622
|
+
& video,
|
|
623
|
+
& iframe {
|
|
624
|
+
max-width: 100%;
|
|
625
|
+
border-radius: \${({ theme }) => theme.spacing.radius.lg};
|
|
626
|
+
margin: 10px 0;
|
|
627
|
+
display: block;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
& h1,
|
|
631
|
+
& h2,
|
|
632
|
+
& h3,
|
|
633
|
+
& h4,
|
|
634
|
+
& h5,
|
|
635
|
+
& h6 {
|
|
636
|
+
margin: 10px 0;
|
|
637
|
+
padding: 0;
|
|
638
|
+
}
|
|
639
|
+
\`;
|
|
640
|
+
|
|
641
|
+
export const StyledSources = styled.div\`
|
|
642
|
+
display: flex;
|
|
643
|
+
gap: 16px;
|
|
644
|
+
flex-wrap: wrap;
|
|
645
|
+
margin: -5px 0 20px;
|
|
646
|
+
\`;
|
|
647
|
+
|
|
648
|
+
export const StyledSourceLink = styled(Link)<{ theme: Theme }>\`
|
|
649
|
+
position: relative;
|
|
650
|
+
text-decoration: none;
|
|
651
|
+
font-size: \${({ theme }) => theme.fontSizes.small.lg};
|
|
652
|
+
line-height: 1;
|
|
653
|
+
color: \${({ theme }) => theme.colors.primary};
|
|
654
|
+
display: flex;
|
|
655
|
+
gap: 6px;
|
|
656
|
+
transition: all 0.3s ease;
|
|
657
|
+
font-weight: 600;
|
|
658
|
+
white-space: nowrap;
|
|
659
|
+
min-width: fit-content;
|
|
660
|
+
background: \${({ theme }) =>
|
|
661
|
+
\`color-mix(in srgb, \${theme.colors.primaryLight} 10%, transparent)\`};
|
|
662
|
+
padding: 6px 8px;
|
|
663
|
+
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
664
|
+
\${interactiveStyles};
|
|
665
|
+
|
|
666
|
+
& * {
|
|
667
|
+
margin: auto 0;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
&:hover {
|
|
671
|
+
color: \${({ theme }) => theme.colors.accent};
|
|
672
|
+
}
|
|
673
|
+
\`;
|
|
674
|
+
|
|
675
|
+
export const StyledChatTitle = styled.div<{ theme: Theme }>\`
|
|
676
|
+
display: flex;
|
|
677
|
+
flex-wrap: nowrap;
|
|
678
|
+
justify-content: space-between;
|
|
679
|
+
position: sticky;
|
|
680
|
+
margin: 0 -20px;
|
|
681
|
+
padding: 16px 20px;
|
|
682
|
+
height: 62px;
|
|
683
|
+
top: 0;
|
|
684
|
+
background: \${({ theme }) => theme.colors.light};
|
|
685
|
+
border-bottom: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
686
|
+
z-index: 1000;
|
|
687
|
+
\`;
|
|
688
|
+
|
|
689
|
+
export const StyledChatTitleIconWrapper = styled.span<{ theme: Theme }>\`
|
|
690
|
+
display: flex;
|
|
691
|
+
align-items: center;
|
|
692
|
+
gap: 12px;
|
|
693
|
+
color: \${({ theme }) => theme.colors.dark};
|
|
694
|
+
\`;
|
|
695
|
+
`;
|