diff --git a/packages/libro-core/README.md b/packages/libro-core/README.md index 555f09e7..07ecaf34 100644 --- a/packages/libro-core/README.md +++ b/packages/libro-core/README.md @@ -1,3 +1,280 @@ -# libro-notebook +# libro-core -cell +## Token/API + +### LibroService + +LibroService 管理 libro 实例,libro view 创建、活跃 libro view 的监听等能力。 + +```typescript +// 组件内引入 +const service = useInject(LibroService); + +// 属性引入 +@inject(LibroService) service:LibroService; + +// 事件监听 +service.getOrCreateView(options); +service.onActiveChanged(callback); +service.onFocusChanged(callback); +service.onNotebookViewCreated(callback); +``` + +## 扩展点 + +### 单元格扩展 + +使用单元格扩展可以增加自定义的单元格类型,内置的单元格类型也均基于该扩展定义实现。 + +单元格定义分为 model 和 view 两部分,model 定义单元格的数据结构,view 定义单元格的渲染方式和提供交互能力。每种单元格都需要对创建时接收到的参数返回优先级,按照最高优先级的单元格类型创建单元格。 + +```typescript +export interface CellModelContribution { + cellMeta: CellMeta; + canHandle: (options: CellOptions, libroType?: string) => number; + createModel: (options: CellOptions) => MaybePromise; + getDefaultCellOption?: () => CellOptions; +} +export interface CellViewContribution { + canHandle: (options: CellOptions) => number; + view: Newable; +} +``` + +### 输出扩展 + +使用输出扩展可以增加自定义的输出类型,内置的输出类型也均基于该扩展定义实现。在 jupyter 场景下,用户一般不需要增加输出类型的扩展,而仅需要增加 mime 渲染器,mime 渲染器扩展由 output 实现。 + +```typescript +export interface OutputContribution { + canHandle: (output: IOutput) => number; + factory: OutputModelFactory; +} +``` + +### 内容加载扩展 + +用户有时候从自定义存储中读取 notebook 数据,可以通过内容加载扩展来实现,这里要求用户的返回数据符合 notebook 的数据结构。 + +```typescript +export interface ContentContribution { + canHandle: (options: Record, model: any) => number; + loadContent: (options: Record, model: any) => Promise; +} +``` + +### 视图插槽 + +如果希望在编辑器内部增加一些自定义的渲染像,除了可以覆盖内置的渲染器外,还可以通过视图插槽的方式来实现。 + +内置插槽位置如下: + +- container +- content +- list +- right + +```typescript +export interface LibroExtensionSlotContribution { + factory: LibroExtensionSlotFactory; + slot: LibroSlot; + viewOpenOption?: { + order?: string; + reveal?: boolean; + }; +} +``` + +## 命令 & 快捷键 + +### 文档命令 + +| 命令 | 快捷键 | 命令模式 | 说明 | +| ------------------ | ----------- | -------- | -------- | +| `document:save` | `ctrlcmd+s` | | 保存文档 | +| `document:setting` | | | 打开配置 | + +### kernel 命令 + +| 命令 | 快捷键 | 命令模式 | 说明 | +| ------------------------------ | ------ | -------- | ------------------- | +| `notebook:change-kernel` | | | Change Kernel | +| `notebook:get-kernel` | | | Get Kernel | +| `notebook:interrupt-kernel` | | | Interrupt Kernel | +| `notebook:reconnect-to-kernel` | | | Reconnect to Kernel | +| `notebook:restart-kernel` | | | Restart Kernel | +| `notebook:shutdown-kernel` | | | Shutdown Kernel | + +### notebook 命令 + +| 命令 | 快捷键 | 命令模式 | 说明 | +| ------------------------------------------------ | ---------------------- | -------- | ----------------------------------------------- | +| `notebook:interrupt` | | | Interrupt | +| `notebook:change-cell-to` | | | | +| `notebook:change-cell-to-code` | `Y` | ✓ | Change to Code Cell Type | +| `notebook:change-cell-to-heading-1` | `1` | ✓ | Change to Heading 1 | +| `notebook:change-cell-to-heading-2` | `2` | ✓ | Change to Heading 2 | +| `notebook:change-cell-to-heading-3` | `3` | ✓ | Change to Heading 3 | +| `notebook:change-cell-to-heading-4` | `4` | ✓ | Change to Heading 4 | +| `notebook:change-cell-to-heading-5` | `5` | ✓ | Change to Heading 5 | +| `notebook:change-cell-to-heading-6` | `6` | ✓ | Change to Heading 6 | +| `notebook:change-cell-to-markdown` | `M` | ✓ | Change to Markdown Cell Type | +| `notebook:change-cell-to-raw` | `R` | ✓ | Change to Raw Cell Type | +| `notebook:clear-all-cell-outputs` | | | Clear Outputs of All Cells | +| `notebook:clear-cell-outputs` | | | Clear Cell Output | +| `notebook:close-and-shutdown` | | | Close editor and shut down kernel | +| `notebook:collapse-all-headings` | `ctrlcmd+shift+left` | | Collapse All Headings | +| `notebook:copy-cell` | `C` | ✓ | Copy Cells | +| `notebook:cut-cell` | `X` | ✓ | Cut Cells | +| `notebook:delete-cell` | `D D` | ✓ | Delete Cells | +| `notebook:deselect-all` | | | Deselect All Cells | +| `notebook:disable-output-scrolling` | | | Disable Scrolling for Outputs | +| `notebook:duplicate-below` | | | Duplicate Cells Below | +| `notebook:enable-output-scrolling` | | | Enable Scrolling for Outputs | +| `notebook:enter-command-mode` | `esc` | | Enter Command Mode | +| `notebook:enter-edit-mode` | `enter` | | Enter Edit Mode | +| `notebook:expand-all-headings` | `ctrlcmd+shift+right` | | Expand All Headings | +| `notebook:export-to-format` | | | Save and Export Notebook to the given format | +| `notebook:extend-marked-cells-above` | `shift+up` `shift+K` | | Extend Selection Above | +| `notebook:extend-marked-cells-below` | `shift+down` `shift+J` | | Extend Selection Below | +| `notebook:extend-marked-cells-bottom` | `shift+end` | | Extend Selection to Bottom | +| `notebook:extend-marked-cells-top` | `shift+home` | | Extend Selection to Top | +| `notebook:hide-all-cell` | | | | +| `notebook:hide-all-cell-code` | | | Collapse All Code | +| `notebook:hide-all-cell-output` | | | Collapse All Outputs | +| `notebook:hide-cell-code` | | | Collapse Selected Code | +| `notebook:hide-or-show-cell-code` | `ctrlcmd+'` | | Hide or show Selected Code | +| `notebook:hide-cell-outputs` | | | Collapse Selected Outputs | +| `notebook:hide-or-show-outputs` | `ctrlcmd+o` | | Hide or show Selected outputs | +| `notebook:insert-cell-above` | `A` | ✓ | Insert Cell Above | +| `notebook:insert-cell-below` | `B` | ✓ | Insert Cell Below | +| `notebook:insert-heading-above` | `shift+A` | ✓ | Insert Heading Above Current Heading | +| `notebook:insert-heading-below` | `shift+B` | ✓ | Insert Heading Below Current Heading | +| `notebook:merge-cell-above` | `ctrlcmd+backspace` | ✓ | Merge Cell Above | +| `notebook:merge-cell-below` | `ctrlcmd+shift+M` | ✓ | Merge Cell Below | +| `notebook:merge-cells` | `shift+M` | ✓ | Merge Selected Cells | +| `notebook:move-cell-down` | `ctrlcmd+shift+down` | ✓ | Move Cells Down | +| `notebook:move-cell-up` | `ctrlcmd+shift+up` | ✓ | Move Cells Up | +| `notebook:move-cursor-down` | `down` `J` | ✓ | Select Cell Below | +| `notebook:move-cursor-up` | `up` `K` | ✓ | Select Cell Up | +| `notebook:move-cursor-heading-above-or-collapse` | `left` | ✓ | Select Heading Above or Collapse Heading | +| `notebook:move-cursor-heading-below-or-expand` | `right` | ✓ | Select Heading Below or Collapse Heading | +| `notebook:paste-and-replace-cell` | | | Paste Cells and Replace | +| `notebook:paste-cell-above` | | | Paste Cells Above | +| `notebook:paste-cell-below` | `V` | ✓ | Paste Cells Below | +| `notebook:redo` | | | Redo | +| `notebook:redo-cell-action` | `shift+Z` | ✓ | Redo Cell Operation | +| `notebook:render-all-markdown` | | | Render All Markdown Cells | +| `notebook:replace-selection` | | | Replace Selection in Notebook Cell | +| `notebook:restart-and-run-to-selected` | | | Restart and Run up to Selected Cell | +| `notebook:restart-clear-output` | | | Restart and Clear Outputs of All Cells | +| `notebook:restart-run-all` | | | Restart and Run All Cells | +| `notebook:run-all-above` | | | Run All Above Selected Cell | +| `notebook:run-all-below` | | | Run All Below Selected Cell | +| `notebook:run-all-cells` | | | Run All Cells | +| `notebook:run-cell` | `ctrlcmd+enter` | | Run Selected Cells and Don't Advance | +| `notebook:run-cell-and-insert-below` | `alt+enter` | | Run Selected Cells and Insert Below | +| `notebook:run-cell-and-select-next` | `shift+enter` | | Run Selected Cells and Select Below | +| `notebook:run-in-console` | | | Run Selected Text or Current Line in Console | +| `notebook:select-all` | `ctrlcmd+A` | ✓ | Select All Cells | +| `notebook:select-last-run-cell` | | | Select current running or last run cell | +| `notebook:set-side-by-side-ratio` | | | Set Side by Side Ratio | +| `notebook:show-all-cell` | | | Expand All Cell | +| `notebook:show-all-cell-code` | | | Expand All Code | +| `notebook:show-all-cell-outputs` | | | Expand All Outputs | +| `notebook:show-cell-code` | | | Expand Selected Code | +| `notebook:show-cell-outputs` | | | Expand Selected Outputs | +| `notebook:split-cell-at-cursor` | `ctrlcmd+shift+-` | | Split Cell | +| `notebook:toggle-all-cell-line-numbers` | `shift+L` | | Show Line Numbers | +| `notebook:toggle-autoclosing-brackets` | | | Auto Close Brackets for All Notebook Cell Types | +| `notebook:toggle-heading-collapse` | | | Toggle Collapse Notebook Heading | +| `notebook:toggle-render-side-by-side-current` | `shift+R` | ✓ | Render Side-by-Side | +| `notebook:trust` | | | Trust Notebook | +| `notebook:undo` | | | Undo | +| `notebook:undo-cell-action` | `Z` | ✓ | Undo Cell Operation | +| `notebook:insert-cell-bottom` | | | | + +## 配置 & 主题 + +libro 内置了一些配置项和主题设置,用户可以是用 mana 的配置模块和主题模块来消费或变更。 + +| 配置项 | 说明 | 默认值 | +| ----------------------------------------------- | --------------------------------------- | ------- | +| `libro.header.toolbar` | 是否显示 libro 顶部工具栏 | `true` | +| `libro.cell.top-toolbar` | 是否显示单元格顶部工具栏 | `true` | +| `libro.cell.side-toolbar` | 是否显示单元格侧边工具栏 | `true` | +| `libro.command.insert-cell-below` | 没有单元格时是否默认创建单元格 | `true` | +| `libro.command.enter-edit-mode-when-add-cell` | 增加单元格操作默认进入编辑态 | `true` | +| `libro.command.collapser-active` | 点击左侧长条是否可以隐藏与显示单元格 | `true` | +| `libro.command.multiselection-when-shift-click` | 按住 shift 键并点击拖拽区域可以进行多选 | `true` | +| `libro.right.content.fixed` | libro view 的右边栏是否相对固定 | `false` | + +| 颜色 | css 变量 | 暗色主题 | 亮色主题 | 高对比主题 | 说明 | +| -------------------------------------------- | -------- | ----------- | ----------- | ---------- | ---- | +| `libro.warning.background` | | `#A9611466` | `#FFFBE6` | | | +| `libro.drag.hover.line.color` | | `#467DB0` | `#BFE0FF` | | | +| `libro.background` | | `#1F2022` | `#FFFFFF` | | | +| `libro.popover.background.color` | | `#2F3032` | `#FFFFFF` | | | +| `libro.menu.hover.color` | | `#515359` | `#EBF6FF` | | | +| `libro.dropdown.icon.color` | | `#FFFFFF4D` | `#00000033` | | | +| `libro.input.background` | | `#19191B` | `#F4F6FB` | | | +| `libro.text.default.color` | | `#E3E4E6` | `#000000` | | | +| `libro.text.tertiary.color` | | `#BDC0C4` | `#B8BABA` | | | +| `libro.output.background` | | `#292A2D` | `#FFFFFF` | | | +| `libro.toptoolbar.border.color` | | `#FFFFFF1A` | `#0000001A` | | | +| `libro.toptoolbar.icon.color` | | `#BFBFBF` | `#7B7B7B` | | | +| `libro.toptoolbar.disabled.icon.color` | | `#FFFFFF4D` | `#00000040` | | | +| `libro.toptoolbar.text.color` | | `#F5F5F5` | `#000000` | | | +| `libro.bottom.btn.background.color` | | `#FFFFFF0A` | `#FFFFFF` | | | +| `libro.bottom.btn.border.color` | | `#505559` | `#000A1A29` | | | +| `libro.bottom.btn.icon.color` | | `#505559` | `#525964D9` | | | +| `libro.bottom.btn.text.color` | | `#E3E4E6` | `#000A1AAD` | | | +| `libro.default.btn.background.color` | | `#FFFFFF1A` | `#FFFFFF` | | | +| `libro.default.btn.text.color` | | `#E3E4E6` | `#000A1AAD` | | | +| `libro.primary.btn.background.color` | | `#2A97FD` | `#1890FF` | | | +| `libro.default.btn.border.color` | | `#BDC0C4` | `#D6D8DA` | | | +| `libro.toolbar.menu.label.color` | | `#BDC0C4` | `#000000A6` | | | +| `libro.toolbar.menu.disabled.label.color` | | `#878C93` | `#00000040` | | | +| `libro.toolbar.menu.keybind.color` | | `#878C93` | `#00000073` | | | +| `libro.sidetoolbar.icon.color` | | `#BFBFBF` | `#6982A9` | | | +| `libro.sidetoolbar.border.color` | | `#FFFFFF14` | `#0000001A` | | | +| `libro.close.color` | | `#FFFFFF73` | `#00000073` | | | +| `libro.modal.title.color` | | `#EDEEEF` | `#000000D9` | | | +| `libro.modal.content.color` | | `#E3E4E6` | `#000A1A` | | | +| `libro.btn.primary.background.color` | | `#2A97FD` | `#1890FF` | | | +| `libro.execution.count.color` | | `#8694A9` | `#6A83AA` | | | +| `libro.tip.font.color` | | `#D6D8DA` | `#00000080` | | | +| `libro.execution.tip.success.color` | | `#48A918` | `#0DC54E` | | | +| `libro.link.color` | | `#177DDC` | `#1890FF` | | | +| `libro.error.color` | | `#CF4C52` | `#ED1345` | | | +| `libro.cell.border.color` | | `#3B3C42` | `#D6DEE6` | | | +| `libro.cell.active.border.color` | | `#378EDF` | `#3490ED` | | | +| `libro.cell.active.border.shadow.color` | | `#49A2FA40` | `#3592EE40` | | | +| `libro.cell.header.content` | | `#E3E4E6` | `#545B66` | | | +| `libro.cell.header.title` | | `#D6D8DA` | `#000A1A` | | | +| `libro.code.border.color` | | `#353638` | `#DCE4EC` | | | +| `libro.input.border.color` | | `#505559` | `#00000026` | | | +| `libro.input.background.color` | | `#FFFFFF0A` | `#FFFFFF` | | | +| `libro.input.group.btn.background.color` | | `#00000005` | `#00000005` | | | +| `libro.table.innner.border.color` | | `#1AFFFF` | `#E5EBF1` | | | +| `libro.table.bottom.border.color` | | `#424242` | `#E2E7EC` | | | +| `libro.editor.keyword.color` | | `#109B67` | `#098658` | | | +| `libro.editor.number.color` | | `#109B67` | `#098658` | | | +| `libro.editor.variable.2.color` | | `#5DA4EA` | `#2060A0` | | | +| `libro.editor.punctuation.color` | | `#5DA4EA` | `#2060A0` | | | +| `libro.editor.property.color` | | `#5DA4EA` | `#2060A0` | | | +| `libro.editor.operator.color` | | `#E12EE1` | `#C700C7` | | | +| `libro.editor.meta.color` | | `#E12EE1` | `#C700C7` | | | +| `libro.editor.builtin.color` | | `#109B67` | `#098658` | | | +| `libro.editor.variable.color` | | `#E3E4E6` | `#212121` | | | +| `libro.editor.def.color` | | `#187DFF` | `#003CFF` | | | +| `libro.editor.comment.color` | | `#618961` | `#406040` | | | +| `libro.editor.string.color` | | `#FF5B48` | `#C03030` | | | +| `libro.editor.activeline.color` | | `#E5E8F01A` | `#E5E8F080` | | | +| `libro.editor.selectionMatch.color` | | `#99FF7780` | `#DDE6FF` | | | +| `libro.editor.selection.color` | | `#B4CEFF` | `#B4CEFF` | | | +| `libro.editor.gutter.number.color` | | `#A8EABF` | `#A4AECB` | | | +| `libro.editor.line.color` | | `#565C6D` | `#A4AECB` | | | +| `libro.editor.cursor.color` | | `#FFFFFF` | `#000000` | | | +| `libro.editor.indent.marker.bg.color` | | `#42444D` | `#D6DBEB` | | | +| `libro.editor.indent.marker.active.bg.color` | | `#788491` | `#9f9f9f` | | | diff --git a/packages/libro-core/src/command/document-commands.ts b/packages/libro-core/src/command/document-commands.ts index 2999db90..b7c5ed4a 100644 --- a/packages/libro-core/src/command/document-commands.ts +++ b/packages/libro-core/src/command/document-commands.ts @@ -12,7 +12,7 @@ export const DocumentCommands: Record< keybind: 'ctrlcmd+s', }, OpenSettings: { - id: 'document.notebook.open_setting', + id: 'document:setting', icon: SettingOutlined, }, }; diff --git a/packages/libro-core/src/command/kernel-command.ts b/packages/libro-core/src/command/kernel-command.ts index c15e5826..ab3ff591 100644 --- a/packages/libro-core/src/command/kernel-command.ts +++ b/packages/libro-core/src/command/kernel-command.ts @@ -31,9 +31,7 @@ export const KernelCommands: Record = { id: 'notebook:shutdown-kernel', label: `Shutdown Kernel`, }, - ShowKernelStatus: { - id: 'notebook:show-kernel-status', - }, + // TODO: remove this command ShowKernelStatusAndSelector: { id: 'notebook:show-kernel-status-and-selector', }, diff --git a/packages/libro-core/src/command/notebook-commands.ts b/packages/libro-core/src/command/notebook-commands.ts index 8eefdd77..a7a644f3 100644 --- a/packages/libro-core/src/command/notebook-commands.ts +++ b/packages/libro-core/src/command/notebook-commands.ts @@ -107,7 +107,7 @@ export const NotebookCommands: Record< }, CloseAndShutdown: { id: 'notebook:close-and-shutdown', - label: `Close and Shut Down Notebook`, + label: `Close editor and shut down kernel`, icon: PoweroffOutlined, }, // TODO: 确定命令含义 @@ -123,16 +123,6 @@ export const NotebookCommands: Record< icon: CopyOutlined, when: 'commandMode', }, - // TODO: 确定命令含义 - CopyToClipboard: { - id: 'notebook:copy-to-clipboard', - label: `Copy Output to Clipboard`, - }, - // TODO: 确定命令含义 - CreateOutputView: { - id: 'notebook:create-output-view', - label: `Create New View for Cell Output`, - }, CutCell: { id: 'notebook:cut-cell', label: `Cut Cells`, @@ -340,6 +330,7 @@ export const NotebookCommands: Record< icon: SnippetsOutlined, when: 'commandMode', }, + // TODO: register keybind Redo: { id: 'notebook:redo', label: `Redo`, diff --git a/packages/libro-core/src/configuration/libro-configuration.ts b/packages/libro-core/src/configuration/libro-configuration.ts index 0ba81909..83915f97 100644 --- a/packages/libro-core/src/configuration/libro-configuration.ts +++ b/packages/libro-core/src/configuration/libro-configuration.ts @@ -13,7 +13,7 @@ export const HeaderToolbarVisible: ConfigurationNode = { }; export const CellTopToolbarSetting: ConfigurationNode = { - id: 'libro.cell.toptoolbar', + id: 'libro.cell.top-toolbar', description: l10n.t('是否显示cell顶部工具栏'), title: l10n.t('cell顶部工具栏'), type: 'checkbox', @@ -24,7 +24,7 @@ export const CellTopToolbarSetting: ConfigurationNode = { }; export const CellSideToolbarVisible: ConfigurationNode = { - id: 'libro.cell.sidetoolbar', + id: 'libro.cell.side-toolbar', description: l10n.t('是否显示cell侧边工具栏'), title: l10n.t('cell侧边工具栏'), type: 'checkbox', @@ -35,7 +35,7 @@ export const CellSideToolbarVisible: ConfigurationNode = { }; export const AutoInsertWhenNoCell: ConfigurationNode = { - id: 'libro.command.insertcellbelow', + id: 'libro.command.insert-cell-below', description: l10n.t('没有cell时是否默认创建cell'), title: l10n.t('默认创建cell'), type: 'checkbox', @@ -46,7 +46,7 @@ export const AutoInsertWhenNoCell: ConfigurationNode = { }; export const EnterEditModeWhenAddCell: ConfigurationNode = { - id: 'libro.command.entereditmodewhenaddcell', + id: 'libro.command.enter-edit-mode-when-add-cell', description: l10n.t('增加cell操作默认进入编辑态'), title: l10n.t('默认进入编辑态'), type: 'checkbox', @@ -55,8 +55,8 @@ export const EnterEditModeWhenAddCell: ConfigurationNode = { type: 'boolean', }, }; -export const CollapserClickActive: ConfigurationNode = { - id: 'libro.command.collapserclickactive', +export const CollapserActive: ConfigurationNode = { + id: 'libro.command.collapser-active', description: l10n.t('点击左侧长条是否可以隐藏与显示cell'), title: l10n.t('默认点击长条可以隐藏与显示cell'), type: 'checkbox', @@ -66,7 +66,7 @@ export const CollapserClickActive: ConfigurationNode = { }, }; export const MultiSelectionWhenShiftClick: ConfigurationNode = { - id: 'libro.command.multiselectionwhenshiftclick', + id: 'libro.command.multiselection-when-shift-click', description: l10n.t('按住shift键并点击拖拽区域可以进行多选'), title: l10n.t('默认按住shift键并点击拖拽区域可以进行多选'), type: 'checkbox', diff --git a/packages/libro-core/src/module.ts b/packages/libro-core/src/module.ts index 3a0039a2..d13e541b 100644 --- a/packages/libro-core/src/module.ts +++ b/packages/libro-core/src/module.ts @@ -1,5 +1,5 @@ import { CodeEditorModule } from '@difizen/libro-code-editor'; -import { ConfigurationModule } from '@difizen/mana-app'; +import { ConfigurationModule, ManaAppPreset } from '@difizen/mana-app'; import { ManaModule } from '@difizen/mana-app'; import { LibroCellModule } from './cell/libro-cell-module.js'; @@ -80,6 +80,7 @@ export const LibroModule = ManaModule.create() }, ) .dependOn( + ManaAppPreset, LibroCellModule, LibroSlotModule, CodeEditorModule, diff --git a/packages/libro-core/src/slot/libro-slot-protocol.ts b/packages/libro-core/src/slot/libro-slot-protocol.ts index 65d19353..baa975ed 100644 --- a/packages/libro-core/src/slot/libro-slot-protocol.ts +++ b/packages/libro-core/src/slot/libro-slot-protocol.ts @@ -17,7 +17,7 @@ export interface LibroExtensionSlotContribution { }; } -export type LibroSlot = 'content' | 'container' | 'list' | 'right' | 'containerLog'; +export type LibroSlot = 'content' | 'container' | 'list' | 'right'; export interface DisplayView { isDisplay: boolean; diff --git a/packages/libro-core/src/theme/libro-color-registry.ts b/packages/libro-core/src/theme/libro-color-registry.ts index de6f4252..b914fcf8 100644 --- a/packages/libro-core/src/theme/libro-color-registry.ts +++ b/packages/libro-core/src/theme/libro-color-registry.ts @@ -19,12 +19,12 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.background', - defaults: { dark: '#1f2022', light: '#ffffff' }, + defaults: { dark: '#1F2022', light: '#FFFFFF' }, description: '', }, { id: 'libro.popover.background.color', - defaults: { dark: '#2f3032', light: '#ffffff' }, + defaults: { dark: '#2F3032', light: '#FFFFFF' }, description: '', }, { @@ -35,8 +35,8 @@ export class LibroColorRegistry implements ColorContribution { { id: 'libro.dropdown.icon.color', defaults: { - dark: Color.rgba(255, 255, 255, 0.3), - light: Color.rgba(0, 0, 0, 0.2), + dark: '#FFFFFF4D', + light: '#00000033', }, description: '', }, @@ -47,24 +47,24 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.text.default.color', - defaults: { dark: '#e3e4e6', light: '#000000' }, + defaults: { dark: '#E3E4E6', light: '#000000' }, description: '', }, { id: 'libro.text.tertiary.color', - defaults: { dark: '#bdc0c4', light: '#B8BABA' }, + defaults: { dark: '#BDC0C4', light: '#B8BABA' }, description: '', }, { id: 'libro.output.background', - defaults: { dark: '#292A2D', light: '#fff' }, + defaults: { dark: '#292A2D', light: '#FFFFFF' }, description: '', }, { id: 'libro.toptoolbar.border.color', defaults: { - dark: Color.rgba(255, 255, 255, 0.1), - light: Color.rgba(0, 0, 0, 0.1), + dark: '#FFFFFF1A', + light: '#0000001A', }, description: '', }, @@ -76,47 +76,47 @@ export class LibroColorRegistry implements ColorContribution { { id: 'libro.toptoolbar.disabled.icon.color', defaults: { - dark: Color.rgba(255, 255, 255, 0.3), - light: Color.rgba(0, 0, 0, 0.25), + dark: '#FFFFFF4D', + light: '#00000040', }, description: '', }, { id: 'libro.toptoolbar.text.color', - defaults: { dark: '#f5f5f5', light: '#000000' }, + defaults: { dark: '#F5F5F5', light: '#000000' }, description: '', }, { id: 'libro.bottom.btn.background.color', defaults: { - dark: Color.rgba(255, 255, 255, 0.04), - light: Color.rgba(255, 255, 255, 1), + dark: '#FFFFFF0A', + light: '#FFFFFF', }, description: '', }, { id: 'libro.bottom.btn.border.color', - defaults: { dark: '#505559', light: Color.rgba(0, 10, 26, 0.16) }, + defaults: { dark: '#505559', light: '#000A1A29' }, description: '', }, { id: 'libro.bottom.btn.icon.color', - defaults: { dark: '#505559', light: Color.rgba(82, 89, 100, 0.85) }, + defaults: { dark: '#505559', light: '#525964D9' }, description: '', }, { id: 'libro.bottom.btn.text.color', - defaults: { dark: '#E3E4E6', light: Color.rgba(0, 10, 26, 0.68) }, + defaults: { dark: '#E3E4E6', light: '#000A1AAD' }, description: '', }, { id: 'libro.default.btn.background.color', - defaults: { dark: Color.rgba(255, 255, 255, 0.1), light: '#FFFFFF' }, + defaults: { dark: '#FFFFFF1A', light: '#FFFFFF' }, description: '', }, { id: 'libro.default.btn.text.color', - defaults: { dark: '#E3E4E6', light: Color.rgba(0, 10, 26, 0.68) }, + defaults: { dark: '#E3E4E6', light: '#000A1AAD' }, description: '', }, { @@ -131,17 +131,17 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.toolbar.menu.label.color', - defaults: { dark: '#BDC0C4', light: Color.rgba(0, 0, 0, 0.65) }, + defaults: { dark: '#BDC0C4', light: '#000000A6' }, description: '', }, { id: 'libro.toolbar.menu.disabled.label.color', - defaults: { dark: '#878c93', light: Color.rgba(0, 0, 0, 0.25) }, + defaults: { dark: '#878C93', light: '#00000040' }, description: '', }, { id: 'libro.toolbar.menu.keybind.color', - defaults: { dark: '#878c93', light: Color.rgba(0, 0, 0, 0.45) }, + defaults: { dark: '#878C93', light: '#00000073' }, description: '', }, { @@ -152,27 +152,27 @@ export class LibroColorRegistry implements ColorContribution { { id: 'libro.sidetoolbar.border.color', defaults: { - dark: Color.rgba(255, 255, 255, 0.08), - light: Color.rgba(0, 0, 0, 0.1), + dark: '#FFFFFF14', + light: '#0000001A', }, description: '', }, { id: 'libro.close.color', defaults: { - dark: Color.rgba(255, 255, 255, 0.45), - light: Color.rgba(0, 0, 0, 0.45), + dark: '#FFFFFF73', + light: '#00000073', }, description: '', }, { id: 'libro.modal.title.color', - defaults: { dark: '#EDEEEF', light: Color.rgba(0, 0, 0, 0.85) }, + defaults: { dark: '#EDEEEF', light: '#000000D9' }, description: '', }, { id: 'libro.modal.content.color', - defaults: { dark: '#e3e4e6', light: '#000a1a' }, + defaults: { dark: '#E3E4E6', light: '#000A1A' }, description: '', }, { @@ -187,7 +187,7 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.tip.font.color', - defaults: { dark: '#D6D8DA', light: Color.rgba(0, 0, 0, 0.5) }, + defaults: { dark: '#D6D8DA', light: '#00000080' }, description: '', }, { @@ -202,24 +202,24 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.error.color', - defaults: { dark: '#cf4c52', light: '#ed1345' }, + defaults: { dark: '#CF4C52', light: '#ED1345' }, description: '', }, { id: 'libro.cell.border.color', - defaults: { dark: '#3b3c42', light: '#D6DEE6' }, + defaults: { dark: '#3B3C42', light: '#D6DEE6' }, description: '', }, { id: 'libro.cell.active.border.color', - defaults: { dark: '#378edf', light: '#3490ed' }, + defaults: { dark: '#378EDF', light: '#3490ED' }, description: '', }, { id: 'libro.cell.active.border.shadow.color', defaults: { - dark: Color.rgba(73, 162, 250, 0.25), - light: Color.rgba(53, 146, 238, 0.25), + dark: '#49A2FA40', + light: '#3592EE40', }, description: '', }, @@ -230,7 +230,7 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.cell.header.title', - defaults: { dark: '#d6d8da', light: '#000a1a' }, + defaults: { dark: '#D6D8DA', light: '#000A1A' }, description: '', }, { @@ -240,22 +240,22 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.input.border.color', - defaults: { dark: '#505559', light: Color.rgba(0, 0, 0, 0.15) }, + defaults: { dark: '#505559', light: '#00000026' }, description: '', }, { id: 'libro.input.background.color', - defaults: { dark: Color.rgba(255, 255, 255, 0.04), light: '#FFFFFF' }, + defaults: { dark: '#FFFFFF0A', light: '#FFFFFF' }, description: '', }, { id: 'libro.input.group.btn.background.color', - defaults: { dark: Color.rgba(0, 0, 0, 0.02), light: Color.rgba(0, 0, 0, 0.02) }, + defaults: { dark: '#00000005', light: '#00000005' }, description: '', }, { id: 'libro.table.innner.border.color', - defaults: { dark: '#1affffff', light: '#E5EBF1' }, + defaults: { dark: '#1AFFFF', light: '#E5EBF1' }, description: '', }, { @@ -265,52 +265,52 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.editor.keyword.color', - defaults: { dark: '#109b67', light: '#098658' }, + defaults: { dark: '#109B67', light: '#098658' }, description: '', }, { id: 'libro.editor.number.color', - defaults: { dark: '#109b67', light: '#098658' }, + defaults: { dark: '#109B67', light: '#098658' }, description: '', }, { id: 'libro.editor.variable.2.color', - defaults: { dark: '#5da4ea', light: '#2060A0' }, + defaults: { dark: '#5DA4EA', light: '#2060A0' }, description: '', }, { id: 'libro.editor.punctuation.color', - defaults: { dark: '#5da4ea', light: '#2060A0' }, + defaults: { dark: '#5DA4EA', light: '#2060A0' }, description: '', }, { id: 'libro.editor.property.color', - defaults: { dark: '#5da4ea', light: '#2060A0' }, + defaults: { dark: '#5DA4EA', light: '#2060A0' }, description: '', }, { id: 'libro.editor.operator.color', - defaults: { dark: 'e12ee1', light: '#C700C7' }, + defaults: { dark: 'E12EE1', light: '#C700C7' }, description: '', }, { id: 'libro.editor.meta.color', - defaults: { dark: '#e12ee1', light: '#C700C7' }, + defaults: { dark: '#E12EE1', light: '#C700C7' }, description: '', }, { id: 'libro.editor.builtin.color', - defaults: { dark: '#109b67', light: '#098658' }, + defaults: { dark: '#109B67', light: '#098658' }, description: '', }, { id: 'libro.editor.variable.color', - defaults: { dark: '#e3e4e6', light: '#212121' }, + defaults: { dark: '#E3E4E6', light: '#212121' }, description: '', }, { id: 'libro.editor.def.color', - defaults: { dark: '#187dff', light: '#003cff' }, + defaults: { dark: '#187DFF', light: '#003CFF' }, description: '', }, { @@ -320,20 +320,20 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.editor.string.color', - defaults: { dark: '#ff5b48', light: '#c03030' }, + defaults: { dark: '#FF5B48', light: '#C03030' }, description: '', }, { id: 'libro.editor.activeline.color', defaults: { - dark: Color.rgba(229, 232, 240, 0.1), - light: Color.rgba(229, 232, 240, 0.5), + dark: '#E5E8F01A', + light: '#E5E8F080', }, description: '', }, { id: 'libro.editor.selectionMatch.color', - defaults: { dark: '#99ff7780', light: '#DDE6FF' }, + defaults: { dark: '#99FF7780', light: '#DDE6FF' }, description: '', }, { @@ -343,7 +343,7 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.editor.gutter.number.color', - defaults: { dark: '#a8aebf', light: '#A4AECB' }, + defaults: { dark: '#A8EABF', light: '#A4AECB' }, description: '', }, { @@ -353,12 +353,12 @@ export class LibroColorRegistry implements ColorContribution { }, { id: 'libro.editor.cursor.color', - defaults: { dark: '#ffffff', light: '#000000' }, + defaults: { dark: '#FFFFFF', light: '#000000' }, description: '', }, { id: 'libro.editor.indent.marker.bg.color', - defaults: { dark: '#42444d', light: '#d6dbeb' }, + defaults: { dark: '#42444D', light: '#D6DBEB' }, description: '', }, {