@difizen/libro-core 0.0.0-snapshot-20241017072317
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +280 -0
- package/es/add-cell/index.d.ts +4 -0
- package/es/add-cell/index.d.ts.map +1 -0
- package/es/add-cell/index.js +3 -0
- package/es/add-cell/index.less +38 -0
- package/es/add-cell/libro-add-cell-module.d.ts +3 -0
- package/es/add-cell/libro-add-cell-module.d.ts.map +1 -0
- package/es/add-cell/libro-add-cell-module.js +4 -0
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts +11 -0
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts.map +1 -0
- package/es/add-cell/libro-add-cell-slot-contribution.js +59 -0
- package/es/add-cell/libro-add-cell-view.d.ts +21 -0
- package/es/add-cell/libro-add-cell-view.d.ts.map +1 -0
- package/es/add-cell/libro-add-cell-view.js +121 -0
- package/es/cell/index.d.ts +10 -0
- package/es/cell/index.d.ts.map +1 -0
- package/es/cell/index.js +9 -0
- package/es/cell/libro-cell-contribution.d.ts +12 -0
- package/es/cell/libro-cell-contribution.d.ts.map +1 -0
- package/es/cell/libro-cell-contribution.js +47 -0
- package/es/cell/libro-cell-model.d.ts +29 -0
- package/es/cell/libro-cell-model.d.ts.map +1 -0
- package/es/cell/libro-cell-model.js +130 -0
- package/es/cell/libro-cell-module.d.ts +10 -0
- package/es/cell/libro-cell-module.d.ts.map +1 -0
- package/es/cell/libro-cell-module.js +30 -0
- package/es/cell/libro-cell-protocol.d.ts +44 -0
- package/es/cell/libro-cell-protocol.d.ts.map +1 -0
- package/es/cell/libro-cell-protocol.js +11 -0
- package/es/cell/libro-cell-service.d.ts +28 -0
- package/es/cell/libro-cell-service.d.ts.map +1 -0
- package/es/cell/libro-cell-service.js +245 -0
- package/es/cell/libro-cell-view.d.ts +74 -0
- package/es/cell/libro-cell-view.d.ts.map +1 -0
- package/es/cell/libro-cell-view.js +239 -0
- package/es/cell/libro-edit-cell-view.d.ts +44 -0
- package/es/cell/libro-edit-cell-view.d.ts.map +1 -0
- package/es/cell/libro-edit-cell-view.js +256 -0
- package/es/cell/libro-executable-cell-model.d.ts +14 -0
- package/es/cell/libro-executable-cell-model.d.ts.map +1 -0
- package/es/cell/libro-executable-cell-model.js +7 -0
- package/es/cell/libro-executable-cell-view.d.ts +34 -0
- package/es/cell/libro-executable-cell-view.d.ts.map +1 -0
- package/es/cell/libro-executable-cell-view.js +74 -0
- package/es/cell/libro-markdown-cell-model.d.ts +9 -0
- package/es/cell/libro-markdown-cell-model.d.ts.map +1 -0
- package/es/cell/libro-markdown-cell-model.js +7 -0
- package/es/collapse-service.d.ts +36 -0
- package/es/collapse-service.d.ts.map +1 -0
- package/es/collapse-service.js +55 -0
- package/es/command/document-commands.d.ts +5 -0
- package/es/command/document-commands.d.ts.map +1 -0
- package/es/command/document-commands.js +21 -0
- package/es/command/index.d.ts +7 -0
- package/es/command/index.d.ts.map +1 -0
- package/es/command/index.js +6 -0
- package/es/command/kernel-command.d.ts +5 -0
- package/es/command/kernel-command.d.ts.map +1 -0
- package/es/command/kernel-command.js +40 -0
- package/es/command/libro-command-contribution.d.ts +13 -0
- package/es/command/libro-command-contribution.d.ts.map +1 -0
- package/es/command/libro-command-contribution.js +1842 -0
- package/es/command/libro-command-register.d.ts +21 -0
- package/es/command/libro-command-register.d.ts.map +1 -0
- package/es/command/libro-command-register.js +111 -0
- package/es/command/module.d.ts +3 -0
- package/es/command/module.d.ts.map +1 -0
- package/es/command/module.js +4 -0
- package/es/command/notebook-commands.d.ts +6 -0
- package/es/command/notebook-commands.d.ts.map +1 -0
- package/es/command/notebook-commands.js +472 -0
- package/es/components/cell-protocol.d.ts +20 -0
- package/es/components/cell-protocol.d.ts.map +1 -0
- package/es/components/cell-protocol.js +4 -0
- package/es/components/dnd-cell-item-render.d.ts +16 -0
- package/es/components/dnd-cell-item-render.d.ts.map +1 -0
- package/es/components/dnd-cell-item-render.js +364 -0
- package/es/components/dnd-component/custom-drag-layer.d.ts +9 -0
- package/es/components/dnd-component/custom-drag-layer.d.ts.map +1 -0
- package/es/components/dnd-component/custom-drag-layer.js +140 -0
- package/es/components/dnd-component/default-dnd-content.d.ts +11 -0
- package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -0
- package/es/components/dnd-component/default-dnd-content.js +292 -0
- package/es/components/dnd-component/dnd-context.d.ts +3 -0
- package/es/components/dnd-component/dnd-context.d.ts.map +1 -0
- package/es/components/dnd-component/dnd-context.js +20 -0
- package/es/components/dnd-component/dnd-list.d.ts +14 -0
- package/es/components/dnd-component/dnd-list.d.ts.map +1 -0
- package/es/components/dnd-component/dnd-list.js +182 -0
- package/es/components/dnd-component/index.d.ts +5 -0
- package/es/components/dnd-component/index.d.ts.map +1 -0
- package/es/components/dnd-component/index.js +4 -0
- package/es/components/dnd-component/index.less +8 -0
- package/es/components/dnd-component/overscanIndices-getter.d.ts +22 -0
- package/es/components/dnd-component/overscanIndices-getter.d.ts.map +1 -0
- package/es/components/dnd-component/overscanIndices-getter.js +58 -0
- package/es/components/dnd-component/virtualized-manager.d.ts +19 -0
- package/es/components/dnd-component/virtualized-manager.d.ts.map +1 -0
- package/es/components/dnd-component/virtualized-manager.js +60 -0
- package/es/components/index.d.ts +6 -0
- package/es/components/index.d.ts.map +1 -0
- package/es/components/index.js +5 -0
- package/es/components/libro-component.d.ts +5 -0
- package/es/components/libro-component.d.ts.map +1 -0
- package/es/components/libro-component.js +35 -0
- package/es/components/libro-side-toolbar-menu.d.ts +21 -0
- package/es/components/libro-side-toolbar-menu.d.ts.map +1 -0
- package/es/components/libro-side-toolbar-menu.js +58 -0
- package/es/components/libro-view-header.d.ts +3 -0
- package/es/components/libro-view-header.d.ts.map +1 -0
- package/es/components/libro-view-header.js +37 -0
- package/es/components/libro-virtualized-render.d.ts +15 -0
- package/es/components/libro-virtualized-render.d.ts.map +1 -0
- package/es/components/libro-virtualized-render.js +174 -0
- package/es/content/index.d.ts +6 -0
- package/es/content/index.d.ts.map +1 -0
- package/es/content/index.js +5 -0
- package/es/content/libro-content-contribution.d.ts +11 -0
- package/es/content/libro-content-contribution.d.ts.map +1 -0
- package/es/content/libro-content-contribution.js +31 -0
- package/es/content/libro-content-module.d.ts +3 -0
- package/es/content/libro-content-module.d.ts.map +1 -0
- package/es/content/libro-content-module.js +6 -0
- package/es/content/libro-content-protocol.d.ts +13 -0
- package/es/content/libro-content-protocol.d.ts.map +1 -0
- package/es/content/libro-content-protocol.js +3 -0
- package/es/content/libro-content-service.d.ts +11 -0
- package/es/content/libro-content-service.d.ts.map +1 -0
- package/es/content/libro-content-service.js +63 -0
- package/es/content/libro-save-content-contribution.d.ts +6 -0
- package/es/content/libro-save-content-contribution.d.ts.map +1 -0
- package/es/content/libro-save-content-contribution.js +27 -0
- package/es/formatter/index.d.ts +6 -0
- package/es/formatter/index.d.ts.map +1 -0
- package/es/formatter/index.js +5 -0
- package/es/formatter/libro-formatter-json-contribution.d.ts +18 -0
- package/es/formatter/libro-formatter-json-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-json-contribution.js +41 -0
- package/es/formatter/libro-formatter-manager.d.ts +16 -0
- package/es/formatter/libro-formatter-manager.d.ts.map +1 -0
- package/es/formatter/libro-formatter-manager.js +86 -0
- package/es/formatter/libro-formatter-module.d.ts +3 -0
- package/es/formatter/libro-formatter-module.d.ts.map +1 -0
- package/es/formatter/libro-formatter-module.js +7 -0
- package/es/formatter/libro-formatter-protocol.d.ts +37 -0
- package/es/formatter/libro-formatter-protocol.d.ts.map +1 -0
- package/es/formatter/libro-formatter-protocol.js +18 -0
- package/es/formatter/libro-formatter-string-contribution.d.ts +18 -0
- package/es/formatter/libro-formatter-string-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-string-contribution.js +41 -0
- package/es/formatter/libro-formatter-trans-default-contribution.d.ts +7 -0
- package/es/formatter/libro-formatter-trans-default-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-trans-default-contribution.js +19 -0
- package/es/index.d.ts +26 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +25 -0
- package/es/index.less +781 -0
- package/es/libro-context-key.d.ts +26 -0
- package/es/libro-context-key.d.ts.map +1 -0
- package/es/libro-context-key.js +84 -0
- package/es/libro-keybind-registry.d.ts +5 -0
- package/es/libro-keybind-registry.d.ts.map +1 -0
- package/es/libro-keybind-registry.js +68 -0
- package/es/libro-model.d.ts +145 -0
- package/es/libro-model.d.ts.map +1 -0
- package/es/libro-model.js +921 -0
- package/es/libro-protocol.d.ts +315 -0
- package/es/libro-protocol.d.ts.map +1 -0
- package/es/libro-protocol.js +47 -0
- package/es/libro-service.d.ts +69 -0
- package/es/libro-service.d.ts.map +1 -0
- package/es/libro-service.js +303 -0
- package/es/libro-setting-contribution.d.ts +5 -0
- package/es/libro-setting-contribution.d.ts.map +1 -0
- package/es/libro-setting-contribution.js +23 -0
- package/es/libro-setting.d.ts +12 -0
- package/es/libro-setting.d.ts.map +1 -0
- package/es/libro-setting.js +101 -0
- package/es/libro-view-tracker.d.ts +6 -0
- package/es/libro-view-tracker.d.ts.map +1 -0
- package/es/libro-view-tracker.js +13 -0
- package/es/libro-view.d.ts +170 -0
- package/es/libro-view.d.ts.map +1 -0
- package/es/libro-view.js +2077 -0
- package/es/libro-workspace-service.d.ts +17 -0
- package/es/libro-workspace-service.d.ts.map +1 -0
- package/es/libro-workspace-service.js +36 -0
- package/es/material-from-designer.d.ts +31 -0
- package/es/material-from-designer.d.ts.map +1 -0
- package/es/material-from-designer.js +697 -0
- package/es/module.d.ts +3 -0
- package/es/module.d.ts.map +1 -0
- package/es/module.js +71 -0
- package/es/output/index.d.ts +6 -0
- package/es/output/index.d.ts.map +1 -0
- package/es/output/index.js +5 -0
- package/es/output/output-area.d.ts +51 -0
- package/es/output/output-area.d.ts.map +1 -0
- package/es/output/output-area.js +399 -0
- package/es/output/output-contribution.d.ts +10 -0
- package/es/output/output-contribution.d.ts.map +1 -0
- package/es/output/output-contribution.js +36 -0
- package/es/output/output-model.d.ts +28 -0
- package/es/output/output-model.d.ts.map +1 -0
- package/es/output/output-model.js +105 -0
- package/es/output/output-module.d.ts +3 -0
- package/es/output/output-module.d.ts.map +1 -0
- package/es/output/output-module.js +6 -0
- package/es/output/output-protocol.d.ts +134 -0
- package/es/output/output-protocol.d.ts.map +1 -0
- package/es/output/output-protocol.js +16 -0
- package/es/settings/index.d.ts +5 -0
- package/es/settings/index.d.ts.map +1 -0
- package/es/settings/index.js +4 -0
- package/es/settings/index.less +3 -0
- package/es/settings/module.d.ts +3 -0
- package/es/settings/module.d.ts.map +1 -0
- package/es/settings/module.js +4 -0
- package/es/settings/setting-editor/configuration-panel-view.d.ts +13 -0
- package/es/settings/setting-editor/configuration-panel-view.d.ts.map +1 -0
- package/es/settings/setting-editor/configuration-panel-view.js +115 -0
- package/es/settings/setting-editor/configuration-render-contribution.d.ts +6 -0
- package/es/settings/setting-editor/configuration-render-contribution.d.ts.map +1 -0
- package/es/settings/setting-editor/configuration-render-contribution.js +77 -0
- package/es/settings/setting-editor/default-node-render.d.ts +9 -0
- package/es/settings/setting-editor/default-node-render.d.ts.map +1 -0
- package/es/settings/setting-editor/default-node-render.js +79 -0
- package/es/settings/setting-editor/index.d.ts +7 -0
- package/es/settings/setting-editor/index.d.ts.map +1 -0
- package/es/settings/setting-editor/index.js +6 -0
- package/es/settings/setting-editor/index.less +12 -0
- package/es/settings/setting-editor/module.d.ts +3 -0
- package/es/settings/setting-editor/module.d.ts.map +1 -0
- package/es/settings/setting-editor/module.js +11 -0
- package/es/settings/setting-editor/setting-editor-view.d.ts +15 -0
- package/es/settings/setting-editor/setting-editor-view.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-editor-view.js +169 -0
- package/es/settings/setting-editor/setting-tree-service.d.ts +9 -0
- package/es/settings/setting-editor/setting-tree-service.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-tree-service.js +118 -0
- package/es/settings/setting-editor/setting-tree-view.d.ts +19 -0
- package/es/settings/setting-editor/setting-tree-view.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-tree-view.js +87 -0
- package/es/settings/settings-contribution.d.ts +7 -0
- package/es/settings/settings-contribution.d.ts.map +1 -0
- package/es/settings/settings-contribution.js +36 -0
- package/es/settings/settings-modal.d.ts +5 -0
- package/es/settings/settings-modal.d.ts.map +1 -0
- package/es/settings/settings-modal.js +53 -0
- package/es/settings/settings-modal.less +3 -0
- package/es/settings/settings-protocol.d.ts +4 -0
- package/es/settings/settings-protocol.d.ts.map +1 -0
- package/es/settings/settings-protocol.js +5 -0
- package/es/slot/index.d.ts +5 -0
- package/es/slot/index.d.ts.map +1 -0
- package/es/slot/index.js +4 -0
- package/es/slot/libro-slot-manager.d.ts +13 -0
- package/es/slot/libro-slot-manager.d.ts.map +1 -0
- package/es/slot/libro-slot-manager.js +66 -0
- package/es/slot/libro-slot-protocol.d.ts +19 -0
- package/es/slot/libro-slot-protocol.d.ts.map +1 -0
- package/es/slot/libro-slot-protocol.js +5 -0
- package/es/slot/libro-slot-view.d.ts +9 -0
- package/es/slot/libro-slot-view.d.ts.map +1 -0
- package/es/slot/libro-slot-view.js +81 -0
- package/es/slot/module.d.ts +3 -0
- package/es/slot/module.d.ts.map +1 -0
- package/es/slot/module.js +5 -0
- package/es/theme/libro-color-registry.d.ts +6 -0
- package/es/theme/libro-color-registry.d.ts.map +1 -0
- package/es/theme/libro-color-registry.js +515 -0
- package/es/toolbar/all-outputs-scroll-icon.d.ts +3 -0
- package/es/toolbar/all-outputs-scroll-icon.d.ts.map +1 -0
- package/es/toolbar/all-outputs-scroll-icon.js +10 -0
- package/es/toolbar/change-cell-to-selector.d.ts +5 -0
- package/es/toolbar/change-cell-to-selector.d.ts.map +1 -0
- package/es/toolbar/change-cell-to-selector.js +51 -0
- package/es/toolbar/hide-all-selector.d.ts +5 -0
- package/es/toolbar/hide-all-selector.d.ts.map +1 -0
- package/es/toolbar/hide-all-selector.js +99 -0
- package/es/toolbar/index.d.ts +4 -0
- package/es/toolbar/index.d.ts.map +1 -0
- package/es/toolbar/index.js +3 -0
- package/es/toolbar/index.less +59 -0
- package/es/toolbar/libro-toolbar-protocol.d.ts +4 -0
- package/es/toolbar/libro-toolbar-protocol.d.ts.map +1 -0
- package/es/toolbar/libro-toolbar-protocol.js +1 -0
- package/es/toolbar/libro-toolbar.d.ts +9 -0
- package/es/toolbar/libro-toolbar.d.ts.map +1 -0
- package/es/toolbar/libro-toolbar.js +275 -0
- package/es/toolbar/module.d.ts +3 -0
- package/es/toolbar/module.d.ts.map +1 -0
- package/es/toolbar/module.js +5 -0
- package/es/toolbar/restart-clear-outputs-contribution.d.ts +5 -0
- package/es/toolbar/restart-clear-outputs-contribution.d.ts.map +1 -0
- package/es/toolbar/restart-clear-outputs-contribution.js +23 -0
- package/es/toolbar/restart-clear-outputs-modal.d.ts +5 -0
- package/es/toolbar/restart-clear-outputs-modal.d.ts.map +1 -0
- package/es/toolbar/restart-clear-outputs-modal.js +30 -0
- package/es/toolbar/save-icon.d.ts +3 -0
- package/es/toolbar/save-icon.d.ts.map +1 -0
- package/es/toolbar/save-icon.js +54 -0
- package/es/toolbar/shutdown-contribution.d.ts +5 -0
- package/es/toolbar/shutdown-contribution.d.ts.map +1 -0
- package/es/toolbar/shutdown-contribution.js +23 -0
- package/es/toolbar/shutdown-modal.d.ts +5 -0
- package/es/toolbar/shutdown-modal.d.ts.map +1 -0
- package/es/toolbar/shutdown-modal.js +30 -0
- package/es/toolbar/side-toolar-more-select.d.ts +4 -0
- package/es/toolbar/side-toolar-more-select.d.ts.map +1 -0
- package/es/toolbar/side-toolar-more-select.js +161 -0
- package/es/typings/index.d.ts +1 -0
- package/es/virtualized-manager-helper.d.ts +11 -0
- package/es/virtualized-manager-helper.d.ts.map +1 -0
- package/es/virtualized-manager-helper.js +51 -0
- package/es/virtualized-manager.d.ts +23 -0
- package/es/virtualized-manager.d.ts.map +1 -0
- package/es/virtualized-manager.js +65 -0
- package/package.json +73 -0
- package/src/add-cell/index.less +38 -0
- package/src/add-cell/index.ts +3 -0
- package/src/add-cell/libro-add-cell-module.ts +9 -0
- package/src/add-cell/libro-add-cell-slot-contribution.ts +28 -0
- package/src/add-cell/libro-add-cell-view.tsx +99 -0
- package/src/cell/README.md +14 -0
- package/src/cell/index.ts +9 -0
- package/src/cell/libro-cell-contribution.ts +34 -0
- package/src/cell/libro-cell-model.ts +119 -0
- package/src/cell/libro-cell-module.ts +40 -0
- package/src/cell/libro-cell-protocol.ts +55 -0
- package/src/cell/libro-cell-service.ts +158 -0
- package/src/cell/libro-cell-view.tsx +156 -0
- package/src/cell/libro-edit-cell-view.tsx +205 -0
- package/src/cell/libro-executable-cell-model.ts +32 -0
- package/src/cell/libro-executable-cell-view.ts +86 -0
- package/src/cell/libro-markdown-cell-model.ts +20 -0
- package/src/collapse-service.ts +69 -0
- package/src/command/document-commands.ts +24 -0
- package/src/command/index.ts +6 -0
- package/src/command/kernel-command.ts +42 -0
- package/src/command/libro-command-contribution.ts +1346 -0
- package/src/command/libro-command-register.ts +168 -0
- package/src/command/module.ts +9 -0
- package/src/command/notebook-commands.ts +502 -0
- package/src/components/cell-protocol.ts +26 -0
- package/src/components/dnd-cell-item-render.tsx +465 -0
- package/src/components/dnd-component/custom-drag-layer.tsx +144 -0
- package/src/components/dnd-component/default-dnd-content.tsx +330 -0
- package/src/components/dnd-component/dnd-context.tsx +28 -0
- package/src/components/dnd-component/dnd-list.tsx +211 -0
- package/src/components/dnd-component/index.less +12 -0
- package/src/components/dnd-component/index.tsx +4 -0
- package/src/components/dnd-component/overscanIndices-getter.ts +92 -0
- package/src/components/dnd-component/virtualized-manager.ts +34 -0
- package/src/components/index.ts +5 -0
- package/src/components/libro-component.tsx +30 -0
- package/src/components/libro-side-toolbar-menu.tsx +82 -0
- package/src/components/libro-view-header.tsx +33 -0
- package/src/components/libro-virtualized-render.tsx +178 -0
- package/src/content/index.ts +5 -0
- package/src/content/libro-content-contribution.ts +16 -0
- package/src/content/libro-content-module.ts +17 -0
- package/src/content/libro-content-protocol.ts +14 -0
- package/src/content/libro-content-service.ts +48 -0
- package/src/content/libro-save-content-contribution.ts +12 -0
- package/src/formatter/index.ts +5 -0
- package/src/formatter/libro-formatter-json-contribution.ts +42 -0
- package/src/formatter/libro-formatter-manager.ts +85 -0
- package/src/formatter/libro-formatter-module.ts +19 -0
- package/src/formatter/libro-formatter-protocol.ts +63 -0
- package/src/formatter/libro-formatter-string-contribution.ts +41 -0
- package/src/formatter/libro-formatter-trans-default-contribution.ts +15 -0
- package/src/index.less +789 -0
- package/src/index.spec.ts +12 -0
- package/src/index.tsx +25 -0
- package/src/libro-context-key.ts +84 -0
- package/src/libro-keybind-registry.ts +43 -0
- package/src/libro-model.ts +710 -0
- package/src/libro-protocol.ts +435 -0
- package/src/libro-service.ts +234 -0
- package/src/libro-setting-contribution.ts +28 -0
- package/src/libro-setting.ts +110 -0
- package/src/libro-view-tracker.ts +9 -0
- package/src/libro-view.tsx +1532 -0
- package/src/libro-workspace-service.ts +28 -0
- package/src/material-from-designer.tsx +579 -0
- package/src/module.ts +121 -0
- package/src/output/index.ts +5 -0
- package/src/output/output-area.tsx +286 -0
- package/src/output/output-contribution.ts +14 -0
- package/src/output/output-model.tsx +70 -0
- package/src/output/output-module.ts +10 -0
- package/src/output/output-protocol.ts +168 -0
- package/src/settings/index.less +3 -0
- package/src/settings/index.ts +4 -0
- package/src/settings/module.ts +8 -0
- package/src/settings/setting-editor/configuration-panel-view.tsx +89 -0
- package/src/settings/setting-editor/configuration-render-contribution.ts +81 -0
- package/src/settings/setting-editor/default-node-render.tsx +65 -0
- package/src/settings/setting-editor/index.less +12 -0
- package/src/settings/setting-editor/index.ts +6 -0
- package/src/settings/setting-editor/module.ts +17 -0
- package/src/settings/setting-editor/setting-editor-view.tsx +93 -0
- package/src/settings/setting-editor/setting-tree-service.ts +82 -0
- package/src/settings/setting-editor/setting-tree-view.tsx +95 -0
- package/src/settings/settings-contribution.tsx +24 -0
- package/src/settings/settings-modal.less +3 -0
- package/src/settings/settings-modal.tsx +51 -0
- package/src/settings/settings-protocol.ts +7 -0
- package/src/slot/index.ts +4 -0
- package/src/slot/libro-slot-manager.ts +38 -0
- package/src/slot/libro-slot-protocol.ts +28 -0
- package/src/slot/libro-slot-view.tsx +48 -0
- package/src/slot/module.ts +9 -0
- package/src/theme/libro-color-registry.ts +386 -0
- package/src/toolbar/all-outputs-scroll-icon.tsx +19 -0
- package/src/toolbar/change-cell-to-selector.tsx +67 -0
- package/src/toolbar/hide-all-selector.tsx +126 -0
- package/src/toolbar/index.less +59 -0
- package/src/toolbar/index.ts +3 -0
- package/src/toolbar/libro-toolbar-protocol.ts +4 -0
- package/src/toolbar/libro-toolbar.tsx +231 -0
- package/src/toolbar/module.ts +11 -0
- package/src/toolbar/restart-clear-outputs-contribution.tsx +10 -0
- package/src/toolbar/restart-clear-outputs-modal.tsx +37 -0
- package/src/toolbar/save-icon.tsx +47 -0
- package/src/toolbar/shutdown-contribution.tsx +10 -0
- package/src/toolbar/shutdown-modal.tsx +37 -0
- package/src/toolbar/side-toolar-more-select.tsx +177 -0
- package/src/typings/index.d.ts +1 -0
- package/src/virtualized-manager-helper.ts +29 -0
- package/src/virtualized-manager.ts +47 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Disposable } from '@difizen/mana-app';
|
|
2
|
+
import type { IContextKey } from '@difizen/mana-app';
|
|
3
|
+
import { ContextKeyService } from '@difizen/mana-app';
|
|
4
|
+
import { LibroService } from './libro-service.js';
|
|
5
|
+
export declare class LibroContextKey {
|
|
6
|
+
protected readonly contextKeyService: ContextKeyService;
|
|
7
|
+
protected readonly libroService: LibroService;
|
|
8
|
+
protected toDisposeOnActiveChanged?: Disposable;
|
|
9
|
+
commandModeEnabled: boolean;
|
|
10
|
+
protected isCommandMode: boolean;
|
|
11
|
+
active: IContextKey<boolean>;
|
|
12
|
+
focus: IContextKey<boolean>;
|
|
13
|
+
commandMode: IContextKey<boolean>;
|
|
14
|
+
constructor(contextKeyService: ContextKeyService, libroService: LibroService);
|
|
15
|
+
disableCommandMode: () => void;
|
|
16
|
+
enableCommandMode: () => void;
|
|
17
|
+
protected setupActive(): void;
|
|
18
|
+
protected setupFocus(): void;
|
|
19
|
+
protected setupCommandMode(): void;
|
|
20
|
+
protected listenToActive: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated use LibroContextKey instead.
|
|
24
|
+
*/
|
|
25
|
+
export declare const LirboContextKey: typeof LibroContextKey;
|
|
26
|
+
//# sourceMappingURL=libro-context-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-context-key.d.ts","sourceRoot":"","sources":["../src/libro-context-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAItD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBACa,eAAe;IAC1B,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACxD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAC9C,SAAS,CAAC,wBAAwB,CAAC,EAAE,UAAU,CAAC;IAChD,kBAAkB,UAAQ;IAC1B,SAAS,CAAC,aAAa,UAAS;IAChC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;gBAGL,iBAAiB,EAAE,iBAAiB,EACzC,YAAY,EAAE,YAAY;IASlD,kBAAkB,aAGhB;IAEF,iBAAiB,aAGf;IAEF,SAAS,CAAC,WAAW;IAarB,SAAS,CAAC,UAAU;IAUpB,SAAS,CAAC,gBAAgB;IAO1B,SAAS,CAAC,cAAc,aAQtB;CACH;AACD;;GAEG;AACH,eAAO,MAAM,eAAe,wBAAkB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _dec, _class;
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
import { ContextKeyService } from '@difizen/mana-app';
|
|
9
|
+
import { inject, singleton } from '@difizen/mana-app';
|
|
10
|
+
import { LibroContextKeys } from "./libro-protocol.js";
|
|
11
|
+
import { LibroService } from "./libro-service.js";
|
|
12
|
+
export var LibroContextKey = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
|
|
13
|
+
function LibroContextKey(contextKeyService, libroService) {
|
|
14
|
+
var _this = this;
|
|
15
|
+
_classCallCheck(this, LibroContextKey);
|
|
16
|
+
this.contextKeyService = void 0;
|
|
17
|
+
this.libroService = void 0;
|
|
18
|
+
this.toDisposeOnActiveChanged = void 0;
|
|
19
|
+
this.commandModeEnabled = true;
|
|
20
|
+
this.isCommandMode = false;
|
|
21
|
+
this.active = void 0;
|
|
22
|
+
this.focus = void 0;
|
|
23
|
+
this.commandMode = void 0;
|
|
24
|
+
this.disableCommandMode = function () {
|
|
25
|
+
_this.commandModeEnabled = false;
|
|
26
|
+
_this.commandMode.set(false);
|
|
27
|
+
};
|
|
28
|
+
this.enableCommandMode = function () {
|
|
29
|
+
_this.commandModeEnabled = true;
|
|
30
|
+
_this.commandMode.set(_this.isCommandMode);
|
|
31
|
+
};
|
|
32
|
+
this.listenToActive = function () {
|
|
33
|
+
var active = _this.libroService.active;
|
|
34
|
+
if (active) {
|
|
35
|
+
_this.toDisposeOnActiveChanged = active.model.onCommandModeChanged(function () {
|
|
36
|
+
_this.isCommandMode = !!active.model.commandMode;
|
|
37
|
+
_this.commandMode.set(_this.isCommandMode && _this.commandModeEnabled);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.contextKeyService = contextKeyService;
|
|
42
|
+
this.libroService = libroService;
|
|
43
|
+
this.setupActive();
|
|
44
|
+
this.setupFocus();
|
|
45
|
+
this.setupCommandMode();
|
|
46
|
+
}
|
|
47
|
+
LibroContextKey = inject(LibroService)(LibroContextKey, undefined, 1) || LibroContextKey;
|
|
48
|
+
LibroContextKey = inject(ContextKeyService)(LibroContextKey, undefined, 0) || LibroContextKey;
|
|
49
|
+
_createClass(LibroContextKey, [{
|
|
50
|
+
key: "setupActive",
|
|
51
|
+
value: function setupActive() {
|
|
52
|
+
var _this2 = this;
|
|
53
|
+
this.libroService.onActiveChanged(function () {
|
|
54
|
+
if (_this2.toDisposeOnActiveChanged) {
|
|
55
|
+
_this2.toDisposeOnActiveChanged.dispose();
|
|
56
|
+
}
|
|
57
|
+
_this2.active.set(!!_this2.libroService.active);
|
|
58
|
+
_this2.listenToActive();
|
|
59
|
+
});
|
|
60
|
+
this.active = this.contextKeyService.createKey(LibroContextKeys.active, !!this.libroService.active);
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
key: "setupFocus",
|
|
64
|
+
value: function setupFocus() {
|
|
65
|
+
var _this3 = this;
|
|
66
|
+
this.libroService.onFocusChanged(function () {
|
|
67
|
+
_this3.focus.set(!!_this3.libroService.focus);
|
|
68
|
+
});
|
|
69
|
+
this.focus = this.contextKeyService.createKey(LibroContextKeys.focus, !!this.libroService.focus);
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "setupCommandMode",
|
|
73
|
+
value: function setupCommandMode() {
|
|
74
|
+
var _this$libroService$ac;
|
|
75
|
+
this.commandMode = this.contextKeyService.createKey(LibroContextKeys.commandMode, !!((_this$libroService$ac = this.libroService.active) !== null && _this$libroService$ac !== void 0 && _this$libroService$ac.model.commandMode));
|
|
76
|
+
this.listenToActive();
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
return LibroContextKey;
|
|
80
|
+
}()) || _class);
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated use LibroContextKey instead.
|
|
83
|
+
*/
|
|
84
|
+
export var LirboContextKey = LibroContextKey;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-keybind-registry.d.ts","sourceRoot":"","sources":["../src/libro-keybind-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAW,MAAM,mBAAmB,CAAC;AAGhE,qBACa,oBAAqB,SAAQ,kBAAkB;IACjD,GAAG,CAAC,KAAK,EAAE,aAAa;CAqClC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _dec, _class;
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
9
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
10
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
15
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
17
|
+
import { KeybindingRegistry, KeyCode } from '@difizen/mana-app';
|
|
18
|
+
import { singleton } from '@difizen/mana-app';
|
|
19
|
+
export var LibroKeybindRegistry = (_dec = singleton({
|
|
20
|
+
token: KeybindingRegistry
|
|
21
|
+
}), _dec(_class = /*#__PURE__*/function (_KeybindingRegistry) {
|
|
22
|
+
_inherits(LibroKeybindRegistry, _KeybindingRegistry);
|
|
23
|
+
var _super = _createSuper(LibroKeybindRegistry);
|
|
24
|
+
function LibroKeybindRegistry() {
|
|
25
|
+
_classCallCheck(this, LibroKeybindRegistry);
|
|
26
|
+
return _super.apply(this, arguments);
|
|
27
|
+
}
|
|
28
|
+
_createClass(LibroKeybindRegistry, [{
|
|
29
|
+
key: "run",
|
|
30
|
+
value: function run(event) {
|
|
31
|
+
var keyCode = KeyCode.createKeyCode(event, 'code');
|
|
32
|
+
if (KeyCode.parse('esc').equals(keyCode)) {
|
|
33
|
+
/* Keycode is only a modifier, next keycode will be modifier + key.
|
|
34
|
+
Ignore this one. */
|
|
35
|
+
if (keyCode.isModifierOnly()) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.keyboardLayoutService.validateKeyCode(keyCode);
|
|
39
|
+
this.keySequence.push(keyCode);
|
|
40
|
+
var match = this.matchKeybinding(this.keySequence, event);
|
|
41
|
+
if (match && match.kind === 'partial') {
|
|
42
|
+
/* Accumulate the keysequence */
|
|
43
|
+
// TODO: The effective scope of of prevent propagation.
|
|
44
|
+
var _match$binding = match.binding,
|
|
45
|
+
_match$binding$preven = _match$binding.preventDefault,
|
|
46
|
+
preventDefault = _match$binding$preven === void 0 ? this.preventDefault : _match$binding$preven,
|
|
47
|
+
_match$binding$stopPr = _match$binding.stopPropagation,
|
|
48
|
+
stopPropagation = _match$binding$stopPr === void 0 ? this.stopPropagation : _match$binding$stopPr;
|
|
49
|
+
if (preventDefault) {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
}
|
|
52
|
+
if (stopPropagation) {
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
}
|
|
55
|
+
this.emitter.fire(match);
|
|
56
|
+
} else {
|
|
57
|
+
if (match && match.kind === 'full') {
|
|
58
|
+
this.executeKeyBinding(match.binding, event);
|
|
59
|
+
}
|
|
60
|
+
this.keySequence = [];
|
|
61
|
+
this.emitter.fire(match);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
_get(_getPrototypeOf(LibroKeybindRegistry.prototype), "run", this).call(this, event);
|
|
65
|
+
}
|
|
66
|
+
}]);
|
|
67
|
+
return LibroKeybindRegistry;
|
|
68
|
+
}(KeybindingRegistry)) || _class);
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { INotebookContent, INotebookMetadata } from '@difizen/libro-common';
|
|
2
|
+
import type { CellTypeAdaptor, ISharedNotebook, NotebookChange } from '@difizen/libro-shared-model';
|
|
3
|
+
import { ConfigurationService } from '@difizen/mana-app';
|
|
4
|
+
import { Emitter } from '@difizen/mana-app';
|
|
5
|
+
import { LibroContentService } from './content/index.js';
|
|
6
|
+
import { NotebookOption } from './libro-protocol.js';
|
|
7
|
+
import type { CellOptions, CellViewChange, DndListModel, NotebookModel, CellView, MouseMode, ICellContentChange } from './libro-protocol.js';
|
|
8
|
+
import { VirtualizedManagerHelper } from './virtualized-manager-helper.js';
|
|
9
|
+
export declare class LibroModel implements NotebookModel, DndListModel {
|
|
10
|
+
options: NotebookOption;
|
|
11
|
+
libroContentService: LibroContentService;
|
|
12
|
+
virtualizedManagerHelper: VirtualizedManagerHelper;
|
|
13
|
+
configurationService: ConfigurationService;
|
|
14
|
+
protected scrollToCellViewEmitter: Emitter;
|
|
15
|
+
get onScrollToCellView(): import("@difizen/mana-app").Event<any>;
|
|
16
|
+
protected cellViewChangeEmitter: Emitter<CellViewChange>;
|
|
17
|
+
get onCellViewChanged(): import("@difizen/mana-app").Event<CellViewChange>;
|
|
18
|
+
disposeScrollToCellViewEmitter(): void;
|
|
19
|
+
protected onCommandModeChangedEmitter: Emitter<boolean>;
|
|
20
|
+
get onCommandModeChanged(): import("@difizen/mana-app").Event<boolean>;
|
|
21
|
+
protected onChangedEmitter: Emitter<boolean>;
|
|
22
|
+
get onChanged(): import("@difizen/mana-app").Event<boolean>;
|
|
23
|
+
protected onSourceChangedEmitter: Emitter<boolean>;
|
|
24
|
+
get onSourceChanged(): import("@difizen/mana-app").Event<boolean>;
|
|
25
|
+
protected onCellContentChangedEmitter: Emitter<ICellContentChange>;
|
|
26
|
+
get onCellContentChanged(): import("@difizen/mana-app").Event<ICellContentChange>;
|
|
27
|
+
onCellContentChange(change: ICellContentChange): void;
|
|
28
|
+
id: string;
|
|
29
|
+
version: number;
|
|
30
|
+
/**
|
|
31
|
+
* The shared notebook model.
|
|
32
|
+
*/
|
|
33
|
+
readonly sharedModel: ISharedNotebook;
|
|
34
|
+
/**
|
|
35
|
+
* A mutex to update the shared model.
|
|
36
|
+
*/
|
|
37
|
+
protected readonly _modelDBMutex: (f: () => void) => void;
|
|
38
|
+
lastClipboardInteraction?: string;
|
|
39
|
+
clipboard?: CellView | CellView[];
|
|
40
|
+
inputEditable: boolean;
|
|
41
|
+
outputEditable: boolean;
|
|
42
|
+
cellsEditable: boolean;
|
|
43
|
+
get executable(): boolean;
|
|
44
|
+
set executable(value: boolean);
|
|
45
|
+
savable: boolean;
|
|
46
|
+
runnable: boolean;
|
|
47
|
+
commandMode: boolean;
|
|
48
|
+
isEditMode: boolean;
|
|
49
|
+
dndAreaNullEnable: boolean;
|
|
50
|
+
dirty: boolean;
|
|
51
|
+
cells: CellView[];
|
|
52
|
+
getCells(): CellView[];
|
|
53
|
+
active?: CellView;
|
|
54
|
+
activeIndex: number;
|
|
55
|
+
hover: CellView | undefined;
|
|
56
|
+
isInitialized: boolean;
|
|
57
|
+
executeCount: number;
|
|
58
|
+
mouseMode: MouseMode;
|
|
59
|
+
selections: CellView[];
|
|
60
|
+
deletedCells: CellView[];
|
|
61
|
+
metadata: INotebookMetadata;
|
|
62
|
+
customParams: Record<string, any>;
|
|
63
|
+
libroViewClass: string;
|
|
64
|
+
canUndo: boolean;
|
|
65
|
+
canRedo: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 默认为true,可以在metadata修改
|
|
68
|
+
*/
|
|
69
|
+
trusted: boolean;
|
|
70
|
+
canRun(): boolean;
|
|
71
|
+
getCustomKey(key: string): any;
|
|
72
|
+
setCustomKey(key: string, val: any): void;
|
|
73
|
+
fontSize: number;
|
|
74
|
+
theme: string;
|
|
75
|
+
cellViewCache: Map<string, CellView>;
|
|
76
|
+
nbformat_minor: number;
|
|
77
|
+
nbformat: number;
|
|
78
|
+
cellTypeAdaptor?: CellTypeAdaptor;
|
|
79
|
+
constructor();
|
|
80
|
+
protected onSharedModelChanged: (change: NotebookChange) => void;
|
|
81
|
+
toString: () => string;
|
|
82
|
+
fromString: (value: string) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Serialize the model to JSON.
|
|
85
|
+
*/
|
|
86
|
+
toJSON(): INotebookContent;
|
|
87
|
+
/**
|
|
88
|
+
* Deserialize the model from JSON.
|
|
89
|
+
*
|
|
90
|
+
* #### Notes
|
|
91
|
+
* Should emit a [contentChanged] signal.
|
|
92
|
+
*/
|
|
93
|
+
fromJSON(value: INotebookContent): void;
|
|
94
|
+
onChange(): void;
|
|
95
|
+
onSourceChange(): void;
|
|
96
|
+
/**
|
|
97
|
+
* override this method to load notebook from server
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
loadNotebookContent(): Promise<INotebookContent>;
|
|
101
|
+
saveNotebookContent(): Promise<void>;
|
|
102
|
+
initialize(): Promise<CellOptions[]>;
|
|
103
|
+
protected toCellIndex(arg: string | number | CellView): number | undefined;
|
|
104
|
+
selectCell: (cell: CellView | undefined) => void;
|
|
105
|
+
hoverCell: (cell?: CellView) => void;
|
|
106
|
+
/**
|
|
107
|
+
* 自动滚动到可视范围内
|
|
108
|
+
*/
|
|
109
|
+
scrollToView(cell: CellView, cellOffset?: number): void;
|
|
110
|
+
addCell: (cell: CellView, position?: number, mode?: string) => void;
|
|
111
|
+
insertCells: (cells: CellView[], position?: number, mode?: string) => void;
|
|
112
|
+
invertCell: (toAddcell: CellView, position: number) => void;
|
|
113
|
+
splitCell: (newCells: CellView[], position: number) => void;
|
|
114
|
+
protected insertCellsView: (cell: CellView[], position?: number) => void;
|
|
115
|
+
removeRange(start: number, end: number): void;
|
|
116
|
+
deleteCell(id: string | number): boolean;
|
|
117
|
+
deleteCell(index: number): boolean;
|
|
118
|
+
deleteCell(cell: CellView): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* 删除 cell 节点
|
|
121
|
+
* @param arg id、index、cell
|
|
122
|
+
* @returns
|
|
123
|
+
*/
|
|
124
|
+
protected deleteCellView(arg: string | number | CellView): boolean;
|
|
125
|
+
protected doDeleteCell: (arg: string | number | CellView) => boolean;
|
|
126
|
+
exchangeCell(source: CellView, target: CellView): boolean;
|
|
127
|
+
exchangeCell(sourceIndex: number, targetIndex: number): boolean;
|
|
128
|
+
exchangeCell(sourceId: string, targetId: string): boolean;
|
|
129
|
+
exchangeCells(source: CellView[], targetIndex: number): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 交换 cell 节点位置
|
|
132
|
+
* @param source id、index、cell
|
|
133
|
+
* @param target id、index、cell
|
|
134
|
+
* @returns
|
|
135
|
+
*/
|
|
136
|
+
protected exchangeCellView(source: string | number | CellView, target: string | number | CellView): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* 进入命令模式
|
|
139
|
+
*/
|
|
140
|
+
enterCommandMode(): void;
|
|
141
|
+
enterEditMode(): void;
|
|
142
|
+
undo(): void;
|
|
143
|
+
redo(): void;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=libro-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-model.d.ts","sourceRoot":"","sources":["../src/libro-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAa,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAK5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAc,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,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