go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/web/rpcexplorer/src/ace.tsx (about) 1 // Copyright 2023 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 import AceEditor from 'react-ace'; 16 17 // Note: these must be imported after 'react-ace' because they depend on 18 // import hooks prepared by 'react-ace'. 19 import 'ace-builds/src-noconflict/ext-language_tools'; 20 import 'ace-builds/src-noconflict/ext-prompt'; 21 import 'ace-builds/src-noconflict/ext-searchbox'; 22 import 'ace-builds/src-noconflict/mode-json'; 23 import 'ace-builds/src-noconflict/theme-chrome'; 24 25 // Note if changing these, also change imports above to make sure 26 // implementations are included in the final bundle. 27 export const mode = 'json'; 28 export const theme = 'chrome'; 29 30 // Reexport the main component for convenience. 31 export { AceEditor };