@@ -22,36 +22,91 @@ import { Popover, PopoverContent, PopoverTrigger } from './popover';
2222const languages : { label : string ; value : string } [ ] = [
2323 { label : 'Auto' , value : 'auto' } ,
2424 { label : 'Plain Text' , value : 'plaintext' } ,
25+ { label : 'ABAP' , value : 'abap' } ,
26+ { label : 'Agda' , value : 'agda' } ,
27+ { label : 'Arduino' , value : 'arduino' } ,
28+ { label : 'ASCII Art' , value : 'ascii' } ,
29+ { label : 'Assembly' , value : 'x86asm' } ,
2530 { label : 'Bash' , value : 'bash' } ,
31+ { label : 'BASIC' , value : 'basic' } ,
32+ { label : 'BNF' , value : 'bnf' } ,
2633 { label : 'C' , value : 'c' } ,
27- { label : 'C++' , value : 'cpp' } ,
2834 { label : 'C#' , value : 'csharp' } ,
35+ { label : 'C++' , value : 'cpp' } ,
36+ { label : 'Clojure' , value : 'clojure' } ,
37+ { label : 'CoffeeScript' , value : 'coffeescript' } ,
38+ { label : 'Coq' , value : 'coq' } ,
2939 { label : 'CSS' , value : 'css' } ,
40+ { label : 'Dart' , value : 'dart' } ,
41+ { label : 'Dhall' , value : 'dhall' } ,
3042 { label : 'Diff' , value : 'diff' } ,
43+ { label : 'Docker' , value : 'dockerfile' } ,
44+ { label : 'EBNF' , value : 'ebnf' } ,
45+ { label : 'Elixir' , value : 'elixir' } ,
46+ { label : 'Elm' , value : 'elm' } ,
47+ { label : 'Erlang' , value : 'erlang' } ,
48+ { label : 'F#' , value : 'fsharp' } ,
49+ { label : 'Flow' , value : 'flow' } ,
50+ { label : 'Fortran' , value : 'fortran' } ,
51+ { label : 'Gherkin' , value : 'gherkin' } ,
52+ { label : 'GLSL' , value : 'glsl' } ,
3153 { label : 'Go' , value : 'go' } ,
3254 { label : 'GraphQL' , value : 'graphql' } ,
55+ { label : 'Groovy' , value : 'groovy' } ,
56+ { label : 'Haskell' , value : 'haskell' } ,
57+ { label : 'HCL' , value : 'hcl' } ,
3358 { label : 'HTML' , value : 'html' } ,
59+ { label : 'Idris' , value : 'idris' } ,
3460 { label : 'Java' , value : 'java' } ,
3561 { label : 'JavaScript' , value : 'javascript' } ,
3662 { label : 'JSON' , value : 'json' } ,
37- { label : 'JSX ' , value : 'jsx ' } ,
63+ { label : 'Julia ' , value : 'julia ' } ,
3864 { label : 'Kotlin' , value : 'kotlin' } ,
65+ { label : 'LaTeX' , value : 'latex' } ,
3966 { label : 'Less' , value : 'less' } ,
67+ { label : 'Lisp' , value : 'lisp' } ,
68+ { label : 'LiveScript' , value : 'livescript' } ,
69+ { label : 'LLVM IR' , value : 'llvm' } ,
4070 { label : 'Lua' , value : 'lua' } ,
4171 { label : 'Makefile' , value : 'makefile' } ,
4272 { label : 'Markdown' , value : 'markdown' } ,
73+ { label : 'Markup' , value : 'markup' } ,
74+ { label : 'MATLAB' , value : 'matlab' } ,
75+ { label : 'Mathematica' , value : 'mathematica' } ,
76+ { label : 'Mermaid' , value : 'mermaid' } ,
77+ { label : 'Nix' , value : 'nix' } ,
78+ { label : 'Notion Formula' , value : 'notion' } ,
4379 { label : 'Objective-C' , value : 'objectivec' } ,
80+ { label : 'OCaml' , value : 'ocaml' } ,
81+ { label : 'Pascal' , value : 'pascal' } ,
82+ { label : 'Perl' , value : 'perl' } ,
4483 { label : 'PHP' , value : 'php' } ,
84+ { label : 'PowerShell' , value : 'powershell' } ,
85+ { label : 'Prolog' , value : 'prolog' } ,
86+ { label : 'Protocol Buffers' , value : 'protobuf' } ,
87+ { label : 'PureScript' , value : 'purescript' } ,
4588 { label : 'Python' , value : 'python' } ,
4689 { label : 'R' , value : 'r' } ,
90+ { label : 'Racket' , value : 'racket' } ,
91+ { label : 'Reason' , value : 'reasonml' } ,
4792 { label : 'Ruby' , value : 'ruby' } ,
4893 { label : 'Rust' , value : 'rust' } ,
94+ { label : 'Sass' , value : 'scss' } ,
95+ { label : 'Scala' , value : 'scala' } ,
96+ { label : 'Scheme' , value : 'scheme' } ,
4997 { label : 'SCSS' , value : 'scss' } ,
5098 { label : 'Shell' , value : 'shell' } ,
99+ { label : 'Smalltalk' , value : 'smalltalk' } ,
100+ { label : 'Solidity' , value : 'solidity' } ,
51101 { label : 'SQL' , value : 'sql' } ,
52102 { label : 'Swift' , value : 'swift' } ,
103+ { label : 'TOML' , value : 'toml' } ,
53104 { label : 'TypeScript' , value : 'typescript' } ,
54- { label : 'TSX' , value : 'tsx' } ,
105+ { label : 'VB.Net' , value : 'vbnet' } ,
106+ { label : 'Verilog' , value : 'verilog' } ,
107+ { label : 'VHDL' , value : 'vhdl' } ,
108+ { label : 'Visual Basic' , value : 'vbnet' } ,
109+ { label : 'WebAssembly' , value : 'wasm' } ,
55110 { label : 'XML' , value : 'xml' } ,
56111 { label : 'YAML' , value : 'yaml' } ,
57112] ;
@@ -61,7 +116,7 @@ export function CodeBlockCombobox() {
61116 const readOnly = useReadOnly ( ) ;
62117 const editor = useEditorRef ( ) ;
63118 const element = useElement < TCodeBlockElement > ( ) ;
64- const value = element . lang ?? 'plaintext' ;
119+ const value = element . lang || 'plaintext' ;
65120 const [ searchValue , setSearchValue ] = React . useState ( '' ) ;
66121
67122 const items = React . useMemo (
@@ -82,7 +137,7 @@ export function CodeBlockCombobox() {
82137 < Button
83138 size = "xs"
84139 variant = "ghost"
85- className = "h-6 justify-between text-muted-foreground gap-1 px-2 text-xs select-none"
140+ className = "h-6 justify-between gap-1 px-2 text-xs text-muted-foreground select-none"
86141 aria-expanded = { open }
87142 role = "combobox"
88143 >
@@ -107,7 +162,7 @@ export function CodeBlockCombobox() {
107162 < CommandGroup >
108163 { items . map ( ( language ) => (
109164 < CommandItem
110- key = { language . value }
165+ key = { language . label }
111166 className = "cursor-pointer"
112167 value = { language . value }
113168 onSelect = { ( value ) => {
0 commit comments