@homecode/ui 5.18.11 → 5.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/launch.json +6 -0
- package/dist/esm/src/components/Autocomplete/Autocomplete.js +2 -0
- package/dist/esm/src/components/Card/Card.styl.js +1 -1
- package/dist/esm/src/components/Chat/ChatPrompt.styl.js +1 -1
- package/dist/esm/src/components/Chat/ChatView.js +14 -4
- package/dist/esm/src/components/Dialogue/Dialogue.styl.js +1 -1
- package/dist/esm/src/components/DropZone/DropZone.styl.js +1 -1
- package/dist/esm/src/components/FoldedLine/FoldedLine.styl.js +1 -1
- package/dist/esm/src/components/Gallery/Gallery.styl.js +1 -1
- package/dist/esm/src/components/InputFile/InputFile.js +3 -1
- package/dist/esm/src/components/Label/Label.styl.js +1 -1
- package/dist/esm/src/components/Notifications/Notifications.styl.js +1 -1
- package/dist/esm/src/components/Paranja/Paranja.styl.js +1 -1
- package/dist/esm/src/components/Popup/Popup.styl.js +1 -1
- package/dist/esm/src/components/PromptComposer/PromptComposer.styl.js +2 -2
- package/dist/esm/src/components/PromptComposer/usePromptComposerEditor.js +2 -0
- package/dist/esm/src/components/Scroll/Scroll.js +30 -7
- package/dist/esm/src/components/Scroll/useAutoScroll.js +284 -0
- package/dist/esm/src/components/Select/Select.styl.js +1 -1
- package/dist/esm/src/components/Table/Table.styl.js +1 -1
- package/dist/esm/src/components/Tooltip/Tooltip.styl.js +1 -1
- package/dist/esm/src/components/VideoPlayer/VideoPlayer.styl.js +1 -1
- package/dist/esm/src/components/Virtualized/Virtualized.styl.js +1 -1
- package/dist/esm/src/tiptap/link-highlight/createLinkHighlightExtension.js +45 -0
- package/dist/esm/src/tiptap/slash-mention/SlashSuggestionList.styl.js +1 -1
- package/dist/esm/types/node_modules/@tiptap/pm/model/index.d.ts +1 -0
- package/dist/esm/types/node_modules/@tiptap/pm/view/index.d.ts +1 -0
- package/dist/esm/types/src/components/Chat/Chat.types.d.ts +1 -0
- package/dist/esm/types/src/components/Chat/ChatView.d.ts +1 -1
- package/dist/esm/types/src/components/Scroll/Scroll.d.ts +2 -0
- package/dist/esm/types/src/components/Scroll/Scroll.types.d.ts +1 -0
- package/dist/esm/types/src/components/Scroll/useAutoScroll.d.ts +21 -0
- package/dist/esm/types/src/tiptap/link-highlight/createLinkHighlightExtension.d.ts +2 -0
- package/dist/esm/types/src/tiptap/link-highlight/index.d.ts +1 -0
- package/package.json +3 -2
|
@@ -80,6 +80,8 @@ import '../Progress/Progress.styl.js';
|
|
|
80
80
|
import '@tiptap/extensions';
|
|
81
81
|
import '@tiptap/starter-kit';
|
|
82
82
|
import '../PromptComposer/PromptComposer.styl.js';
|
|
83
|
+
import '@tiptap/pm/view';
|
|
84
|
+
import 'linkifyjs';
|
|
83
85
|
import '../RadioGroup/RadioGroupContext.js';
|
|
84
86
|
import '../RadioButton/RadioButton.styl.js';
|
|
85
87
|
import '../RadioGroup/RadioGroup.styl.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Card_root__khJ4u{background-color:var(--surface-color);border-radius:var(--border-radius-l);display:flex;flex-direction:column;gap:var(--p-5);max-height:100%;position:relative}.Card_root__khJ4u.Card_blur__VbZXN{
|
|
1
|
+
var css_248z = ".Card_root__khJ4u{background-color:var(--surface-color);border-radius:var(--border-radius-l);display:flex;flex-direction:column;gap:var(--p-5);max-height:100%;position:relative}.Card_root__khJ4u.Card_blur__VbZXN{backdrop-filter:blur(20px);background-color:var(--decent-color-alpha-500)}.Card_root__khJ4u.Card_padding-xs__dd13Q{border-radius:var(--p-3);padding:var(--p-2)}.Card_root__khJ4u.Card_padding-s__S7iiZ{border-radius:var(--p-4);padding:var(--p-3)}.Card_root__khJ4u.Card_padding-m__thC3O{border-radius:var(--p-6);padding:var(--p-5)}.Card_root__khJ4u.Card_padding-l__gtTEF{border-radius:var(--p-8);padding:var(--p-8)}.Card_root__khJ4u.Card_padding-xl__y01o1{border-radius:var(--p-11);padding:var(--p-10)}.Card_header__LDTGV{align-items:flex-start;display:flex;gap:var(--p-5);justify-content:space-between}.Card_header__LDTGV:has([data-slot=card-action]){grid-template-columns:1fr auto}.Card_icon__aRlE5{align-items:center;border-radius:var(--p-2);box-shadow:inset 0 0 0 1px var(--decent-color-alpha-200);display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.Card_icon__aRlE5.Card_withBackground__lIrjx{background-color:var(--accent-color-alpha-100);box-shadow:none}.Card_icon__aRlE5>img,.Card_icon__aRlE5>svg{height:20px;width:20px}.Card_headerText__hawuL{flex-grow:1;overflow:hidden}.Card_scroll__uDcXL{margin-top:calc(var(--p-2)*-1);max-height:100%;overflow:hidden;padding-right:var(--p-5);width:calc(100% + var(--p-5))}.Card_scroll__uDcXL [data-slot=card-content]{padding-right:1px;padding-top:var(--p-2)}.Card_centered__0YX4F,.Card_fullHeight__i3n8e{display:flex;flex-direction:column}.Card_centered__0YX4F{align-items:center;justify-content:center}.Card_fullHeight__i3n8e{flex-grow:1}.Card_description__RTQTR,.Card_title__Z1SQz{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.Card_title__Z1SQz{font-size:120%;font-weight:500;line-height:1.2}.Card_description__RTQTR{color:var(--accent-color-alpha-500);max-width:100%;word-break:break-word}.Card_action__viIuL{grid-row-span:2;align-self:start;grid-column-start:2;grid-row-start:1;justify-self:end}.Card_footer__T0DXA{align-items:center;display:flex;flex-shrink:0;justify-content:space-between;overflow:visible}";
|
|
2
2
|
var S = {"root":"Card_root__khJ4u","blur":"Card_blur__VbZXN","padding-xs":"Card_padding-xs__dd13Q","padding-s":"Card_padding-s__S7iiZ","padding-m":"Card_padding-m__thC3O","padding-l":"Card_padding-l__gtTEF","padding-xl":"Card_padding-xl__y01o1","header":"Card_header__LDTGV","icon":"Card_icon__aRlE5","withBackground":"Card_withBackground__lIrjx","headerText":"Card_headerText__hawuL","scroll":"Card_scroll__uDcXL","centered":"Card_centered__0YX4F","fullHeight":"Card_fullHeight__i3n8e","title":"Card_title__Z1SQz","description":"Card_description__RTQTR","action":"Card_action__viIuL","footer":"Card_footer__T0DXA"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".ChatPrompt_root__jEydp{
|
|
1
|
+
var css_248z = ".ChatPrompt_root__jEydp{backdrop-filter:blur(20px);background-color:var(--decent-color-alpha-500);background-color:var(--accent-color-alpha-50);border-radius:var(--p-5);box-shadow:0 0 0 1px var(--active-color-alpha-100);display:flex;flex-direction:column;flex-wrap:wrap;font-size:80%;font-size:calc(80%*var(--dialogue-text-scale, 1));margin:2px auto;max-width:600px;min-height:76px;min-height:calc(var(--prompt-height, 80px) - 4px);position:relative;transition:box-shadow .4s ease-out,border-top-left-radius .2s ease,border-top-right-radius .2s ease,background-color .5s ease;width:100%}.ChatPrompt_root__jEydp:after{border-radius:inherit;box-shadow:inset 0 0 0 1px var(--accent-color-alpha-100),0 0 0 2px var(--decent-color-alpha-800),0 0 30px 0 var(--decent-color-alpha-500);content:\"\";height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:box-shadow .4s ease-out;width:100%;z-index:-2}.ChatPrompt_root__jEydp:focus-within:after,.ChatPrompt_root__jEydp:hover:after{box-shadow:0 0 0 2px var(--decent-color-alpha-500),0 0 50px 0 var(--decent-color-alpha-500)}.ChatPrompt_root__jEydp:focus-within,.ChatPrompt_root__jEydp:hover{box-shadow:inset 0 0 0 1px var(--decent-color-alpha-500)}.ChatPrompt_root__jEydp:hover{box-shadow:inset 0 0 0 1px var(--active-color-alpha-300)}.ChatPrompt_root__jEydp:focus-within{box-shadow:inset 0 0 0 1px var(--active-color-alpha-500)}.ChatPrompt_composer__uWvF4{background-color:transparent!important;position:relative;transition:opacity .2s ease-out;width:100%;z-index:1}.ChatPrompt_composer__uWvF4 .ProseMirror,.ChatPrompt_composer__uWvF4 .editorMount .promptComposerEditor{caret-color:var(--accent-color);font-size:16px!important;font-size:calc(16px*var(--dialogue-text-scale, 1))!important;min-height:1.5em!important;padding:10px var(--p-7) 0 14px!important}.ChatPrompt_composer__uWvF4 .ProseMirror:focus{box-shadow:inset 0 0 0 2px none}.ChatPrompt_composer__uWvF4 .promptComposerEmptyEditor .promptComposerEmptyNode:before{color:var(--accent-color-alpha-500)}.ChatPrompt_buttons__gm2Lm{align-items:center;cursor:text;display:flex;flex-direction:row-reverse;flex-shrink:0;flex-wrap:nowrap;gap:6px;justify-content:flex-start;padding:0 2px 0 6px;transform:translateY(-2px);width:100%;z-index:1}.ChatPrompt_buttons__gm2Lm svg{transition:.2s ease-out;transition-property:filter,scale}.ChatPrompt_button__h1lLp{background-color:transparent!important;padding:0 var(--p-2);position:relative}.ChatPrompt_button__h1lLp:focus,.ChatPrompt_button__h1lLp:hover{opacity:1}.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy{background-color:var(--active-color)!important;box-shadow:0 1px 1px 0 rgba(0,0,0,.6);color:var(--decent-color)!important;margin-left:var(--p-2);transition:filter .2s ease-out,opacity .5s ease-out}.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy svg{color:var(--decent-color)!important}.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy:focus,.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy:focus-visible,.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy:hover{filter:drop-shadow(0 0 14px var(--active-color))}.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy[disabled]{background-color:inherit!important;box-shadow:none;filter:none;pointer-events:none}.ChatPrompt_button__h1lLp.ChatPrompt_submit__CICZy[disabled] svg{color:var(--accent-color-alpha-500)!important}.ChatPrompt_submitIcon__yqHzk{display:block}.ChatPrompt_gap__xkA50{flex-grow:1}.ChatPrompt_livePanel__RoA-9{align-items:center;display:flex;flex-shrink:0;gap:6px}.ChatPrompt_promptModelSelector__RZpMR{bottom:100%;flex-shrink:0;max-width:calc(100% - 200px);opacity:.4;position:absolute;right:var(--p-1);transition:opacity .2s ease-out}.ChatPrompt_promptModelSelector__RZpMR label>div:first-child{background-color:transparent!important}.ChatPrompt_promptModelSelector__RZpMR:hover{opacity:1}.ChatPrompt_fileInput__l36Lj{display:none}.ChatPrompt_attachButton__vLVfy{flex-shrink:0;margin-left:-8px;opacity:.5;position:relative;z-index:4}.ChatPrompt_status__RpNcl{align-items:center;display:flex;flex-shrink:0;font-size:12.8px;font-size:calc(12.8px*var(--dialogue-text-scale, 1));pointer-events:none;white-space:nowrap}.ChatPrompt_status__RpNcl:last-child{padding-left:var(--p-3)}";
|
|
2
2
|
var S = {"root":"ChatPrompt_root__jEydp","composer":"ChatPrompt_composer__uWvF4","buttons":"ChatPrompt_buttons__gm2Lm","button":"ChatPrompt_button__h1lLp","submit":"ChatPrompt_submit__CICZy","submitIcon":"ChatPrompt_submitIcon__yqHzk","gap":"ChatPrompt_gap__xkA50","livePanel":"ChatPrompt_livePanel__RoA-9","promptModelSelector":"ChatPrompt_promptModelSelector__RZpMR","fileInput":"ChatPrompt_fileInput__l36Lj","attachButton":"ChatPrompt_attachButton__vLVfy","status":"ChatPrompt_status__RpNcl"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -7,16 +7,26 @@ import cn from 'classnames';
|
|
|
7
7
|
import { isPlanMessageContent } from './content.js';
|
|
8
8
|
import { scrollTo } from '../../tools/scroll.js';
|
|
9
9
|
|
|
10
|
-
function ChatView({ messages, isPrompting, emptyLabel = 'Start the conversation', className, messagesClassName, footer, onButtonClick, footerClassName, }) {
|
|
10
|
+
function ChatView({ messages, isPrompting, emptyLabel = 'Start the conversation', className, messagesClassName, footer, onButtonClick, footerClassName, autoScroll = true, }) {
|
|
11
11
|
const listRef = useRef(null);
|
|
12
|
+
const scrollRef = useRef(null);
|
|
12
13
|
const visible = messages.filter(message => !isPlanMessageContent(message.content));
|
|
13
|
-
const
|
|
14
|
+
const lastMessage = visible[visible.length - 1];
|
|
15
|
+
const lastContent = lastMessage?.content;
|
|
14
16
|
useEffect(() => {
|
|
17
|
+
if (autoScroll)
|
|
18
|
+
return;
|
|
15
19
|
const scroller = listRef.current;
|
|
16
20
|
if (scroller)
|
|
17
21
|
scrollTo(scroller, 0, scroller.scrollHeight + 80);
|
|
18
|
-
}, [visible.length, lastContent, isPrompting]);
|
|
19
|
-
|
|
22
|
+
}, [autoScroll, visible.length, lastContent, isPrompting]);
|
|
23
|
+
// A new user message always brings the view back to the bottom
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (autoScroll && lastMessage?.role === 'USER') {
|
|
26
|
+
scrollRef.current?.scrollToBottom();
|
|
27
|
+
}
|
|
28
|
+
}, [autoScroll, visible.length]);
|
|
29
|
+
return (jsxs("div", { className: cn(S.root, className), children: [jsxs(Scroll, { ref: scrollRef, y: true, autoScroll: autoScroll, fadeSize: "l", autoHide: true, offset: { y: { after: 30 } }, className: S.messages, innerClassName: cn(S.messagesInner, footer && S.messagesInnerWithPrompt, messagesClassName), onInnerRef: elem => {
|
|
20
30
|
listRef.current = elem;
|
|
21
31
|
}, children: [visible.length === 0 && jsx("div", { className: S.empty, children: emptyLabel }), visible.map((message, index) => {
|
|
22
32
|
const prev = visible[index - 1];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Dialogue_dialogOverlay__jjBIa{
|
|
1
|
+
var css_248z = ".Dialogue_dialogOverlay__jjBIa{backdrop-filter:blur(4px);background-color:var(--decent-color-alpha-900);inset:0;opacity:0;position:fixed;transition:opacity .2s ease-out;z-index:10}.Dialogue_dialogOverlay__jjBIa.Dialogue_isOpen__gISMb{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_fadeIn__RSEB2;animation-timing-function:ease-out;opacity:1}.Dialogue_dialogContent__-Lxde{border-radius:var(--border-radius-l);box-shadow:0 10px 20px rgba(0,0,0,.3),0 0 0 2px var(--decent-color-alpha-800);display:flex;flex-direction:column;left:50%;max-height:calc(100% - var(--p-5));opacity:0;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%) scale(.95);transition:opacity .2s ease-out,transform .2s ease-out;width:-moz-fit-content;width:fit-content;z-index:10}.Dialogue_dialogContent__-Lxde.Dialogue_isOpen__gISMb{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_dialogueIn__M0tLL;animation-timing-function:ease-out;opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}.Dialogue_dialogContent__-Lxde.Dialogue_isClosed__lHYyZ{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_dialogueOut__6bLTY;animation-timing-function:ease-in;opacity:0;pointer-events:none;transform:translateX(-50%) translateY(-50%) scale(.95)}@media (max-width:700px){.Dialogue_dialogContent__-Lxde{max-width:calc(100% - var(--p-5));width:calc(100% - var(--p-5))}}.Dialogue_dialogContent__-Lxde:has(.Dialogue_dialogClose__5q12n) [data-slot=card-header]{padding-right:calc(2rem + var(--p-3))}.Dialogue_size-default__X1sdB{max-width:40rem}.Dialogue_size-login__GyixB{max-width:24rem}.Dialogue_size-wide__HQbiX{max-width:calc(100% - var(--p-5))}@media (min-width:700px){.Dialogue_size-wide__HQbiX{max-width:80rem}}.Dialogue_dialogClose__5q12n{align-items:center;background-color:transparent;border:none;border-radius:var(--border-radius-s);box-shadow:inset 0 0 0 2px none;color:var(--accent-color);cursor:pointer;display:flex;height:2rem;justify-content:center;opacity:.3;position:absolute;right:var(--p-3);top:var(--p-3);transform-origin:center;transition:opacity .2s ease,transform .2s ease;width:2rem;z-index:10}.Dialogue_dialogClose__5q12n:focus-visible,.Dialogue_dialogClose__5q12n:hover{opacity:1;transform:scale(1.1)}.Dialogue_dialogClose__5q12n:focus-visible{box-shadow:0 0 0 2px var(--active-color)}.Dialogue_dialogClose__5q12n:disabled{pointer-events:none}.Dialogue_footerAlignLeft__xQUD8{justify-content:flex-start}.Dialogue_footerAlignCenter__yq9Mu{justify-content:center}.Dialogue_footerAlignRight__Yo7hG{justify-content:flex-end}@keyframes Dialogue_fadeIn__RSEB2{0%{opacity:0}to{opacity:1}}@keyframes Dialogue_dialogueIn__M0tLL{0%{opacity:0;transform:translateX(-50%) translateY(-50%) scale(.95)}to{opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}}@keyframes Dialogue_dialogueOut__6bLTY{0%{opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}to{opacity:0;transform:translateX(-50%) translateY(-50%) scale(.95)}}";
|
|
2
2
|
var S = {"dialogOverlay":"Dialogue_dialogOverlay__jjBIa","isOpen":"Dialogue_isOpen__gISMb","fadeIn":"Dialogue_fadeIn__RSEB2","dialogContent":"Dialogue_dialogContent__-Lxde","dialogueIn":"Dialogue_dialogueIn__M0tLL","isClosed":"Dialogue_isClosed__lHYyZ","dialogueOut":"Dialogue_dialogueOut__6bLTY","dialogClose":"Dialogue_dialogClose__5q12n","size-default":"Dialogue_size-default__X1sdB","size-login":"Dialogue_size-login__GyixB","size-wide":"Dialogue_size-wide__HQbiX","footerAlignLeft":"Dialogue_footerAlignLeft__xQUD8","footerAlignCenter":"Dialogue_footerAlignCenter__yq9Mu","footerAlignRight":"Dialogue_footerAlignRight__Yo7hG"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".DropZone_root__gk-Ef{display:flex;flex-direction:column;gap:var(--p-2)}.DropZone_dropArea__u-8Ye{background-color:var(--accent-color-alpha-100);border:2px dashed var(--decent-color-alpha-200);border-radius:var(--p-4);cursor:pointer;padding:var(--p-4);position:relative;text-align:center;transition:all .2s ease}.DropZone_dropArea__u-8Ye label:before{border-radius:var(--p-4);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.DropZone_dropArea__u-8Ye.DropZone_isDragging__S-aQp,.DropZone_dropArea__u-8Ye:hover:not(.DropZone_disabled__qsAf6){border:2px dashed var(--active-color-alpha-500)}.DropZone_dropArea__u-8Ye:hover:not(.DropZone_disabled__qsAf6){background-color:var(--accent-color-alpha-50)}.DropZone_dropArea__u-8Ye.DropZone_isDragging__S-aQp{align-items:center
|
|
1
|
+
var css_248z = ".DropZone_root__gk-Ef{display:flex;flex-direction:column;gap:var(--p-2)}.DropZone_dropArea__u-8Ye{background-color:var(--accent-color-alpha-100);border:2px dashed var(--decent-color-alpha-200);border-radius:var(--p-4);cursor:pointer;padding:var(--p-4);position:relative;text-align:center;transition:all .2s ease}.DropZone_dropArea__u-8Ye label:before{border-radius:var(--p-4);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.DropZone_dropArea__u-8Ye.DropZone_isDragging__S-aQp,.DropZone_dropArea__u-8Ye:hover:not(.DropZone_disabled__qsAf6){border:2px dashed var(--active-color-alpha-500)}.DropZone_dropArea__u-8Ye:hover:not(.DropZone_disabled__qsAf6){background-color:var(--accent-color-alpha-50)}.DropZone_dropArea__u-8Ye.DropZone_isDragging__S-aQp{align-items:center;backdrop-filter:blur(10px);background-color:var(--decent-color-alpha-900)!important;display:flex;height:calc(100% - var(--p-2));justify-content:center;left:var(--p-1);position:fixed;top:var(--p-1);width:calc(100% - var(--p-2));z-index:9999}.DropZone_dropArea__u-8Ye.DropZone_isDragging__S-aQp label{pointer-events:none}.DropZone_dropArea__u-8Ye.DropZone_disabled__qsAf6{cursor:not-allowed;opacity:.6}.DropZone_fileInput__E8DeE{display:none}.DropZone_label__u7-Pb{cursor:pointer}.DropZone_error__vSiwM{color:var(--danger-color);font-size:.875rem;padding:var(--p-1) var(--p-2)}";
|
|
2
2
|
var S = {"root":"DropZone_root__gk-Ef","dropArea":"DropZone_dropArea__u-8Ye","disabled":"DropZone_disabled__qsAf6","isDragging":"DropZone_isDragging__S-aQp","fileInput":"DropZone_fileInput__E8DeE","label":"DropZone_label__u7-Pb","error":"DropZone_error__vSiwM"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".FoldedLine_root__lhi-1{border-radius:12px;display:flex;flex-direction:column;min-height:1rem;padding-left:calc(4px + var(--p-2));position:relative;transition:.1s ease-out;transition-property:border-radius,margin,background-color}.FoldedLine_root__lhi-1:before{background:var(--accent-color);border-radius:2px;bottom:2px;content:\"\";height:calc(100% - 4px);left:6px;opacity:.1;pointer-events:none;position:absolute;top:2px;width:4px}.FoldedLine_root__lhi-1:hover:before,.FoldedLine_root__lhi-1:not(.FoldedLine_folded__6zX8d):before{opacity:.7}.FoldedLine_root__lhi-1.FoldedLine_folded__6zX8d{border-radius:0;margin:0}.FoldedLine_root__lhi-1.FoldedLine_folded__6zX8d .FoldedLine_scroll__X7T5v{height:1em}.FoldedLine_root__lhi-1.FoldedLine_hasChildren__8hCZA.FoldedLine_folded__6zX8d{cursor:pointer}.FoldedLine_root__lhi-1.FoldedLine_hasChildren__8hCZA:not(.FoldedLine_folded__6zX8d) .FoldedLine_triggerInteractive__sCLnl{border-top-left-radius:inherit;border-top-right-radius:inherit}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA{border-radius:inherit;min-height:0;padding:0}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA:before{content:none}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA.FoldedLine_hasChildren__8hCZA{cursor:pointer}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA.FoldedLine_folded__6zX8d{-webkit-line-clamp:unset;-webkit-box-orient:unset;line-clamp:none;display:flex;overflow:visible;text-overflow:clip}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA .FoldedLine_triggerInteractive__sCLnl{opacity:1}.FoldedLine_chevron__zxu20{opacity:.3;position:absolute;right:var(--p-2);transition:transform .1s ease-out,opacity .1s ease-out}.FoldedLine_root__lhi-1:hover .FoldedLine_chevron__zxu20{opacity:1}.FoldedLine_folded__6zX8d .FoldedLine_chevron__zxu20{transform:rotate(-90deg)}.FoldedLine_lineCompleted__sEfzm:before{background:var(--active-color)}.FoldedLine_lineInProgress__VcwjJ:before{animation:FoldedLine_foldedLinePulse__y-Dle 1.4s ease-in-out infinite}.FoldedLine_triggerInteractive__sCLnl{align-items:center;cursor:pointer;display:flex;gap:var(--p-1);opacity:.8;padding-right:var(--p-6);transition:background-color .1s ease-out}.FoldedLine_triggerInteractive__sCLnl:hover{opacity:1}.FoldedLine_triggerInteractive__sCLnl:hover:before{background-color:var(--accent-color-alpha-900)}.FoldedLine_header__gyQpI{cursor:pointer;height:100%;position:absolute;transition:opacity .1s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:1}.FoldedLine_folded__6zX8d{-webkit-line-clamp:1;-webkit-box-orient:vertical;line-clamp:1;display:-webkit-box;min-width:0;overflow:hidden;text-overflow:ellipsis;transition:opacity .1s ease-out;width:100%}.FoldedLine_folded__6zX8d:before{opacity:.4}.FoldedLine_folded__6zX8d .FoldedLine_scroll__X7T5v{max-height:1.5em}.FoldedLine_content__POIox{position:relative}.FoldedLine_scroll__X7T5v{max-height:50vh}.FoldedLine_scrollInner__1BGOP>div{-webkit-user-select:text;-moz-user-select:text;user-select:text}.FoldedLine_actions__SmF3b{align-items:center;bottom:0;display:flex;flex-shrink:0;flex-wrap:wrap;gap:var(--p-1);justify-content:flex-end;padding:0 var(--p-5) var(--p-3) var(--p-2);position:absolute;right:0}.FoldedLine_actions__SmF3b>button{
|
|
1
|
+
var css_248z = ".FoldedLine_root__lhi-1{border-radius:12px;display:flex;flex-direction:column;min-height:1rem;padding-left:calc(4px + var(--p-2));position:relative;transition:.1s ease-out;transition-property:border-radius,margin,background-color}.FoldedLine_root__lhi-1:before{background:var(--accent-color);border-radius:2px;bottom:2px;content:\"\";height:calc(100% - 4px);left:6px;opacity:.1;pointer-events:none;position:absolute;top:2px;width:4px}.FoldedLine_root__lhi-1:hover:before,.FoldedLine_root__lhi-1:not(.FoldedLine_folded__6zX8d):before{opacity:.7}.FoldedLine_root__lhi-1.FoldedLine_folded__6zX8d{border-radius:0;margin:0}.FoldedLine_root__lhi-1.FoldedLine_folded__6zX8d .FoldedLine_scroll__X7T5v{height:1em}.FoldedLine_root__lhi-1.FoldedLine_hasChildren__8hCZA.FoldedLine_folded__6zX8d{cursor:pointer}.FoldedLine_root__lhi-1.FoldedLine_hasChildren__8hCZA:not(.FoldedLine_folded__6zX8d) .FoldedLine_triggerInteractive__sCLnl{border-top-left-radius:inherit;border-top-right-radius:inherit}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA{border-radius:inherit;min-height:0;padding:0}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA:before{content:none}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA.FoldedLine_hasChildren__8hCZA{cursor:pointer}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA.FoldedLine_folded__6zX8d{-webkit-line-clamp:unset;-webkit-box-orient:unset;line-clamp:none;display:flex;overflow:visible;text-overflow:clip}.FoldedLine_root__lhi-1.FoldedLine_clear__t47RA .FoldedLine_triggerInteractive__sCLnl{opacity:1}.FoldedLine_chevron__zxu20{opacity:.3;position:absolute;right:var(--p-2);transition:transform .1s ease-out,opacity .1s ease-out}.FoldedLine_root__lhi-1:hover .FoldedLine_chevron__zxu20{opacity:1}.FoldedLine_folded__6zX8d .FoldedLine_chevron__zxu20{transform:rotate(-90deg)}.FoldedLine_lineCompleted__sEfzm:before{background:var(--active-color)}.FoldedLine_lineInProgress__VcwjJ:before{animation:FoldedLine_foldedLinePulse__y-Dle 1.4s ease-in-out infinite}.FoldedLine_triggerInteractive__sCLnl{align-items:center;cursor:pointer;display:flex;gap:var(--p-1);opacity:.8;padding-right:var(--p-6);transition:background-color .1s ease-out}.FoldedLine_triggerInteractive__sCLnl:hover{opacity:1}.FoldedLine_triggerInteractive__sCLnl:hover:before{background-color:var(--accent-color-alpha-900)}.FoldedLine_header__gyQpI{cursor:pointer;height:100%;position:absolute;transition:opacity .1s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:1}.FoldedLine_folded__6zX8d{-webkit-line-clamp:1;-webkit-box-orient:vertical;line-clamp:1;display:-webkit-box;min-width:0;overflow:hidden;text-overflow:ellipsis;transition:opacity .1s ease-out;width:100%}.FoldedLine_folded__6zX8d:before{opacity:.4}.FoldedLine_folded__6zX8d .FoldedLine_scroll__X7T5v{max-height:1.5em}.FoldedLine_content__POIox{position:relative}.FoldedLine_scroll__X7T5v{max-height:50vh}.FoldedLine_scrollInner__1BGOP>div{-webkit-user-select:text;-moz-user-select:text;user-select:text}.FoldedLine_actions__SmF3b{align-items:center;bottom:0;display:flex;flex-shrink:0;flex-wrap:wrap;gap:var(--p-1);justify-content:flex-end;padding:0 var(--p-5) var(--p-3) var(--p-2);position:absolute;right:0}.FoldedLine_actions__SmF3b>button{backdrop-filter:blur(10px)}@keyframes FoldedLine_foldedLinePulse__y-Dle{0%,to{background-color:var(--accent-color-alpha-400)}50%{background-color:var(--active-color)}}";
|
|
2
2
|
var S = {"root":"FoldedLine_root__lhi-1","folded":"FoldedLine_folded__6zX8d","scroll":"FoldedLine_scroll__X7T5v","hasChildren":"FoldedLine_hasChildren__8hCZA","triggerInteractive":"FoldedLine_triggerInteractive__sCLnl","clear":"FoldedLine_clear__t47RA","chevron":"FoldedLine_chevron__zxu20","lineCompleted":"FoldedLine_lineCompleted__sEfzm","lineInProgress":"FoldedLine_lineInProgress__VcwjJ","foldedLinePulse":"FoldedLine_foldedLinePulse__y-Dle","header":"FoldedLine_header__gyQpI","content":"FoldedLine_content__POIox","scrollInner":"FoldedLine_scrollInner__1BGOP","actions":"FoldedLine_actions__SmF3b"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Gallery_item__P4qTJ,.Gallery_root__-Crit{height:100%;width:100%}.Gallery_root__-Crit{overflow:hidden;position:relative}.Gallery_inner__4FAPt{
|
|
1
|
+
var css_248z = ".Gallery_item__P4qTJ,.Gallery_root__-Crit{height:100%;width:100%}.Gallery_root__-Crit{overflow:hidden;position:relative}.Gallery_inner__4FAPt{backface-visibility:hidden;display:flex;height:100%;position:absolute;touch-action:none;transform:translate3d(-33.33333%,0,0);width:calc(300% + 1px)}.Gallery_single__Wfd9h .Gallery_inner__4FAPt{transform:none;width:100%}.Gallery_single__Wfd9h .Gallery_item__P4qTJ{width:100%}.Gallery_inner__4FAPt.Gallery_left__zrrmv,.Gallery_inner__4FAPt.Gallery_right__dpZ-m{transition:transform 0s ease-out;transition-duration:.2s}.Gallery_inner__4FAPt.Gallery_left__zrrmv{transform:translateZ(0)!important}.Gallery_inner__4FAPt.Gallery_right__dpZ-m{transform:translate3d(-66.66667%,0,0)!important}.Gallery_inner__4FAPt.Gallery_initialBounce__nZnKd{animation:Gallery_bounce__buqva 1s ease-out}.Gallery_item__P4qTJ{align-items:center;display:flex;justify-content:center;position:relative;width:33.33333%}.Gallery_image__FkvmG{height:auto;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;opacity:0;transition:opacity .15s ease-out;width:auto}.Gallery_image__FkvmG.Gallery_imageLoaded__1rGwn{opacity:1}.Gallery_cover__ZGx5X .Gallery_image__FkvmG{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.Gallery_brokenImage__Bj3O-{height:50%;opacity:.2;width:50%}.Gallery_videoItem__06r39 .Gallery_video__vKK23{max-height:100%;max-width:100%}.Gallery_arr__knicI{background:transparent!important;height:100%;min-height:100%;opacity:0;padding:10%;position:absolute;top:0;transition:opacity .1s ease-out;z-index:1}.Gallery_arr__knicI.Gallery_left__zrrmv{justify-content:flex-start;left:0}.Gallery_arr__knicI.Gallery_right__dpZ-m{justify-content:flex-end;right:0;width:77%}.Gallery_arr__knicI:hover{opacity:1}@keyframes Gallery_bounce__buqva{0%{left:0}50%{left:-20%}80%{left:10%}to{left:0}}";
|
|
2
2
|
var S = {"root":"Gallery_root__-Crit","item":"Gallery_item__P4qTJ","inner":"Gallery_inner__4FAPt","single":"Gallery_single__Wfd9h","left":"Gallery_left__zrrmv","right":"Gallery_right__dpZ-m","initialBounce":"Gallery_initialBounce__nZnKd","bounce":"Gallery_bounce__buqva","image":"Gallery_image__FkvmG","imageLoaded":"Gallery_imageLoaded__1rGwn","cover":"Gallery_cover__ZGx5X","brokenImage":"Gallery_brokenImage__Bj3O-","videoItem":"Gallery_videoItem__06r39","video":"Gallery_video__vKK23","arr":"Gallery_arr__knicI"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -77,8 +77,10 @@ import '@tiptap/react';
|
|
|
77
77
|
import '@tiptap/starter-kit';
|
|
78
78
|
import '../PromptComposer/PromptComposer.styl.js';
|
|
79
79
|
import '@tiptap/core';
|
|
80
|
-
import '@tiptap/extension-mention';
|
|
81
80
|
import '@tiptap/pm/state';
|
|
81
|
+
import '@tiptap/pm/view';
|
|
82
|
+
import 'linkifyjs';
|
|
83
|
+
import '@tiptap/extension-mention';
|
|
82
84
|
import '../../tiptap/slash-mention/SlashSuggestionList.styl.js';
|
|
83
85
|
import '../RadioGroup/RadioGroupContext.js';
|
|
84
86
|
import '../RadioButton/RadioButton.styl.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Label_size-xs__7yAN0{font-size:14px;padding:0 8px}.Label_size-s__CL8do{font-size:16px;padding:0 12px}.Label_size-m__X81DA{font-size:18px;padding:0 16px}.Label_size-l__-2YIE{font-size:22px;padding:0 20px}.Label_size-xl__aeykV{font-size:26px;padding:0 10px 0 24px}.Label_root__TewVm{align-items:center;color:var(--accent-color-alpha-500);display:flex;left:0;padding-bottom:0;padding-top:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.Label_root__TewVm,.Label_root__TewVm>div{height:100%;max-width:100%}.Label_gap__zlRrx,.Label_view__Lz9Eu>div{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Label_view__Lz9Eu{align-items:center
|
|
1
|
+
var css_248z = ".Label_size-xs__7yAN0{font-size:14px;padding:0 8px}.Label_size-s__CL8do{font-size:16px;padding:0 12px}.Label_size-m__X81DA{font-size:18px;padding:0 16px}.Label_size-l__-2YIE{font-size:22px;padding:0 20px}.Label_size-xl__aeykV{font-size:26px;padding:0 10px 0 24px}.Label_root__TewVm{align-items:center;color:var(--accent-color-alpha-500);display:flex;left:0;padding-bottom:0;padding-top:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}.Label_root__TewVm,.Label_root__TewVm>div{height:100%;max-width:100%}.Label_gap__zlRrx,.Label_view__Lz9Eu>div{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Label_view__Lz9Eu{align-items:center;backface-visibility:hidden;display:flex;height:100%;max-width:100%;transform:translateZ(0);transform-origin:top left;transition:transform .15s ease-out}.Label_onTop__7Ntzk .Label_view__Lz9Eu{color:var(--accent-color);padding-bottom:8px;transform:scale(.7) translate3d(0,-50%,0)}.Label_isError__YqI0d .Label_view__Lz9Eu{color:var(--danger-color)}.Label_gapWrap__lDGBB{max-width:100%;opacity:0;padding:inherit;pointer-events:none;position:absolute}.Label_gapWrap__lDGBB:before{border-radius:4px;content:\"\";height:1.4em;left:-6px;position:absolute;right:-6px;z-index:-1}";
|
|
2
2
|
var S = {"size-xs":"Label_size-xs__7yAN0","size-s":"Label_size-s__CL8do","size-m":"Label_size-m__X81DA","size-l":"Label_size-l__-2YIE","size-xl":"Label_size-xl__aeykV","root":"Label_root__TewVm","view":"Label_view__Lz9Eu","gap":"Label_gap__zlRrx","onTop":"Label_onTop__7Ntzk","isError":"Label_isError__YqI0d","gapWrap":"Label_gapWrap__lDGBB"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Notifications_root__S3ujN{max-height:calc(var(--vh)*100);overflow:hidden;position:fixed;right:0;top:0;transform:translateZ(0);transition:right .3s ease-out;width:320px;z-index:20}.Notifications_inner__6v9e3{padding:var(--p-5);padding-right:var(--p-3)}.Notifications_empty__zCpOA{pointer-events:none}.Notifications_itemInner__nEYAl,.Notifications_item__I3Up4{border-radius:var(--p-4)}.Notifications_item__I3Up4{
|
|
1
|
+
var css_248z = ".Notifications_root__S3ujN{max-height:calc(var(--vh)*100);overflow:hidden;position:fixed;right:0;top:0;transform:translateZ(0);transition:right .3s ease-out;width:320px;z-index:20}.Notifications_inner__6v9e3{padding:var(--p-5);padding-right:var(--p-3)}.Notifications_empty__zCpOA{pointer-events:none}.Notifications_itemInner__nEYAl,.Notifications_item__I3Up4{border-radius:var(--p-4)}.Notifications_item__I3Up4{backface-visibility:hidden;left:100%;max-height:0;max-width:100%;opacity:0;overscroll-behavior-x:none;position:relative;touch-action:pan-y;transition:all .3s ease-out;width:300px}.Notifications_item__I3Up4:first-child{margin-top:calc(var(--p-2)*-1)}.Notifications_item__I3Up4+.Notifications_item__I3Up4{padding-top:var(--p-2)}.Notifications_item__I3Up4:hover{transform:translateX(-2px)}.Notifications_visible__ln4-n{left:0;max-height:500px;opacity:1}.Notifications_itemInner__nEYAl{align-items:center;backdrop-filter:blur(30px);background-color:var(--decent-color-alpha-500);box-shadow:inset 0 0 1px var(--accent-color-alpha-300),0 0 20px var(--decent-color);box-sizing:border-box;display:flex;padding:var(--p-3);padding-right:var(--p-6);position:relative;transition:.3s ease-out;transition-property:transform}.Notifications_type-warning__Nxg6C .Notifications_itemInner__nEYAl{background-color:var(--warning-color-alpha-300)}.Notifications_type-danger__zeIMt .Notifications_itemInner__nEYAl{background-color:var(--danger-color-alpha-300)}.Notifications_itemInner__nEYAl button{margin-bottom:calc(var(--p-2)*-1);margin-top:calc(var(--p-2)*-1)}.Notifications_icon__nKs-X{background:no-repeat 50%;height:24px;margin-right:10px;min-width:24px;width:24px}.Notifications_type-loading__N4EE5 .Notifications_icon__nKs-X{transform:translateY(-20px)}.Notifications_text__7QZL6{display:flex;flex-direction:column;flex-grow:1;z-index:1}.Notifications_title__Gu9bs{font-size:16px;font-weight:700}.Notifications_content__Zrvw2{font-size:12px;margin-top:calc(var(--p-3)/2)}.Notifications_content__Zrvw2:first-child{margin-top:0}.Notifications_close__-IUH3{background-color:transparent;border-radius:50%;cursor:pointer;height:40px!important;max-height:40px!important;max-width:40px!important;opacity:0;position:absolute;right:-5px;top:2px;transform:scale(.8);transition:.1s ease-out;transition-property:opacity,transform;width:40px!important}.Notifications_close__-IUH3:before{background-color:var(--decent-color-alpha-400);border-radius:inherit;bottom:var(--p-2);content:\"\";left:var(--p-2);pointer-events:none;position:absolute;right:var(--p-2);top:var(--p-2);transition:background-color .1s ease-out}.Notifications_close__-IUH3 svg{transform:scale(.6)}.Notifications_item__I3Up4:hover .Notifications_close__-IUH3{opacity:.8}.Notifications_close__-IUH3:hover{background-color:transparent;background-color:initial;opacity:1}.Notifications_close__-IUH3:hover:before{background-color:var(--decent-color-alpha-800)}@media (max-width:700px){.Notifications_item__I3Up4,.Notifications_root__S3ujN{width:100%}.Notifications_title__Gu9bs{font-size:20px}.Notifications_content__Zrvw2{font-size:16px}.Notifications_close__-IUH3{transform:scale(1.2)}}";
|
|
2
2
|
var S = {"root":"Notifications_root__S3ujN","inner":"Notifications_inner__6v9e3","empty":"Notifications_empty__zCpOA","item":"Notifications_item__I3Up4","itemInner":"Notifications_itemInner__nEYAl","visible":"Notifications_visible__ln4-n","type-warning":"Notifications_type-warning__Nxg6C","type-danger":"Notifications_type-danger__zeIMt","icon":"Notifications_icon__nKs-X","type-loading":"Notifications_type-loading__N4EE5","text":"Notifications_text__7QZL6","title":"Notifications_title__Gu9bs","content":"Notifications_content__Zrvw2","close":"Notifications_close__-IUH3"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Paranja_root__ddboV{align-items:center;background-color:var(--decent-color-alpha-900);bottom:0;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .2s ease-out;z-index:10}.Paranja_visible__xZukG{opacity:1;pointer-events:all}.Paranja_visible__xZukG.Paranja_blur__Hg0SQ{
|
|
1
|
+
var css_248z = ".Paranja_root__ddboV{align-items:center;background-color:var(--decent-color-alpha-900);bottom:0;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .2s ease-out;z-index:10}.Paranja_visible__xZukG{opacity:1;pointer-events:all}.Paranja_visible__xZukG.Paranja_blur__Hg0SQ{backdrop-filter:blur(50px);background-color:var(--decent-color-alpha-500)}";
|
|
2
2
|
var S = {"root":"Paranja_root__ddboV","visible":"Paranja_visible__xZukG","blur":"Paranja_blur__Hg0SQ"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Popup_root__uQ-fP{display:inline-block;position:relative}.Popup_contentWrapper__2yi-2{opacity:0;pointer-events:none;position:absolute}.Popup_contentWrapper__2yi-2.Popup_animating__kR0qF{transition:opacity .1s ease-out}.Popup_contentWrapper__2yi-2.Popup_isOpen__BRIdP{opacity:1;z-index:11}.Popup_contentWrapper__2yi-2.Popup_inline__1-l1S.Popup_isOpen__BRIdP{position:relative}.Popup_contentWrapper__2yi-2:not(.Popup_inline__1-l1S),.Popup_contentWrapper__2yi-2:not(.Popup_inline__1-l1S)>.Popup_content__e8Qyu{position:absolute}.Popup_trigger__jQNaQ{cursor:pointer}.Popup_trigger__jQNaQ.Popup_isOpen__BRIdP{position:relative;z-index:11}.Popup_trigger__jQNaQ.Popup_disabled__DlE9y{opacity:.4;pointer-events:none}.Popup_content__e8Qyu{
|
|
1
|
+
var css_248z = ".Popup_root__uQ-fP{display:inline-block;position:relative}.Popup_contentWrapper__2yi-2{opacity:0;pointer-events:none;position:absolute}.Popup_contentWrapper__2yi-2.Popup_animating__kR0qF{transition:opacity .1s ease-out}.Popup_contentWrapper__2yi-2.Popup_isOpen__BRIdP{opacity:1;z-index:11}.Popup_contentWrapper__2yi-2.Popup_inline__1-l1S.Popup_isOpen__BRIdP{position:relative}.Popup_contentWrapper__2yi-2:not(.Popup_inline__1-l1S),.Popup_contentWrapper__2yi-2:not(.Popup_inline__1-l1S)>.Popup_content__e8Qyu{position:absolute}.Popup_trigger__jQNaQ{cursor:pointer}.Popup_trigger__jQNaQ.Popup_isOpen__BRIdP{position:relative;z-index:11}.Popup_trigger__jQNaQ.Popup_disabled__DlE9y{opacity:.4;pointer-events:none}.Popup_content__e8Qyu{backface-visibility:hidden;background-color:var(--decent-color);box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50);box-sizing:border-box;max-width:min(min(560px,70vw),calc(100svw - 16px));min-width:100%;overflow:hidden;position:relative;transform-origin:top center;z-index:11}.Popup_content__e8Qyu:before{background-color:var(--accent-color-alpha-50);bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.Popup_content__e8Qyu.Popup_blur__1hfU8{backdrop-filter:blur(50px);background-color:var(--decent-color-alpha-500)}.Popup_content__e8Qyu.Popup_size-xs__7QR-d{border-radius:8.4px}.Popup_content__e8Qyu.Popup_size-xs__7QR-d.Popup_round__7rD1m{border-radius:12px}.Popup_content__e8Qyu.Popup_size-s__UmixP{border-radius:8.4px}.Popup_content__e8Qyu.Popup_size-s__UmixP.Popup_round__7rD1m{border-radius:16px}.Popup_content__e8Qyu.Popup_size-m__FYpTL{border-radius:12.6px}.Popup_content__e8Qyu.Popup_size-m__FYpTL.Popup_round__7rD1m{border-radius:20px}.Popup_content__e8Qyu.Popup_size-l__BTS57{border-radius:16.8px}.Popup_content__e8Qyu.Popup_size-l__BTS57.Popup_round__7rD1m{border-radius:24px}.Popup_content__e8Qyu.Popup_size-xl__fSfCc{border-radius:21px}.Popup_content__e8Qyu.Popup_size-xl__fSfCc.Popup_round__7rD1m{border-radius:28px}.Popup_content__e8Qyu.Popup_elevation-1__vmP3e{box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 0 var(--p-3) 2px var(--decent-color-alpha-500)}.Popup_content__e8Qyu.Popup_elevation-2__Ci4sI{box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 0 var(--p-5) 2px var(--decent-color-alpha-500)}.Popup_content__e8Qyu.Popup_outlined__g3cJV:after{border-radius:inherit;bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.Popup_isOpen__BRIdP .Popup_content__e8Qyu{opacity:1;pointer-events:all;transform:scaleX(1)}.Popup_animating__kR0qF{transition:70ms ease-out;transition-property:transform,opacity,margin}.Popup_axis-top__BaLgG{bottom:100%}.Popup_axis-bottom__hZwwr{top:100%}.Popup_axis-right__LMYVy{left:100%}.Popup_axis-left__SFKm-{right:100%}.Popup_float-top__8SQAu{bottom:0}.Popup_float-right__mdm-3{left:0}.Popup_float-bottom__7flve{top:0}.Popup_float-left__tz7fX{right:0}.Popup_axis-bottom__hZwwr,.Popup_axis-top__BaLgG{transform:scaleY(.5)}.Popup_axis-bottom__hZwwr.Popup_float-middle__Dmnn1,.Popup_axis-top__BaLgG.Popup_float-middle__Dmnn1{left:50%;transform:translateX(-50%) scaleY(.5)}.Popup_isOpen__BRIdP .Popup_axis-bottom__hZwwr.Popup_float-middle__Dmnn1,.Popup_isOpen__BRIdP .Popup_axis-top__BaLgG.Popup_float-middle__Dmnn1{transform:translateX(-50%) scaleX(1)}.Popup_axis-left__SFKm-,.Popup_axis-right__LMYVy{transform:scaleX(.5)}.Popup_axis-left__SFKm-.Popup_float-middle__Dmnn1,.Popup_axis-right__LMYVy.Popup_float-middle__Dmnn1{top:50%;transform:translateY(-50%) scaleX(.5)}.Popup_isOpen__BRIdP .Popup_axis-left__SFKm-.Popup_float-middle__Dmnn1,.Popup_isOpen__BRIdP .Popup_axis-right__LMYVy.Popup_float-middle__Dmnn1{transform:translateY(-50%) scaleX(1)}.Popup_axis-top__BaLgG.Popup_float-middle__Dmnn1{transform-origin:bottom center}.Popup_axis-top__BaLgG.Popup_float-right__mdm-3{transform-origin:bottom left}.Popup_axis-top__BaLgG.Popup_float-left__tz7fX{transform-origin:bottom right}.Popup_axis-bottom__hZwwr.Popup_float-middle__Dmnn1{transform-origin:top center}.Popup_axis-bottom__hZwwr.Popup_float-right__mdm-3{transform-origin:top left}.Popup_axis-bottom__hZwwr.Popup_float-left__tz7fX{transform-origin:top right}.Popup_axis-right__LMYVy.Popup_float-middle__Dmnn1{transform-origin:center left}.Popup_axis-right__LMYVy.Popup_float-top__8SQAu{transform-origin:bottom left}.Popup_axis-right__LMYVy.Popup_float-bottom__7flve{transform-origin:top left}.Popup_axis-left__SFKm-.Popup_float-middle__Dmnn1{transform-origin:center right}.Popup_axis-left__SFKm-.Popup_float-top__8SQAu{transform-origin:bottom right}.Popup_axis-left__SFKm-.Popup_float-bottom__7flve{transform-origin:top right}";
|
|
2
2
|
var S = {"root":"Popup_root__uQ-fP","contentWrapper":"Popup_contentWrapper__2yi-2","animating":"Popup_animating__kR0qF","isOpen":"Popup_isOpen__BRIdP","inline":"Popup_inline__1-l1S","content":"Popup_content__e8Qyu","trigger":"Popup_trigger__jQNaQ","disabled":"Popup_disabled__DlE9y","blur":"Popup_blur__1hfU8","size-xs":"Popup_size-xs__7QR-d","round":"Popup_round__7rD1m","size-s":"Popup_size-s__UmixP","size-m":"Popup_size-m__FYpTL","size-l":"Popup_size-l__BTS57","size-xl":"Popup_size-xl__fSfCc","elevation-1":"Popup_elevation-1__vmP3e","elevation-2":"Popup_elevation-2__Ci4sI","outlined":"Popup_outlined__g3cJV","axis-top":"Popup_axis-top__BaLgG","axis-bottom":"Popup_axis-bottom__hZwwr","axis-right":"Popup_axis-right__LMYVy","axis-left":"Popup_axis-left__SFKm-","float-top":"Popup_float-top__8SQAu","float-right":"Popup_float-right__mdm-3","float-bottom":"Popup_float-bottom__7flve","float-left":"Popup_float-left__tz7fX","float-middle":"Popup_float-middle__Dmnn1"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var css_248z = ".PromptComposer_root__gfdXN{width:100%}.PromptComposer_scroller__Sueif{flex:1;max-height:200px;min-height:40px;width:100%}.PromptComposer_editorMount__B9G-o{background:transparent;border:none;border-radius:0!important;box-shadow:none!important;display:flex;flex:1;flex-direction:column;min-height:40px;min-width:0;padding:0!important}.PromptComposer_editorMount__B9G-o:focus-within{box-shadow:none!important}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq{border:none!important;box-shadow:none!important;flex:1;margin:0;min-height:40px!important;outline:none!important;overflow:hidden!important;padding:var(--p-2) 0 0!important;resize:none!important;transition:opacity .1s ease-out;white-space:pre-wrap;word-break:break-word}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq a{color:var(--link-color)}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq a:hover{cursor:pointer;opacity:.8}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEmptyNode__62Ylm:before{color:var(--muted-foreground);content:attr(data-placeholder);float:left;height:0;opacity:.3;pointer-events:none}";
|
|
2
|
-
var S = {"root":"PromptComposer_root__gfdXN","scroller":"PromptComposer_scroller__Sueif","editorMount":"PromptComposer_editorMount__B9G-o","promptComposerEditor":"PromptComposer_promptComposerEditor__yQIpq","promptComposerEmptyNode":"PromptComposer_promptComposerEmptyNode__62Ylm"};
|
|
1
|
+
var css_248z = ".PromptComposer_root__gfdXN{width:100%}.PromptComposer_scroller__Sueif{flex:1;max-height:200px;min-height:40px;width:100%}.PromptComposer_editorMount__B9G-o{background:transparent;border:none;border-radius:0!important;box-shadow:none!important;display:flex;flex:1;flex-direction:column;min-height:40px;min-width:0;padding:0!important}.PromptComposer_editorMount__B9G-o:focus-within{box-shadow:none!important}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq{border:none!important;box-shadow:none!important;flex:1;margin:0;min-height:40px!important;outline:none!important;overflow:hidden!important;padding:var(--p-2) 0 0!important;resize:none!important;transition:opacity .1s ease-out;white-space:pre-wrap;word-break:break-word}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq .PromptComposer_promptComposerLink__rKhhp,.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq a{color:var(--link-color)}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEditor__yQIpq a:hover{cursor:pointer;opacity:.8}.PromptComposer_editorMount__B9G-o .PromptComposer_promptComposerEmptyNode__62Ylm:before{color:var(--muted-foreground);content:attr(data-placeholder);float:left;height:0;opacity:.3;pointer-events:none}";
|
|
2
|
+
var S = {"root":"PromptComposer_root__gfdXN","scroller":"PromptComposer_scroller__Sueif","editorMount":"PromptComposer_editorMount__B9G-o","promptComposerEditor":"PromptComposer_promptComposerEditor__yQIpq","promptComposerLink":"PromptComposer_promptComposerLink__rKhhp","promptComposerEmptyNode":"PromptComposer_promptComposerEmptyNode__62Ylm"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
5
5
|
if (__uilibHead) {
|
|
@@ -3,6 +3,7 @@ import { Placeholder } from '@tiptap/extensions';
|
|
|
3
3
|
import { useEditor } from '@tiptap/react';
|
|
4
4
|
import StarterKit from '@tiptap/starter-kit';
|
|
5
5
|
import S from './PromptComposer.styl.js';
|
|
6
|
+
import { createLinkHighlightExtension } from '../../tiptap/link-highlight/createLinkHighlightExtension.js';
|
|
6
7
|
import { DEFAULT_CHAT_SLASH_ITEMS } from '../../tiptap/slash-mention/defaultChatSlashItems.js';
|
|
7
8
|
import { createSlashMentionExtension } from '../../tiptap/slash-mention/createSlashMentionExtension.js';
|
|
8
9
|
import { safePromptComposerEditorText, promptComposerSafeEditorDom, syncPromptComposerHeight } from './PromptComposer.helpers.js';
|
|
@@ -108,6 +109,7 @@ function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, sla
|
|
|
108
109
|
showOnlyWhenEditable: true,
|
|
109
110
|
emptyNodeClass: S.promptComposerEmptyNode,
|
|
110
111
|
}),
|
|
112
|
+
createLinkHighlightExtension(S.promptComposerLink),
|
|
111
113
|
];
|
|
112
114
|
for (const cfg of resolvedMentionConfigs) {
|
|
113
115
|
const slashChar = cfg.slashChar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, useRef,
|
|
2
|
+
import { forwardRef, useRef, useState, useImperativeHandle, useMemo, useCallback, useEffect, createElement } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import Time from 'timen';
|
|
5
5
|
import { isTouch } from '../../tools/dom.js';
|
|
@@ -7,6 +7,7 @@ import { observe, unobserve } from '../../tools/resizeObserver.js';
|
|
|
7
7
|
import S from './Scroll.styl.js';
|
|
8
8
|
import { useEvent } from '../../hooks/useEvent.js';
|
|
9
9
|
import { useDebounce } from '../../hooks/useDebounce.js';
|
|
10
|
+
import { useAutoScroll } from './useAutoScroll.js';
|
|
10
11
|
|
|
11
12
|
const getEventCoords = e => ({
|
|
12
13
|
x: e.clientX,
|
|
@@ -33,7 +34,7 @@ const BY_AXIS = {
|
|
|
33
34
|
},
|
|
34
35
|
};
|
|
35
36
|
const Scroll = forwardRef(function Scroll(props, ref) {
|
|
36
|
-
const { x, y, offset, size = 'm', fadeSize, smooth, className, innerClassName, xScrollbarClassName, yScrollbarClassName, innerProps, onInnerRef, thumbClassName, autoHide, children, onScroll, ...rest } = props;
|
|
37
|
+
const { x, y, offset, size = 'm', fadeSize, smooth, className, innerClassName, xScrollbarClassName, yScrollbarClassName, innerProps, onInnerRef, thumbClassName, autoHide, autoScroll, children, onScroll, ...rest } = props;
|
|
37
38
|
const innerElemRef = useRef(null);
|
|
38
39
|
const thumbXRef = useRef(null);
|
|
39
40
|
const thumbYRef = useRef(null);
|
|
@@ -41,11 +42,27 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
41
42
|
x: thumbXRef,
|
|
42
43
|
y: thumbYRef,
|
|
43
44
|
};
|
|
45
|
+
const [isScrolling, setIsScrolling] = useState(false);
|
|
46
|
+
const [activeAxis, setActiveAxis] = useState(null);
|
|
47
|
+
const isDraggingRef = useRef(false);
|
|
48
|
+
isDraggingRef.current = !!activeAxis;
|
|
49
|
+
const autoScrollApi = useAutoScroll({
|
|
50
|
+
enabled: !!(autoScroll && y),
|
|
51
|
+
innerRef: innerElemRef,
|
|
52
|
+
isDraggingRef,
|
|
53
|
+
});
|
|
44
54
|
useImperativeHandle(ref, () => ({
|
|
45
55
|
innerElem: innerElemRef.current,
|
|
56
|
+
scrollToBottom: () => {
|
|
57
|
+
const elem = innerElemRef.current;
|
|
58
|
+
if (!elem)
|
|
59
|
+
return;
|
|
60
|
+
if (autoScroll && y)
|
|
61
|
+
autoScrollApi.scrollToBottom();
|
|
62
|
+
else
|
|
63
|
+
elem.scrollTo({ top: elem.scrollHeight, behavior: 'smooth' });
|
|
64
|
+
},
|
|
46
65
|
}));
|
|
47
|
-
const [isScrolling, setIsScrolling] = useState(false);
|
|
48
|
-
const [activeAxis, setActiveAxis] = useState(null);
|
|
49
66
|
const [coeff, setCoeff] = useState({ x: 0, y: 0 });
|
|
50
67
|
const [hasOffset, setHasOffset] = useState({
|
|
51
68
|
top: false,
|
|
@@ -152,7 +169,8 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
152
169
|
newHasOffset.right =
|
|
153
170
|
scrollWidth - (scrollLeft + offsetWidth) > OFFSET_THRESHOLD;
|
|
154
171
|
}
|
|
155
|
-
|
|
172
|
+
const isSame = Object.keys(newHasOffset).every(key => newHasOffset[key] === prev[key]);
|
|
173
|
+
return isSame ? prev : newHasOffset;
|
|
156
174
|
});
|
|
157
175
|
}, [x, y]);
|
|
158
176
|
const updateAll = useCallback(() => {
|
|
@@ -190,6 +208,7 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
190
208
|
if (innerElemRef.current !== e.target)
|
|
191
209
|
return;
|
|
192
210
|
updateHasOffsets();
|
|
211
|
+
autoScrollApi.onScroll();
|
|
193
212
|
onScroll?.(e);
|
|
194
213
|
if (!activeAxis)
|
|
195
214
|
eachAxis(updatePos);
|
|
@@ -198,6 +217,7 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
198
217
|
dropScrollingState();
|
|
199
218
|
}, [
|
|
200
219
|
activeAxis,
|
|
220
|
+
autoScrollApi.onScroll,
|
|
201
221
|
dropScrollingState,
|
|
202
222
|
eachAxis,
|
|
203
223
|
isScrollSizeChanged,
|
|
@@ -222,9 +242,11 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
222
242
|
}, [activeAxis, updatePos, updateScroll]);
|
|
223
243
|
const onPointerUp = useCallback(e => {
|
|
224
244
|
e.stopPropagation();
|
|
245
|
+
isDraggingRef.current = false;
|
|
225
246
|
setActiveAxis(null);
|
|
247
|
+
autoScrollApi.onDragEnd();
|
|
226
248
|
dropScrollingState();
|
|
227
|
-
}, [dropScrollingState]);
|
|
249
|
+
}, [autoScrollApi.onDragEnd, dropScrollingState]);
|
|
228
250
|
useEffect(() => {
|
|
229
251
|
if (innerElemRef.current) {
|
|
230
252
|
// Initial update
|
|
@@ -288,7 +310,7 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
288
310
|
thumbElemRef,
|
|
289
311
|
]);
|
|
290
312
|
const renderInner = useCallback(() => {
|
|
291
|
-
const innerClasses = cn(S.inner, innerProps?.className, innerClassName, !activeAxis && smooth && S.smooth, hasOffset.top && S.hasOffsetTop, hasOffset.bottom && S.hasOffsetBottom, hasOffset.right && S.hasOffsetRight, hasOffset.left && S.hasOffsetLeft);
|
|
313
|
+
const innerClasses = cn(S.inner, innerProps?.className, innerClassName, !activeAxis && smooth && !autoScroll && S.smooth, hasOffset.top && S.hasOffsetTop, hasOffset.bottom && S.hasOffsetBottom, hasOffset.right && S.hasOffsetRight, hasOffset.left && S.hasOffsetLeft);
|
|
292
314
|
const props = { ...innerProps };
|
|
293
315
|
props.onScrollCapture = onInnerScroll;
|
|
294
316
|
return (createElement("div", { ...props, className: innerClasses, ref: innerElemRef, key: "inner" }, children));
|
|
@@ -300,6 +322,7 @@ const Scroll = forwardRef(function Scroll(props, ref) {
|
|
|
300
322
|
innerProps,
|
|
301
323
|
onInnerScroll,
|
|
302
324
|
smooth,
|
|
325
|
+
autoScroll,
|
|
303
326
|
]);
|
|
304
327
|
const classes = cn(S.root, y && S.y, x && S.x, S[`size-${size}`], fadeSize && S[`fadeSize-${fadeSize}`], autoHide && S.autoHide, (isScrolling || activeAxis) && S.isScrolling, isTouchDevice ? S.isTouch : S.isDesktop, className);
|
|
305
328
|
return (jsxs("div", { className: classes, ...rest, children: [renderInner(), AXES.map(renderBar)] }));
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
// Distance (px) from the bottom still treated as "at the bottom".
|
|
4
|
+
const AUTO_SCROLL_BOTTOM_EPS = 8;
|
|
5
|
+
// Growth burst is reset after this long (ms) without scrollHeight changes.
|
|
6
|
+
const AUTO_SCROLL_TIMEOUT = 1000;
|
|
7
|
+
// After a user input, scroll events within this window (ms) are attributed to the user.
|
|
8
|
+
const USER_INPUT_WINDOW = 200;
|
|
9
|
+
// Shortest window (s) used to estimate the growth rate, so the first frames of a burst don't spike.
|
|
10
|
+
const MIN_RATE_WINDOW = 0.12;
|
|
11
|
+
// How fast the remaining distance is caught up (1/s).
|
|
12
|
+
const CATCH_UP = 3;
|
|
13
|
+
// While content keeps growing, stay this far (in seconds of growth) behind the
|
|
14
|
+
// bottom, so the scroll keeps a steady pace instead of catch-up-and-stop pulses.
|
|
15
|
+
const LAG_TIME = 0.3;
|
|
16
|
+
// Time constant (s) of the growth rate easing.
|
|
17
|
+
const RATE_TAU = 0.4;
|
|
18
|
+
// Time constant (s) of each of the two speed easing stages.
|
|
19
|
+
// Two stages give ease-in-out speed changes instead of a jerky ease-out.
|
|
20
|
+
const SPEED_TAU = 0.1;
|
|
21
|
+
// Deceleration (px/s²) used to brake before reaching the bottom.
|
|
22
|
+
const BRAKE = 700;
|
|
23
|
+
const MAX_SPEED = 6000;
|
|
24
|
+
const MAX_FRAME_DT = 1 / 30;
|
|
25
|
+
const USER_KEYS = new Set([
|
|
26
|
+
'ArrowUp',
|
|
27
|
+
'ArrowDown',
|
|
28
|
+
'PageUp',
|
|
29
|
+
'PageDown',
|
|
30
|
+
'Home',
|
|
31
|
+
'End',
|
|
32
|
+
' ',
|
|
33
|
+
]);
|
|
34
|
+
const getMaxTop = (el) => el.scrollHeight - el.clientHeight;
|
|
35
|
+
const isAtBottom = (el, eps = AUTO_SCROLL_BOTTOM_EPS) => getMaxTop(el) - el.scrollTop <= eps;
|
|
36
|
+
/**
|
|
37
|
+
* Keeps the scroll pinned to the bottom while content grows.
|
|
38
|
+
* Follows only when the user is at the bottom; scrolling away pauses it,
|
|
39
|
+
* returning to the bottom resumes it.
|
|
40
|
+
* Speed is driven by the growth delta of the current burst and the remaining
|
|
41
|
+
* distance, and is eased every frame so speed changes stay smooth.
|
|
42
|
+
*/
|
|
43
|
+
function useAutoScroll({ enabled, innerRef, isDraggingRef }) {
|
|
44
|
+
const isFollowingRef = useRef(true);
|
|
45
|
+
const userActiveUntilRef = useRef(0);
|
|
46
|
+
const isTouchingRef = useRef(false);
|
|
47
|
+
const rafRef = useRef(null);
|
|
48
|
+
const lastTimeRef = useRef(0);
|
|
49
|
+
const posRef = useRef(0);
|
|
50
|
+
const speedRef = useRef(0);
|
|
51
|
+
const rateRef = useRef(0);
|
|
52
|
+
const targetSpeedRef = useRef(0);
|
|
53
|
+
const lastHeightRef = useRef(0);
|
|
54
|
+
const burstRef = useRef(null);
|
|
55
|
+
const isUserActive = (now) => isTouchingRef.current ||
|
|
56
|
+
isDraggingRef.current ||
|
|
57
|
+
now < userActiveUntilRef.current;
|
|
58
|
+
const resetMotion = (el) => {
|
|
59
|
+
speedRef.current = 0;
|
|
60
|
+
rateRef.current = 0;
|
|
61
|
+
targetSpeedRef.current = 0;
|
|
62
|
+
burstRef.current = null;
|
|
63
|
+
posRef.current = el.scrollTop;
|
|
64
|
+
lastHeightRef.current = el.scrollHeight;
|
|
65
|
+
};
|
|
66
|
+
const stop = () => {
|
|
67
|
+
if (rafRef.current !== null)
|
|
68
|
+
cancelAnimationFrame(rafRef.current);
|
|
69
|
+
rafRef.current = null;
|
|
70
|
+
};
|
|
71
|
+
const frame = (now) => {
|
|
72
|
+
rafRef.current = null;
|
|
73
|
+
const el = innerRef.current;
|
|
74
|
+
if (!el || !enabled || !isFollowingRef.current)
|
|
75
|
+
return;
|
|
76
|
+
const dt = Math.min((now - lastTimeRef.current) / 1000, MAX_FRAME_DT);
|
|
77
|
+
lastTimeRef.current = now;
|
|
78
|
+
// Track growth bursts
|
|
79
|
+
const height = el.scrollHeight;
|
|
80
|
+
if (height !== lastHeightRef.current) {
|
|
81
|
+
if (height > lastHeightRef.current && !burstRef.current) {
|
|
82
|
+
burstRef.current = {
|
|
83
|
+
startHeight: lastHeightRef.current,
|
|
84
|
+
startTime: now,
|
|
85
|
+
lastTime: now,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (burstRef.current)
|
|
89
|
+
burstRef.current.lastTime = now;
|
|
90
|
+
lastHeightRef.current = height;
|
|
91
|
+
}
|
|
92
|
+
const burst = burstRef.current;
|
|
93
|
+
if (burst && now - burst.lastTime > AUTO_SCROLL_TIMEOUT) {
|
|
94
|
+
burstRef.current = null;
|
|
95
|
+
}
|
|
96
|
+
// Something else moved the scroll (user, layout) – take it as the new origin
|
|
97
|
+
if (Math.abs(el.scrollTop - posRef.current) > 2)
|
|
98
|
+
posRef.current = el.scrollTop;
|
|
99
|
+
const maxTop = getMaxTop(el);
|
|
100
|
+
if (posRef.current > maxTop)
|
|
101
|
+
posRef.current = Math.max(0, maxTop);
|
|
102
|
+
const gap = maxTop - posRef.current;
|
|
103
|
+
if (isUserActive(now)) {
|
|
104
|
+
speedRef.current = 0;
|
|
105
|
+
targetSpeedRef.current = 0;
|
|
106
|
+
schedule();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
let rate = 0;
|
|
110
|
+
if (burstRef.current) {
|
|
111
|
+
const { startHeight, startTime } = burstRef.current;
|
|
112
|
+
const elapsed = Math.max((now - startTime) / 1000, MIN_RATE_WINDOW);
|
|
113
|
+
rate = Math.max(0, height - startHeight) / elapsed;
|
|
114
|
+
}
|
|
115
|
+
const k = 1 - Math.exp(-dt / SPEED_TAU);
|
|
116
|
+
// Ease the rate too, so burst start/reset never makes the speed jump
|
|
117
|
+
rateRef.current += (rate - rateRef.current) * (1 - Math.exp(-dt / RATE_TAU));
|
|
118
|
+
rate = rateRef.current;
|
|
119
|
+
// Brake with constant deceleration instead of hitting the bottom at full speed
|
|
120
|
+
const brakeCap = Math.sqrt(2 * BRAKE * Math.max(gap, 0));
|
|
121
|
+
const lag = burstRef.current ? rate * LAG_TIME : 0;
|
|
122
|
+
const target = Math.min(Math.max(0, rate + (gap - lag) * CATCH_UP), MAX_SPEED);
|
|
123
|
+
const targetSpeed = targetSpeedRef.current + (target - targetSpeedRef.current) * k;
|
|
124
|
+
let speed = speedRef.current + (targetSpeed - speedRef.current) * k;
|
|
125
|
+
targetSpeedRef.current = Math.min(targetSpeed, brakeCap);
|
|
126
|
+
speed = Math.max(0, Math.min(speed, brakeCap));
|
|
127
|
+
speedRef.current = speed;
|
|
128
|
+
if (gap > 0) {
|
|
129
|
+
posRef.current += Math.min(speed * dt, gap);
|
|
130
|
+
el.scrollTop = posRef.current;
|
|
131
|
+
}
|
|
132
|
+
const isIdle = !burstRef.current && maxTop - posRef.current < 0.5;
|
|
133
|
+
if (isIdle) {
|
|
134
|
+
speedRef.current = 0;
|
|
135
|
+
rateRef.current = 0;
|
|
136
|
+
targetSpeedRef.current = 0;
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
schedule();
|
|
140
|
+
};
|
|
141
|
+
const schedule = () => {
|
|
142
|
+
if (rafRef.current === null)
|
|
143
|
+
rafRef.current = requestAnimationFrame(frame);
|
|
144
|
+
};
|
|
145
|
+
const wake = useCallback(() => {
|
|
146
|
+
const el = innerRef.current;
|
|
147
|
+
if (!enabled || !el || !isFollowingRef.current)
|
|
148
|
+
return;
|
|
149
|
+
if (rafRef.current !== null)
|
|
150
|
+
return;
|
|
151
|
+
lastTimeRef.current = performance.now();
|
|
152
|
+
if (Math.abs(el.scrollTop - posRef.current) > 2)
|
|
153
|
+
posRef.current = el.scrollTop;
|
|
154
|
+
schedule();
|
|
155
|
+
}, [enabled]);
|
|
156
|
+
const setFollowing = (value) => {
|
|
157
|
+
const el = innerRef.current;
|
|
158
|
+
if (isFollowingRef.current === value)
|
|
159
|
+
return;
|
|
160
|
+
isFollowingRef.current = value;
|
|
161
|
+
if (!el)
|
|
162
|
+
return;
|
|
163
|
+
resetMotion(el);
|
|
164
|
+
if (value)
|
|
165
|
+
wake();
|
|
166
|
+
else
|
|
167
|
+
stop();
|
|
168
|
+
};
|
|
169
|
+
const markUserInput = () => {
|
|
170
|
+
userActiveUntilRef.current = performance.now() + USER_INPUT_WINDOW;
|
|
171
|
+
};
|
|
172
|
+
// Called by Scroll on every scroll event of the inner element
|
|
173
|
+
const onScroll = useCallback(() => {
|
|
174
|
+
const el = innerRef.current;
|
|
175
|
+
if (!enabled || !el)
|
|
176
|
+
return;
|
|
177
|
+
if (!isUserActive(performance.now()))
|
|
178
|
+
return;
|
|
179
|
+
// keep attributing momentum scroll to the user
|
|
180
|
+
markUserInput();
|
|
181
|
+
setFollowing(isAtBottom(el));
|
|
182
|
+
}, [enabled]);
|
|
183
|
+
const scrollToBottom = useCallback(() => {
|
|
184
|
+
const el = innerRef.current;
|
|
185
|
+
if (!el)
|
|
186
|
+
return;
|
|
187
|
+
userActiveUntilRef.current = 0;
|
|
188
|
+
if (!isFollowingRef.current) {
|
|
189
|
+
isFollowingRef.current = true;
|
|
190
|
+
resetMotion(el);
|
|
191
|
+
}
|
|
192
|
+
wake();
|
|
193
|
+
}, [wake]);
|
|
194
|
+
// Thumb drag released – decide by position
|
|
195
|
+
const onDragEnd = useCallback(() => {
|
|
196
|
+
const el = innerRef.current;
|
|
197
|
+
if (!enabled || !el)
|
|
198
|
+
return;
|
|
199
|
+
setFollowing(isAtBottom(el));
|
|
200
|
+
}, [enabled]);
|
|
201
|
+
// User input listeners
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
const el = innerRef.current;
|
|
204
|
+
if (!enabled || !el)
|
|
205
|
+
return;
|
|
206
|
+
const onWheel = (e) => {
|
|
207
|
+
markUserInput();
|
|
208
|
+
if (e.deltaY < 0)
|
|
209
|
+
setFollowing(false);
|
|
210
|
+
};
|
|
211
|
+
const onTouchStart = () => {
|
|
212
|
+
isTouchingRef.current = true;
|
|
213
|
+
markUserInput();
|
|
214
|
+
};
|
|
215
|
+
const onTouchMove = () => {
|
|
216
|
+
markUserInput();
|
|
217
|
+
if (!isAtBottom(el))
|
|
218
|
+
setFollowing(false);
|
|
219
|
+
};
|
|
220
|
+
const onTouchEnd = () => {
|
|
221
|
+
isTouchingRef.current = false;
|
|
222
|
+
markUserInput();
|
|
223
|
+
setFollowing(isAtBottom(el));
|
|
224
|
+
};
|
|
225
|
+
const onKeyDown = (e) => {
|
|
226
|
+
if (!USER_KEYS.has(e.key))
|
|
227
|
+
return;
|
|
228
|
+
markUserInput();
|
|
229
|
+
if (['ArrowUp', 'PageUp', 'Home'].includes(e.key))
|
|
230
|
+
setFollowing(false);
|
|
231
|
+
};
|
|
232
|
+
const passive = { passive: true };
|
|
233
|
+
el.addEventListener('wheel', onWheel, passive);
|
|
234
|
+
el.addEventListener('touchstart', onTouchStart, passive);
|
|
235
|
+
el.addEventListener('touchmove', onTouchMove, passive);
|
|
236
|
+
el.addEventListener('touchend', onTouchEnd, passive);
|
|
237
|
+
el.addEventListener('touchcancel', onTouchEnd, passive);
|
|
238
|
+
el.addEventListener('keydown', onKeyDown);
|
|
239
|
+
return () => {
|
|
240
|
+
el.removeEventListener('wheel', onWheel);
|
|
241
|
+
el.removeEventListener('touchstart', onTouchStart);
|
|
242
|
+
el.removeEventListener('touchmove', onTouchMove);
|
|
243
|
+
el.removeEventListener('touchend', onTouchEnd);
|
|
244
|
+
el.removeEventListener('touchcancel', onTouchEnd);
|
|
245
|
+
el.removeEventListener('keydown', onKeyDown);
|
|
246
|
+
};
|
|
247
|
+
}, [enabled]);
|
|
248
|
+
// Content growth observers
|
|
249
|
+
useEffect(() => {
|
|
250
|
+
const el = innerRef.current;
|
|
251
|
+
if (!enabled || !el)
|
|
252
|
+
return;
|
|
253
|
+
// Start pinned to the bottom
|
|
254
|
+
isFollowingRef.current = true;
|
|
255
|
+
el.scrollTop = getMaxTop(el);
|
|
256
|
+
resetMotion(el);
|
|
257
|
+
const resizeObserver = new ResizeObserver(() => wake());
|
|
258
|
+
const observeChildren = () => {
|
|
259
|
+
resizeObserver.disconnect();
|
|
260
|
+
resizeObserver.observe(el);
|
|
261
|
+
Array.from(el.children).forEach(child => resizeObserver.observe(child));
|
|
262
|
+
};
|
|
263
|
+
const mutationObserver = new MutationObserver(mutations => {
|
|
264
|
+
if (mutations.some(m => m.type === 'childList' && m.target === el)) {
|
|
265
|
+
observeChildren();
|
|
266
|
+
}
|
|
267
|
+
wake();
|
|
268
|
+
});
|
|
269
|
+
observeChildren();
|
|
270
|
+
mutationObserver.observe(el, {
|
|
271
|
+
childList: true,
|
|
272
|
+
subtree: true,
|
|
273
|
+
characterData: true,
|
|
274
|
+
});
|
|
275
|
+
return () => {
|
|
276
|
+
stop();
|
|
277
|
+
resizeObserver.disconnect();
|
|
278
|
+
mutationObserver.disconnect();
|
|
279
|
+
};
|
|
280
|
+
}, [enabled, wake]);
|
|
281
|
+
return { onScroll, onDragEnd, scrollToBottom };
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export { AUTO_SCROLL_BOTTOM_EPS, AUTO_SCROLL_TIMEOUT, isAtBottom, useAutoScroll };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Select_root__mjOjv{max-height:200px;max-width:100%;position:relative}.Select_root__mjOjv.Select_disabled__AlOQi{opacity:.4;pointer-events:none}.Select_additionalLabel__K0--Z{flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis}.Select_trigger__OH48f{position:relative;z-index:1}.Select_triggerArrow__1LEop{flex-shrink:0;margin-left:.3em;margin-right:.7em;transition:transform .2s ease-out}.Select_triggerArrow__1LEop.Select_isOpen__WlMUH{transform:rotateX(-180deg)}.Select_disabled__AlOQi .Select_triggerArrow__1LEop{color:var(--text3-color)}.Select_variant-clear__3Htb5 .Select_triggerButton__lErtt{background-color:transparent}.Select_triggerButton__lErtt{justify-content:space-between;text-align:left;width:100%}.Select_triggerButton__lErtt.Select_hasTriggerArrow__vPLad{padding-right:0}.Select_triggerButton__lErtt.Select_hasTriggerArrow__vPLad>span{max-width:calc(100% - 22px)}.Select_triggerButton__lErtt.Select_isError__WJJLq{box-shadow:inset 0 0 0 2px var(--danger-color)}.Select_triggerButton__lErtt .Select_triggerButtonLabel__XXLzh{line-height:1.2em;opacity:0;overflow:hidden;text-overflow:ellipsis}.Select_triggerButton__lErtt .Select_triggerButtonLabel__XXLzh.Select_hasSelected__zQhBV{opacity:1}.Select_presetPanel__Yu94r{box-shadow:inset 0 -1px 0 var(--decent-color-alpha-100);display:flex;padding:5px}.Select_presetButton__BAl0q{flex-grow:1;justify-content:center}.Select_presetButton__BAl0q+.Select_presetButton__BAl0q{margin-left:8px}.Select_options__3C0-v{max-height:200px;overflow-y:auto}.keyboard .Select_options__3C0-v{pointer-events:none}.Select_option__iJkfJ{align-items:center;cursor:pointer;display:flex;overflow:hidden;padding-bottom:0!important;padding-top:0!important;position:relative;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.Select_isTree__SiTaD .Select_option__iJkfJ{min-height:36px}.Select_size-xs__2lZQY .Select_option__iJkfJ{border-radius:6px;font-size:14px;height:22px;padding:0 8px}.Select_size-s__qBK9t .Select_option__iJkfJ{border-radius:6px;font-size:16px;height:26px;padding:0 12px}.Select_size-m__jp7n- .Select_option__iJkfJ{border-radius:9px;font-size:18px;height:34px;padding:0 16px}.Select_size-l__b4EEy .Select_option__iJkfJ{border-radius:12px;font-size:22px;height:42px;padding:0 20px}.Select_size-xl__0OerX .Select_option__iJkfJ{border-radius:15px;font-size:26px;height:50px;padding:0 24px}.Select_isTree__SiTaD .Select_option__iJkfJ{padding-left:30px}.Select_option__iJkfJ.Select_isGroup__aP1lY{color:var(--accent-color);font-weight:500;pointer-events:none}.Select_isExpanded__rG8R1>.Select_option__iJkfJ{display:flex}.Select_option__iJkfJ>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Select_option__iJkfJ:before{content:\"\";display:inline-block}.Select_option__iJkfJ.Select_level-0__vu03A:before{content:none}.Select_option__iJkfJ.Select_level-1__ozH2U:before{min-width:24px;width:24px}.Select_option__iJkfJ.Select_level-2__XDqeh:before{min-width:48px;width:48px}.Select_option__iJkfJ.Select_level-3__Bc9XS:before{min-width:72px;width:72px}.Select_option__iJkfJ.Select_level-4__KfQcQ:before{min-width:96px;width:96px}.Select_option__iJkfJ.Select_level-5__DGSDM:before{min-width:120px;width:120px}.Select_option__iJkfJ.Select_level-6__p688A:before{min-width:144px;width:144px}.Select_option__iJkfJ.Select_isIndeterminate__dy-xV,.Select_option__iJkfJ.Select_isSelected__n3ZeN{background-color:var(--active-color-alpha-500)}.keyboard .Select_option__iJkfJ.Select_isFocused__oZSgY,.pointer .Select_option__iJkfJ:hover{box-shadow:inset 100vw 0 0 0 var(--accent-color-alpha-200)}.Select_expandButton__UTwlR{background-color:transparent!important;display:flex;height:100%;justify-content:flex-end;overflow:visible;padding:0;position:relative;width:30px}.Select_expandButton__UTwlR:before{content:\"\";display:block;height:calc(100% + 20px);position:absolute;right:0;top:-10;width:100px}.Select_size-xs__2lZQY .Select_expandButton__UTwlR{margin-left:-34px}.Select_size-s__qBK9t .Select_expandButton__UTwlR{margin-left:-37px}.Select_size-m__jp7n- .Select_expandButton__UTwlR{margin-left:-40px}.Select_size-l__b4EEy .Select_expandButton__UTwlR{margin-left:-46px}.Select_size-xl__0OerX .Select_expandButton__UTwlR{margin-left:-52px}.Select_expandIcon__gWAIB{
|
|
1
|
+
var css_248z = ".Select_root__mjOjv{max-height:200px;max-width:100%;position:relative}.Select_root__mjOjv.Select_disabled__AlOQi{opacity:.4;pointer-events:none}.Select_additionalLabel__K0--Z{flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis}.Select_trigger__OH48f{position:relative;z-index:1}.Select_triggerArrow__1LEop{flex-shrink:0;margin-left:.3em;margin-right:.7em;transition:transform .2s ease-out}.Select_triggerArrow__1LEop.Select_isOpen__WlMUH{transform:rotateX(-180deg)}.Select_disabled__AlOQi .Select_triggerArrow__1LEop{color:var(--text3-color)}.Select_variant-clear__3Htb5 .Select_triggerButton__lErtt{background-color:transparent}.Select_triggerButton__lErtt{justify-content:space-between;text-align:left;width:100%}.Select_triggerButton__lErtt.Select_hasTriggerArrow__vPLad{padding-right:0}.Select_triggerButton__lErtt.Select_hasTriggerArrow__vPLad>span{max-width:calc(100% - 22px)}.Select_triggerButton__lErtt.Select_isError__WJJLq{box-shadow:inset 0 0 0 2px var(--danger-color)}.Select_triggerButton__lErtt .Select_triggerButtonLabel__XXLzh{line-height:1.2em;opacity:0;overflow:hidden;text-overflow:ellipsis}.Select_triggerButton__lErtt .Select_triggerButtonLabel__XXLzh.Select_hasSelected__zQhBV{opacity:1}.Select_presetPanel__Yu94r{box-shadow:inset 0 -1px 0 var(--decent-color-alpha-100);display:flex;padding:5px}.Select_presetButton__BAl0q{flex-grow:1;justify-content:center}.Select_presetButton__BAl0q+.Select_presetButton__BAl0q{margin-left:8px}.Select_options__3C0-v{max-height:200px;overflow-y:auto}.keyboard .Select_options__3C0-v{pointer-events:none}.Select_option__iJkfJ{align-items:center;cursor:pointer;display:flex;overflow:hidden;padding-bottom:0!important;padding-top:0!important;position:relative;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%}.Select_isTree__SiTaD .Select_option__iJkfJ{min-height:36px}.Select_size-xs__2lZQY .Select_option__iJkfJ{border-radius:6px;font-size:14px;height:22px;padding:0 8px}.Select_size-s__qBK9t .Select_option__iJkfJ{border-radius:6px;font-size:16px;height:26px;padding:0 12px}.Select_size-m__jp7n- .Select_option__iJkfJ{border-radius:9px;font-size:18px;height:34px;padding:0 16px}.Select_size-l__b4EEy .Select_option__iJkfJ{border-radius:12px;font-size:22px;height:42px;padding:0 20px}.Select_size-xl__0OerX .Select_option__iJkfJ{border-radius:15px;font-size:26px;height:50px;padding:0 24px}.Select_isTree__SiTaD .Select_option__iJkfJ{padding-left:30px}.Select_option__iJkfJ.Select_isGroup__aP1lY{color:var(--accent-color);font-weight:500;pointer-events:none}.Select_isExpanded__rG8R1>.Select_option__iJkfJ{display:flex}.Select_option__iJkfJ>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Select_option__iJkfJ:before{content:\"\";display:inline-block}.Select_option__iJkfJ.Select_level-0__vu03A:before{content:none}.Select_option__iJkfJ.Select_level-1__ozH2U:before{min-width:24px;width:24px}.Select_option__iJkfJ.Select_level-2__XDqeh:before{min-width:48px;width:48px}.Select_option__iJkfJ.Select_level-3__Bc9XS:before{min-width:72px;width:72px}.Select_option__iJkfJ.Select_level-4__KfQcQ:before{min-width:96px;width:96px}.Select_option__iJkfJ.Select_level-5__DGSDM:before{min-width:120px;width:120px}.Select_option__iJkfJ.Select_level-6__p688A:before{min-width:144px;width:144px}.Select_option__iJkfJ.Select_isIndeterminate__dy-xV,.Select_option__iJkfJ.Select_isSelected__n3ZeN{background-color:var(--active-color-alpha-500)}.keyboard .Select_option__iJkfJ.Select_isFocused__oZSgY,.pointer .Select_option__iJkfJ:hover{box-shadow:inset 100vw 0 0 0 var(--accent-color-alpha-200)}.Select_expandButton__UTwlR{background-color:transparent!important;display:flex;height:100%;justify-content:flex-end;overflow:visible;padding:0;position:relative;width:30px}.Select_expandButton__UTwlR:before{content:\"\";display:block;height:calc(100% + 20px);position:absolute;right:0;top:-10;width:100px}.Select_size-xs__2lZQY .Select_expandButton__UTwlR{margin-left:-34px}.Select_size-s__qBK9t .Select_expandButton__UTwlR{margin-left:-37px}.Select_size-m__jp7n- .Select_expandButton__UTwlR{margin-left:-40px}.Select_size-l__b4EEy .Select_expandButton__UTwlR{margin-left:-46px}.Select_size-xl__0OerX .Select_expandButton__UTwlR{margin-left:-52px}.Select_expandIcon__gWAIB{backface-visibility:hidden;transition:transform .1s ease-out}.Select_isExpanded__rG8R1 .Select_expandIcon__gWAIB{transform:rotate(90deg) translateZ(0)}.Select_expandButton__UTwlR:hover .Select_expandIcon__gWAIB{color:var(--primary-color)}.Select_chip__FRK2y{margin-left:-.4em}.Select_chipsContainer__JruCi{overflow-y:auto;padding:4px 0}.Select_size-xs__2lZQY .Select_chipsContainer__JruCi{max-height:90px}.Select_size-s__qBK9t .Select_chipsContainer__JruCi{max-height:108px}.Select_size-m__jp7n- .Select_chipsContainer__JruCi{max-height:180px}.Select_size-l__b4EEy .Select_chipsContainer__JruCi{max-height:220px}.Select_size-xl__0OerX .Select_chipsContainer__JruCi{max-height:260px}.Select_chipContainerInner__cYHSk{display:flex;flex-wrap:wrap;gap:4px}.Select_chip__FRK2y{margin:0}@keyframes Select_fadeIn__QpAwZ{0%{opacity:0}10%{opacity:0}to{opacity:1}}";
|
|
2
2
|
var S = {"root":"Select_root__mjOjv","disabled":"Select_disabled__AlOQi","additionalLabel":"Select_additionalLabel__K0--Z","trigger":"Select_trigger__OH48f","triggerArrow":"Select_triggerArrow__1LEop","isOpen":"Select_isOpen__WlMUH","variant-clear":"Select_variant-clear__3Htb5","triggerButton":"Select_triggerButton__lErtt","hasTriggerArrow":"Select_hasTriggerArrow__vPLad","isError":"Select_isError__WJJLq","triggerButtonLabel":"Select_triggerButtonLabel__XXLzh","hasSelected":"Select_hasSelected__zQhBV","presetPanel":"Select_presetPanel__Yu94r","presetButton":"Select_presetButton__BAl0q","options":"Select_options__3C0-v","option":"Select_option__iJkfJ","isTree":"Select_isTree__SiTaD","size-xs":"Select_size-xs__2lZQY","size-s":"Select_size-s__qBK9t","size-m":"Select_size-m__jp7n-","size-l":"Select_size-l__b4EEy","size-xl":"Select_size-xl__0OerX","isGroup":"Select_isGroup__aP1lY","isExpanded":"Select_isExpanded__rG8R1","level-0":"Select_level-0__vu03A","level-1":"Select_level-1__ozH2U","level-2":"Select_level-2__XDqeh","level-3":"Select_level-3__Bc9XS","level-4":"Select_level-4__KfQcQ","level-5":"Select_level-5__DGSDM","level-6":"Select_level-6__p688A","isSelected":"Select_isSelected__n3ZeN","isIndeterminate":"Select_isIndeterminate__dy-xV","isFocused":"Select_isFocused__oZSgY","expandButton":"Select_expandButton__UTwlR","expandIcon":"Select_expandIcon__gWAIB","chip":"Select_chip__FRK2y","chipsContainer":"Select_chipsContainer__JruCi","chipContainerInner":"Select_chipContainerInner__cYHSk","fadeIn":"Select_fadeIn__QpAwZ"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Table_root__PxLR-{--brad:6px;border-radius:6px;border-radius:var(--brad);max-height:100%;overflow:hidden;position:relative}.Table_root__PxLR- table{min-width:100%}.Table_root__PxLR- tbody{overflow-scrolling:touch;overflow:auto}.Table_root__PxLR- thead{position:sticky;top:0;z-index:1}.Table_root__PxLR- td,.Table_root__PxLR- th{min-width:5em;padding:var(--cell-padding);text-align:left}.Table_root__PxLR- td{vertical-align:top}.Table_root__PxLR- tr:last-child td{border-bottom-left-radius:var(--brad);border-bottom-right-radius:var(--brad);padding-bottom:var(--last-row-padding-bottom)}.Table_variant-default__86px7{box-shadow:0 0 0 2px var(--accent-color-alpha-100)}.Table_variant-default__86px7 th{background-color:var(--accent-color-alpha-100)}.Table_variant-default__86px7 td{box-shadow:inset 0 1px 0 0 var(--accent-color-alpha-100)}.Table_variant-plain__orPhH th{border-bottom:1px solid var(--accent-color-alpha-100)}.Table_variant-plain__orPhH td,.Table_variant-plain__orPhH th{border-bottom:1px solid var(--accent-color-alpha-100);border-right:1px solid var(--accent-color-alpha-100)}.Table_variant-plain__orPhH td:last-child,.Table_variant-plain__orPhH th:last-child{border-right:none}.Table_variant-plain__orPhH tr:last-child td{border-bottom:none}.Table_size-xs__z1E3a{--brad:4px;--cell-padding:2px;--last-row-padding-bottom:var(--p-4)}.Table_size-s__9PBIX{--brad:4px;--cell-padding:var(--p-1);--last-row-padding-bottom:var(--p-5)}.Table_size-m__wNH3x{--brad:6px;--cell-padding:var(--p-2);--last-row-padding-bottom:var(--p-5)}.Table_size-l__lCN-O{--brad:8px;--cell-padding:var(--p-5);--last-row-padding-bottom:var(--p-8)}.Table_size-xl__QS-V3{--brad:10px;--cell-padding:var(--p-8);--last-row-padding-bottom:var(--p-8)}.Table_scroll__a04XZ{position:static}.Table_xScrollbar__FODoD{transform:translateY(4px)}.Table_yScrollbar__KwMOv{transform:translateX(4px)}.Table_sticky__99lks{background-color:var(--decent-color);left:0;position:sticky;z-index:1}th.Table_sticky__99lks{background-color:var(--accent-color);color:var(--decent-color)}.Table_blur__UwMAo .Table_sticky__99lks{
|
|
1
|
+
var css_248z = ".Table_root__PxLR-{--brad:6px;border-radius:6px;border-radius:var(--brad);max-height:100%;overflow:hidden;position:relative}.Table_root__PxLR- table{min-width:100%}.Table_root__PxLR- tbody{overflow-scrolling:touch;overflow:auto}.Table_root__PxLR- thead{position:sticky;top:0;z-index:1}.Table_root__PxLR- td,.Table_root__PxLR- th{min-width:5em;padding:var(--cell-padding);text-align:left}.Table_root__PxLR- td{vertical-align:top}.Table_root__PxLR- tr:last-child td{border-bottom-left-radius:var(--brad);border-bottom-right-radius:var(--brad);padding-bottom:var(--last-row-padding-bottom)}.Table_variant-default__86px7{box-shadow:0 0 0 2px var(--accent-color-alpha-100)}.Table_variant-default__86px7 th{background-color:var(--accent-color-alpha-100)}.Table_variant-default__86px7 td{box-shadow:inset 0 1px 0 0 var(--accent-color-alpha-100)}.Table_variant-plain__orPhH th{border-bottom:1px solid var(--accent-color-alpha-100)}.Table_variant-plain__orPhH td,.Table_variant-plain__orPhH th{border-bottom:1px solid var(--accent-color-alpha-100);border-right:1px solid var(--accent-color-alpha-100)}.Table_variant-plain__orPhH td:last-child,.Table_variant-plain__orPhH th:last-child{border-right:none}.Table_variant-plain__orPhH tr:last-child td{border-bottom:none}.Table_size-xs__z1E3a{--brad:4px;--cell-padding:2px;--last-row-padding-bottom:var(--p-4)}.Table_size-s__9PBIX{--brad:4px;--cell-padding:var(--p-1);--last-row-padding-bottom:var(--p-5)}.Table_size-m__wNH3x{--brad:6px;--cell-padding:var(--p-2);--last-row-padding-bottom:var(--p-5)}.Table_size-l__lCN-O{--brad:8px;--cell-padding:var(--p-5);--last-row-padding-bottom:var(--p-8)}.Table_size-xl__QS-V3{--brad:10px;--cell-padding:var(--p-8);--last-row-padding-bottom:var(--p-8)}.Table_scroll__a04XZ{position:static}.Table_xScrollbar__FODoD{transform:translateY(4px)}.Table_yScrollbar__KwMOv{transform:translateX(4px)}.Table_sticky__99lks{background-color:var(--decent-color);left:0;position:sticky;z-index:1}th.Table_sticky__99lks{background-color:var(--accent-color);color:var(--decent-color)}.Table_blur__UwMAo .Table_sticky__99lks{backdrop-filter:blur(20px);background-color:var(--decent-color-alpha-500)}.Table_blur__UwMAo th.Table_sticky__99lks{background-color:var(--accent-color-alpha-500);color:var(--decent-color-alpha-800)}";
|
|
2
2
|
var S = {"root":"Table_root__PxLR-","variant-default":"Table_variant-default__86px7","variant-plain":"Table_variant-plain__orPhH","size-xs":"Table_size-xs__z1E3a","size-s":"Table_size-s__9PBIX","size-m":"Table_size-m__wNH3x","size-l":"Table_size-l__lCN-O","size-xl":"Table_size-xl__QS-V3","scroll":"Table_scroll__a04XZ","xScrollbar":"Table_xScrollbar__FODoD","yScrollbar":"Table_yScrollbar__KwMOv","sticky":"Table_sticky__99lks","blur":"Table_blur__UwMAo"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Tooltip_trigger__9GSNV{display:inline-block}.Tooltip_tooltip__tzL8q{word-wrap:break-word;background:var(--decent-color-alpha-900);border-radius:4px;box-shadow:0 0 0 1px var(--accent-color-alpha-100);color:var(--accent-color);font-size:14px;line-height:1.4;margin:0;max-width:250px;padding:6px 12px;pointer-events:none;position:fixed;z-index:9999}.Tooltip_tooltip__tzL8q.Tooltip_blur__SQYHW{
|
|
1
|
+
var css_248z = ".Tooltip_trigger__9GSNV{display:inline-block}.Tooltip_tooltip__tzL8q{word-wrap:break-word;background:var(--decent-color-alpha-900);border-radius:4px;box-shadow:0 0 0 1px var(--accent-color-alpha-100);color:var(--accent-color);font-size:14px;line-height:1.4;margin:0;max-width:250px;padding:6px 12px;pointer-events:none;position:fixed;z-index:9999}.Tooltip_tooltip__tzL8q.Tooltip_blur__SQYHW{backdrop-filter:blur(10px);background:var(--decent-color-alpha-500)}.Tooltip_tooltip__tzL8q:after{content:\"\";position:absolute}.Tooltip_tooltip__tzL8q[data-direction=top]{transform:translateY(0)}.Tooltip_tooltip__tzL8q[data-direction=top]:after{left:50%;top:100%;transform:translateX(-50%)}.Tooltip_tooltip__tzL8q[data-direction=bottom]{transform:translateY(0)}.Tooltip_tooltip__tzL8q[data-direction=bottom]:after{bottom:100%;left:50%;transform:translateX(-50%)}.Tooltip_tooltip__tzL8q[data-direction=left]{transform:translateX(0)}.Tooltip_tooltip__tzL8q[data-direction=left]:after{left:100%;top:50%;transform:translateY(-50%)}.Tooltip_tooltip__tzL8q[data-direction=right]{transform:translateX(0)}.Tooltip_tooltip__tzL8q[data-direction=right]:after{right:100%;top:50%;transform:translateY(-50%)}.Tooltip_tooltip__tzL8q:popover-open{animation:Tooltip_fadeIn__Buhx4 .2s ease-out}.Tooltip_tooltip__tzL8q.Tooltip_tooltipOverTrigger__gRUoT{word-wrap:break-word;box-sizing:border-box;font-size:inherit;height:-moz-fit-content;height:fit-content;line-height:inherit;max-width:none;overflow-wrap:break-word;white-space:normal}.Tooltip_tooltip__tzL8q.Tooltip_tooltipOverTrigger__gRUoT:after{display:none}.Tooltip_tooltip__tzL8q.Tooltip_tooltipOverTrigger__gRUoT:popover-open{animation:Tooltip_fadeIn__Buhx4 .15s ease-out}@keyframes Tooltip_fadeIn__Buhx4{0%{opacity:0}to{opacity:1}}";
|
|
2
2
|
var S = {"trigger":"Tooltip_trigger__9GSNV","tooltip":"Tooltip_tooltip__tzL8q","blur":"Tooltip_blur__SQYHW","fadeIn":"Tooltip_fadeIn__Buhx4","tooltipOverTrigger":"Tooltip_tooltipOverTrigger__gRUoT"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".VideoPlayer_root__LGBzl{box-shadow:inset 0 0 0 2px none;color:var(--accent-color);display:flex;flex-direction:column;overflow:hidden;position:relative;width:100%}.VideoPlayer_root__LGBzl.VideoPlayer_size-s__7gpUI,.VideoPlayer_root__LGBzl.VideoPlayer_size-xs__gE1DT{border-radius:6px}.VideoPlayer_root__LGBzl.VideoPlayer_size-m__oNx3V{border-radius:9px}.VideoPlayer_root__LGBzl.VideoPlayer_size-l__BrHtn{border-radius:12px}.VideoPlayer_root__LGBzl.VideoPlayer_size-xl__u0nqW{border-radius:15px}.VideoPlayer_videoWrap__sglO6{align-items:center;aspect-ratio:16/9;border-radius:inherit;display:flex;overflow:hidden;position:relative;width:100%}.VideoPlayer_video__fYIXE{display:block;height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.VideoPlayer_loading__PpSPh{align-items:center
|
|
1
|
+
var css_248z = ".VideoPlayer_root__LGBzl{box-shadow:inset 0 0 0 2px none;color:var(--accent-color);display:flex;flex-direction:column;overflow:hidden;position:relative;width:100%}.VideoPlayer_root__LGBzl.VideoPlayer_size-s__7gpUI,.VideoPlayer_root__LGBzl.VideoPlayer_size-xs__gE1DT{border-radius:6px}.VideoPlayer_root__LGBzl.VideoPlayer_size-m__oNx3V{border-radius:9px}.VideoPlayer_root__LGBzl.VideoPlayer_size-l__BrHtn{border-radius:12px}.VideoPlayer_root__LGBzl.VideoPlayer_size-xl__u0nqW{border-radius:15px}.VideoPlayer_videoWrap__sglO6{align-items:center;aspect-ratio:16/9;border-radius:inherit;display:flex;overflow:hidden;position:relative;width:100%}.VideoPlayer_video__fYIXE{display:block;height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.VideoPlayer_loading__PpSPh{align-items:center;backdrop-filter:blur(10px);background:var(--decent-color-alpha-200);border-radius:inherit;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.VideoPlayer_controls__ZtlUH{background:var(--decent-color-alpha-700);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;height:auto;left:0;pointer-events:none;position:absolute;right:0;top:auto;transform:translateY(0);transition:transform .25s ease;width:100%;z-index:2}.VideoPlayer_size-xs__gE1DT .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 1px))}.VideoPlayer_size-s__7gpUI .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 2px))}.VideoPlayer_size-m__oNx3V .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 4px))}.VideoPlayer_size-l__BrHtn .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 6px))}.VideoPlayer_size-xl__u0nqW .VideoPlayer_controlsCompact__j25Ad{transform:translateY(calc(100% - 10px))}.VideoPlayer_progressRow__u53xA{pointer-events:auto;width:100%}.VideoPlayer_progressRow__u53xA input{--track-radius:0}.VideoPlayer_progress__qRC1a{min-width:0;width:100%}.VideoPlayer_size-xs__gE1DT .VideoPlayer_progress__qRC1a{top:-5px}.VideoPlayer_size-s__7gpUI .VideoPlayer_progress__qRC1a{top:-6px}.VideoPlayer_size-m__oNx3V .VideoPlayer_progress__qRC1a{top:-4px}.VideoPlayer_size-l__BrHtn .VideoPlayer_progress__qRC1a,.VideoPlayer_size-xl__u0nqW .VideoPlayer_progress__qRC1a{top:-5px}.VideoPlayer_bar__myWn1{align-items:center;display:flex;gap:var(--p-2);padding:0 var(--p-3) var(--p-2);pointer-events:auto}.VideoPlayer_time__-icL3{font-feature-settings:\"tnum\";flex:1;font-size:13px;font-variant-numeric:tabular-nums;min-width:0;opacity:.85;white-space:nowrap}.VideoPlayer_volumeControl__XUc1I{align-items:center;display:inline-flex;flex-shrink:0}.VideoPlayer_volumePopup__eXzsE{align-items:center;box-sizing:border-box;display:flex;height:120px;justify-content:center;padding:var(--p-3) var(--p-2)}.VideoPlayer_volumeSliderWrap__ANQ55{align-items:stretch;display:flex;height:100%;justify-content:center;width:16px;width:var(--thumb-size,16px)}.VideoPlayer_volumeSlider__TWOG5{height:100%}.VideoPlayer_fullscreen__aue41,.VideoPlayer_fullscreen__aue41 .VideoPlayer_videoWrap__sglO6{border-radius:0}.VideoPlayer_fullscreen__aue41 video{-o-object-fit:contain;object-fit:contain}";
|
|
2
2
|
var S = {"root":"VideoPlayer_root__LGBzl","size-xs":"VideoPlayer_size-xs__gE1DT","size-s":"VideoPlayer_size-s__7gpUI","size-m":"VideoPlayer_size-m__oNx3V","size-l":"VideoPlayer_size-l__BrHtn","size-xl":"VideoPlayer_size-xl__u0nqW","videoWrap":"VideoPlayer_videoWrap__sglO6","video":"VideoPlayer_video__fYIXE","loading":"VideoPlayer_loading__PpSPh","controls":"VideoPlayer_controls__ZtlUH","controlsCompact":"VideoPlayer_controlsCompact__j25Ad","progressRow":"VideoPlayer_progressRow__u53xA","progress":"VideoPlayer_progress__qRC1a","bar":"VideoPlayer_bar__myWn1","time":"VideoPlayer_time__-icL3","volumeControl":"VideoPlayer_volumeControl__XUc1I","volumePopup":"VideoPlayer_volumePopup__eXzsE","volumeSliderWrap":"VideoPlayer_volumeSliderWrap__ANQ55","volumeSlider":"VideoPlayer_volumeSlider__TWOG5","fullscreen":"VideoPlayer_fullscreen__aue41"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".Virtualized_root__SX71a{display:block;height:100%;max-height:100%;overflow-y:auto;position:relative}.Virtualized_item__1vSN0{animation:Virtualized_show__2WhkK .1s ease-out
|
|
1
|
+
var css_248z = ".Virtualized_root__SX71a{display:block;height:100%;max-height:100%;overflow-y:auto;position:relative}.Virtualized_item__1vSN0{animation:Virtualized_show__2WhkK .1s ease-out;backface-visibility:hidden;transform:translateZ(0)}.Virtualized_freezeClicks__SCBdy .Virtualized_item__1vSN0{pointer-events:none}@keyframes Virtualized_show__2WhkK{0%{opacity:0}to{opacity:1}}";
|
|
2
2
|
var S = {"root":"Virtualized_root__SX71a","item":"Virtualized_item__1vSN0","show":"Virtualized_show__2WhkK","freezeClicks":"Virtualized_freezeClicks__SCBdy"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey, Plugin } from '@tiptap/pm/state';
|
|
3
|
+
import { Decoration, DecorationSet } from '@tiptap/pm/view';
|
|
4
|
+
import { find } from 'linkifyjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Colors URLs in plain text. Unlike Link autolink, it also covers text that
|
|
8
|
+
* was set programmatically, the last word before a space is typed, and URLs
|
|
9
|
+
* followed by punctuation.
|
|
10
|
+
*/
|
|
11
|
+
function buildDecorations(doc, className) {
|
|
12
|
+
const decorations = [];
|
|
13
|
+
doc.descendants((node, pos) => {
|
|
14
|
+
if (!node.isText || !node.text)
|
|
15
|
+
return;
|
|
16
|
+
for (const link of find(node.text, 'url')) {
|
|
17
|
+
decorations.push(Decoration.inline(pos + link.start, pos + link.end, {
|
|
18
|
+
class: className,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return DecorationSet.create(doc, decorations);
|
|
23
|
+
}
|
|
24
|
+
function createLinkHighlightExtension(className) {
|
|
25
|
+
const key = new PluginKey('linkHighlight');
|
|
26
|
+
return Extension.create({
|
|
27
|
+
name: 'linkHighlight',
|
|
28
|
+
addProseMirrorPlugins() {
|
|
29
|
+
return [
|
|
30
|
+
new Plugin({
|
|
31
|
+
key,
|
|
32
|
+
state: {
|
|
33
|
+
init: (_, { doc }) => buildDecorations(doc, className),
|
|
34
|
+
apply: (tr, prev) => tr.docChanged ? buildDecorations(tr.doc, className) : prev,
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
decorations: state => key.getState(state),
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
];
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { createLinkHighlightExtension };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".SlashSuggestionList_root__9KCb1{
|
|
1
|
+
var css_248z = ".SlashSuggestionList_root__9KCb1{backdrop-filter:blur(10px);background-color:var(--decent-color-alpha-700);border-radius:8px;border-radius:var(--radius-lg,8px);box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 8px 24px rgba(0,0,0,.2);color:var(--foreground);max-width:90vw;min-width:220px;overflow:hidden;position:relative}.SlashSuggestionList_root__9KCb1:before{background-color:var(--accent-color-alpha-50);bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.dark .SlashSuggestionList_root__9KCb1{box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 8px 24px rgba(0,0,0,.5)}.SlashSuggestionList_menu__s-jK3{margin:0;max-height:40vh}.SlashSuggestionList_item__9JBeY{align-items:center;border-radius:var(--p-2);display:flex;flex-direction:row;gap:var(--p-2);height:auto!important;justify-content:flex-start;min-height:0;overflow:visible!important;padding:var(--p-1) var(--p-2)!important;position:relative;text-overflow:clip!important;white-space:normal!important;width:100%}.SlashSuggestionList_itemHighlighted__cStZr{box-shadow:inset 100vw 0 0 0 var(--active-color-alpha-200)}.SlashSuggestionList_itemIcon__hTtxe{color:var(--accent-color-alpha-800);flex-shrink:0}.SlashSuggestionList_itemText__uwNbZ{align-items:flex-start;display:flex;flex-direction:column;min-width:0}.SlashSuggestionList_itemLabel__OMaov{font-weight:600}.SlashSuggestionList_itemDesc__fAdcA{color:var(--accent-color-alpha-600);font-size:80%;white-space:normal}.SlashSuggestionList_mention__aT45p{align-items:center;background:var(--muted);border-radius:var(--p-1);display:inline-flex;line-height:1.4;margin:0 var(--p-1);padding:0 var(--p-1);transition:background-color .1s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:baseline;white-space:nowrap}.SlashSuggestionList_mention__aT45p:hover{background-color:var(--active-color-alpha-200)}";
|
|
2
2
|
var S = {"root":"SlashSuggestionList_root__9KCb1","menu":"SlashSuggestionList_menu__s-jK3","item":"SlashSuggestionList_item__9JBeY","itemHighlighted":"SlashSuggestionList_itemHighlighted__cStZr","itemIcon":"SlashSuggestionList_itemIcon__hTtxe","itemText":"SlashSuggestionList_itemText__uwNbZ","itemLabel":"SlashSuggestionList_itemLabel__OMaov","itemDesc":"SlashSuggestionList_itemDesc__fAdcA","mention":"SlashSuggestionList_mention__aT45p"};
|
|
3
3
|
if (typeof document !== 'undefined') {
|
|
4
4
|
var __uilibHead = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'prosemirror-model';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'prosemirror-view';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ChatViewProps } from './types';
|
|
2
|
-
export declare function ChatView({ messages, isPrompting, emptyLabel, className, messagesClassName, footer, onButtonClick, footerClassName, }: ChatViewProps): import("react").JSX.Element;
|
|
2
|
+
export declare function ChatView({ messages, isPrompting, emptyLabel, className, messagesClassName, footer, onButtonClick, footerClassName, autoScroll, }: ChatViewProps): import("react").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import * as T from './Scroll.types';
|
|
|
2
2
|
export type ScrollProps = T.Props;
|
|
3
3
|
export type ScrollRef = {
|
|
4
4
|
innerElem: HTMLDivElement | null;
|
|
5
|
+
scrollToBottom: () => void;
|
|
5
6
|
};
|
|
6
7
|
export declare const Scroll: import("react").ForwardRefExoticComponent<import("../../types").ComponentType & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
7
8
|
innerClassName?: string;
|
|
@@ -16,6 +17,7 @@ export declare const Scroll: import("react").ForwardRefExoticComponent<import(".
|
|
|
16
17
|
fadeSize?: import("../../types").Size;
|
|
17
18
|
smooth?: boolean;
|
|
18
19
|
autoHide?: boolean;
|
|
20
|
+
autoScroll?: boolean;
|
|
19
21
|
offset?: {
|
|
20
22
|
x?: {
|
|
21
23
|
before?: number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const AUTO_SCROLL_BOTTOM_EPS = 8;
|
|
2
|
+
export declare const AUTO_SCROLL_TIMEOUT = 1000;
|
|
3
|
+
export declare const isAtBottom: (el: HTMLElement, eps?: number) => boolean;
|
|
4
|
+
type Params = {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
innerRef: React.RefObject<HTMLDivElement>;
|
|
7
|
+
isDraggingRef: React.MutableRefObject<boolean>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Keeps the scroll pinned to the bottom while content grows.
|
|
11
|
+
* Follows only when the user is at the bottom; scrolling away pauses it,
|
|
12
|
+
* returning to the bottom resumes it.
|
|
13
|
+
* Speed is driven by the growth delta of the current burst and the remaining
|
|
14
|
+
* distance, and is eased every frame so speed changes stay smooth.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useAutoScroll({ enabled, innerRef, isDraggingRef }: Params): {
|
|
17
|
+
onScroll: () => void;
|
|
18
|
+
onDragEnd: () => void;
|
|
19
|
+
scrollToBottom: () => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createLinkHighlightExtension } from './createLinkHighlightExtension';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homecode/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.19.0",
|
|
4
4
|
"description": "React UI components library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"tests": "jest",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"fastest-validator": "^1.16.0",
|
|
74
74
|
"favicons": "^7.1.3",
|
|
75
75
|
"justorm": "^3.0.2",
|
|
76
|
+
"linkifyjs": "^4.3.3",
|
|
76
77
|
"lucide-react": "^1.43.0",
|
|
77
78
|
"moment": "^2.29.4",
|
|
78
79
|
"react": "^18.2.0",
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"rollup-plugin-dts": "^5.2.0",
|
|
119
120
|
"rollup-plugin-node-externals": "^5.1.2",
|
|
120
121
|
"rollup-plugin-styles": "^4.0.0",
|
|
121
|
-
"rollup-plugin-typescript2": "^0.
|
|
122
|
+
"rollup-plugin-typescript2": "^0.37.0",
|
|
122
123
|
"standard-version": "^9.5.0",
|
|
123
124
|
"stylus": "^0.59.0",
|
|
124
125
|
"ts-jest": "^29.2.5",
|