@difizen/libro-jupyter 0.3.8 → 0.3.9

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.
@@ -1 +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"}
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;AAGnE,eAAO,MAAM,0BAA0B;;;;;;;CAOtC,CAAC;AAEF,qBACa,sCAAuC,YAAW,mBAAmB;IAChF,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CA8CjD"}
@@ -9,6 +9,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
9
9
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
10
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
11
  import { CommandContribution, singleton } from '@difizen/mana-app';
12
+ import { v4 } from 'uuid';
12
13
  export var LibroAddBetweenCellCommand = {
13
14
  AddBetweenCell: {
14
15
  id: 'notebook:libro-add-between-cell'
@@ -29,6 +30,7 @@ export var LibroAddBetweenCellCommandContribution = (_dec = singleton({
29
30
  command.registerCommand(LibroAddBetweenCellCommand.AddBetweenCell, {
30
31
  execute: function () {
31
32
  var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, addCell, index) {
33
+ var cellOptions;
32
34
  return _regeneratorRuntime().wrap(function _callee$(_context) {
33
35
  while (1) switch (_context.prev = _context.next) {
34
36
  case 0:
@@ -38,15 +40,17 @@ export var LibroAddBetweenCellCommandContribution = (_dec = singleton({
38
40
  }
39
41
  return _context.abrupt("return");
40
42
  case 2:
41
- _context.next = 4;
42
- return addCell({
43
+ cellOptions = {
44
+ id: v4(),
43
45
  cell: {
44
46
  cell_type: type,
45
47
  metadata: {},
46
48
  source: ''
47
49
  }
48
- }, index);
49
- case 4:
50
+ };
51
+ _context.next = 5;
52
+ return addCell(cellOptions, index);
53
+ case 5:
50
54
  case "end":
51
55
  return _context.stop();
52
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-jupyter",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro"
@@ -37,24 +37,25 @@
37
37
  "dependencies": {
38
38
  "@ant-design/colors": "^7.0.0",
39
39
  "@ant-design/icons": "^5.1.0",
40
- "@difizen/libro-code-cell": "^0.3.8",
41
- "@difizen/libro-code-editor": "^0.3.8",
42
- "@difizen/libro-codemirror": "^0.3.8",
43
- "@difizen/libro-cofine-editor": "^0.3.8",
44
- "@difizen/libro-common": "^0.3.8",
45
- "@difizen/libro-core": "^0.3.8",
46
- "@difizen/libro-kernel": "^0.3.8",
47
- "@difizen/libro-l10n": "^0.3.8",
48
- "@difizen/libro-language-client": "^0.3.8",
49
- "@difizen/libro-lsp": "^0.3.8",
50
- "@difizen/libro-markdown-cell": "^0.3.8",
51
- "@difizen/libro-output": "^0.3.8",
52
- "@difizen/libro-raw-cell": "^0.3.8",
53
- "@difizen/libro-rendermime": "^0.3.8",
54
- "@difizen/libro-search": "^0.3.8",
55
- "@difizen/libro-search-code-cell": "^0.3.8",
40
+ "@difizen/libro-code-cell": "^0.3.9",
41
+ "@difizen/libro-code-editor": "^0.3.9",
42
+ "@difizen/libro-codemirror": "^0.3.9",
43
+ "@difizen/libro-cofine-editor": "^0.3.9",
44
+ "@difizen/libro-common": "^0.3.9",
45
+ "@difizen/libro-core": "^0.3.9",
46
+ "@difizen/libro-kernel": "^0.3.9",
47
+ "@difizen/libro-l10n": "^0.3.9",
48
+ "@difizen/libro-language-client": "^0.3.9",
49
+ "@difizen/libro-lsp": "^0.3.9",
50
+ "@difizen/libro-markdown-cell": "^0.3.9",
51
+ "@difizen/libro-output": "^0.3.9",
52
+ "@difizen/libro-raw-cell": "^0.3.9",
53
+ "@difizen/libro-rendermime": "^0.3.9",
54
+ "@difizen/libro-search": "^0.3.9",
55
+ "@difizen/libro-search-code-cell": "^0.3.9",
56
56
  "@difizen/mana-app": "latest",
57
57
  "@difizen/mana-l10n": "latest",
58
+ "uuid": "^9.0.0",
58
59
  "classnames": "^2.3.2",
59
60
  "moment": "^2.29.4",
60
61
  "plotly.js": "^2.35.0"
@@ -1,6 +1,7 @@
1
1
  import type { CellOptions } from '@difizen/libro-core';
2
2
  import type { CommandRegistry } from '@difizen/mana-app';
3
3
  import { CommandContribution, singleton } from '@difizen/mana-app';
4
+ import { v4 } from 'uuid';
4
5
 
5
6
  export const LibroAddBetweenCellCommand = {
6
7
  AddBetweenCell: {
@@ -23,16 +24,15 @@ export class LibroAddBetweenCellCommandContribution implements CommandContributi
23
24
  if (!type || typeof addCell !== 'function') {
24
25
  return;
25
26
  }
26
- await addCell(
27
- {
28
- cell: {
29
- cell_type: type,
30
- metadata: {},
31
- source: '',
32
- },
27
+ const cellOptions = {
28
+ id: v4(),
29
+ cell: {
30
+ cell_type: type,
31
+ metadata: {},
32
+ source: '',
33
33
  },
34
- index,
35
- );
34
+ };
35
+ await addCell(cellOptions, index);
36
36
  },
37
37
  });
38
38