@difizen/libro-jupyter 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 +1 -0
- package/es/add-between-cell/add-between-cell-command-contribution.d.ts +14 -0
- package/es/add-between-cell/add-between-cell-command-contribution.d.ts.map +1 -0
- package/es/add-between-cell/add-between-cell-command-contribution.js +97 -0
- package/es/add-between-cell/add-between-cell.d.ts +5 -0
- package/es/add-between-cell/add-between-cell.d.ts.map +1 -0
- package/es/add-between-cell/add-between-cell.js +243 -0
- package/es/add-between-cell/index.d.ts +3 -0
- package/es/add-between-cell/index.d.ts.map +1 -0
- package/es/add-between-cell/index.js +2 -0
- package/es/add-between-cell/index.less +103 -0
- package/es/add-between-cell/module.d.ts +3 -0
- package/es/add-between-cell/module.d.ts.map +1 -0
- package/es/add-between-cell/module.js +8 -0
- package/es/cell/index.d.ts +3 -0
- package/es/cell/index.d.ts.map +1 -0
- package/es/cell/index.js +2 -0
- package/es/cell/jupyter-code-cell-model.d.ts +12 -0
- package/es/cell/jupyter-code-cell-model.d.ts.map +1 -0
- package/es/cell/jupyter-code-cell-model.js +56 -0
- package/es/cell/jupyter-code-cell-view.d.ts +18 -0
- package/es/cell/jupyter-code-cell-view.d.ts.map +1 -0
- package/es/cell/jupyter-code-cell-view.js +280 -0
- package/es/command/command-contribution.d.ts +10 -0
- package/es/command/command-contribution.d.ts.map +1 -0
- package/es/command/command-contribution.js +161 -0
- package/es/command/index.d.ts +3 -0
- package/es/command/index.d.ts.map +1 -0
- package/es/command/index.js +2 -0
- package/es/command/keybinding-contribution.d.ts +8 -0
- package/es/command/keybinding-contribution.d.ts.map +1 -0
- package/es/command/keybinding-contribution.js +37 -0
- package/es/components/cell-execution-tip.d.ts +6 -0
- package/es/components/cell-execution-tip.d.ts.map +1 -0
- package/es/components/cell-execution-tip.js +69 -0
- package/es/components/cell-input-bottom-blank.d.ts +5 -0
- package/es/components/cell-input-bottom-blank.d.ts.map +1 -0
- package/es/components/cell-input-bottom-blank.js +21 -0
- package/es/components/icons.d.ts +5 -0
- package/es/components/icons.d.ts.map +1 -0
- package/es/components/icons.js +154 -0
- package/es/components/index.d.ts +4 -0
- package/es/components/index.d.ts.map +1 -0
- package/es/components/index.js +3 -0
- package/es/components/index.less +82 -0
- package/es/config/config-contribution.d.ts +10 -0
- package/es/config/config-contribution.d.ts.map +1 -0
- package/es/config/config-contribution.js +50 -0
- package/es/config/config.d.ts +3 -0
- package/es/config/config.d.ts.map +1 -0
- package/es/config/config.js +11 -0
- package/es/config/index.d.ts +2 -0
- package/es/config/index.d.ts.map +1 -0
- package/es/config/index.js +1 -0
- package/es/configuration/index.d.ts +3 -0
- package/es/configuration/index.d.ts.map +1 -0
- package/es/configuration/index.js +2 -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 +3 -0
- package/es/configuration/libro-configuration.d.ts.map +1 -0
- package/es/configuration/libro-configuration.js +12 -0
- package/es/contents/content-contribution.d.ts +7 -0
- package/es/contents/content-contribution.d.ts.map +1 -0
- package/es/contents/content-contribution.js +63 -0
- package/es/contents/index.d.ts +2 -0
- package/es/contents/index.d.ts.map +1 -0
- package/es/contents/index.js +1 -0
- package/es/file/file-name-alias.d.ts +7 -0
- package/es/file/file-name-alias.d.ts.map +1 -0
- package/es/file/file-name-alias.js +26 -0
- package/es/file/file-protocol.d.ts +8 -0
- package/es/file/file-protocol.d.ts.map +1 -0
- package/es/file/file-protocol.js +7 -0
- package/es/file/file-service.d.ts +31 -0
- package/es/file/file-service.d.ts.map +1 -0
- package/es/file/file-service.js +329 -0
- package/es/file/file-tree-label-provider.d.ts +13 -0
- package/es/file/file-tree-label-provider.d.ts.map +1 -0
- package/es/file/file-tree-label-provider.js +62 -0
- package/es/file/file-view/index.d.ts +14 -0
- package/es/file/file-view/index.d.ts.map +1 -0
- package/es/file/file-view/index.js +101 -0
- package/es/file/file-view/index.less +5 -0
- package/es/file/index.d.ts +7 -0
- package/es/file/index.d.ts.map +1 -0
- package/es/file/index.js +6 -0
- package/es/file/module.d.ts +3 -0
- package/es/file/module.d.ts.map +1 -0
- package/es/file/module.js +8 -0
- package/es/file/navigatable-view.d.ts +24 -0
- package/es/file/navigatable-view.d.ts.map +1 -0
- package/es/file/navigatable-view.js +151 -0
- package/es/file/open-handler-contribution.d.ts +11 -0
- package/es/file/open-handler-contribution.d.ts.map +1 -0
- package/es/file/open-handler-contribution.js +102 -0
- package/es/index.d.ts +32 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +31 -0
- package/es/keybind-instructions/index.d.ts +6 -0
- package/es/keybind-instructions/index.d.ts.map +1 -0
- package/es/keybind-instructions/index.js +5 -0
- package/es/keybind-instructions/index.less +177 -0
- package/es/keybind-instructions/keybind-instructions-contribution.d.ts +11 -0
- package/es/keybind-instructions/keybind-instructions-contribution.d.ts.map +1 -0
- package/es/keybind-instructions/keybind-instructions-contribution.js +84 -0
- package/es/keybind-instructions/keybind-instructions-icon.d.ts +3 -0
- package/es/keybind-instructions/keybind-instructions-icon.d.ts.map +1 -0
- package/es/keybind-instructions/keybind-instructions-icon.js +23 -0
- package/es/keybind-instructions/keybind-instructions-items.d.ts +14 -0
- package/es/keybind-instructions/keybind-instructions-items.d.ts.map +1 -0
- package/es/keybind-instructions/keybind-instructions-items.js +589 -0
- package/es/keybind-instructions/keybind-instructions-view.d.ts +16 -0
- package/es/keybind-instructions/keybind-instructions-view.d.ts.map +1 -0
- package/es/keybind-instructions/keybind-instructions-view.js +224 -0
- package/es/keybind-instructions/module.d.ts +3 -0
- package/es/keybind-instructions/module.d.ts.map +1 -0
- package/es/keybind-instructions/module.js +5 -0
- package/es/libro-jupyter-file-service.d.ts +106 -0
- package/es/libro-jupyter-file-service.d.ts.map +1 -0
- package/es/libro-jupyter-file-service.js +127 -0
- package/es/libro-jupyter-model.d.ts +49 -0
- package/es/libro-jupyter-model.d.ts.map +1 -0
- package/es/libro-jupyter-model.js +505 -0
- package/es/libro-jupyter-protocol.d.ts +38 -0
- package/es/libro-jupyter-protocol.d.ts.map +1 -0
- package/es/libro-jupyter-protocol.js +9 -0
- package/es/libro-jupyter-server-launch-manager.d.ts +11 -0
- package/es/libro-jupyter-server-launch-manager.d.ts.map +1 -0
- package/es/libro-jupyter-server-launch-manager.js +59 -0
- package/es/libro-jupyter-view.d.ts +10 -0
- package/es/libro-jupyter-view.d.ts.map +1 -0
- package/es/libro-jupyter-view.js +42 -0
- package/es/module.d.ts +3 -0
- package/es/module.d.ts.map +1 -0
- package/es/module.js +48 -0
- package/es/output/index.d.ts +2 -0
- package/es/output/index.d.ts.map +1 -0
- package/es/output/index.js +1 -0
- package/es/output/libro-jupyter-outputarea.d.ts +8 -0
- package/es/output/libro-jupyter-outputarea.d.ts.map +1 -0
- package/es/output/libro-jupyter-outputarea.js +77 -0
- package/es/rendermime/assets/plotly.svg +31 -0
- package/es/rendermime/index.d.ts +5 -0
- package/es/rendermime/index.d.ts.map +1 -0
- package/es/rendermime/index.js +4 -0
- package/es/rendermime/index.less +22 -0
- package/es/rendermime/module.d.ts +3 -0
- package/es/rendermime/module.d.ts.map +1 -0
- package/es/rendermime/module.js +3 -0
- package/es/rendermime/plotly-render.d.ts +7 -0
- package/es/rendermime/plotly-render.d.ts.map +1 -0
- package/es/rendermime/plotly-render.js +30 -0
- package/es/rendermime/plotly-renderers.d.ts +58 -0
- package/es/rendermime/plotly-renderers.d.ts.map +1 -0
- package/es/rendermime/plotly-renderers.js +211 -0
- package/es/rendermime/plotly-rendermime-contribution.d.ts +12 -0
- package/es/rendermime/plotly-rendermime-contribution.d.ts.map +1 -0
- package/es/rendermime/plotly-rendermime-contribution.js +22 -0
- package/es/theme/color-registry.d.ts +6 -0
- package/es/theme/color-registry.d.ts.map +1 -0
- package/es/theme/color-registry.js +393 -0
- package/es/theme/index.d.ts +2 -0
- package/es/theme/index.d.ts.map +1 -0
- package/es/theme/index.js +1 -0
- package/es/toolbar/index.d.ts +6 -0
- package/es/toolbar/index.d.ts.map +1 -0
- package/es/toolbar/index.js +5 -0
- package/es/toolbar/index.less +194 -0
- package/es/toolbar/kernel-selector-dropdown.d.ts +13 -0
- package/es/toolbar/kernel-selector-dropdown.d.ts.map +1 -0
- package/es/toolbar/kernel-selector-dropdown.js +165 -0
- package/es/toolbar/kernel-status-and-selector.d.ts +18 -0
- package/es/toolbar/kernel-status-and-selector.d.ts.map +1 -0
- package/es/toolbar/kernel-status-and-selector.js +164 -0
- package/es/toolbar/run-selector.d.ts +3 -0
- package/es/toolbar/run-selector.d.ts.map +1 -0
- package/es/toolbar/run-selector.js +98 -0
- package/es/toolbar/save-file-error-contribution.d.ts +5 -0
- package/es/toolbar/save-file-error-contribution.d.ts.map +1 -0
- package/es/toolbar/save-file-error-contribution.js +23 -0
- package/es/toolbar/save-file-error.d.ts +5 -0
- package/es/toolbar/save-file-error.d.ts.map +1 -0
- package/es/toolbar/save-file-error.js +27 -0
- package/es/toolbar/side-toolbar-run-selector.d.ts +3 -0
- package/es/toolbar/side-toolbar-run-selector.d.ts.map +1 -0
- package/es/toolbar/side-toolbar-run-selector.js +67 -0
- package/es/toolbar/toolbar-contribution.d.ts +9 -0
- package/es/toolbar/toolbar-contribution.d.ts.map +1 -0
- package/es/toolbar/toolbar-contribution.js +67 -0
- package/es/typings/index.d.ts +31 -0
- package/es/utils/index.d.ts +11 -0
- package/es/utils/index.d.ts.map +1 -0
- package/es/utils/index.js +47 -0
- package/package.json +75 -0
- package/src/add-between-cell/add-between-cell-command-contribution.ts +63 -0
- package/src/add-between-cell/add-between-cell.tsx +201 -0
- package/src/add-between-cell/index.less +103 -0
- package/src/add-between-cell/index.ts +2 -0
- package/src/add-between-cell/module.ts +13 -0
- package/src/cell/index.ts +2 -0
- package/src/cell/jupyter-code-cell-model.ts +36 -0
- package/src/cell/jupyter-code-cell-view.tsx +221 -0
- package/src/command/command-contribution.ts +163 -0
- package/src/command/index.ts +2 -0
- package/src/command/keybinding-contribution.ts +25 -0
- package/src/components/cell-execution-tip.tsx +107 -0
- package/src/components/cell-input-bottom-blank.tsx +24 -0
- package/src/components/icons.tsx +117 -0
- package/src/components/index.less +82 -0
- package/src/components/index.ts +3 -0
- package/src/config/config-contribution.ts +21 -0
- package/src/config/config.ts +14 -0
- package/src/config/index.ts +1 -0
- package/src/configuration/index.ts +2 -0
- package/src/configuration/libro-configuration-contribution.ts +11 -0
- package/src/configuration/libro-configuration.ts +14 -0
- package/src/contents/content-contribution.ts +32 -0
- package/src/contents/index.ts +1 -0
- package/src/file/file-name-alias.ts +15 -0
- package/src/file/file-protocol.ts +7 -0
- package/src/file/file-service.ts +179 -0
- package/src/file/file-tree-label-provider.ts +42 -0
- package/src/file/file-view/index.less +5 -0
- package/src/file/file-view/index.tsx +90 -0
- package/src/file/index.ts +6 -0
- package/src/file/module.ts +19 -0
- package/src/file/navigatable-view.tsx +93 -0
- package/src/file/open-handler-contribution.ts +44 -0
- package/src/index.ts +32 -0
- package/src/keybind-instructions/index.less +177 -0
- package/src/keybind-instructions/index.ts +5 -0
- package/src/keybind-instructions/keybind-instructions-contribution.ts +47 -0
- package/src/keybind-instructions/keybind-instructions-icon.tsx +28 -0
- package/src/keybind-instructions/keybind-instructions-items.tsx +597 -0
- package/src/keybind-instructions/keybind-instructions-view.tsx +239 -0
- package/src/keybind-instructions/module.ts +11 -0
- package/src/libro-jupyter-file-service.ts +158 -0
- package/src/libro-jupyter-model.ts +289 -0
- package/src/libro-jupyter-protocol.ts +59 -0
- package/src/libro-jupyter-server-launch-manager.ts +36 -0
- package/src/libro-jupyter-view.tsx +24 -0
- package/src/module.ts +105 -0
- package/src/output/index.ts +1 -0
- package/src/output/libro-jupyter-outputarea.tsx +71 -0
- package/src/rendermime/assets/plotly.svg +31 -0
- package/src/rendermime/index.less +13 -0
- package/src/rendermime/index.ts +4 -0
- package/src/rendermime/module.ts +7 -0
- package/src/rendermime/plotly-render.tsx +35 -0
- package/src/rendermime/plotly-renderers.ts +191 -0
- package/src/rendermime/plotly-rendermime-contribution.ts +15 -0
- package/src/theme/color-registry.ts +301 -0
- package/src/theme/index.ts +1 -0
- package/src/toolbar/index.less +194 -0
- package/src/toolbar/index.ts +5 -0
- package/src/toolbar/kernel-selector-dropdown.tsx +204 -0
- package/src/toolbar/kernel-status-and-selector.tsx +195 -0
- package/src/toolbar/run-selector.tsx +110 -0
- package/src/toolbar/save-file-error-contribution.ts +10 -0
- package/src/toolbar/save-file-error.tsx +35 -0
- package/src/toolbar/side-toolbar-run-selector.tsx +77 -0
- package/src/toolbar/toolbar-contribution.tsx +62 -0
- package/src/typings/index.d.ts +31 -0
- package/src/utils/index.ts +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Difizen Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# libro-jupyter
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CommandRegistry } from '@difizen/mana-app';
|
|
2
|
+
import { CommandContribution } from '@difizen/mana-app';
|
|
3
|
+
export declare const LibroAddBetweenCellCommand: {
|
|
4
|
+
AddBetweenCell: {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
AddBetweenCellWithContext: {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare class LibroAddBetweenCellCommandContribution implements CommandContribution {
|
|
12
|
+
registerCommands(command: CommandRegistry): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=add-between-cell-command-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-between-cell-command-contribution.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/add-between-cell-command-contribution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAa,MAAM,mBAAmB,CAAC;AAEnE,eAAO,MAAM,0BAA0B;;;;;;;CAOtC,CAAC;AAEF,qBACa,sCAAuC,YAAW,mBAAmB;IAChF,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CA+CjD"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
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); } }
|
|
8
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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); }
|
|
11
|
+
import { CommandContribution, singleton } from '@difizen/mana-app';
|
|
12
|
+
export var LibroAddBetweenCellCommand = {
|
|
13
|
+
AddBetweenCell: {
|
|
14
|
+
id: 'notebook:libro-add-between-cell'
|
|
15
|
+
},
|
|
16
|
+
AddBetweenCellWithContext: {
|
|
17
|
+
id: 'notebook:libro-add-between-cell-with-context'
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export var LibroAddBetweenCellCommandContribution = (_dec = singleton({
|
|
21
|
+
contrib: CommandContribution
|
|
22
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
23
|
+
function LibroAddBetweenCellCommandContribution() {
|
|
24
|
+
_classCallCheck(this, LibroAddBetweenCellCommandContribution);
|
|
25
|
+
}
|
|
26
|
+
_createClass(LibroAddBetweenCellCommandContribution, [{
|
|
27
|
+
key: "registerCommands",
|
|
28
|
+
value: function registerCommands(command) {
|
|
29
|
+
command.registerCommand(LibroAddBetweenCellCommand.AddBetweenCell, {
|
|
30
|
+
execute: function () {
|
|
31
|
+
var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, addCell, index) {
|
|
32
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
|
+
while (1) switch (_context.prev = _context.next) {
|
|
34
|
+
case 0:
|
|
35
|
+
if (!(!type || typeof addCell !== 'function')) {
|
|
36
|
+
_context.next = 2;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
return _context.abrupt("return");
|
|
40
|
+
case 2:
|
|
41
|
+
_context.next = 4;
|
|
42
|
+
return addCell({
|
|
43
|
+
cell: {
|
|
44
|
+
cell_type: type,
|
|
45
|
+
metadata: {},
|
|
46
|
+
source: ''
|
|
47
|
+
}
|
|
48
|
+
}, index);
|
|
49
|
+
case 4:
|
|
50
|
+
case "end":
|
|
51
|
+
return _context.stop();
|
|
52
|
+
}
|
|
53
|
+
}, _callee);
|
|
54
|
+
}));
|
|
55
|
+
function execute(_x, _x2, _x3) {
|
|
56
|
+
return _execute.apply(this, arguments);
|
|
57
|
+
}
|
|
58
|
+
return execute;
|
|
59
|
+
}()
|
|
60
|
+
});
|
|
61
|
+
command.registerCommand(LibroAddBetweenCellCommand.AddBetweenCellWithContext, {
|
|
62
|
+
execute: function () {
|
|
63
|
+
var _execute2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(type, addCell, index, context) {
|
|
64
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
65
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
if (!(!type || typeof addCell !== 'function')) {
|
|
68
|
+
_context2.next = 2;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
return _context2.abrupt("return");
|
|
72
|
+
case 2:
|
|
73
|
+
_context2.next = 4;
|
|
74
|
+
return addCell({
|
|
75
|
+
cell: {
|
|
76
|
+
cell_type: type,
|
|
77
|
+
metadata: {},
|
|
78
|
+
source: ''
|
|
79
|
+
},
|
|
80
|
+
context: context
|
|
81
|
+
}, index);
|
|
82
|
+
case 4:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context2.stop();
|
|
85
|
+
}
|
|
86
|
+
}, _callee2);
|
|
87
|
+
}));
|
|
88
|
+
function execute(_x4, _x5, _x6, _x7) {
|
|
89
|
+
return _execute2.apply(this, arguments);
|
|
90
|
+
}
|
|
91
|
+
return execute;
|
|
92
|
+
}()
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
return LibroAddBetweenCellCommandContribution;
|
|
97
|
+
}()) || _class);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BetweenCellProvider } from '@difizen/libro-core';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare const LibroCommonBetweenCellContent: BetweenCellProvider;
|
|
4
|
+
export declare const LibroWrappedBetweenCellContent: BetweenCellProvider;
|
|
5
|
+
//# sourceMappingURL=add-between-cell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-between-cell.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/add-between-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAa,MAAM,qBAAqB,CAAC;AAU1E,OAAO,cAAc,CAAC;AA0BtB,eAAO,MAAM,6BAA6B,EAAE,mBAwJ3C,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,mBAS5C,CAAC"}
|
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { DisplayWrapComponent } from '@difizen/libro-common';
|
|
12
|
+
import { CellService } from '@difizen/libro-core';
|
|
13
|
+
import { CommandRegistry, useInject, ViewInstance } from '@difizen/mana-app';
|
|
14
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
15
|
+
import { Tooltip, Popover, Menu } from 'antd';
|
|
16
|
+
import { useEffect, useRef, useState, forwardRef } from 'react';
|
|
17
|
+
import { LibroAddBetweenCellCommand } from "./add-between-cell-command-contribution.js";
|
|
18
|
+
import "./index.less";
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
var AddCellOutlined = function AddCellOutlined() {
|
|
23
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
24
|
+
width: "18px",
|
|
25
|
+
height: "18px",
|
|
26
|
+
viewBox: "0 0 18 18",
|
|
27
|
+
version: "1.1",
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
30
|
+
children: /*#__PURE__*/_jsx("g", {
|
|
31
|
+
id: "\u9875\u9762-1",
|
|
32
|
+
stroke: "none",
|
|
33
|
+
strokeWidth: "1",
|
|
34
|
+
fill: "#6982A9",
|
|
35
|
+
fillRule: "evenodd",
|
|
36
|
+
children: /*#__PURE__*/_jsx("g", {
|
|
37
|
+
id: "2.0-\u6DFB\u52A0-cell",
|
|
38
|
+
transform: "translate(-1539.000000, -240.000000)",
|
|
39
|
+
children: /*#__PURE__*/_jsx("g", {
|
|
40
|
+
id: "Icon/01-Line/add\u5907\u4EFD-3",
|
|
41
|
+
transform: "translate(1539.937500, 240.562500)",
|
|
42
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
43
|
+
d: "M15.9375,7.546875 C16.040625,7.546875 16.125,7.63125 16.125,7.734375 L16.125,9.140625 C16.125,9.24375 16.040625,9.328125 15.9375,9.328125 L8.953125,9.328125 L8.953125,16.6875 C8.953125,16.7910534 8.86917839,16.875 8.765625,16.875 L7.359375,16.875 C7.25582161,16.875 7.171875,16.7910534 7.171875,16.6875 L7.171875,9.328125 L0.1875,9.328125 C0.084375,9.328125 0,9.24375 0,9.140625 L0,7.734375 C0,7.63125 0.084375,7.546875 0.1875,7.546875 L7.171875,7.546875 L7.171875,0.1875 C7.171875,0.0839466094 7.25582161,0 7.359375,0 L8.765625,0 C8.86917839,0 8.953125,0.0839466094 8.953125,0.1875 L8.953125,7.546875 L15.9375,7.546875 Z",
|
|
44
|
+
id: "path-1",
|
|
45
|
+
fill: "currentColor"
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
54
|
+
export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function LibroCommonBetweenCellContent(props, _ref) {
|
|
55
|
+
// eslint-disable-next-line react/prop-types
|
|
56
|
+
var addCell = props.addCell,
|
|
57
|
+
index = props.index;
|
|
58
|
+
var _useInject = useInject(CellService),
|
|
59
|
+
cellsMeta = _useInject.cellsMeta;
|
|
60
|
+
var anchorRef = useRef(null);
|
|
61
|
+
var gutterRef = useRef(null);
|
|
62
|
+
var _useState = useState({
|
|
63
|
+
top: 0,
|
|
64
|
+
left: 0
|
|
65
|
+
}),
|
|
66
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
+
position = _useState2[0],
|
|
68
|
+
setPosition = _useState2[1];
|
|
69
|
+
var _useState3 = useState(false),
|
|
70
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
71
|
+
GutterVisible = _useState4[0],
|
|
72
|
+
setGutterVisible = _useState4[1];
|
|
73
|
+
var _useState5 = useState(false),
|
|
74
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
75
|
+
tooltipVisible = _useState6[0],
|
|
76
|
+
setTooltipVisible = _useState6[1];
|
|
77
|
+
var _useState7 = useState(false),
|
|
78
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
79
|
+
menuVisible = _useState8[0],
|
|
80
|
+
setMenuVisible = _useState8[1];
|
|
81
|
+
var command = useInject(CommandRegistry);
|
|
82
|
+
var innerOpenTooltip = function innerOpenTooltip() {
|
|
83
|
+
if (menuVisible) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setTooltipVisible(true);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
//====== delay ========
|
|
90
|
+
var delayRef = useRef();
|
|
91
|
+
var clearDelay = function clearDelay() {
|
|
92
|
+
clearTimeout(delayRef.current);
|
|
93
|
+
};
|
|
94
|
+
var openTooltip = function openTooltip(_nextOpen) {
|
|
95
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;
|
|
96
|
+
clearDelay();
|
|
97
|
+
if (delay === 0) {
|
|
98
|
+
innerOpenTooltip();
|
|
99
|
+
} else {
|
|
100
|
+
delayRef.current = setTimeout(function () {
|
|
101
|
+
innerOpenTooltip();
|
|
102
|
+
}, delay * 1000);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var closeTooltip = function closeTooltip() {
|
|
106
|
+
clearDelay();
|
|
107
|
+
setTooltipVisible(false);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
|
+
useEffect(function () {
|
|
112
|
+
return closeTooltip;
|
|
113
|
+
}, []);
|
|
114
|
+
var items = cellsMeta.filter(function (item) {
|
|
115
|
+
return item.type !== 'raw';
|
|
116
|
+
}).sort(function (a, b) {
|
|
117
|
+
return a.order.localeCompare(b.order);
|
|
118
|
+
}).map(function (item) {
|
|
119
|
+
return {
|
|
120
|
+
label: item.name,
|
|
121
|
+
key: item.type,
|
|
122
|
+
onClick: function () {
|
|
123
|
+
var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
124
|
+
var _anchorRef$current;
|
|
125
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
126
|
+
while (1) switch (_context.prev = _context.next) {
|
|
127
|
+
case 0:
|
|
128
|
+
command.executeCommand(LibroAddBetweenCellCommand.AddBetweenCell.id, item.type, addCell, index);
|
|
129
|
+
(_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.blur();
|
|
130
|
+
setMenuVisible(false);
|
|
131
|
+
case 3:
|
|
132
|
+
case "end":
|
|
133
|
+
return _context.stop();
|
|
134
|
+
}
|
|
135
|
+
}, _callee);
|
|
136
|
+
}));
|
|
137
|
+
function onClick() {
|
|
138
|
+
return _onClick.apply(this, arguments);
|
|
139
|
+
}
|
|
140
|
+
return onClick;
|
|
141
|
+
}()
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
145
|
+
className: "libro-add-between-cell",
|
|
146
|
+
children: [/*#__PURE__*/_jsx(Popover, {
|
|
147
|
+
content: /*#__PURE__*/_jsx(Menu, {
|
|
148
|
+
items: items
|
|
149
|
+
}),
|
|
150
|
+
trigger: "click",
|
|
151
|
+
getPopupContainer: function getPopupContainer(trigger) {
|
|
152
|
+
var _anchorRef$current2;
|
|
153
|
+
return (_anchorRef$current2 = anchorRef.current) !== null && _anchorRef$current2 !== void 0 ? _anchorRef$current2 : trigger;
|
|
154
|
+
},
|
|
155
|
+
placement: "bottomLeft",
|
|
156
|
+
overlayClassName: "libro-add-cell-menu",
|
|
157
|
+
destroyTooltipOnHide: true,
|
|
158
|
+
open: menuVisible,
|
|
159
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
160
|
+
tabIndex: 10,
|
|
161
|
+
className: "libro-add-between-cell-anchor",
|
|
162
|
+
style: {
|
|
163
|
+
position: 'fixed',
|
|
164
|
+
top: position.top + 5,
|
|
165
|
+
left: position.left + 5,
|
|
166
|
+
width: 1,
|
|
167
|
+
height: 1,
|
|
168
|
+
zIndex: 1000
|
|
169
|
+
},
|
|
170
|
+
ref: anchorRef,
|
|
171
|
+
onBlur: function onBlur(e) {
|
|
172
|
+
var _anchorRef$current3;
|
|
173
|
+
if (!((_anchorRef$current3 = anchorRef.current) !== null && _anchorRef$current3 !== void 0 && _anchorRef$current3.contains(e.relatedTarget))) {
|
|
174
|
+
setMenuVisible(false);
|
|
175
|
+
}
|
|
176
|
+
setGutterVisible(false);
|
|
177
|
+
closeTooltip();
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
181
|
+
ref: gutterRef,
|
|
182
|
+
className: "libro-add-between-cell-area",
|
|
183
|
+
onMouseEnter: function onMouseEnter() {
|
|
184
|
+
setGutterVisible(true);
|
|
185
|
+
},
|
|
186
|
+
onMouseLeave: function onMouseLeave() {
|
|
187
|
+
closeTooltip();
|
|
188
|
+
if (menuVisible) {
|
|
189
|
+
setGutterVisible(true);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
setGutterVisible(false);
|
|
193
|
+
},
|
|
194
|
+
onMouseUp: function onMouseUp(e) {
|
|
195
|
+
var _anchorRef$current4;
|
|
196
|
+
closeTooltip();
|
|
197
|
+
setGutterVisible(true);
|
|
198
|
+
setMenuVisible(true);
|
|
199
|
+
setPosition({
|
|
200
|
+
top: e.clientY,
|
|
201
|
+
left: e.clientX
|
|
202
|
+
});
|
|
203
|
+
(_anchorRef$current4 = anchorRef.current) === null || _anchorRef$current4 === void 0 ? void 0 : _anchorRef$current4.focus();
|
|
204
|
+
},
|
|
205
|
+
children: GutterVisible && /*#__PURE__*/_jsxs(_Fragment, {
|
|
206
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
207
|
+
title: l10n.t('添加 Cell'),
|
|
208
|
+
open: tooltipVisible,
|
|
209
|
+
overlayClassName: "libro-add-between-cell-tooltip",
|
|
210
|
+
destroyTooltipOnHide: true,
|
|
211
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
212
|
+
className: "libro-add-between-cell-icon",
|
|
213
|
+
onMouseEnter: function onMouseEnter() {
|
|
214
|
+
openTooltip(true);
|
|
215
|
+
},
|
|
216
|
+
onMouseLeave: function onMouseLeave() {
|
|
217
|
+
closeTooltip();
|
|
218
|
+
if (menuVisible) {
|
|
219
|
+
setGutterVisible(true);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
children: /*#__PURE__*/_jsx(AddCellOutlined, {})
|
|
223
|
+
})
|
|
224
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
225
|
+
className: "libro-cell-divider"
|
|
226
|
+
})]
|
|
227
|
+
})
|
|
228
|
+
})]
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
export var LibroWrappedBetweenCellContent = function LibroWrappedBetweenCellContent(props) {
|
|
232
|
+
// eslint-disable-next-line react/prop-types
|
|
233
|
+
var index = props.index,
|
|
234
|
+
addCell = props.addCell;
|
|
235
|
+
var instance = useInject(ViewInstance);
|
|
236
|
+
return /*#__PURE__*/_jsx(DisplayWrapComponent, {
|
|
237
|
+
mode: instance.model.readOnly,
|
|
238
|
+
children: /*#__PURE__*/_jsx(LibroCommonBetweenCellContent, {
|
|
239
|
+
index: index,
|
|
240
|
+
addCell: addCell
|
|
241
|
+
})
|
|
242
|
+
});
|
|
243
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@ant-prefix: ant;
|
|
2
|
+
|
|
3
|
+
.libro-add-between-cell {
|
|
4
|
+
position: relative;
|
|
5
|
+
.@{ant-prefix}-popover-arrow {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
.@{ant-prefix}-popover {
|
|
9
|
+
padding: 0;
|
|
10
|
+
max-width: unset;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.@{ant-prefix}-popover-inner {
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
background-color: var(--mana-libro-add-between-popover-background-color);
|
|
16
|
+
padding: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.@{ant-prefix}-popover-inner-content {
|
|
20
|
+
padding: 0;
|
|
21
|
+
width: unset;
|
|
22
|
+
max-width: unset;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.libro-add-cell-menu {
|
|
26
|
+
z-index: 1000;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.@{ant-prefix}-menu {
|
|
30
|
+
border-radius: 8px !important;
|
|
31
|
+
background-color: var(--mana-libro-add-between-popover-background-color) !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.@{ant-prefix}-menu-vertical {
|
|
35
|
+
border-right: unset !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.@{ant-prefix}-menu-item {
|
|
39
|
+
height: 32px !important;
|
|
40
|
+
line-height: 32px !important;
|
|
41
|
+
}
|
|
42
|
+
.@{ant-prefix}-menu-item:hover {
|
|
43
|
+
background-color: var(--mana-libro-add-between-hover-color) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.@{ant-prefix}-menu-title-content {
|
|
47
|
+
color: var(--mana-libro-add-between-menu-label-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.@{ant-prefix}-menu-item-selected {
|
|
51
|
+
background-color: var(--mana-libro-add-between-hover-color) !important;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.libro-cell-divider {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 4px;
|
|
58
|
+
background-color: var(--mana-libro-add-between-divider-color);
|
|
59
|
+
border-radius: 2px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.libro-add-between-cell-icon {
|
|
63
|
+
z-index: 20;
|
|
64
|
+
margin-right: 10px;
|
|
65
|
+
margin-left: 30px;
|
|
66
|
+
height: 18px;
|
|
67
|
+
line-height: 18px;
|
|
68
|
+
text-align: center;
|
|
69
|
+
|
|
70
|
+
svg {
|
|
71
|
+
color: var(--mana-libro-add-between-icon-color);
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
color: var(--mana-libro-add-between-icon-hover-color);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.libro-add-between-cell-area {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: -16px;
|
|
82
|
+
z-index: 10;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 16px;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.libro-add-between-cell-tooltip {
|
|
91
|
+
.@{ant-prefix}-tooltip-inner {
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
line-height: 22px;
|
|
95
|
+
text-align: center;
|
|
96
|
+
border-radius: 6px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.libro-add-between-cell-anchor:focus {
|
|
101
|
+
outline: none;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,eAAO,MAAM,sBAAsB,YAMlC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BetweenCellProvider } from '@difizen/libro-core';
|
|
2
|
+
import { ManaModule } from '@difizen/mana-app';
|
|
3
|
+
import { LibroAddBetweenCellCommandContribution } from "./add-between-cell-command-contribution.js";
|
|
4
|
+
import { LibroWrappedBetweenCellContent } from "./add-between-cell.js";
|
|
5
|
+
export var LibroBetweenCellModule = ManaModule.create().register({
|
|
6
|
+
token: BetweenCellProvider,
|
|
7
|
+
useValue: LibroWrappedBetweenCellContent
|
|
8
|
+
}, LibroAddBetweenCellCommandContribution);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
|
package/es/cell/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LibroCodeCellModel } from '@difizen/libro-codemirror-code-cell';
|
|
2
|
+
import type { ICellMetadata } from '@difizen/libro-common';
|
|
3
|
+
import { CellOptions } from '@difizen/libro-core';
|
|
4
|
+
import { ViewManager } from '@difizen/mana-app';
|
|
5
|
+
import type { ExecutedWithKernelCellModel, CodeCellMetadata } from '../libro-jupyter-protocol.js';
|
|
6
|
+
export declare class JupyterCodeCellModel extends LibroCodeCellModel implements ExecutedWithKernelCellModel {
|
|
7
|
+
metadata: Partial<CodeCellMetadata | ICellMetadata>;
|
|
8
|
+
kernelExecuting: boolean;
|
|
9
|
+
constructor(options: CellOptions, viewManager: ViewManager);
|
|
10
|
+
clearExecution: () => void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=jupyter-code-cell-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jupyter-code-cell-model.d.ts","sourceRoot":"","sources":["../../src/cell/jupyter-code-cell-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAQ,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,qBACa,oBACX,SAAQ,kBACR,YAAW,2BAA2B;IAG7B,QAAQ,EAAE,OAAO,CAAC,gBAAgB,GAAG,aAAa,CAAC,CAAC;IAE7D,eAAe,UAAS;gBAGD,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,WAAW;IAMtC,cAAc,aAKrB;CACH"}
|