Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
WIP convert to `snake_case`
Nate Butler2e162f8af7e5
diff --git a/styles/mod.py b/styles/mod.pynew file mode 100644index 00000000000..77238e5b454--- /dev/null+++ b/styles/mod.py@@ -0,0 +1,42 @@+import os, sys, re+++def camel_to_snake(inputstring):+ REG = r'(?<!^)(?=[A-Z])'+ return re.sub(REG, '_', inputstring).lower()+++def change_case(mypath):+ if os.path.isabs(mypath):+ raise ValueError+ else:+ abs_path_to_dir = os.path.normpath(os.path.join(os.path.dirname(__file__), mypath))+ with os.scandir(abs_path_to_dir) as iter:+ dirs = []+ typescriptfiles = []+ for entry in iter:+ if (entry.is_dir() and entry.name not in ["node_modules", "target"]):+ dirs.append(entry.name)+ if (entry.is_file() and entry.name.endswith('.ts')):+ typescriptfiles.append(entry.name)+ if len(dirs) != 0:+ for dir in dirs:+ change_case(os.path.normpath(os.path.join(mypath,dir)))+ for entry in typescriptfiles:+ relative_path = os.path.normpath(os.path.join(mypath,entry))+ dst = camel_to_snake(relative_path)+ abs_path = os.path.normpath(os.path.join(os.path.dirname(__file__), relative_path))+ abs_dst = os.path.normpath(os.path.join(os.path.dirname(__file__), dst))+ (head, tail) = os.path.split(abs_dst)+ if not os.path.exists(head):+ os.makedirs(head)+ os.rename(abs_path, abs_dst)++def main():+ dir = os.path.dirname(__file__)+ path = sys.argv[1]+ change_case(path)+++if __name__ == '__main__':+ main()diff --git a/styles/package.json b/styles/package.jsonindex e21840e613c..06621e8cc1a 100644--- a/styles/package.json+++ b/styles/package.json@@ -4,10 +4,10 @@"description": "","main": "index.js","scripts": {- "build": "ts-node ./src/buildThemes.ts",- "build-licenses": "ts-node ./src/buildLicenses.ts",- "build-tokens": "ts-node ./src/buildTokens.ts",- "build-types": "ts-node ./src/buildTypes.ts",+ "build": "ts-node ./src/build_themes.ts",+ "build-licenses": "ts-node ./src/build_licenses.ts",+ "build-tokens": "ts-node ./src/build_tokens.ts",+ "build-types": "ts-node ./src/build_types.ts","test": "vitest"},"author": "",diff --git a/styles/src/buildLicenses.ts b/styles/src/build_licenses.tssimilarity index 100%rename from styles/src/buildLicenses.tsrename to styles/src/build_licenses.tsdiff --git a/styles/src/buildThemes.ts b/styles/src/build_themes.tssimilarity index 90%rename from styles/src/buildThemes.tsrename to styles/src/build_themes.tsindex 7d831ee42ed..3ce1688152b 100644--- a/styles/src/buildThemes.ts+++ b/styles/src/build_themes.ts@@ -1,9 +1,9 @@import * as fs from "fs"import { tmpdir } from "os"import * as path from "path"-import app from "./styleTree/app"-import { ColorScheme, createColorScheme } from "./theme/colorScheme"-import snakeCase from "./utils/snakeCase"+import app from "./style_tree/app"+import { ColorScheme, createColorScheme } from "./theme/color_scheme"+import snakeCase from "./utils/snake_case"import { themes } from "./themes"const assetsDirectory = `${__dirname}/../../assets`diff --git a/styles/src/buildTokens.ts b/styles/src/build_tokens.tssimilarity index 92%rename from styles/src/buildTokens.tsrename to styles/src/build_tokens.tsindex 6c6acd2f227..e1878efed72 100644--- a/styles/src/buildTokens.ts+++ b/styles/src/build_tokens.ts@@ -3,7 +3,7 @@ import * as path from "path"import { ColorScheme, createColorScheme } from "./common"import { themes } from "./themes"import { slugify } from "./utils/slugify"-import { colorSchemeTokens } from "./theme/tokens/colorScheme"+import { colorSchemeTokens } from "./theme/tokens/color_scheme"const TOKENS_DIRECTORY = path.join(__dirname, "..", "target", "tokens")const TOKENS_FILE = path.join(TOKENS_DIRECTORY, "$themes.json")@@ -38,7 +38,7 @@ function buildTokenSetOrder(colorSchemes: ColorScheme[]): {function buildThemesIndex(colorSchemes: ColorScheme[]): TokenSet[] {const themesIndex: TokenSet[] = colorSchemes.map((scheme, index) => {- const id = `${scheme.isLight ? "light" : "dark"}_${scheme.name+ const id = `${scheme.is_light ? "light" : "dark"}_${scheme.name.toLowerCase().replace(/\s+/g, "_")}_${index}`const selectedTokenSets: { [key: string]: "enabled" } = {}@@ -47,7 +47,7 @@ function buildThemesIndex(colorSchemes: ColorScheme[]): TokenSet[] {return {id,- name: `${scheme.name} - ${scheme.isLight ? "Light" : "Dark"}`,+ name: `${scheme.name} - ${scheme.is_light ? "Light" : "Dark"}`,selectedTokenSets,}})diff --git a/styles/src/buildTypes.ts b/styles/src/build_types.tssimilarity index 95%rename from styles/src/buildTypes.tsrename to styles/src/build_types.tsindex cd788c540ed..5957ae5076a 100644--- a/styles/src/buildTypes.ts+++ b/styles/src/build_types.ts@@ -43,7 +43,6 @@ async function main() {return}} catch (e) {- // @ts-expect-error - It's fine if there's no output from a previous run.if (e.code !== "ENOENT") {throw e}diff --git a/styles/src/component/icon_button.ts b/styles/src/component/icon_button.tsindex 39c1adb5e50..4664928d555 100644--- a/styles/src/component/icon_button.ts+++ b/styles/src/component/icon_button.ts@@ -1,6 +1,6 @@-import { ColorScheme } from "../common"import { interactive, toggleable } from "../element"-import { background, foreground } from "../styleTree/components"+import { background, foreground } from "../style_tree/components"+import { ColorScheme } from "../theme/color_scheme"export type Margin = {top: number@@ -11,9 +11,9 @@ export type Margin = {interface IconButtonOptions {layer?:- | ColorScheme["lowest"]- | ColorScheme["middle"]- | ColorScheme["highest"]+ | ColorScheme["lowest"]+ | ColorScheme["middle"]+ | ColorScheme["highest"]color?: keyof ColorScheme["lowest"]margin?: Partial<Margin>}diff --git a/styles/src/component/text_button.ts b/styles/src/component/text_button.tsindex b8a2272cd34..64a91de7b04 100644--- a/styles/src/component/text_button.ts+++ b/styles/src/component/text_button.ts@@ -1,18 +1,18 @@-import { ColorScheme } from "../common"import { interactive, toggleable } from "../element"import {TextProperties,background,foreground,text,-} from "../styleTree/components"+} from "../style_tree/components"+import { ColorScheme } from "../theme/color_scheme"import { Margin } from "./icon_button"interface TextButtonOptions {layer?:- | ColorScheme["lowest"]- | ColorScheme["middle"]- | ColorScheme["highest"]+ | ColorScheme["lowest"]+ | ColorScheme["middle"]+ | ColorScheme["highest"]color?: keyof ColorScheme["lowest"]margin?: Partial<Margin>text_properties?: TextPropertiesdiff --git a/styles/src/styleTree/app.ts b/styles/src/styleTree/app.tsdeleted file mode 100644index a8430028318..00000000000--- a/styles/src/styleTree/app.ts+++ /dev/null@@ -1,75 +0,0 @@-import contactFinder from "./contactFinder"-import contactsPopover from "./contactsPopover"-import commandPalette from "./commandPalette"-import editor from "./editor"-import projectPanel from "./projectPanel"-import search from "./search"-import picker from "./picker"-import workspace from "./workspace"-import contextMenu from "./contextMenu"-import sharedScreen from "./sharedScreen"-import projectDiagnostics from "./projectDiagnostics"-import contactNotification from "./contactNotification"-import updateNotification from "./updateNotification"-import simpleMessageNotification from "./simpleMessageNotification"-import projectSharedNotification from "./projectSharedNotification"-import tooltip from "./tooltip"-import terminal from "./terminal"-import contactList from "./contactList"-import toolbarDropdownMenu from "./toolbarDropdownMenu"-import incomingCallNotification from "./incomingCallNotification"-import { ColorScheme } from "../theme/colorScheme"-import feedback from "./feedback"-import welcome from "./welcome"-import copilot from "./copilot"-import assistant from "./assistant"-import { titlebar } from "./titlebar"--export default function app(colorScheme: ColorScheme): any {- return {- meta: {- name: colorScheme.name,- isLight: colorScheme.isLight,- },- commandPalette: commandPalette(colorScheme),- contactNotification: contactNotification(colorScheme),- projectSharedNotification: projectSharedNotification(colorScheme),- incomingCallNotification: incomingCallNotification(colorScheme),- picker: picker(colorScheme),- workspace: workspace(colorScheme),- titlebar: titlebar(colorScheme),- copilot: copilot(colorScheme),- welcome: welcome(colorScheme),- contextMenu: contextMenu(colorScheme),- editor: editor(colorScheme),- projectDiagnostics: projectDiagnostics(colorScheme),- projectPanel: projectPanel(colorScheme),- contactsPopover: contactsPopover(colorScheme),- contactFinder: contactFinder(colorScheme),- contactList: contactList(colorScheme),- toolbarDropdownMenu: toolbarDropdownMenu(colorScheme),- search: search(colorScheme),- sharedScreen: sharedScreen(colorScheme),- updateNotification: updateNotification(colorScheme),- simpleMessageNotification: simpleMessageNotification(colorScheme),- tooltip: tooltip(colorScheme),- terminal: terminal(colorScheme),- assistant: assistant(colorScheme),- feedback: feedback(colorScheme),- colorScheme: {- ...colorScheme,- players: Object.values(colorScheme.players),- ramps: {- neutral: colorScheme.ramps.neutral.colors(100, "hex"),- red: colorScheme.ramps.red.colors(100, "hex"),- orange: colorScheme.ramps.orange.colors(100, "hex"),- yellow: colorScheme.ramps.yellow.colors(100, "hex"),- green: colorScheme.ramps.green.colors(100, "hex"),- cyan: colorScheme.ramps.cyan.colors(100, "hex"),- blue: colorScheme.ramps.blue.colors(100, "hex"),- violet: colorScheme.ramps.violet.colors(100, "hex"),- magenta: colorScheme.ramps.magenta.colors(100, "hex"),- },- },- }-}diff --git a/styles/src/style_tree/app.ts b/styles/src/style_tree/app.tsnew file mode 100644index 00000000000..684614d073b--- /dev/null+++ b/styles/src/style_tree/app.ts@@ -0,0 +1,75 @@+import contact_finder from "./contact_finder"+import contacts_popover from "./contacts_popover"+import command_palette from "./command_palette"+import project_panel from "./project_panel"+import search from "./search"+import picker from "./picker"+import workspace from "./workspace"+import context_menu from "./context_menu"+import shared_screen from "./shared_screen"+import project_diagnostics from "./project_diagnostics"+import contact_notification from "./contact_notification"+import update_notification from "./update_notification"+import simple_message_notification from "./simple_message_notification"+import project_shared_notification from "./project_shared_notification"+import tooltip from "./tooltip"+import terminal from "./terminal"+import contact_list from "./contact_list"+import toolbar_dropdown_menu from "./toolbar_dropdown_menu"+import incoming_call_notification from "./incoming_call_notification"+import { ColorScheme } from "../theme/color_scheme"+import welcome from "./welcome"+import copilot from "./copilot"+import assistant from "./assistant"+import { titlebar } from "./titlebar"+import editor from "./editor"+import feedback from "./feedback"++export default function app(theme: ColorScheme): any {+ return {+ meta: {+ name: theme.name,+ is_light: theme.is_light,+ },+ command_palette: command_palette(theme),+ contact_notification: contact_notification(theme),+ project_shared_notification: project_shared_notification(theme),+ incoming_call_notification: incoming_call_notification(theme),+ picker: picker(theme),+ workspace: workspace(theme),+ titlebar: titlebar(theme),+ copilot: copilot(theme),+ welcome: welcome(theme),+ context_menu: context_menu(theme),+ editor: editor(theme),+ project_diagnostics: project_diagnostics(theme),+ project_panel: project_panel(theme),+ contacts_popover: contacts_popover(theme),+ contact_finder: contact_finder(theme),+ contact_list: contact_list(theme),+ toolbar_dropdown_menu: toolbar_dropdown_menu(theme),+ search: search(theme),+ shared_screen: shared_screen(theme),+ update_notification: update_notification(theme),+ simple_message_notification: simple_message_notification(theme),+ tooltip: tooltip(theme),+ terminal: terminal(theme),+ assistant: assistant(theme),+ feedback: feedback(theme),+ color_scheme: {+ ...theme,+ players: Object.values(theme.players),+ ramps: {+ neutral: theme.ramps.neutral.colors(100, "hex"),+ red: theme.ramps.red.colors(100, "hex"),+ orange: theme.ramps.orange.colors(100, "hex"),+ yellow: theme.ramps.yellow.colors(100, "hex"),+ green: theme.ramps.green.colors(100, "hex"),+ cyan: theme.ramps.cyan.colors(100, "hex"),+ blue: theme.ramps.blue.colors(100, "hex"),+ violet: theme.ramps.violet.colors(100, "hex"),+ magenta: theme.ramps.magenta.colors(100, "hex"),+ },+ },+ }+}diff --git a/styles/src/styleTree/assistant.ts b/styles/src/style_tree/assistant.tssimilarity index 99%rename from styles/src/styleTree/assistant.tsrename to styles/src/style_tree/assistant.tsindex f233f027864..7003e0765ce 100644--- a/styles/src/styleTree/assistant.ts+++ b/styles/src/style_tree/assistant.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { text, border, background, foreground } from "./components"import editor from "./editor"import { interactive } from "../element"diff --git a/styles/src/styleTree/commandPalette.ts b/styles/src/style_tree/command_palette.tssimilarity index 89%rename from styles/src/styleTree/commandPalette.tsrename to styles/src/style_tree/command_palette.tsindex 101f4d437e9..988a1c949bc 100644--- a/styles/src/styleTree/commandPalette.ts+++ b/styles/src/style_tree/command_palette.ts@@ -1,9 +1,9 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import { text, background } from "./components"import { toggleable } from "../element"-export default function commandPalette(colorScheme: ColorScheme): any {+export default function command_palette(colorScheme: ColorScheme): any {const layer = colorScheme.highestconst key = toggleable({diff --git a/styles/src/styleTree/components.ts b/styles/src/style_tree/components.tssimilarity index 99%rename from styles/src/styleTree/components.tsrename to styles/src/style_tree/components.tsindex 8db1fa4b2ef..6f69023d129 100644--- a/styles/src/styleTree/components.ts+++ b/styles/src/style_tree/components.ts@@ -1,5 +1,5 @@import { fontFamilies, fontSizes, FontWeight } from "../common"-import { Layer, Styles, StyleSets, Style } from "../theme/colorScheme"+import { Layer, Styles, StyleSets, Style } from "../theme/color_scheme"function isStyleSet(key: any): key is StyleSets {return [diff --git a/styles/src/styleTree/contactFinder.ts b/styles/src/style_tree/contact_finder.tssimilarity index 93%rename from styles/src/styleTree/contactFinder.tsrename to styles/src/style_tree/contact_finder.tsindex f0720d05888..239b4b5004e 100644--- a/styles/src/styleTree/contactFinder.ts+++ b/styles/src/style_tree/contact_finder.ts@@ -1,8 +1,8 @@import picker from "./picker"-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, foreground, text } from "./components"-export default function contactFinder(colorScheme: ColorScheme): any {+export default function contact_finder(colorScheme: ColorScheme): any {const layer = colorScheme.middleconst sideMargin = 6diff --git a/styles/src/styleTree/contactList.ts b/styles/src/style_tree/contact_list.tssimilarity index 98%rename from styles/src/styleTree/contactList.tsrename to styles/src/style_tree/contact_list.tsindex 9194e809ee3..fb6b665a143 100644--- a/styles/src/styleTree/contactList.ts+++ b/styles/src/style_tree/contact_list.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, borderColor, foreground, text } from "./components"import { interactive, toggleable } from "../element"-export default function contactsPanel(colorScheme: ColorScheme): any {+export default function contacts_panel(colorScheme: ColorScheme): any {const nameMargin = 8const sidePadding = 12diff --git a/styles/src/styleTree/contactNotification.ts b/styles/src/style_tree/contact_notification.tssimilarity index 91%rename from styles/src/styleTree/contactNotification.tsrename to styles/src/style_tree/contact_notification.tsindex 450f927535e..6ae2dc5d203 100644--- a/styles/src/styleTree/contactNotification.ts+++ b/styles/src/style_tree/contact_notification.ts@@ -1,10 +1,10 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, foreground, text } from "./components"import { interactive } from "../element"const avatarSize = 12const headerPadding = 8-export default function contactNotification(colorScheme: ColorScheme): any {+export default function contact_notification(colorScheme: ColorScheme): any {const layer = colorScheme.lowestreturn {headerAvatar: {diff --git a/styles/src/styleTree/contactsPopover.ts b/styles/src/style_tree/contacts_popover.tssimilarity index 72%rename from styles/src/styleTree/contactsPopover.tsrename to styles/src/style_tree/contacts_popover.tsindex 6d9f84322d6..0c9d1a47eb4 100644--- a/styles/src/styleTree/contactsPopover.ts+++ b/styles/src/style_tree/contacts_popover.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border } from "./components"-export default function contactsPopover(colorScheme: ColorScheme): any {+export default function contacts_popover(colorScheme: ColorScheme): any {const layer = colorScheme.middlereturn {background: background(layer),diff --git a/styles/src/styleTree/contextMenu.ts b/styles/src/style_tree/context_menu.tssimilarity index 94%rename from styles/src/styleTree/contextMenu.tsrename to styles/src/style_tree/context_menu.tsindex 1064eedd0dc..52795be7968 100644--- a/styles/src/styleTree/contextMenu.ts+++ b/styles/src/style_tree/context_menu.ts@@ -1,8 +1,8 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, borderColor, text } from "./components"import { interactive, toggleable } from "../element"-export default function contextMenu(colorScheme: ColorScheme): any {+export default function context_menu(colorScheme: ColorScheme): any {const layer = colorScheme.middlereturn {background: background(layer),diff --git a/styles/src/styleTree/copilot.ts b/styles/src/style_tree/copilot.tssimilarity index 99%rename from styles/src/styleTree/copilot.tsrename to styles/src/style_tree/copilot.tsindex 2f82e94c439..cd2bbe0584f 100644--- a/styles/src/styleTree/copilot.ts+++ b/styles/src/style_tree/copilot.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, foreground, svg, text } from "./components"import { interactive } from "../element"export default function copilot(colorScheme: ColorScheme): any {diff --git a/styles/src/styleTree/editor.ts b/styles/src/style_tree/editor.tssimilarity index 96%rename from styles/src/styleTree/editor.tsrename to styles/src/style_tree/editor.tsindex 71c34207eb9..9bf46055808 100644--- a/styles/src/styleTree/editor.ts+++ b/styles/src/style_tree/editor.ts@@ -1,13 +1,13 @@import { withOpacity } from "../theme/color"-import { ColorScheme, Layer, StyleSets } from "../theme/colorScheme"+import { ColorScheme, Layer, StyleSets } from "../theme/color_scheme"import { background, border, borderColor, foreground, text } from "./components"-import hoverPopover from "./hoverPopover"+import hoverPopover from "./hover_popover"import { buildSyntax } from "../theme/syntax"import { interactive, toggleable } from "../element"export default function editor(colorScheme: ColorScheme): any {- const { isLight } = colorScheme+ const { is_light } = colorSchemeconst layer = colorScheme.highest@@ -130,13 +130,13 @@ export default function editor(colorScheme: ColorScheme): any {foldBackground: foreground(layer, "variant"),},diff: {- deleted: isLight+ deleted: is_light? colorScheme.ramps.red(0.5).hex(): colorScheme.ramps.red(0.4).hex(),- modified: isLight+ modified: is_light? colorScheme.ramps.yellow(0.5).hex(): colorScheme.ramps.yellow(0.5).hex(),- inserted: isLight+ inserted: is_light? colorScheme.ramps.green(0.4).hex(): colorScheme.ramps.green(0.5).hex(),removedWidthEm: 0.275,@@ -292,13 +292,13 @@ export default function editor(colorScheme: ColorScheme): any {},},git: {- deleted: isLight+ deleted: is_light? withOpacity(colorScheme.ramps.red(0.5).hex(), 0.8): withOpacity(colorScheme.ramps.red(0.4).hex(), 0.8),- modified: isLight+ modified: is_light? withOpacity(colorScheme.ramps.yellow(0.5).hex(), 0.8): withOpacity(colorScheme.ramps.yellow(0.4).hex(), 0.8),- inserted: isLight+ inserted: is_light? withOpacity(colorScheme.ramps.green(0.5).hex(), 0.8): withOpacity(colorScheme.ramps.green(0.4).hex(), 0.8),},diff --git a/styles/src/styleTree/feedback.ts b/styles/src/style_tree/feedback.tssimilarity index 96%rename from styles/src/styleTree/feedback.tsrename to styles/src/style_tree/feedback.tsindex 9b66015dc64..88f3cebc37e 100644--- a/styles/src/styleTree/feedback.ts+++ b/styles/src/style_tree/feedback.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, text } from "./components"import { interactive } from "../element"diff --git a/styles/src/styleTree/hoverPopover.ts b/styles/src/style_tree/hover_popover.tssimilarity index 91%rename from styles/src/styleTree/hoverPopover.tsrename to styles/src/style_tree/hover_popover.tsindex 9e2f8d0a785..68eba194948 100644--- a/styles/src/styleTree/hoverPopover.ts+++ b/styles/src/style_tree/hover_popover.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, foreground, text } from "./components"-export default function HoverPopover(colorScheme: ColorScheme): any {+export default function hover_popover(colorScheme: ColorScheme): any {const layer = colorScheme.middleconst baseContainer = {background: background(layer),diff --git a/styles/src/styleTree/incomingCallNotification.ts b/styles/src/style_tree/incoming_call_notification.tssimilarity index 93%rename from styles/src/styleTree/incomingCallNotification.tsrename to styles/src/style_tree/incoming_call_notification.tsindex 6249bfb6934..9a6d400017f 100644--- a/styles/src/styleTree/incomingCallNotification.ts+++ b/styles/src/style_tree/incoming_call_notification.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, text } from "./components"-export default function incomingCallNotification(+export default function incoming_call_notification(colorScheme: ColorScheme): unknown {const layer = colorScheme.middlediff --git a/styles/src/styleTree/picker.ts b/styles/src/style_tree/picker.tssimilarity index 98%rename from styles/src/styleTree/picker.tsrename to styles/src/style_tree/picker.tsindex aaf2740a6e0..417c1faea4c 100644--- a/styles/src/styleTree/picker.ts+++ b/styles/src/style_tree/picker.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import { background, border, text } from "./components"import { interactive, toggleable } from "../element"diff --git a/styles/src/styleTree/projectDiagnostics.ts b/styles/src/style_tree/project_diagnostics.tssimilarity index 70%rename from styles/src/styleTree/projectDiagnostics.tsrename to styles/src/style_tree/project_diagnostics.tsindex d2c2152ab41..f3f5a5a1446 100644--- a/styles/src/styleTree/projectDiagnostics.ts+++ b/styles/src/style_tree/project_diagnostics.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, text } from "./components"-export default function projectDiagnostics(colorScheme: ColorScheme): any {+export default function project_diagnostics(colorScheme: ColorScheme): any {const layer = colorScheme.highestreturn {background: background(layer),diff --git a/styles/src/styleTree/projectPanel.ts b/styles/src/style_tree/project_panel.tssimilarity index 88%rename from styles/src/styleTree/projectPanel.tsrename to styles/src/style_tree/project_panel.tsindex de4a98df53f..c38c689f4fe 100644--- a/styles/src/styleTree/projectPanel.ts+++ b/styles/src/style_tree/project_panel.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import {Border,@@ -10,10 +10,10 @@ import {} from "./components"import { interactive, toggleable } from "../element"import merge from "ts-deepmerge"-export default function projectPanel(colorScheme: ColorScheme): any {- const { isLight } = colorScheme+export default function project_panel(theme: ColorScheme): any {+ const { is_light } = theme- const layer = colorScheme.middle+ const layer = theme.middletype EntryStateProps = {background?: string@@ -31,15 +31,15 @@ export default function projectPanel(colorScheme: ColorScheme): any {const entry = (unselected?: EntryState, selected?: EntryState) => {const git_status = {git: {- modified: isLight- ? colorScheme.ramps.yellow(0.6).hex()- : colorScheme.ramps.yellow(0.5).hex(),- inserted: isLight- ? colorScheme.ramps.green(0.45).hex()- : colorScheme.ramps.green(0.5).hex(),- conflict: isLight- ? colorScheme.ramps.red(0.6).hex()- : colorScheme.ramps.red(0.5).hex(),+ modified: is_light+ ? theme.ramps.yellow(0.6).hex()+ : theme.ramps.yellow(0.5).hex(),+ inserted: is_light+ ? theme.ramps.green(0.45).hex()+ : theme.ramps.green(0.5).hex(),+ conflict: is_light+ ? theme.ramps.red(0.6).hex()+ : theme.ramps.red(0.5).hex(),},}@@ -182,7 +182,7 @@ export default function projectPanel(colorScheme: ColorScheme): any {filenameEditor: {background: background(layer, "on"),text: text(layer, "mono", "on", { size: "sm" }),- selection: colorScheme.players[0],+ selection: theme.players[0],},}}diff --git a/styles/src/styleTree/projectSharedNotification.ts b/styles/src/style_tree/project_shared_notification.tssimilarity index 93%rename from styles/src/styleTree/projectSharedNotification.tsrename to styles/src/style_tree/project_shared_notification.tsindex c114e17176a..f8b103e2e49 100644--- a/styles/src/styleTree/projectSharedNotification.ts+++ b/styles/src/style_tree/project_shared_notification.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, text } from "./components"-export default function projectSharedNotification(+export default function project_shared_notification(colorScheme: ColorScheme): unknown {const layer = colorScheme.middlediff --git a/styles/src/styleTree/search.ts b/styles/src/style_tree/search.tssimilarity index 98%rename from styles/src/styleTree/search.tsrename to styles/src/style_tree/search.tsindex 9ecad3ab197..c236284fa06 100644--- a/styles/src/styleTree/search.ts+++ b/styles/src/style_tree/search.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import { background, border, foreground, text } from "./components"import { interactive, toggleable } from "../element"diff --git a/styles/src/styleTree/sharedScreen.ts b/styles/src/style_tree/shared_screen.tssimilarity index 84%rename from styles/src/styleTree/sharedScreen.tsrename to styles/src/style_tree/shared_screen.tsindex 59968d59499..718ea20642d 100644--- a/styles/src/styleTree/sharedScreen.ts+++ b/styles/src/style_tree/shared_screen.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { StyleTree } from "../types"import { background } from "./components"diff --git a/styles/src/styleTree/simpleMessageNotification.ts b/styles/src/style_tree/simple_message_notification.tssimilarity index 93%rename from styles/src/styleTree/simpleMessageNotification.tsrename to styles/src/style_tree/simple_message_notification.tsindex 99dc878a79a..207924a99fb 100644--- a/styles/src/styleTree/simpleMessageNotification.ts+++ b/styles/src/style_tree/simple_message_notification.ts@@ -1,10 +1,10 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, foreground, text } from "./components"import { interactive } from "../element"const headerPadding = 8-export default function simpleMessageNotification(+export default function simple_message_notification(colorScheme: ColorScheme): unknown {const layer = colorScheme.middlediff --git a/styles/src/styleTree/statusBar.ts b/styles/src/style_tree/status_bar.tssimilarity index 97%rename from styles/src/styleTree/statusBar.tsrename to styles/src/style_tree/status_bar.tsindex 6ca53afb187..e86afb1c0da 100644--- a/styles/src/styleTree/statusBar.ts+++ b/styles/src/style_tree/status_bar.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, foreground, text } from "./components"import { interactive, toggleable } from "../element"-export default function statusBar(colorScheme: ColorScheme): any {+export default function status_bar(colorScheme: ColorScheme): any {const layer = colorScheme.lowestconst statusContainer = {diff --git a/styles/src/styleTree/tabBar.ts b/styles/src/style_tree/tab_bar.tssimilarity index 96%rename from styles/src/styleTree/tabBar.tsrename to styles/src/style_tree/tab_bar.tsindex ae9512d8ce5..fe43934f79f 100644--- a/styles/src/styleTree/tabBar.ts+++ b/styles/src/style_tree/tab_bar.ts@@ -1,9 +1,9 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import { text, border, background, foreground } from "./components"import { interactive, toggleable } from "../element"-export default function tabBar(colorScheme: ColorScheme): any {+export default function tab_bar(colorScheme: ColorScheme): any {const height = 32const activeLayer = colorScheme.highestdiff --git a/styles/src/styleTree/terminal.ts b/styles/src/style_tree/terminal.tssimilarity index 97%rename from styles/src/styleTree/terminal.tsrename to styles/src/style_tree/terminal.tsindex 5198cb195dd..4e3dc18627c 100644--- a/styles/src/styleTree/terminal.ts+++ b/styles/src/style_tree/terminal.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { StyleTree } from "../types"export default function terminal(theme: ColorScheme): StyleTree.TerminalStyle {diff --git a/styles/src/styleTree/titlebar.ts b/styles/src/style_tree/titlebar.tssimilarity index 100%rename from styles/src/styleTree/titlebar.tsrename to styles/src/style_tree/titlebar.tsdiff --git a/styles/src/styleTree/toolbarDropdownMenu.ts b/styles/src/style_tree/toolbar_dropdown_menu.tssimilarity index 94%rename from styles/src/styleTree/toolbarDropdownMenu.tsrename to styles/src/style_tree/toolbar_dropdown_menu.tsindex 4eff06026b0..992631e0363 100644--- a/styles/src/styleTree/toolbarDropdownMenu.ts+++ b/styles/src/style_tree/toolbar_dropdown_menu.ts@@ -1,7 +1,7 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, text } from "./components"import { interactive, toggleable } from "../element"-export default function dropdownMenu(colorScheme: ColorScheme): any {+export default function dropdown_menu(colorScheme: ColorScheme): any {const layer = colorScheme.middlereturn {diff --git a/styles/src/styleTree/tooltip.ts b/styles/src/style_tree/tooltip.tssimilarity index 93%rename from styles/src/styleTree/tooltip.tsrename to styles/src/style_tree/tooltip.tsindex fb896112a99..54daae529e5 100644--- a/styles/src/styleTree/tooltip.ts+++ b/styles/src/style_tree/tooltip.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { background, border, text } from "./components"export default function tooltip(colorScheme: ColorScheme): any {diff --git a/styles/src/styleTree/updateNotification.ts b/styles/src/style_tree/update_notification.tssimilarity index 89%rename from styles/src/styleTree/updateNotification.tsrename to styles/src/style_tree/update_notification.tsindex bf792ffc7b5..c6e6130f540 100644--- a/styles/src/styleTree/updateNotification.ts+++ b/styles/src/style_tree/update_notification.ts@@ -1,10 +1,10 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { foreground, text } from "./components"import { interactive } from "../element"const headerPadding = 8-export default function updateNotification(colorScheme: ColorScheme): any {+export default function update_notification(colorScheme: ColorScheme): any {const layer = colorScheme.middlereturn {message: {diff --git a/styles/src/styleTree/welcome.ts b/styles/src/style_tree/welcome.tssimilarity index 98%rename from styles/src/styleTree/welcome.tsrename to styles/src/style_tree/welcome.tsindex c64a17b5f60..93f18267401 100644--- a/styles/src/styleTree/welcome.ts+++ b/styles/src/style_tree/welcome.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import {border,diff --git a/styles/src/styleTree/workspace.ts b/styles/src/style_tree/workspace.tssimilarity index 94%rename from styles/src/styleTree/workspace.tsrename to styles/src/style_tree/workspace.tsindex 5f5da7e47ea..48217e89c74 100644--- a/styles/src/styleTree/workspace.ts+++ b/styles/src/style_tree/workspace.ts@@ -1,4 +1,4 @@-import { ColorScheme } from "../theme/colorScheme"+import { ColorScheme } from "../theme/color_scheme"import { withOpacity } from "../theme/color"import {background,@@ -8,14 +8,14 @@ import {svg,text,} from "./components"-import statusBar from "./statusBar"-import tabBar from "./tabBar"+import statusBar from "./status_bar"+import tabBar from "./tab_bar"import { interactive } from "../element"import { titlebar } from "./titlebar"export default function workspace(colorScheme: ColorScheme): any {const layer = colorScheme.lowest- const isLight = colorScheme.isLight+ const is_light = colorScheme.is_lightreturn {background: background(colorScheme.lowest),@@ -25,7 +25,7 @@ export default function workspace(colorScheme: ColorScheme): any {height: 256,},logo: svg(- withOpacity("#000000", colorScheme.isLight ? 0.6 : 0.8),+ withOpacity("#000000", colorScheme.is_light ? 0.6 : 0.8),"icons/logo_96.svg",256,256@@ -33,10 +33,10 @@ export default function workspace(colorScheme: ColorScheme): any {logoShadow: svg(withOpacity(- colorScheme.isLight+ colorScheme.is_light? "#FFFFFF": colorScheme.lowest.base.default.background,- colorScheme.isLight ? 1 : 0.6+ colorScheme.is_light ? 1 : 0.6),"icons/logo_96.svg",256,@@ -96,7 +96,7 @@ export default function workspace(colorScheme: ColorScheme): any {},zoomedBackground: {cursor: "Arrow",- background: isLight+ background: is_light? withOpacity(background(colorScheme.lowest), 0.8): withOpacity(background(colorScheme.highest), 0.6),},diff --git a/styles/src/theme/colorScheme.ts b/styles/src/theme/color_scheme.tssimilarity index 98%rename from styles/src/theme/colorScheme.tsrename to styles/src/theme/color_scheme.tsindex ea3b1b9b298..61b459911b9 100644--- a/styles/src/theme/colorScheme.ts+++ b/styles/src/theme/color_scheme.ts@@ -5,12 +5,12 @@ import {ThemeConfig,ThemeAppearance,ThemeConfigInputColors,-} from "./themeConfig"+} from "./theme_config"import { getRamps } from "./ramps"export interface ColorScheme {name: string- isLight: boolean+ is_light: booleanlowest: Layermiddle: Layer@@ -155,7 +155,7 @@ export function createColorScheme(theme: ThemeConfig): ColorScheme {return {name,- isLight,+ is_light: isLight,ramps,diff --git a/styles/src/theme/index.ts b/styles/src/theme/index.tsindex 2bf625521c1..22287bf6699 100644--- a/styles/src/theme/index.ts+++ b/styles/src/theme/index.ts@@ -1,4 +1,4 @@-export * from "./colorScheme"+export * from "./color_scheme"export * from "./ramps"export * from "./syntax"-export * from "./themeConfig"+export * from "./theme_config"diff --git a/styles/src/theme/ramps.ts b/styles/src/theme/ramps.tsindex de1f8ee0d4c..98a73ef5bf0 100644--- a/styles/src/theme/ramps.ts+++ b/styles/src/theme/ramps.ts@@ -1,9 +1,9 @@import chroma, { Color, Scale } from "chroma-js"-import { RampSet } from "./colorScheme"+import { RampSet } from "./color_scheme"import {ThemeConfigInputColors,ThemeConfigInputColorsKeys,-} from "./themeConfig"+} from "./theme_config"export function colorRamp(color: Color): Scale {const endColor = color.desaturate(1).brighten(5)diff --git a/styles/src/theme/syntax.ts b/styles/src/theme/syntax.tsindex a35013c1e9a..5d214abdebe 100644--- a/styles/src/theme/syntax.ts+++ b/styles/src/theme/syntax.ts@@ -1,6 +1,6 @@import deepmerge from "deepmerge"import { FontWeight, fontWeights } from "../common"-import { ColorScheme } from "./colorScheme"+import { ColorScheme } from "./color_scheme"import chroma from "chroma-js"export interface SyntaxHighlightStyle {diff --git a/styles/src/theme/themeConfig.ts b/styles/src/theme/theme_config.tssimilarity index 100%rename from styles/src/theme/themeConfig.tsrename to styles/src/theme/theme_config.tsdiff --git a/styles/src/theme/tokens/colorScheme.ts b/styles/src/theme/tokens/color_scheme.tssimilarity index 95%rename from styles/src/theme/tokens/colorScheme.tsrename to styles/src/theme/tokens/color_scheme.tsindex bc53ca802a9..84e456a6e7f 100644--- a/styles/src/theme/tokens/colorScheme.ts+++ b/styles/src/theme/tokens/color_scheme.ts@@ -9,12 +9,12 @@ import {Shadow,SyntaxHighlightStyle,ThemeSyntax,-} from "../colorScheme"+} from "../color_scheme"import { LayerToken, layerToken } from "./layer"import { PlayersToken, playersToken } from "./players"import { colorToken } from "./token"import { Syntax } from "../syntax"-import editor from "../../styleTree/editor"+import editor from "../../style_tree/editor"interface ColorSchemeTokens {name: SingleOtherToken@@ -85,7 +85,7 @@ export function colorSchemeTokens(colorScheme: ColorScheme): ColorSchemeTokens {},appearance: {name: "themeAppearance",- value: colorScheme.isLight ? "light" : "dark",+ value: colorScheme.is_light ? "light" : "dark",type: TokenTypes.OTHER,},lowest: layerToken(colorScheme.lowest, "lowest"),diff --git a/styles/src/theme/tokens/layer.ts b/styles/src/theme/tokens/layer.tsindex 42a69b5a528..10309e0d2e2 100644--- a/styles/src/theme/tokens/layer.ts+++ b/styles/src/theme/tokens/layer.ts@@ -1,5 +1,5 @@import { SingleColorToken } from "@tokens-studio/types"-import { Layer, Style, StyleSet } from "../colorScheme"+import { Layer, Style, StyleSet } from "../color_scheme"import { colorToken } from "./token"interface StyleToken {diff --git a/styles/src/theme/tokens/players.ts b/styles/src/theme/tokens/players.tsindex 94d05cd827d..12f16343e9d 100644--- a/styles/src/theme/tokens/players.ts+++ b/styles/src/theme/tokens/players.ts@@ -1,6 +1,6 @@import { SingleColorToken } from "@tokens-studio/types"-import { ColorScheme, Players } from "../../common"import { colorToken } from "./token"+import { ColorScheme, Players } from "../color_scheme"export type PlayerToken = Record<"selection" | "cursor", SingleColorToken>diff --git a/styles/src/types/styleTree.ts b/styles/src/types/style_tree.tssimilarity index 100%rename from styles/src/types/styleTree.tsrename to styles/src/types/style_tree.tsdiff --git a/styles/src/utils/snakeCase.ts b/styles/src/utils/snake_case.tssimilarity index 100%rename from styles/src/utils/snakeCase.tsrename to styles/src/utils/snake_case.ts