Compare commits

...
2 Commits
Author SHA1 Message Date
Lotus CIandClaude Opus 5.5 e06600afe1 fix(a11y): Escape no longer yanks focus into the composer (#187 DP9)
CI / Build & Quality Checks (push) Successful in 6m18s
CI / Docker image build & smoke test (push) Skipped
CI / Secret scan (gitleaks) (push) Successful in 10s
CI / Trigger Desktop Build (push) Successful in 10s
CI / Playwright smoke (e2e) (push) Canceled after 14m59s
RoomView focuses the composer on any "typing" key pressed while nothing
editable has focus, and Escape counted as typing. Closing the GIF picker
with Esc (its focus trap returns focus to the GIF button) therefore
landed in the composer instead, and so did Esc on any other room control.
Escape, CapsLock, Insert, ContextMenu, PrintScreen and Pause are now
excluded like the other non-typing keys.

Verified at 1300 px and 320 px: Esc closes the picker and focus is back
on "Insert GIF"; the 320 px picker fits with no page overflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-24 11:02:46 -04:00
Lotus CIandClaude Opus 5.5 f3722ae859 refactor(types): drop 127 unnecessary as any casts (#210)
Removed every `as any` in src/, then restored only the ones tsc still
needs: 163 → 36. 112 were in lotus-terminal.css.ts (`'… !important' as
any` etc. — vanilla-extract's style types accept these strings as-is),
so its file-wide eslint-disable goes too. The casts were type-only, so
emitted code and generated CSS are unchanged.

eslint warnings 49 → 46; the ratchet is tightened to match.
tsc clean; 1202 unit tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-23 23:32:42 -04:00
10 changed files with 138 additions and 143 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
"build": "vite build",
"preview": "vite preview",
"lint": "npm run check:eslint && npm run check:prettier",
"check:eslint": "eslint src/* --max-warnings 49",
"check:eslint": "eslint src/* --max-warnings 46",
"check:prettier": "prettier --check .",
"fix:prettier": "prettier --write .",
"typecheck": "tsc --noEmit",
@@ -43,7 +43,7 @@ function computePollState(
const validIds = new Set(parsed.answers.map((a) => a.id));
const getRels = (type: string): MatrixEvent[] =>
relations.getChildEventsForEvent(eventId, 'm.reference', type as any)?.getRelations() ?? [];
relations.getChildEventsForEvent(eventId, 'm.reference', type)?.getRelations() ?? [];
const endEvents = [...getRels('m.poll.end'), ...getRels('org.matrix.msc3381.poll.end')];
const respEvents = [
@@ -127,18 +127,10 @@ export function PollContent({
if (!eventId || !parsed) return undefined;
const relations = room.getUnfilteredTimelineSet().relations;
const relObjs = [
relations.getChildEventsForEvent(eventId, 'm.reference', 'm.poll.response' as any),
relations.getChildEventsForEvent(
eventId,
'm.reference',
'org.matrix.msc3381.poll.response' as any,
),
relations.getChildEventsForEvent(eventId, 'm.reference', 'm.poll.end' as any),
relations.getChildEventsForEvent(
eventId,
'm.reference',
'org.matrix.msc3381.poll.end' as any,
),
relations.getChildEventsForEvent(eventId, 'm.reference', 'm.poll.response'),
relations.getChildEventsForEvent(eventId, 'm.reference', 'org.matrix.msc3381.poll.response'),
relations.getChildEventsForEvent(eventId, 'm.reference', 'm.poll.end'),
relations.getChildEventsForEvent(eventId, 'm.reference', 'org.matrix.msc3381.poll.end'),
];
relObjs.forEach((r) => {
r?.on(RelationsEvent.Add, refresh);
+1 -1
View File
@@ -330,7 +330,7 @@ function AddSpaceButton({ item }: { item: HierarchyItem }) {
};
const handleCreateSpace = () => {
openCreateSpaceModal(item.roomId as any);
openCreateSpaceModal(item.roomId);
setCords(undefined);
};
@@ -174,8 +174,7 @@ export const useMessageSearch = (params: MessageSearchParams) => {
// date range is instead enforced client-side (see filterGroupsByDateRange).
// contains_url is a valid spec field not yet in SDK types.
...(containsUrl !== undefined && { contains_url: containsUrl }),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
},
include_state: false,
order_by: order as SearchOrderBy.Recent,
search_term: term,
+11 -1
View File
@@ -51,7 +51,17 @@ const shouldFocusMessageField = (evt: KeyboardEvent): boolean => {
code === 'Space' ||
code === 'Enter' ||
code === 'NumLock' ||
code === 'ScrollLock'
code === 'ScrollLock' ||
// Not typing: Escape in particular dismisses popouts, and a focus-trap
// hands focus back to the opener on Escape. Treating it as "start typing"
// yanked focus into the composer instead (#187 DP9: closing the GIF picker
// with Esc left focus in the composer, not on the GIF button).
code === 'Escape' ||
code === 'CapsLock' ||
code === 'Insert' ||
code === 'ContextMenu' ||
code === 'PrintScreen' ||
code === 'Pause'
) {
return false;
}
@@ -361,12 +361,9 @@ export function ForwardMessageDialog({ mEvent, onClose }: Props) {
// failed) doesn't post the comment twice — only the missing forward.
const needsComment = commentBody && !commentSentRef.current.has(id);
const step = needsComment
? mx
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.sendMessage(id, null, { msgtype: MsgType.Text, body: commentBody } as any)
.then(() => {
commentSentRef.current.add(id);
})
? mx.sendMessage(id, null, { msgtype: MsgType.Text, body: commentBody }).then(() => {
commentSentRef.current.add(id);
})
: Promise.resolve();
return step.then(sendForward);
};
+2 -4
View File
@@ -1283,8 +1283,7 @@ export const Message = React.memo(
after={<Icon size="100" src={Icons.Send} />}
radii="300"
onClick={() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(mx as any).resendEvent(mEvent, room);
mx.resendEvent(mEvent, room);
closeMenu();
}}
>
@@ -1297,8 +1296,7 @@ export const Message = React.memo(
after={<Icon size="100" src={Icons.Cross} />}
radii="300"
onClick={() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(mx as any).cancelPendingEvent(mEvent);
mx.cancelPendingEvent(mEvent);
closeMenu();
}}
>
+1 -1
View File
@@ -291,7 +291,7 @@ export function ClientRoot({ children }: ClientRootProps) {
Failed to sync with your homeserver. Check your connection and try again.
</Text>
)}
{('error' in loadState ? (loadState as any).error?.message : undefined) !==
{('error' in loadState ? loadState.error?.message : undefined) !==
IDB_VERSION_CONFLICT && (
<Button variant="Critical" onClick={mx ? () => startMatrix(mx) : loadMatrix}>
<Text as="span" size="B400">
+1 -1
View File
@@ -658,7 +658,7 @@ export const getReactCustomHtmlParser = (
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') params.handleSpoilerClick?.(e as any);
if (e.key === 'Enter' || e.key === ' ') params.handleSpoilerClick?.(e);
}}
onClick={params.handleSpoilerClick}
className={css.Spoiler()}
+112 -113
View File
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { globalStyle, keyframes, style } from '@vanilla-extract/css';
const glitch1 = keyframes({
@@ -91,7 +90,7 @@ export const lotusTerminalBodyClass = style({
'--bg-surface-active': 'rgba(0,212,255,0.12)',
'--bg-surface-border': 'rgba(0,212,255,0.20)',
'--text-primary': '#c4d9ee',
} as any,
},
});
// Font on all descendants
@@ -131,7 +130,7 @@ globalStyle(`body.${lotusTerminalBodyClass} .lt-glitch`, { position: 'relative'
globalStyle(
`body.${lotusTerminalBodyClass} .lt-glitch::before, body.${lotusTerminalBodyClass} .lt-glitch::after`,
{
content: 'attr(data-text)' as any,
content: 'attr(data-text)',
position: 'absolute',
top: 0,
left: 0,
@@ -448,7 +447,7 @@ globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass}`, {
'--bg-surface-active': 'rgba(0,98,184,0.10)',
'--bg-surface-border': 'rgba(0,98,184,0.22)',
'--text-primary': '#111827',
} as any,
},
});
// Scanlines + vignette: OFF in light mode (base.css:3676-3678)
@@ -657,28 +656,28 @@ globalStyle(
`body.${lotusTerminalBodyClass} [data-gif-terminal] input,` +
`body.${lotusTerminalBodyClass} [data-gif-terminal] form`,
{
background: '#030c14 !important' as any,
color: '#e8edf5 !important' as any,
fontFamily: "'JetBrains Mono','Cascadia Code','Fira Code',monospace !important" as any,
border: '1px solid rgba(255,107,0,0.35) !important' as any,
borderRadius: '4px !important' as any,
fontSize: '12px !important' as any,
boxShadow: 'none !important' as any,
background: '#030c14 !important',
color: '#e8edf5 !important',
fontFamily: "'JetBrains Mono','Cascadia Code','Fira Code',monospace !important",
border: '1px solid rgba(255,107,0,0.35) !important',
borderRadius: '4px !important',
fontSize: '12px !important',
boxShadow: 'none !important',
},
);
globalStyle(`body.${lotusTerminalBodyClass} [data-gif-terminal] input:focus`, {
borderColor: 'rgba(255,107,0,0.70) !important' as any,
boxShadow: '0 0 0 2px rgba(255,107,0,0.12) !important' as any,
outline: 'none !important' as any,
borderColor: 'rgba(255,107,0,0.70) !important',
boxShadow: '0 0 0 2px rgba(255,107,0,0.12) !important',
outline: 'none !important',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-gif-terminal] input::placeholder`, {
color: 'rgba(255,107,0,0.40) !important' as any,
color: 'rgba(255,107,0,0.40) !important',
});
globalStyle(
`body.${lotusTerminalBodyClass} [data-gif-terminal] svg,` +
`body.${lotusTerminalBodyClass} [data-gif-terminal] button[type="reset"]`,
{
display: 'none !important' as any,
display: 'none !important',
},
);
globalStyle(`body.${lotusTerminalBodyClass} [data-gif-terminal] ::-webkit-scrollbar`, {
@@ -701,10 +700,10 @@ globalStyle(`body.${lotusTerminalBodyClass} [data-url-preview]`, {
color: '#e8edf5',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-url-preview] a`, {
color: 'rgba(0,212,255,0.85) !important' as any,
color: 'rgba(0,212,255,0.85) !important',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-url-preview] a:hover`, {
color: 'rgba(255,107,0,0.90) !important' as any,
color: 'rgba(255,107,0,0.90) !important',
textShadow: '0 0 6px rgba(255,107,0,0.30)',
});
// light TDS
@@ -715,7 +714,7 @@ globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-url-p
color: '#2d3d56',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-url-preview] a`, {
color: '#0062b8 !important' as any,
color: '#0062b8 !important',
});
// ── GIF picker light TDS (dark-mode rules already exist via [data-gif-terminal]) ──
@@ -723,33 +722,33 @@ globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-gif-terminal] input,` +
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-gif-terminal] form`,
{
background: '#f4f6fa !important' as any,
color: '#111827 !important' as any,
border: '1px solid rgba(196,78,0,0.28) !important' as any,
fontFamily: "'JetBrains Mono','Cascadia Code','Fira Code',monospace !important" as any,
fontSize: '12px !important' as any,
boxShadow: 'none !important' as any,
background: '#f4f6fa !important',
color: '#111827 !important',
border: '1px solid rgba(196,78,0,0.28) !important',
fontFamily: "'JetBrains Mono','Cascadia Code','Fira Code',monospace !important",
fontSize: '12px !important',
boxShadow: 'none !important',
},
);
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-gif-terminal] input:focus`,
{
borderColor: 'rgba(196,78,0,0.60) !important' as any,
boxShadow: '0 0 0 2px rgba(196,78,0,0.12) !important' as any,
outline: 'none !important' as any,
borderColor: 'rgba(196,78,0,0.60) !important',
boxShadow: '0 0 0 2px rgba(196,78,0,0.12) !important',
outline: 'none !important',
},
);
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-gif-terminal] input::placeholder`,
{
color: 'rgba(196,78,0,0.45) !important' as any,
color: 'rgba(196,78,0,0.45) !important',
},
);
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-gif-terminal] svg,` +
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-gif-terminal] button[type="reset"]`,
{
display: 'none !important' as any,
display: 'none !important',
},
);
globalStyle(
@@ -768,197 +767,197 @@ globalStyle(
// ── Tooltip TDS ──────────────────────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} ._6plmi2g > div`, {
background: '#060c14 !important' as any,
border: '1px solid rgba(0,212,255,0.30) !important' as any,
color: '#b0cbe8 !important' as any,
fontFamily: "'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace !important" as any,
fontSize: '11px !important' as any,
borderRadius: '4px !important' as any,
boxShadow: '0 4px 12px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,212,255,0.08) !important' as any,
background: '#060c14 !important',
border: '1px solid rgba(0,212,255,0.30) !important',
color: '#b0cbe8 !important',
fontFamily: "'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace !important",
fontSize: '11px !important',
borderRadius: '4px !important',
boxShadow: '0 4px 12px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,212,255,0.08) !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} ._6plmi2g > div`, {
background: '#f0f4fc !important' as any,
border: '1px solid rgba(0,98,184,0.30) !important' as any,
color: '#2d3d56 !important' as any,
background: '#f0f4fc !important',
border: '1px solid rgba(0,98,184,0.30) !important',
color: '#2d3d56 !important',
});
// ── Switch toggle TDS ─────────────────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} [role="switch"]`, {
background: 'rgba(0,212,255,0.12) !important' as any,
border: '1px solid rgba(0,212,255,0.30) !important' as any,
borderRadius: '99px !important' as any,
background: 'rgba(0,212,255,0.12) !important',
border: '1px solid rgba(0,212,255,0.30) !important',
borderRadius: '99px !important',
transition: 'background 0.2s, border-color 0.2s',
});
globalStyle(`body.${lotusTerminalBodyClass} [role="switch"][aria-checked="true"]`, {
background: 'rgba(255,107,0,0.22) !important' as any,
borderColor: 'rgba(255,107,0,0.60) !important' as any,
boxShadow: '0 0 8px rgba(255,107,0,0.20) !important' as any,
background: 'rgba(255,107,0,0.22) !important',
borderColor: 'rgba(255,107,0,0.60) !important',
boxShadow: '0 0 8px rgba(255,107,0,0.20) !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} [role="switch"]`, {
background: 'rgba(0,98,184,0.10) !important' as any,
borderColor: 'rgba(0,98,184,0.35) !important' as any,
background: 'rgba(0,98,184,0.10) !important',
borderColor: 'rgba(0,98,184,0.35) !important',
});
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [role="switch"][aria-checked="true"]`,
{
background: 'rgba(196,78,0,0.18) !important' as any,
borderColor: 'rgba(196,78,0,0.55) !important' as any,
background: 'rgba(196,78,0,0.18) !important',
borderColor: 'rgba(196,78,0,0.55) !important',
},
);
// ── Spinner TDS ───────────────────────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} ._31czpko`, {
stroke: 'rgba(0,212,255,0.20) !important' as any,
stroke: 'rgba(0,212,255,0.20) !important',
});
globalStyle(`body.${lotusTerminalBodyClass} ._31czpkp`, {
stroke: 'rgba(255,107,0,0.85) !important' as any,
stroke: 'rgba(255,107,0,0.85) !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} ._31czpko`, {
stroke: 'rgba(0,98,184,0.20) !important' as any,
stroke: 'rgba(0,98,184,0.20) !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} ._31czpkp`, {
stroke: 'rgba(196,78,0,0.85) !important' as any,
stroke: 'rgba(196,78,0,0.85) !important',
});
// ── EmojiBoard TDS ────────────────────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} [data-emoji-board]`, {
background: '#060c14 !important' as any,
border: '1px solid rgba(0,212,255,0.20) !important' as any,
borderRadius: '4px !important' as any,
boxShadow: '0 8px 32px rgba(0,0,0,0.75), 0 0 0 1px rgba(0,212,255,0.08) !important' as any,
color: '#b0cbe8 !important' as any,
background: '#060c14 !important',
border: '1px solid rgba(0,212,255,0.20) !important',
borderRadius: '4px !important',
boxShadow: '0 8px 32px rgba(0,0,0,0.75), 0 0 0 1px rgba(0,212,255,0.08) !important',
color: '#b0cbe8 !important',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-emoji-board] input`, {
background: 'rgba(0,212,255,0.06) !important' as any,
border: '1px solid rgba(0,212,255,0.22) !important' as any,
color: '#b0cbe8 !important' as any,
fontFamily: "'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace !important" as any,
borderRadius: '4px !important' as any,
background: 'rgba(0,212,255,0.06) !important',
border: '1px solid rgba(0,212,255,0.22) !important',
color: '#b0cbe8 !important',
fontFamily: "'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace !important",
borderRadius: '4px !important',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-emoji-board] input:focus`, {
borderColor: 'rgba(255,107,0,0.60) !important' as any,
boxShadow: '0 0 0 2px rgba(255,107,0,0.12) !important' as any,
outline: 'none !important' as any,
borderColor: 'rgba(255,107,0,0.60) !important',
boxShadow: '0 0 0 2px rgba(255,107,0,0.12) !important',
outline: 'none !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-emoji-board]`, {
background: '#f0f4fc !important' as any,
border: '1px solid rgba(0,98,184,0.22) !important' as any,
color: '#2d3d56 !important' as any,
background: '#f0f4fc !important',
border: '1px solid rgba(0,98,184,0.22) !important',
color: '#2d3d56 !important',
});
// ── PopOut / Menu / floating panels TDS ──────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} ._1v6ozra1`, {
background: '#060c14 !important' as any,
border: '1px solid rgba(0,212,255,0.22) !important' as any,
borderRadius: '6px !important' as any,
boxShadow: '0 8px 32px rgba(0,0,0,0.80), 0 0 0 1px rgba(0,212,255,0.06) !important' as any,
color: '#b0cbe8 !important' as any,
background: '#060c14 !important',
border: '1px solid rgba(0,212,255,0.22) !important',
borderRadius: '6px !important',
boxShadow: '0 8px 32px rgba(0,0,0,0.80), 0 0 0 1px rgba(0,212,255,0.06) !important',
color: '#b0cbe8 !important',
});
globalStyle(`body.${lotusTerminalBodyClass} ._1fptcza0`, {
background: 'transparent !important' as any,
background: 'transparent !important',
});
globalStyle(`body.${lotusTerminalBodyClass} ._13tt0gb6`, {
color: '#b0cbe8 !important' as any,
borderRadius: '3px !important' as any,
color: '#b0cbe8 !important',
borderRadius: '3px !important',
});
globalStyle(`body.${lotusTerminalBodyClass} ._13tt0gb6:hover`, {
background: 'rgba(0,212,255,0.08) !important' as any,
color: '#00d4ff !important' as any,
background: 'rgba(0,212,255,0.08) !important',
color: '#00d4ff !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} ._1v6ozra1`, {
background: '#f0f4fc !important' as any,
border: '1px solid rgba(0,98,184,0.22) !important' as any,
boxShadow: '0 8px 32px rgba(0,0,0,0.15) !important' as any,
color: '#2d3d56 !important' as any,
background: '#f0f4fc !important',
border: '1px solid rgba(0,98,184,0.22) !important',
boxShadow: '0 8px 32px rgba(0,0,0,0.15) !important',
color: '#2d3d56 !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} ._13tt0gb6`, {
color: '#2d3d56 !important' as any,
color: '#2d3d56 !important',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} ._13tt0gb6:hover`, {
background: 'rgba(0,98,184,0.08) !important' as any,
color: '#0062b8 !important' as any,
background: 'rgba(0,98,184,0.08) !important',
color: '#0062b8 !important',
});
// ── Poll card TDS ─────────────────────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} [data-poll-content] [data-poll-answer]`, {
background: 'rgba(0,212,255,0.04) !important' as any,
border: '1px solid rgba(0,212,255,0.22) !important' as any,
color: '#c4d9ee !important' as any,
background: 'rgba(0,212,255,0.04) !important',
border: '1px solid rgba(0,212,255,0.22) !important',
color: '#c4d9ee !important',
transition: 'border-color 0.15s, background 0.15s, box-shadow 0.15s',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-poll-content] [data-poll-answer]:hover`, {
background: 'rgba(0,212,255,0.08) !important' as any,
borderColor: 'rgba(0,212,255,0.40) !important' as any,
background: 'rgba(0,212,255,0.08) !important',
borderColor: 'rgba(0,212,255,0.40) !important',
boxShadow: '0 0 8px rgba(0,212,255,0.08)',
});
globalStyle(
`body.${lotusTerminalBodyClass} [data-poll-content] [data-poll-answer][data-selected="true"]`,
{
background: 'rgba(255,107,0,0.10) !important' as any,
border: '1px solid rgba(255,107,0,0.55) !important' as any,
background: 'rgba(255,107,0,0.10) !important',
border: '1px solid rgba(255,107,0,0.55) !important',
boxShadow: '0 0 10px rgba(255,107,0,0.10)',
},
);
globalStyle(`body.${lotusTerminalBodyClass} [data-poll-content] [data-poll-content-label]`, {
color: 'rgba(0,212,255,0.60) !important' as any,
opacity: '1 !important' as any,
color: 'rgba(0,212,255,0.60) !important',
opacity: '1 !important',
textShadow: '0 0 8px rgba(0,212,255,0.25)',
});
// light TDS
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-poll-content] [data-poll-answer]`,
{
background: 'rgba(0,98,184,0.04) !important' as any,
border: '1px solid rgba(0,98,184,0.22) !important' as any,
color: '#111827 !important' as any,
background: 'rgba(0,98,184,0.04) !important',
border: '1px solid rgba(0,98,184,0.22) !important',
color: '#111827 !important',
},
);
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-poll-content] [data-poll-answer][data-selected="true"]`,
{
background: 'rgba(196,78,0,0.08) !important' as any,
border: '1px solid rgba(196,78,0,0.50) !important' as any,
background: 'rgba(196,78,0,0.08) !important',
border: '1px solid rgba(196,78,0,0.50) !important',
},
);
// ── Voice recorder TDS ───────────────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} [data-voice-recorder="recording"]`, {
background: 'rgba(0,212,255,0.05) !important' as any,
border: '1px solid rgba(0,212,255,0.22) !important' as any,
background: 'rgba(0,212,255,0.05) !important',
border: '1px solid rgba(0,212,255,0.22) !important',
borderRadius: '6px',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-voice-rec-dot]`, {
background: '#00FF88 !important' as any,
background: '#00FF88 !important',
boxShadow: '0 0 6px rgba(0,255,136,0.55)',
});
globalStyle(`body.${lotusTerminalBodyClass} [data-voice-waveform] > div`, {
background: '#00D4FF !important' as any,
background: '#00D4FF !important',
});
// light TDS
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-voice-recorder="recording"]`,
{
background: 'rgba(0,98,184,0.05) !important' as any,
border: '1px solid rgba(0,98,184,0.22) !important' as any,
background: 'rgba(0,98,184,0.05) !important',
border: '1px solid rgba(0,98,184,0.22) !important',
},
);
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-voice-rec-dot]`, {
background: '#006d35 !important' as any,
background: '#006d35 !important',
boxShadow: 'none',
});
globalStyle(`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-voice-waveform] > div`, {
background: '#0062b8 !important' as any,
background: '#0062b8 !important',
});
// ── Caption input TDS focus ring ──────────────────────────────────────────────
globalStyle(`body.${lotusTerminalBodyClass} [data-caption-input]:focus-visible`, {
borderColor: 'rgba(255,107,0,0.65) !important' as any,
boxShadow: '0 0 0 2px rgba(255,107,0,0.14), 0 0 6px rgba(255,107,0,0.10) !important' as any,
borderColor: 'rgba(255,107,0,0.65) !important',
boxShadow: '0 0 0 2px rgba(255,107,0,0.14), 0 0 6px rgba(255,107,0,0.10) !important',
});
globalStyle(
`html[data-theme="light"] body.${lotusTerminalBodyClass} [data-caption-input]:focus-visible`,
{
borderColor: 'rgba(196,78,0,0.60) !important' as any,
boxShadow: '0 0 0 2px rgba(196,78,0,0.12) !important' as any,
borderColor: 'rgba(196,78,0,0.60) !important',
boxShadow: '0 0 0 2px rgba(196,78,0,0.12) !important',
},
);