Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Merge branch 'main' into update-assistant-styles
Nate Butler4029481fd012
diff --cc styles/src/style_tree/assistant.tsindex 3205268f531,6df02a0e330..adec3dee62d--- a/styles/src/style_tree/assistant.ts+++ b/styles/src/style_tree/assistant.ts@@@ -1,62 -1,10 +1,59 @@@- import { ColorScheme, StyleSets } from "../theme/color_scheme"-import { text, border, background, foreground } from "./components"-import { interactive } from "../element"-import { useTheme } from "../theme"+import { text, border, background, foreground, TextStyle } from "./components"+import { Interactive, interactive } from "../element"+import { tab_bar_button } from "../component/tab_bar_button"-- interface ToolbarButtonOptions {- icon: string- }++import { StyleSets, useTheme } from "../theme"++type RoleCycleButton = TextStyle & {+ background?: string+}+// TODO: Replace these with zed types+type RemainingTokens = TextStyle & {+ background: string,+ margin: { top: number, right: number },+ padding: {+ right: number,+ left: number,+ top: number,+ bottom: number,+ },+ corner_radius: number,+}- export default function assistant(theme: ColorScheme): any {+ export default function assistant(): any {+ const theme = useTheme()+ const interactive_role = (color: StyleSets): Interactive<RoleCycleButton> => {+ return (+ interactive({+ base: {+ ...text(theme.highest, "sans", color, { size: "sm" }),+ },+ state: {+ hovered: {+ ...text(theme.highest, "sans", color, { size: "sm" }),+ background: background(theme.highest, color, "hovered"),+ },+ clicked: {+ ...text(theme.highest, "sans", color, { size: "sm" }),+ background: background(theme.highest, color, "pressed"),+ }+ },+ })+ )+ }++ const tokens_remaining = (color: StyleSets): RemainingTokens => {+ return (+ {+ ...text(theme.highest, "mono", color, { size: "xs" }),+ background: background(theme.highest, "on", "default"),+ margin: { top: 12, right: 8 },+ padding: { right: 4, left: 4, top: 1, bottom: 1 },+ corner_radius: 6,+ }+ )+ }+return {container: {background: background(theme.highest),