@homecode/ui 5.18.1 → 5.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/src/components/Chat/ChatMessage.styl.js +1 -1
- package/dist/esm/src/components/Chat/ChatView.styl.js +1 -1
- package/dist/esm/src/components/FormattedText/FormattedText.js +41 -3
- package/dist/esm/src/components/Resizer/Resizer.styl.js +1 -1
- package/dist/esm/src/components/Router/Link/Link.js +25 -3
- package/dist/esm/src/components/ThinkingOutline/ThinkingOutline.js +4 -3
- package/dist/esm/src/components/ThinkingOutline/ThinkingOutline.styl.js +2 -2
- package/dist/esm/types/src/components/FormattedText/FormattedText.d.ts +1 -0
- package/dist/esm/types/src/components/Menu/Menu.types.d.ts +2 -2
- package/dist/esm/types/src/components/ThinkingOutline/ThinkingOutline.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".ChatMessage_root__JkQi6{align-items:flex-start;display:flex;flex-direction:column;max-width:100%;padding:0 var(--p-5) var(--p-2)}@media (max-width:768px){.ChatMessage_root__JkQi6{padding:0 var(--p-2) var(--p-2)}}.ChatMessage_root__JkQi6+.ChatMessage_root__JkQi6{margin-top:20px}.ChatMessage_root__JkQi6 .ChatMessage_textContent__O-pxi{padding:0}.ChatMessage_root__JkQi6.ChatMessage_USER__UEEuA{align-items:flex-end;padding-right:var(--p-5)}.ChatMessage_root__JkQi6.ChatMessage_USER__UEEuA .ChatMessage_text__CNGXE{background-color:var(--active-color-alpha-500);padding:6px var(--p-2)}.ChatMessage_root__JkQi6.ChatMessage_AGENT__fvHxv .ChatMessage_textContent__O-pxi,.ChatMessage_root__JkQi6.ChatMessage_AGENT__fvHxv .ChatMessage_text__CNGXE{width:100%!important}.ChatMessage_root__JkQi6.ChatMessage_AGENT__fvHxv .ChatMessage_text__CNGXE{padding-top:4px}.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf{align-items:stretch}.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf+.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf{margin-top:-6px!important}.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf .ChatMessage_text__CNGXE{font-size:90%;opacity:.8;padding:0;width:100%}.ChatMessage_root__JkQi6.ChatMessage_stacked__LoLL0 .ChatMessage_meta__lMww1{display:none}.ChatMessage_text__CNGXE{border-radius:14px;display:flex;flex-direction:row;max-width:100%;overflow:hidden;padding:var(--p-2);width:-moz-fit-content;width:fit-content}.ChatMessage_textContent__O-pxi{max-width:100%;text-align:left;white-space:pre-line;word-break:break-word}.ChatMessage_textContent__O-pxi h1,.ChatMessage_textContent__O-pxi h2,.ChatMessage_textContent__O-pxi h3,.ChatMessage_textContent__O-pxi h4,.ChatMessage_textContent__O-pxi h5,.ChatMessage_textContent__O-pxi h6{margin-top:1em}.ChatMessage_textContent__O-pxi a{margin-bottom:-.1em;margin-top:-.3em;padding:0 .3em .1em .4em!important}.ChatMessage_SYSTEM__bkOnf .ChatMessage_textContent__O-pxi a{margin-bottom:0;margin-top:0}.ChatMessage_meta__lMww1{font-size:11px;margin-bottom:4px;opacity:.5;padding:0 4px}.ChatMessage_parts__z7LHI{display:flex;flex-direction:column;gap:var(--p-2)}.ChatMessage_mediaPart__A67rQ{border-radius:var(--p-2);max-height:320px;max-width:100%}.ChatMessage_systemFold__FUSrL{width:100%}.ChatMessage_systemFoldTrigger__35Hnd{max-width:100%;overflow:hidden;padding:2px 10px;text-overflow:ellipsis;white-space:nowrap}.ChatMessage_systemFoldContent__0G-uw{padding:0 10px}";
|
|
3
|
+
var css_248z = ".ChatMessage_root__JkQi6{align-items:flex-start;display:flex;flex-direction:column;max-width:100%;padding:0 var(--p-5) var(--p-2)}.ChatMessage_root__JkQi6:last-child:after{content:\"\";display:block;height:20vh;width:100%}@media (max-width:768px){.ChatMessage_root__JkQi6{padding:0 var(--p-2) var(--p-2)}}.ChatMessage_root__JkQi6+.ChatMessage_root__JkQi6{margin-top:20px}.ChatMessage_root__JkQi6 .ChatMessage_textContent__O-pxi{padding:0}.ChatMessage_root__JkQi6.ChatMessage_USER__UEEuA{align-items:flex-end;padding-right:var(--p-5)}.ChatMessage_root__JkQi6.ChatMessage_USER__UEEuA .ChatMessage_text__CNGXE{background-color:var(--active-color-alpha-500);padding:6px var(--p-2)}.ChatMessage_root__JkQi6.ChatMessage_AGENT__fvHxv .ChatMessage_textContent__O-pxi,.ChatMessage_root__JkQi6.ChatMessage_AGENT__fvHxv .ChatMessage_text__CNGXE{width:100%!important}.ChatMessage_root__JkQi6.ChatMessage_AGENT__fvHxv .ChatMessage_text__CNGXE{padding-top:4px}.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf{align-items:stretch}.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf+.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf{margin-top:-6px!important}.ChatMessage_root__JkQi6.ChatMessage_SYSTEM__bkOnf .ChatMessage_text__CNGXE{font-size:90%;opacity:.8;padding:0;width:100%}.ChatMessage_root__JkQi6.ChatMessage_stacked__LoLL0 .ChatMessage_meta__lMww1{display:none}.ChatMessage_text__CNGXE{border-radius:14px;display:flex;flex-direction:row;max-width:100%;overflow:hidden;padding:var(--p-2);width:-moz-fit-content;width:fit-content}.ChatMessage_textContent__O-pxi{max-width:100%;text-align:left;white-space:pre-line;word-break:break-word}.ChatMessage_textContent__O-pxi h1,.ChatMessage_textContent__O-pxi h2,.ChatMessage_textContent__O-pxi h3,.ChatMessage_textContent__O-pxi h4,.ChatMessage_textContent__O-pxi h5,.ChatMessage_textContent__O-pxi h6{margin-top:1em}.ChatMessage_textContent__O-pxi a{margin-bottom:-.1em;margin-top:-.3em;padding:0 .3em .1em .4em!important}.ChatMessage_SYSTEM__bkOnf .ChatMessage_textContent__O-pxi a{margin-bottom:0;margin-top:0}.ChatMessage_meta__lMww1{font-size:11px;margin-bottom:4px;opacity:.5;padding:0 4px}.ChatMessage_parts__z7LHI{display:flex;flex-direction:column;gap:var(--p-2)}.ChatMessage_mediaPart__A67rQ{border-radius:var(--p-2);max-height:320px;max-width:100%}.ChatMessage_systemFold__FUSrL{width:100%}.ChatMessage_systemFoldTrigger__35Hnd{max-width:100%;overflow:hidden;padding:2px 10px;text-overflow:ellipsis;white-space:nowrap}.ChatMessage_systemFoldContent__0G-uw{padding:0 10px}";
|
|
4
4
|
var S = {"root":"ChatMessage_root__JkQi6","textContent":"ChatMessage_textContent__O-pxi","USER":"ChatMessage_USER__UEEuA","text":"ChatMessage_text__CNGXE","AGENT":"ChatMessage_AGENT__fvHxv","SYSTEM":"ChatMessage_SYSTEM__bkOnf","stacked":"ChatMessage_stacked__LoLL0","meta":"ChatMessage_meta__lMww1","parts":"ChatMessage_parts__z7LHI","mediaPart":"ChatMessage_mediaPart__A67rQ","systemFold":"ChatMessage_systemFold__FUSrL","systemFoldTrigger":"ChatMessage_systemFoldTrigger__35Hnd","systemFoldContent":"ChatMessage_systemFoldContent__0G-uw"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".ChatView_root__fRLUe{--prompt-height:80px;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;position:relative;width:100%}.ChatView_messages__XjC53{flex:1;min-height:0}.ChatView_messagesInner__oRfmN{display:flex;flex-direction:column;height:-moz-fit-content;height:fit-content;min-height:100%;padding:var(--p-10)
|
|
3
|
+
var css_248z = ".ChatView_root__fRLUe{--prompt-height:80px;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;position:relative;width:100%}.ChatView_messages__XjC53{flex:1;min-height:0}.ChatView_messagesInner__oRfmN{display:flex;flex-direction:column;height:-moz-fit-content;height:fit-content;min-height:100%;padding:var(--p-10) var(--p-2) 0}.ChatView_messagesInnerWithPrompt__AuC8M{padding-bottom:20px}.ChatView_empty__5yGXV{margin:auto;opacity:.6;padding:24px;text-align:center}.ChatView_footer__huDww{height:-moz-fit-content;height:fit-content;margin-top:calc(var(--p-5)*-1);overflow:visible;padding:0;position:relative}";
|
|
4
4
|
var S = {"root":"ChatView_root__fRLUe","messages":"ChatView_messages__XjC53","messagesInner":"ChatView_messagesInner__oRfmN","messagesInnerWithPrompt":"ChatView_messagesInnerWithPrompt__AuC8M","empty":"ChatView_empty__5yGXV","footer":"ChatView_footer__huDww"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -6,6 +6,36 @@ import { Table } from '../Table/Table.js';
|
|
|
6
6
|
import { Tooltip } from '../Tooltip/Tooltip.js';
|
|
7
7
|
import S from './FormattedText.styl.js';
|
|
8
8
|
|
|
9
|
+
function isAppOriginHost(hostname) {
|
|
10
|
+
if (hostname === 'localhost' || hostname === '127.0.0.1')
|
|
11
|
+
return true;
|
|
12
|
+
if (typeof location === 'undefined')
|
|
13
|
+
return false;
|
|
14
|
+
return hostname === location.hostname;
|
|
15
|
+
}
|
|
16
|
+
function hrefForFormattedLink(url) {
|
|
17
|
+
const value = url.trim();
|
|
18
|
+
if (/^https?:\/\//i.test(value)) {
|
|
19
|
+
try {
|
|
20
|
+
const parsed = new URL(value);
|
|
21
|
+
if (parsed.pathname.startsWith('/app/') &&
|
|
22
|
+
isAppOriginHost(parsed.hostname)) {
|
|
23
|
+
return `/${parsed.pathname}${parsed.search}${parsed.hash}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
if (value.startsWith('//app/'))
|
|
32
|
+
return value;
|
|
33
|
+
if (value.startsWith('/app/'))
|
|
34
|
+
return `/${value}`;
|
|
35
|
+
if (value.startsWith('app/'))
|
|
36
|
+
return `//${value}`;
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
9
39
|
function findJsonEndExclusive(content, start) {
|
|
10
40
|
const first = content[start];
|
|
11
41
|
if (first !== '{' && first !== '[')
|
|
@@ -185,6 +215,7 @@ function FormattedText({ text, className, onButtonClick, }) {
|
|
|
185
215
|
let url = markdown[2];
|
|
186
216
|
if (url.startsWith('www.'))
|
|
187
217
|
url = `https://${url}`;
|
|
218
|
+
url = hrefForFormattedLink(url);
|
|
188
219
|
return {
|
|
189
220
|
elem: (jsx(Tooltip, { content: url, direction: "top", children: jsx(Link, { href: url, inline: true, target: "_blank", children: markdown[1] }) })),
|
|
190
221
|
index: markdown.index,
|
|
@@ -198,6 +229,7 @@ function FormattedText({ text, className, onButtonClick, }) {
|
|
|
198
229
|
let url = matches[0];
|
|
199
230
|
if (url.startsWith('www.'))
|
|
200
231
|
url = `https://${url}`;
|
|
232
|
+
url = hrefForFormattedLink(url);
|
|
201
233
|
return {
|
|
202
234
|
elem: (jsx(Tooltip, { content: url, direction: "top", children: jsx(Link, { href: url, inline: true, target: "_blank", children: matches[0] }) })),
|
|
203
235
|
index: matches.index,
|
|
@@ -280,14 +312,20 @@ function FormattedText({ text, className, onButtonClick, }) {
|
|
|
280
312
|
const hasSeparator = Boolean(withSep);
|
|
281
313
|
const headerRow = matches[2].trim();
|
|
282
314
|
const dataRows = (hasSeparator ? matches[4] : matches[3]).trim();
|
|
283
|
-
const headers = headerRow
|
|
315
|
+
const headers = headerRow
|
|
316
|
+
.split('|')
|
|
317
|
+
.map(cell => cell.trim())
|
|
318
|
+
.slice(1, -1);
|
|
284
319
|
if (headers.length === 0)
|
|
285
320
|
return null;
|
|
286
321
|
const rows = dataRows
|
|
287
322
|
.split('\n')
|
|
288
323
|
.map(row => row.trim())
|
|
289
324
|
.filter(row => row.startsWith('|') && row.endsWith('|'))
|
|
290
|
-
.map(row => row
|
|
325
|
+
.map(row => row
|
|
326
|
+
.split('|')
|
|
327
|
+
.map(cell => cell.trim())
|
|
328
|
+
.slice(1, -1))
|
|
291
329
|
.filter(row => row.length > 0);
|
|
292
330
|
if (rows.length === 0)
|
|
293
331
|
return null;
|
|
@@ -331,4 +369,4 @@ function FormattedText({ text, className, onButtonClick, }) {
|
|
|
331
369
|
]) }));
|
|
332
370
|
}
|
|
333
371
|
|
|
334
|
-
export { FormattedText };
|
|
372
|
+
export { FormattedText, hrefForFormattedLink };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Resizer_root__ALJP3{display:flex;flex-direction:row;height:100%;min-height:0;min-width:0;width:100%}.Resizer_root__ALJP3.Resizer_vertical__YFqC0{flex-direction:column}.Resizer_root__ALJP3.Resizer_dragging__pD7Co{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Resizer_root__ALJP3.Resizer_dragging__pD7Co.Resizer_vertical__YFqC0{cursor:row-resize}.Resizer_pane__VMBEO{box-sizing:border-box;flex
|
|
3
|
+
var css_248z = ".Resizer_root__ALJP3{display:flex;flex-direction:row;height:100%;min-height:0;min-width:0;width:100%}.Resizer_root__ALJP3.Resizer_vertical__YFqC0{flex-direction:column}.Resizer_root__ALJP3.Resizer_dragging__pD7Co{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Resizer_root__ALJP3.Resizer_dragging__pD7Co.Resizer_vertical__YFqC0{cursor:row-resize}.Resizer_pane__VMBEO{box-sizing:border-box;flex:1 1 var(--width);height:100%;min-height:0;min-width:0;overflow:hidden;width:var(--width)}.Resizer_root__ALJP3.Resizer_vertical__YFqC0 .Resizer_pane__VMBEO{flex:1 1 var(--height);height:var(--height);width:100%}.Resizer_handle__OOZAA{cursor:col-resize;flex-shrink:0;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:0;z-index:1}.Resizer_handle__OOZAA:before{bottom:0;content:\"\";left:-7px;position:absolute;top:0;width:14px}.Resizer_handle__OOZAA:after{background:var(--accent-color-alpha-50);bottom:0;content:\"\";left:-1px;position:absolute;top:0;width:2px}.Resizer_handle__OOZAA:hover:after{background:var(--active-color)}.Resizer_root__ALJP3.Resizer_vertical__YFqC0 .Resizer_handle__OOZAA{cursor:row-resize;height:0;width:auto}.Resizer_root__ALJP3.Resizer_vertical__YFqC0 .Resizer_handle__OOZAA:before{bottom:auto;height:14px;left:0;right:0;top:-7px;width:auto}.Resizer_root__ALJP3.Resizer_vertical__YFqC0 .Resizer_handle__OOZAA:after{bottom:auto;height:2px;left:0;right:0;top:-1px;width:auto}";
|
|
4
4
|
var S = {"root":"Resizer_root__ALJP3","vertical":"Resizer_vertical__YFqC0","dragging":"Resizer_dragging__pD7Co","pane":"Resizer_pane__VMBEO","handle":"Resizer_handle__OOZAA"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -7,26 +7,48 @@ import Context from '../context.js';
|
|
|
7
7
|
import S from './Link.styl.js';
|
|
8
8
|
|
|
9
9
|
const isStartFromDoubleSlash = href => /^\/\//.test(href);
|
|
10
|
+
const isHttpHref = (href) => /^https?:\/\//i.test(href);
|
|
11
|
+
function sameOriginPath(href) {
|
|
12
|
+
if (!isHttpHref(href))
|
|
13
|
+
return null;
|
|
14
|
+
try {
|
|
15
|
+
const url = new URL(href);
|
|
16
|
+
if (typeof location === 'undefined' || url.origin !== location.origin) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return `${url.pathname}${url.search}${url.hash}` || '/';
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
10
25
|
const Link = ({ className, exactClassName, children, href: hrefProp, isClear = false, isDisabled = false, disableExternalIcon = false, inline = false, isPartialExact = false, onClick, ...rest }) => {
|
|
11
26
|
const { router } = useStore({ router: ['path'] });
|
|
12
27
|
const { path } = router;
|
|
13
28
|
const isFromRoot = isStartFromDoubleSlash(hrefProp);
|
|
14
29
|
const domElem = useRef(null);
|
|
15
30
|
const { basePath } = useContext(Context);
|
|
16
|
-
const
|
|
31
|
+
const internalHref = useMemo(() => sameOriginPath(hrefProp), [hrefProp]);
|
|
32
|
+
const isExternal = useMemo(() => {
|
|
33
|
+
if (internalHref)
|
|
34
|
+
return false;
|
|
35
|
+
if (isHttpHref(hrefProp))
|
|
36
|
+
return true;
|
|
37
|
+
return /\./.test(hrefProp);
|
|
38
|
+
}, [hrefProp, internalHref]);
|
|
17
39
|
const rootPath = useMemo(() => {
|
|
18
40
|
if (isExternal || isFromRoot)
|
|
19
41
|
return '';
|
|
20
42
|
return basePath ?? '';
|
|
21
43
|
}, [isExternal, isFromRoot, basePath]);
|
|
22
44
|
const href = useMemo(() => {
|
|
23
|
-
let str = hrefProp;
|
|
45
|
+
let str = internalHref ?? hrefProp;
|
|
24
46
|
if (isFromRoot)
|
|
25
47
|
str = str.replace(/^\//, '');
|
|
26
48
|
if (str === '/')
|
|
27
49
|
str = '';
|
|
28
50
|
return `${rootPath}${str}`;
|
|
29
|
-
}, [hrefProp, rootPath]);
|
|
51
|
+
}, [hrefProp, internalHref, isFromRoot, rootPath]);
|
|
30
52
|
const handleClick = useCallback(e => {
|
|
31
53
|
onClick?.(e, href);
|
|
32
54
|
if (!isExternal && router.path !== href) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import S from './ThinkingOutline.styl.js';
|
|
3
2
|
import cn from 'classnames';
|
|
3
|
+
import S from './ThinkingOutline.styl.js';
|
|
4
4
|
|
|
5
|
-
function ThinkingOutline({ active
|
|
6
|
-
|
|
5
|
+
function ThinkingOutline({ active, className }) {
|
|
6
|
+
const isControlled = active !== undefined;
|
|
7
|
+
return (jsx("div", { className: cn(S.root, isControlled && active && S.active, !isControlled && S.interactive, className), children: jsx("div", { className: S.bloom }) }));
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export { ThinkingOutline };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@property --promptGlowAngle{syntax:\"<angle>\";inherits:true;initial-value:0deg}.ThinkingOutline_root__rvvBG{animation:ThinkingOutline_orbitGlow__3bK-F 3.5s linear infinite;animation-play-state:paused;border-radius:inherit;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .5s ease-out}.ThinkingOutline_root__rvvBG.ThinkingOutline_active__-66iV,.ThinkingOutline_root__rvvBG:hover{animation-play-state:running;opacity:1}.ThinkingOutline_root__rvvBG:before{background:conic-gradient(from var(--promptGlowAngle),var(--active-color) 0deg,var(--active-color-alpha-300) 48deg,transparent 80deg,transparent 100deg,var(--active-color-alpha-300) 132deg,var(--active-color) 180deg,var(--active-color-alpha-300) 228deg,transparent 260deg,transparent 280deg,var(--active-color-alpha-300) 312deg,var(--active-color) 1turn);border-radius:inherit;content:\"\";inset:0;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1.5px;position:absolute}.ThinkingOutline_bloom__XKYD5{border-radius:inherit;filter:blur(20px);inset:0;opacity:.55;position:absolute}.ThinkingOutline_bloom__XKYD5:before{background:conic-gradient(from var(--promptGlowAngle),var(--active-color) 0deg,var(--active-color-alpha-300) 48deg,transparent 80deg,transparent 100deg,var(--active-color-alpha-300) 132deg,var(--active-color) 180deg,var(--active-color-alpha-300) 228deg,transparent 260deg,transparent 280deg,var(--active-color-alpha-300) 312deg,var(--active-color) 1turn);border-radius:inherit;content:\"\";inset:0;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:6px;position:absolute}@media (prefers-reduced-motion:reduce){.ThinkingOutline_root__rvvBG{animation:none}}@keyframes ThinkingOutline_orbitGlow__3bK-F{0%{--promptGlowAngle:-30deg}25%{--promptGlowAngle:30deg}50%{--promptGlowAngle:150deg}75%{--promptGlowAngle:210deg}to{--promptGlowAngle:330deg}}";
|
|
4
|
-
var S = {"root":"ThinkingOutline_root__rvvBG","orbitGlow":"ThinkingOutline_orbitGlow__3bK-F","active":"ThinkingOutline_active__-66iV","bloom":"ThinkingOutline_bloom__XKYD5"};
|
|
3
|
+
var css_248z = "@property --promptGlowAngle{syntax:\"<angle>\";inherits:true;initial-value:0deg}.ThinkingOutline_root__rvvBG{animation:ThinkingOutline_orbitGlow__3bK-F 3.5s linear infinite;animation-play-state:paused;border-radius:inherit;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .5s ease-out}.ThinkingOutline_root__rvvBG.ThinkingOutline_interactive__3jMCg{pointer-events:auto}.ThinkingOutline_root__rvvBG.ThinkingOutline_active__-66iV,.ThinkingOutline_root__rvvBG:hover{animation-play-state:running;opacity:1}.ThinkingOutline_root__rvvBG:before{background:conic-gradient(from var(--promptGlowAngle),var(--active-color) 0deg,var(--active-color-alpha-300) 48deg,transparent 80deg,transparent 100deg,var(--active-color-alpha-300) 132deg,var(--active-color) 180deg,var(--active-color-alpha-300) 228deg,transparent 260deg,transparent 280deg,var(--active-color-alpha-300) 312deg,var(--active-color) 1turn);border-radius:inherit;content:\"\";inset:0;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1.5px;position:absolute}.ThinkingOutline_bloom__XKYD5{border-radius:inherit;filter:blur(20px);inset:0;opacity:.55;position:absolute}.ThinkingOutline_bloom__XKYD5:before{background:conic-gradient(from var(--promptGlowAngle),var(--active-color) 0deg,var(--active-color-alpha-300) 48deg,transparent 80deg,transparent 100deg,var(--active-color-alpha-300) 132deg,var(--active-color) 180deg,var(--active-color-alpha-300) 228deg,transparent 260deg,transparent 280deg,var(--active-color-alpha-300) 312deg,var(--active-color) 1turn);border-radius:inherit;content:\"\";inset:0;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:6px;position:absolute}@media (prefers-reduced-motion:reduce){.ThinkingOutline_root__rvvBG{animation:none}}@keyframes ThinkingOutline_orbitGlow__3bK-F{0%{--promptGlowAngle:-30deg}25%{--promptGlowAngle:30deg}50%{--promptGlowAngle:150deg}75%{--promptGlowAngle:210deg}to{--promptGlowAngle:330deg}}";
|
|
4
|
+
var S = {"root":"ThinkingOutline_root__rvvBG","orbitGlow":"ThinkingOutline_orbitGlow__3bK-F","interactive":"ThinkingOutline_interactive__3jMCg","active":"ThinkingOutline_active__-66iV","bloom":"ThinkingOutline_bloom__XKYD5"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FormattedTextProps } from './FormattedText.types';
|
|
3
|
+
export declare function hrefForFormattedLink(url: string): string;
|
|
3
4
|
export declare function FormattedText({ text, className, onButtonClick, }: FormattedTextProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Props as ScrollProps } from '../Scroll/Scroll.types';
|
|
3
|
+
import { Size } from '../../types';
|
|
4
4
|
export interface MenuProps extends ScrollProps {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
className?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type ThinkingOutlineProps = {
|
|
2
|
+
/** When omitted, hover on the outline drives the glow. */
|
|
2
3
|
active?: boolean;
|
|
3
4
|
className?: string;
|
|
4
5
|
};
|
|
5
|
-
export declare function ThinkingOutline({ active, className
|
|
6
|
+
export declare function ThinkingOutline({ active, className }: ThinkingOutlineProps): import("react").JSX.Element;
|