Skip to content

Commit

Permalink
docs(core): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BroKun committed Nov 9, 2023
1 parent ebf7c9e commit 8b57958
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 82 deletions.
281 changes: 279 additions & 2 deletions packages/libro-core/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/libro-core/src/command/document-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const DocumentCommands: Record<
keybind: 'ctrlcmd+s',
},
OpenSettings: {
id: 'document.notebook.open_setting',
id: 'document:setting',
icon: SettingOutlined,
},
};
4 changes: 1 addition & 3 deletions packages/libro-core/src/command/kernel-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export const KernelCommands: Record<string, Command & { keybind?: string }> = {
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',
},
Expand Down
13 changes: 2 additions & 11 deletions packages/libro-core/src/command/notebook-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: 确定命令含义
Expand All @@ -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`,
Expand Down Expand Up @@ -340,6 +330,7 @@ export const NotebookCommands: Record<
icon: SnippetsOutlined,
when: 'commandMode',
},
// TODO: register keybind
Redo: {
id: 'notebook:redo',
label: `Redo`,
Expand Down
14 changes: 7 additions & 7 deletions packages/libro-core/src/configuration/libro-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const HeaderToolbarVisible: ConfigurationNode<boolean> = {
};

export const CellTopToolbarSetting: ConfigurationNode<boolean> = {
id: 'libro.cell.toptoolbar',
id: 'libro.cell.top-toolbar',
description: l10n.t('是否显示cell顶部工具栏'),
title: l10n.t('cell顶部工具栏'),
type: 'checkbox',
Expand All @@ -24,7 +24,7 @@ export const CellTopToolbarSetting: ConfigurationNode<boolean> = {
};

export const CellSideToolbarVisible: ConfigurationNode<boolean> = {
id: 'libro.cell.sidetoolbar',
id: 'libro.cell.side-toolbar',
description: l10n.t('是否显示cell侧边工具栏'),
title: l10n.t('cell侧边工具栏'),
type: 'checkbox',
Expand All @@ -35,7 +35,7 @@ export const CellSideToolbarVisible: ConfigurationNode<boolean> = {
};

export const AutoInsertWhenNoCell: ConfigurationNode<boolean> = {
id: 'libro.command.insertcellbelow',
id: 'libro.command.insert-cell-below',
description: l10n.t('没有cell时是否默认创建cell'),
title: l10n.t('默认创建cell'),
type: 'checkbox',
Expand All @@ -46,7 +46,7 @@ export const AutoInsertWhenNoCell: ConfigurationNode<boolean> = {
};

export const EnterEditModeWhenAddCell: ConfigurationNode<boolean> = {
id: 'libro.command.entereditmodewhenaddcell',
id: 'libro.command.enter-edit-mode-when-add-cell',
description: l10n.t('增加cell操作默认进入编辑态'),
title: l10n.t('默认进入编辑态'),
type: 'checkbox',
Expand All @@ -55,8 +55,8 @@ export const EnterEditModeWhenAddCell: ConfigurationNode<boolean> = {
type: 'boolean',
},
};
export const CollapserClickActive: ConfigurationNode<boolean> = {
id: 'libro.command.collapserclickactive',
export const CollapserActive: ConfigurationNode<boolean> = {
id: 'libro.command.collapser-active',
description: l10n.t('点击左侧长条是否可以隐藏与显示cell'),
title: l10n.t('默认点击长条可以隐藏与显示cell'),
type: 'checkbox',
Expand All @@ -66,7 +66,7 @@ export const CollapserClickActive: ConfigurationNode<boolean> = {
},
};
export const MultiSelectionWhenShiftClick: ConfigurationNode<boolean> = {
id: 'libro.command.multiselectionwhenshiftclick',
id: 'libro.command.multiselection-when-shift-click',
description: l10n.t('按住shift键并点击拖拽区域可以进行多选'),
title: l10n.t('默认按住shift键并点击拖拽区域可以进行多选'),
type: 'checkbox',
Expand Down
3 changes: 2 additions & 1 deletion packages/libro-core/src/module.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -80,6 +80,7 @@ export const LibroModule = ManaModule.create()
},
)
.dependOn(
ManaAppPreset,
LibroCellModule,
LibroSlotModule,
CodeEditorModule,
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-core/src/slot/libro-slot-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 8b57958

Please sign in to comment.