@difizen/libro-core 0.0.2-alpha.0
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 +3 -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 +12 -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 +53 -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 +129 -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 +13 -0
- package/es/cell/libro-cell-contribution.d.ts.map +1 -0
- package/es/cell/libro-cell-contribution.js +41 -0
- package/es/cell/libro-cell-model.d.ts +19 -0
- package/es/cell/libro-cell-model.d.ts.map +1 -0
- package/es/cell/libro-cell-model.js +103 -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 +42 -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 +242 -0
- package/es/cell/libro-cell-view.d.ts +65 -0
- package/es/cell/libro-cell-view.d.ts.map +1 -0
- package/es/cell/libro-cell-view.js +191 -0
- package/es/cell/libro-edit-cell-view.d.ts +32 -0
- package/es/cell/libro-edit-cell-view.d.ts.map +1 -0
- package/es/cell/libro-edit-cell-view.js +72 -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 +27 -0
- package/es/cell/libro-executable-cell-view.d.ts.map +1 -0
- package/es/cell/libro-executable-cell-view.js +66 -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 +6 -0
- package/es/command/document-commands.d.ts.map +1 -0
- package/es/command/document-commands.js +13 -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 +39 -0
- package/es/command/libro-command-contribution.d.ts +14 -0
- package/es/command/libro-command-contribution.d.ts.map +1 -0
- package/es/command/libro-command-contribution.js +1751 -0
- package/es/command/libro-command-register.d.ts +22 -0
- package/es/command/libro-command-register.d.ts.map +1 -0
- package/es/command/libro-command-register.js +105 -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 +468 -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 +12 -0
- package/es/components/dnd-cell-item-render.d.ts.map +1 -0
- package/es/components/dnd-cell-item-render.js +253 -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 +141 -0
- package/es/components/dnd-component/default-dnd-content.d.ts +10 -0
- package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -0
- package/es/components/dnd-component/default-dnd-content.js +257 -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 +10 -0
- package/es/components/dnd-component/dnd-list.d.ts.map +1 -0
- package/es/components/dnd-component/dnd-list.js +115 -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/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/configuration/libro-configuration-contribution.d.ts +5 -0
- package/es/configuration/libro-configuration-contribution.d.ts.map +1 -0
- package/es/configuration/libro-configuration-contribution.js +24 -0
- package/es/configuration/libro-configuration.d.ts +10 -0
- package/es/configuration/libro-configuration.d.ts.map +1 -0
- package/es/configuration/libro-configuration.js +81 -0
- package/es/content/index.d.ts +5 -0
- package/es/content/index.d.ts.map +1 -0
- package/es/content/index.js +4 -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 +32 -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 +5 -0
- package/es/content/libro-content-protocol.d.ts +8 -0
- package/es/content/libro-content-protocol.d.ts.map +1 -0
- package/es/content/libro-content-protocol.js +2 -0
- package/es/content/libro-content-service.d.ts +9 -0
- package/es/content/libro-content-service.d.ts.map +1 -0
- package/es/content/libro-content-service.js +35 -0
- package/es/index.d.ts +20 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +19 -0
- package/es/index.less +682 -0
- package/es/libro-context-key.d.ts +22 -0
- package/es/libro-context-key.d.ts.map +1 -0
- package/es/libro-context-key.js +80 -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 +129 -0
- package/es/libro-model.d.ts.map +1 -0
- package/es/libro-model.js +803 -0
- package/es/libro-protocol.d.ts +241 -0
- package/es/libro-protocol.d.ts.map +1 -0
- package/es/libro-protocol.js +34 -0
- package/es/libro-service.d.ts +34 -0
- package/es/libro-service.d.ts.map +1 -0
- package/es/libro-service.js +180 -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 +151 -0
- package/es/libro-view.d.ts.map +1 -0
- package/es/libro-view.js +1963 -0
- package/es/material-from-designer.d.ts +27 -0
- package/es/material-from-designer.d.ts.map +1 -0
- package/es/material-from-designer.js +550 -0
- package/es/module.d.ts +3 -0
- package/es/module.d.ts.map +1 -0
- package/es/module.js +55 -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 +346 -0
- package/es/output/output-contribution.d.ts +11 -0
- package/es/output/output-contribution.d.ts.map +1 -0
- package/es/output/output-contribution.js +31 -0
- package/es/output/output-model.d.ts +27 -0
- package/es/output/output-model.d.ts.map +1 -0
- package/es/output/output-model.js +95 -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 +130 -0
- package/es/output/output-protocol.d.ts.map +1 -0
- package/es/output/output-protocol.js +18 -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 +57 -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 +494 -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 +48 -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 +8 -0
- package/es/toolbar/libro-toolbar.d.ts.map +1 -0
- package/es/toolbar/libro-toolbar.js +223 -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 +6 -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 +6 -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/package.json +70 -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 +31 -0
- package/src/add-cell/libro-add-cell-view.tsx +101 -0
- package/src/cell/README.md +14 -0
- package/src/cell/index.ts +9 -0
- package/src/cell/libro-cell-contribution.ts +38 -0
- package/src/cell/libro-cell-model.ts +61 -0
- package/src/cell/libro-cell-module.ts +40 -0
- package/src/cell/libro-cell-protocol.ts +53 -0
- package/src/cell/libro-cell-service.ts +157 -0
- package/src/cell/libro-cell-view.tsx +128 -0
- package/src/cell/libro-edit-cell-view.tsx +60 -0
- package/src/cell/libro-executable-cell-model.ts +32 -0
- package/src/cell/libro-executable-cell-view.ts +74 -0
- package/src/cell/libro-markdown-cell-model.ts +20 -0
- package/src/collapse-service.ts +69 -0
- package/src/command/document-commands.ts +18 -0
- package/src/command/index.ts +6 -0
- package/src/command/kernel-command.ts +41 -0
- package/src/command/libro-command-contribution.ts +1339 -0
- package/src/command/libro-command-register.ts +171 -0
- package/src/command/module.ts +9 -0
- package/src/command/notebook-commands.ts +498 -0
- package/src/components/cell-protocol.ts +22 -0
- package/src/components/dnd-cell-item-render.tsx +308 -0
- package/src/components/dnd-component/custom-drag-layer.tsx +145 -0
- package/src/components/dnd-component/default-dnd-content.tsx +275 -0
- package/src/components/dnd-component/dnd-context.tsx +28 -0
- package/src/components/dnd-component/dnd-list.tsx +116 -0
- package/src/components/dnd-component/index.tsx +4 -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/configuration/libro-configuration-contribution.ts +29 -0
- package/src/configuration/libro-configuration.ts +88 -0
- package/src/content/index.ts +4 -0
- package/src/content/libro-content-contribution.ts +17 -0
- package/src/content/libro-content-module.ts +9 -0
- package/src/content/libro-content-protocol.ts +8 -0
- package/src/content/libro-content-service.ts +30 -0
- package/src/index.less +682 -0
- package/src/index.tsx +19 -0
- package/src/libro-context-key.ts +80 -0
- package/src/libro-keybind-registry.ts +43 -0
- package/src/libro-model.ts +614 -0
- package/src/libro-protocol.ts +322 -0
- package/src/libro-service.ts +121 -0
- package/src/libro-view-tracker.ts +9 -0
- package/src/libro-view.tsx +1399 -0
- package/src/material-from-designer.tsx +457 -0
- package/src/module.ts +90 -0
- package/src/output/index.ts +5 -0
- package/src/output/output-area.tsx +255 -0
- package/src/output/output-contribution.ts +18 -0
- package/src/output/output-model.tsx +66 -0
- package/src/output/output-module.ts +10 -0
- package/src/output/output-protocol.ts +164 -0
- package/src/slot/index.ts +4 -0
- package/src/slot/libro-slot-manager.ts +37 -0
- package/src/slot/libro-slot-protocol.ts +28 -0
- package/src/slot/libro-slot-view.tsx +51 -0
- package/src/slot/module.ts +9 -0
- package/src/theme/libro-color-registry.ts +371 -0
- package/src/toolbar/change-cell-to-selector.tsx +58 -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 +192 -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 +172 -0
- package/src/typings/index.d.ts +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import { ConfigurationContribution } from '@difizen/mana-app';
|
|
9
|
+
import { singleton } from '@difizen/mana-app';
|
|
10
|
+
import { CellSideToolbarVisible, CellTopToolbarSetting, HeaderToolbarVisible, AutoInsertWhenNoCell, EnterEditModeWhenAddCell, CollapserClickActive, MultiSelectionWhenShiftClick, RightContentFixed } from "./libro-configuration.js";
|
|
11
|
+
export var LibroConfigurationContribution = (_dec = singleton({
|
|
12
|
+
contrib: ConfigurationContribution
|
|
13
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
14
|
+
function LibroConfigurationContribution() {
|
|
15
|
+
_classCallCheck(this, LibroConfigurationContribution);
|
|
16
|
+
}
|
|
17
|
+
_createClass(LibroConfigurationContribution, [{
|
|
18
|
+
key: "registerConfigurations",
|
|
19
|
+
value: function registerConfigurations() {
|
|
20
|
+
return [HeaderToolbarVisible, CellTopToolbarSetting, CellSideToolbarVisible, AutoInsertWhenNoCell, EnterEditModeWhenAddCell, CollapserClickActive, MultiSelectionWhenShiftClick, RightContentFixed];
|
|
21
|
+
}
|
|
22
|
+
}]);
|
|
23
|
+
return LibroConfigurationContribution;
|
|
24
|
+
}()) || _class);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConfigurationNode } from '@difizen/mana-app';
|
|
2
|
+
export declare const HeaderToolbarVisible: ConfigurationNode<boolean>;
|
|
3
|
+
export declare const CellTopToolbarSetting: ConfigurationNode<boolean>;
|
|
4
|
+
export declare const CellSideToolbarVisible: ConfigurationNode<boolean>;
|
|
5
|
+
export declare const AutoInsertWhenNoCell: ConfigurationNode<boolean>;
|
|
6
|
+
export declare const EnterEditModeWhenAddCell: ConfigurationNode<boolean>;
|
|
7
|
+
export declare const CollapserClickActive: ConfigurationNode<boolean>;
|
|
8
|
+
export declare const MultiSelectionWhenShiftClick: ConfigurationNode<boolean>;
|
|
9
|
+
export declare const RightContentFixed: ConfigurationNode<boolean>;
|
|
10
|
+
//# sourceMappingURL=libro-configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-configuration.d.ts","sourceRoot":"","sources":["../../src/configuration/libro-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,OAAO,CAS5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,OAAO,CAS7D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,OAAO,CAS/D,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AACF,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,OAAO,CASnE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CASxD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
2
|
+
export var HeaderToolbarVisible = {
|
|
3
|
+
id: 'libro.header.toolbar',
|
|
4
|
+
description: l10n.t('是否显示libro顶部工具栏'),
|
|
5
|
+
title: l10n.t('顶部工具栏'),
|
|
6
|
+
type: 'checkbox',
|
|
7
|
+
defaultValue: true,
|
|
8
|
+
schema: {
|
|
9
|
+
type: 'boolean'
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export var CellTopToolbarSetting = {
|
|
13
|
+
id: 'libro.cell.toptoolbar',
|
|
14
|
+
description: l10n.t('是否显示cell顶部工具栏'),
|
|
15
|
+
title: l10n.t('cell顶部工具栏'),
|
|
16
|
+
type: 'checkbox',
|
|
17
|
+
defaultValue: true,
|
|
18
|
+
schema: {
|
|
19
|
+
type: 'boolean'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export var CellSideToolbarVisible = {
|
|
23
|
+
id: 'libro.cell.sidetoolbar',
|
|
24
|
+
description: l10n.t('是否显示cell侧边工具栏'),
|
|
25
|
+
title: l10n.t('cell侧边工具栏'),
|
|
26
|
+
type: 'checkbox',
|
|
27
|
+
defaultValue: true,
|
|
28
|
+
schema: {
|
|
29
|
+
type: 'boolean'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export var AutoInsertWhenNoCell = {
|
|
33
|
+
id: 'libro.command.insertcellbelow',
|
|
34
|
+
description: l10n.t('没有cell时是否默认创建cell'),
|
|
35
|
+
title: l10n.t('默认创建cell'),
|
|
36
|
+
type: 'checkbox',
|
|
37
|
+
defaultValue: true,
|
|
38
|
+
schema: {
|
|
39
|
+
type: 'boolean'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export var EnterEditModeWhenAddCell = {
|
|
43
|
+
id: 'libro.command.entereditmodewhenaddcell',
|
|
44
|
+
description: l10n.t('增加cell操作默认进入编辑态'),
|
|
45
|
+
title: l10n.t('默认进入编辑态'),
|
|
46
|
+
type: 'checkbox',
|
|
47
|
+
defaultValue: true,
|
|
48
|
+
schema: {
|
|
49
|
+
type: 'boolean'
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export var CollapserClickActive = {
|
|
53
|
+
id: 'libro.command.collapserclickactive',
|
|
54
|
+
description: l10n.t('点击左侧长条是否可以隐藏与显示cell'),
|
|
55
|
+
title: l10n.t('默认点击长条可以隐藏与显示cell'),
|
|
56
|
+
type: 'checkbox',
|
|
57
|
+
defaultValue: true,
|
|
58
|
+
schema: {
|
|
59
|
+
type: 'boolean'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export var MultiSelectionWhenShiftClick = {
|
|
63
|
+
id: 'libro.command.multiselectionwhenshiftclick',
|
|
64
|
+
description: l10n.t('按住shift键并点击拖拽区域可以进行多选'),
|
|
65
|
+
title: l10n.t('默认按住shift键并点击拖拽区域可以进行多选'),
|
|
66
|
+
type: 'checkbox',
|
|
67
|
+
defaultValue: true,
|
|
68
|
+
schema: {
|
|
69
|
+
type: 'boolean'
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export var RightContentFixed = {
|
|
73
|
+
id: 'libro.right.content.fixed',
|
|
74
|
+
description: l10n.t('libroview的右边栏是否相对固定'),
|
|
75
|
+
title: l10n.t('右侧内容是否相对固定'),
|
|
76
|
+
type: 'checkbox',
|
|
77
|
+
defaultValue: false,
|
|
78
|
+
schema: {
|
|
79
|
+
type: 'boolean'
|
|
80
|
+
}
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ContentContribution } from './libro-content-protocol.js';
|
|
2
|
+
export declare class DefaultContentContribution implements ContentContribution {
|
|
3
|
+
canHandle: (_options: Record<string, any>, _model: any) => number;
|
|
4
|
+
loadContent(_options: Record<string, any>, _model: any): Promise<{
|
|
5
|
+
metadata: {};
|
|
6
|
+
cells: never[];
|
|
7
|
+
nbformat: number;
|
|
8
|
+
nbformat_minor: number;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=libro-content-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-content-contribution.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-contribution.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,qBACa,0BAA2B,YAAW,mBAAmB;IACpE,SAAS,aAAc,OAAO,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,YAAO;IAC9D,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG;;;;;;CAQvD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
9
|
+
import { singleton } from '@difizen/mana-app';
|
|
10
|
+
import { ContentContribution } from "./libro-content-protocol.js";
|
|
11
|
+
export var DefaultContentContribution = (_dec = singleton({
|
|
12
|
+
contrib: ContentContribution
|
|
13
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
14
|
+
function DefaultContentContribution() {
|
|
15
|
+
_classCallCheck(this, DefaultContentContribution);
|
|
16
|
+
this.canHandle = function (_options, _model) {
|
|
17
|
+
return 1;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
_createClass(DefaultContentContribution, [{
|
|
21
|
+
key: "loadContent",
|
|
22
|
+
value: function loadContent(_options, _model) {
|
|
23
|
+
return Promise.resolve({
|
|
24
|
+
metadata: {},
|
|
25
|
+
cells: [],
|
|
26
|
+
nbformat: 4,
|
|
27
|
+
nbformat_minor: 4
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}]);
|
|
31
|
+
return DefaultContentContribution;
|
|
32
|
+
}()) || _class);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-content-module.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,eAAO,MAAM,kBAAkB,YAE6B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ManaModule } from '@difizen/mana-app';
|
|
2
|
+
import { DefaultContentContribution } from "./libro-content-contribution.js";
|
|
3
|
+
import { ContentContribution } from "./libro-content-protocol.js";
|
|
4
|
+
import { LibroContentService } from "./libro-content-service.js";
|
|
5
|
+
export var LibroContentModule = ManaModule.create().contribution(ContentContribution).register(DefaultContentContribution, LibroContentService);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { INotebookContent } from '@difizen/libro-common';
|
|
2
|
+
import { Syringe } from '@difizen/mana-app';
|
|
3
|
+
export declare const ContentContribution: Syringe.DefinedToken;
|
|
4
|
+
export interface ContentContribution {
|
|
5
|
+
canHandle: (options: Record<string, any>, model: any) => number;
|
|
6
|
+
loadContent: (options: Record<string, any>, model: any) => Promise<INotebookContent>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=libro-content-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-content-protocol.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,mBAAmB,sBAA6C,CAAC;AAC9E,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;IAChE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACtF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Contribution } from '@difizen/mana-app';
|
|
2
|
+
import { ContentContribution } from './libro-content-protocol.js';
|
|
3
|
+
export declare class LibroContentService {
|
|
4
|
+
protected contentProvider: Contribution.Provider<ContentContribution>;
|
|
5
|
+
constructor(contentProvider: Contribution.Provider<ContentContribution>);
|
|
6
|
+
protected findProvider(options: Record<string, any>, model: any): ContentContribution;
|
|
7
|
+
loadLibroContent(options: Record<string, any>, model: any): Promise<import("@difizen/libro-common").INotebookContent>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=libro-content-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-content-service.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,qBACa,mBAAmB;IAC9B,SAAS,CAAC,eAAe,EAAE,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;gBAGpE,eAAe,EAAE,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAI7D,SAAS,CAAC,YAAY,CACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,KAAK,EAAE,GAAG,GACT,mBAAmB;IAStB,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG;CAG1D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import { contrib, Priority, singleton } from '@difizen/mana-app';
|
|
9
|
+
import { ContentContribution } from "./libro-content-protocol.js";
|
|
10
|
+
export var LibroContentService = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
|
|
11
|
+
function LibroContentService(contentProvider) {
|
|
12
|
+
_classCallCheck(this, LibroContentService);
|
|
13
|
+
this.contentProvider = void 0;
|
|
14
|
+
this.contentProvider = contentProvider;
|
|
15
|
+
}
|
|
16
|
+
LibroContentService = contrib(ContentContribution)(LibroContentService, undefined, 0) || LibroContentService;
|
|
17
|
+
_createClass(LibroContentService, [{
|
|
18
|
+
key: "findProvider",
|
|
19
|
+
value: function findProvider(options, model) {
|
|
20
|
+
var prioritized = Priority.sortSync(this.contentProvider.getContributions(), function (contribution) {
|
|
21
|
+
return contribution.canHandle(options, model);
|
|
22
|
+
});
|
|
23
|
+
var sorted = prioritized.map(function (c) {
|
|
24
|
+
return c.value;
|
|
25
|
+
});
|
|
26
|
+
return sorted[0];
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
key: "loadLibroContent",
|
|
30
|
+
value: function loadLibroContent(options, model) {
|
|
31
|
+
return this.findProvider(options, model).loadContent(options, model);
|
|
32
|
+
}
|
|
33
|
+
}]);
|
|
34
|
+
return LibroContentService;
|
|
35
|
+
}()) || _class);
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './libro-view.js';
|
|
2
|
+
export * from './module.js';
|
|
3
|
+
export * from './libro-protocol.js';
|
|
4
|
+
export * from './libro-service.js';
|
|
5
|
+
export * from './libro-model.js';
|
|
6
|
+
export * from './cell/index.js';
|
|
7
|
+
export * from './components/index.js';
|
|
8
|
+
export * from './configuration/libro-configuration.js';
|
|
9
|
+
export * from './toolbar/index.js';
|
|
10
|
+
export * from './output/index.js';
|
|
11
|
+
export * from './slot/index.js';
|
|
12
|
+
export * from './command/index.js';
|
|
13
|
+
export * from './libro-context-key.js';
|
|
14
|
+
export * from './libro-keybind-registry.js';
|
|
15
|
+
export * from './add-cell/index.js';
|
|
16
|
+
export * from './material-from-designer.js';
|
|
17
|
+
export * from './libro-view-tracker.js';
|
|
18
|
+
export * from './content/index.js';
|
|
19
|
+
export * from './collapse-service.js';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
package/es/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./libro-view.js";
|
|
2
|
+
export * from "./module.js";
|
|
3
|
+
export * from "./libro-protocol.js";
|
|
4
|
+
export * from "./libro-service.js";
|
|
5
|
+
export * from "./libro-model.js";
|
|
6
|
+
export * from "./cell/index.js";
|
|
7
|
+
export * from "./components/index.js";
|
|
8
|
+
export * from "./configuration/libro-configuration.js";
|
|
9
|
+
export * from "./toolbar/index.js";
|
|
10
|
+
export * from "./output/index.js";
|
|
11
|
+
export * from "./slot/index.js";
|
|
12
|
+
export * from "./command/index.js";
|
|
13
|
+
export * from "./libro-context-key.js";
|
|
14
|
+
export * from "./libro-keybind-registry.js";
|
|
15
|
+
export * from "./add-cell/index.js";
|
|
16
|
+
export * from "./material-from-designer.js";
|
|
17
|
+
export * from "./libro-view-tracker.js";
|
|
18
|
+
export * from "./content/index.js";
|
|
19
|
+
export * from "./collapse-service.js";
|