@jupyterlab/codemirror
Advanced tools
Comparing version 4.1.0-alpha.1 to 4.1.0-alpha.2
@@ -463,3 +463,3 @@ // Copyright (c) Jupyter Development Team. | ||
displayName: trans.__('SQL'), | ||
mime: 'text/x-sql', | ||
mime: ['application/sql', 'text/x-sql'], | ||
extensions: ['sql'], | ||
@@ -466,0 +466,0 @@ load() { |
@@ -15,2 +15,4 @@ import { IEditorMimeTypeService } from '@jupyterlab/codeeditor'; | ||
* If a mime type cannot be found returns the default mime type `text/plain`, never `null`. | ||
* There may be more than one mime type, but only the first one will be returned. | ||
* To access all mime types, use `IEditorLanguageRegistry` instead. | ||
*/ | ||
@@ -23,4 +25,6 @@ getMimeTypeByLanguage(info: nbformat.ILanguageInfoMetadata): string; | ||
* If a mime type cannot be found returns the default mime type `text/plain`, never `null`. | ||
* There may be more than one mime type, but only the first one will be returned. | ||
* To access all mime types, use `IEditorLanguageRegistry` instead. | ||
*/ | ||
getMimeTypeByFilePath(path: string): string; | ||
} |
@@ -17,4 +17,7 @@ // Copyright (c) Jupyter Development Team. | ||
* If a mime type cannot be found returns the default mime type `text/plain`, never `null`. | ||
* There may be more than one mime type, but only the first one will be returned. | ||
* To access all mime types, use `IEditorLanguageRegistry` instead. | ||
*/ | ||
getMimeTypeByLanguage(info) { | ||
var _a; | ||
const ext = info.file_extension || ''; | ||
@@ -27,3 +30,5 @@ const mode = this.languages.findBest(info.codemirror_mode || { | ||
return mode | ||
? mode.mime | ||
? Array.isArray(mode.mime) | ||
? (_a = mode.mime[0]) !== null && _a !== void 0 ? _a : IEditorMimeTypeService.defaultMimeType | ||
: mode.mime | ||
: IEditorMimeTypeService.defaultMimeType; | ||
@@ -36,2 +41,4 @@ } | ||
* If a mime type cannot be found returns the default mime type `text/plain`, never `null`. | ||
* There may be more than one mime type, but only the first one will be returned. | ||
* To access all mime types, use `IEditorLanguageRegistry` instead. | ||
*/ | ||
@@ -38,0 +45,0 @@ getMimeTypeByFilePath(path) { |
@@ -41,5 +41,8 @@ // Copyright (c) Jupyter Development Team. | ||
}, | ||
'.cm-gutter, .cm-activeLine': { | ||
'.cm-gutter': { | ||
backgroundColor: 'var(--jp-layout-color2)' | ||
}, | ||
'.cm-activeLine': { | ||
backgroundColor: 'color-mix(in srgb, var(--jp-layout-color3) 25%, transparent)' | ||
}, | ||
'.cm-lineNumbers': { | ||
@@ -46,0 +49,0 @@ color: 'var(--jp-ui-font-color2)' |
{ | ||
"name": "@jupyterlab/codemirror", | ||
"version": "4.1.0-alpha.1", | ||
"version": "4.1.0-alpha.2", | ||
"description": "JupyterLab - CodeMirror Editor Provider", | ||
@@ -61,8 +61,8 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"@codemirror/view": "^6.9.6", | ||
"@jupyter/ydoc": "^1.0.2", | ||
"@jupyterlab/codeeditor": "^4.1.0-alpha.1", | ||
"@jupyterlab/coreutils": "^6.1.0-alpha.1", | ||
"@jupyterlab/documentsearch": "^4.1.0-alpha.1", | ||
"@jupyterlab/nbformat": "^4.1.0-alpha.1", | ||
"@jupyterlab/translation": "^4.1.0-alpha.1", | ||
"@jupyter/ydoc": "^1.1.1", | ||
"@jupyterlab/codeeditor": "^4.1.0-alpha.2", | ||
"@jupyterlab/coreutils": "^6.1.0-alpha.2", | ||
"@jupyterlab/documentsearch": "^4.1.0-alpha.2", | ||
"@jupyterlab/nbformat": "^4.1.0-alpha.2", | ||
"@jupyterlab/translation": "^4.1.0-alpha.2", | ||
"@lezer/common": "^1.0.2", | ||
@@ -78,3 +78,3 @@ "@lezer/generator": "^1.2.2", | ||
"devDependencies": { | ||
"@jupyterlab/testing": "^4.1.0-alpha.1", | ||
"@jupyterlab/testing": "^4.1.0-alpha.2", | ||
"@lezer/generator": "^1.2.2", | ||
@@ -81,0 +81,0 @@ "@lezer/lr": "^1.3.3", |
@@ -504,3 +504,3 @@ // Copyright (c) Jupyter Development Team. | ||
displayName: trans.__('SQL'), | ||
mime: 'text/x-sql', | ||
mime: ['application/sql', 'text/x-sql'], | ||
extensions: ['sql'], | ||
@@ -507,0 +507,0 @@ load() { |
@@ -19,2 +19,4 @@ // Copyright (c) Jupyter Development Team. | ||
* If a mime type cannot be found returns the default mime type `text/plain`, never `null`. | ||
* There may be more than one mime type, but only the first one will be returned. | ||
* To access all mime types, use `IEditorLanguageRegistry` instead. | ||
*/ | ||
@@ -31,3 +33,5 @@ getMimeTypeByLanguage(info: nbformat.ILanguageInfoMetadata): string { | ||
return mode | ||
? (mode.mime as string) | ||
? Array.isArray(mode.mime) | ||
? mode.mime[0] ?? IEditorMimeTypeService.defaultMimeType | ||
: mode.mime | ||
: IEditorMimeTypeService.defaultMimeType; | ||
@@ -41,2 +45,4 @@ } | ||
* If a mime type cannot be found returns the default mime type `text/plain`, never `null`. | ||
* There may be more than one mime type, but only the first one will be returned. | ||
* To access all mime types, use `IEditorLanguageRegistry` instead. | ||
*/ | ||
@@ -43,0 +49,0 @@ getMimeTypeByFilePath(path: string): string { |
@@ -58,6 +58,11 @@ // Copyright (c) Jupyter Development Team. | ||
'.cm-gutter, .cm-activeLine': { | ||
'.cm-gutter': { | ||
backgroundColor: 'var(--jp-layout-color2)' | ||
}, | ||
'.cm-activeLine': { | ||
backgroundColor: | ||
'color-mix(in srgb, var(--jp-layout-color3) 25%, transparent)' | ||
}, | ||
'.cm-lineNumbers': { | ||
@@ -64,0 +69,0 @@ color: 'var(--jp-ui-font-color2)' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
501687
11891