@difizen/libro-jupyter 0.1.1 → 0.1.2

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.
Files changed (100) hide show
  1. package/es/add-between-cell/add-between-cell.d.ts.map +1 -1
  2. package/es/add-between-cell/add-between-cell.js +7 -7
  3. package/es/add-between-cell/index.less +6 -0
  4. package/es/cell/jupyter-code-cell-model.d.ts +2 -2
  5. package/es/cell/jupyter-code-cell-model.d.ts.map +1 -1
  6. package/es/cell/jupyter-code-cell-model.js +7 -3
  7. package/es/cell/jupyter-code-cell-view.d.ts +9 -4
  8. package/es/cell/jupyter-code-cell-view.d.ts.map +1 -1
  9. package/es/cell/jupyter-code-cell-view.js +137 -100
  10. package/es/command/command-contribution.d.ts.map +1 -1
  11. package/es/command/command-contribution.js +9 -9
  12. package/es/components/cell-execution-tip.d.ts.map +1 -1
  13. package/es/components/cell-execution-tip.js +14 -1
  14. package/es/components/cell-input-bottom-blank.d.ts.map +1 -1
  15. package/es/components/cell-input-bottom-blank.js +4 -4
  16. package/es/config/config-contribution.d.ts +2 -2
  17. package/es/config/config-contribution.d.ts.map +1 -1
  18. package/es/config/config-contribution.js +7 -7
  19. package/es/config/config.d.ts +6 -1
  20. package/es/config/config.d.ts.map +1 -1
  21. package/es/config/config.js +15 -1
  22. package/es/config/index.d.ts +1 -0
  23. package/es/config/index.d.ts.map +1 -1
  24. package/es/config/index.js +2 -1
  25. package/es/file/file-command.d.ts.map +1 -1
  26. package/es/file/file-command.js +6 -2
  27. package/es/file/navigatable-view.d.ts +7 -2
  28. package/es/file/navigatable-view.d.ts.map +1 -1
  29. package/es/file/navigatable-view.js +41 -6
  30. package/es/file/open-handler-contribution.js +1 -1
  31. package/es/index.d.ts +17 -15
  32. package/es/index.d.ts.map +1 -1
  33. package/es/index.js +17 -15
  34. package/es/keybind-instructions/index.less +2 -2
  35. package/es/keybind-instructions/keybind-instructions-contribution.js +2 -2
  36. package/es/libro-jupyter-model.d.ts +8 -4
  37. package/es/libro-jupyter-model.d.ts.map +1 -1
  38. package/es/libro-jupyter-model.js +24 -17
  39. package/es/libro-jupyter-protocol.d.ts +4 -0
  40. package/es/libro-jupyter-protocol.d.ts.map +1 -1
  41. package/es/libro-jupyter-protocol.js +2 -1
  42. package/es/libro-jupyter-server-launch-manager.d.ts +3 -1
  43. package/es/libro-jupyter-server-launch-manager.d.ts.map +1 -1
  44. package/es/libro-jupyter-server-launch-manager.js +9 -2
  45. package/es/libro-jupyter-view.d.ts +2 -1
  46. package/es/libro-jupyter-view.d.ts.map +1 -1
  47. package/es/libro-jupyter-view.js +4 -2
  48. package/es/module.d.ts.map +1 -1
  49. package/es/module.js +12 -10
  50. package/es/output/libro-jupyter-outputarea.d.ts +3 -0
  51. package/es/output/libro-jupyter-outputarea.d.ts.map +1 -1
  52. package/es/output/libro-jupyter-outputarea.js +49 -4
  53. package/es/rendermime/index.less +12 -1
  54. package/es/rendermime/plotly-renderers.d.ts +15 -14
  55. package/es/rendermime/plotly-renderers.d.ts.map +1 -1
  56. package/es/rendermime/plotly-renderers.js +1 -3
  57. package/es/toolbar/kernel-selector-dropdown.d.ts.map +1 -1
  58. package/es/toolbar/kernel-selector-dropdown.js +2 -6
  59. package/es/typings/index.d.ts +7 -2
  60. package/package.json +16 -14
  61. package/src/add-between-cell/add-between-cell.tsx +17 -8
  62. package/src/add-between-cell/index.less +6 -0
  63. package/src/cell/jupyter-code-cell-model.ts +6 -4
  64. package/src/cell/jupyter-code-cell-view.tsx +81 -48
  65. package/src/command/command-contribution.ts +13 -9
  66. package/src/components/cell-execution-tip.tsx +8 -2
  67. package/src/components/cell-input-bottom-blank.tsx +10 -5
  68. package/src/config/config-contribution.ts +3 -3
  69. package/src/config/config.ts +17 -2
  70. package/src/config/index.ts +1 -0
  71. package/src/file/file-command.tsx +5 -2
  72. package/src/file/navigatable-view.tsx +39 -1
  73. package/src/file/open-handler-contribution.ts +1 -1
  74. package/src/index.spec.ts +1 -5
  75. package/src/index.ts +17 -16
  76. package/src/keybind-instructions/index.less +2 -2
  77. package/src/keybind-instructions/keybind-instructions-contribution.ts +2 -2
  78. package/src/libro-jupyter-model.ts +34 -20
  79. package/src/libro-jupyter-protocol.ts +5 -0
  80. package/src/libro-jupyter-server-launch-manager.ts +11 -2
  81. package/src/libro-jupyter-view.tsx +4 -1
  82. package/src/module.ts +23 -15
  83. package/src/output/libro-jupyter-outputarea.tsx +31 -3
  84. package/src/rendermime/index.less +12 -1
  85. package/src/rendermime/plotly-render.tsx +1 -1
  86. package/src/rendermime/plotly-renderers.ts +15 -17
  87. package/src/toolbar/kernel-selector-dropdown.tsx +2 -6
  88. package/src/typings/index.d.ts +7 -2
  89. package/es/configuration/index.d.ts +0 -3
  90. package/es/configuration/index.d.ts.map +0 -1
  91. package/es/configuration/index.js +0 -2
  92. package/es/configuration/libro-configuration-contribution.d.ts +0 -5
  93. package/es/configuration/libro-configuration-contribution.d.ts.map +0 -1
  94. package/es/configuration/libro-configuration-contribution.js +0 -24
  95. package/es/configuration/libro-configuration.d.ts +0 -3
  96. package/es/configuration/libro-configuration.d.ts.map +0 -1
  97. package/es/configuration/libro-configuration.js +0 -12
  98. package/src/configuration/index.ts +0 -2
  99. package/src/configuration/libro-configuration-contribution.ts +0 -11
  100. package/src/configuration/libro-configuration.ts +0 -14
@@ -150,9 +150,7 @@ export const KernelSelector: React.FC = () => {
150
150
  (libroView.model as LibroJupyterModel).kernelConnecting = false;
151
151
  return;
152
152
  })
153
- .catch(() => {
154
- //
155
- });
153
+ .catch(console.error);
156
154
 
157
155
  return;
158
156
  }
@@ -173,9 +171,7 @@ export const KernelSelector: React.FC = () => {
173
171
  (libroView.model as LibroJupyterModel).kernelConnecting = false;
174
172
  return;
175
173
  })
176
- .catch(() => {
177
- //
178
- });
174
+ .catch(console.error);
179
175
  }
180
176
 
181
177
  libroView.model.kernelConnecting = false;
@@ -4,6 +4,13 @@ declare module 'plotly.js' {
4
4
  export type Frame = Record<string, any>;
5
5
  export function addFrames(root: Plotly.Root, frames: Frame[]): Promise<void>;
6
6
  export function animate(root: Plotly.Root): void;
7
+ export function react(
8
+ root: Plotly.Root,
9
+ data: Data[],
10
+ layout: Layout,
11
+ config: any,
12
+ ): Promise<Plotly.Root>;
13
+ export function toImage(root: Plotly.Root, options: any): Promise<string>;
7
14
  export type Data = any;
8
15
  export type Layout = any;
9
16
 
@@ -26,6 +33,4 @@ declare module 'plotly.js' {
26
33
  layout: Layout;
27
34
  on(event: PlotlyEvent, callback: (update: any) => void): void;
28
35
  }
29
- export function react(node: HTMLElement, data: any, layout: any, config: any): void;
30
- export function toImage(...args: any[]): Promise<string>;
31
36
  }
@@ -1,3 +0,0 @@
1
- export * from './libro-configuration.js';
2
- export * from './libro-configuration-contribution.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./libro-configuration.js";
2
- export * from "./libro-configuration-contribution.js";
@@ -1,5 +0,0 @@
1
- import { ConfigurationContribution } from '@difizen/mana-app';
2
- export declare class LibroConfigurationContribution implements ConfigurationContribution {
3
- registerConfigurations(): import("@difizen/mana-app").ConfigurationNode<string>[];
4
- }
5
- //# sourceMappingURL=libro-configuration-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"libro-configuration-contribution.d.ts","sourceRoot":"","sources":["../../src/configuration/libro-configuration-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAK9D,qBACa,8BAA+B,YAAW,yBAAyB;IAC9E,sBAAsB;CAGvB"}
@@ -1,24 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _dec, _class;
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
5
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
- function _toPropertyKey(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 { LibroJupyterConfiguration } 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 [LibroJupyterConfiguration['OpenSlot']];
21
- }
22
- }]);
23
- return LibroConfigurationContribution;
24
- }()) || _class);
@@ -1,3 +0,0 @@
1
- import type { ConfigurationNode } from '@difizen/mana-app';
2
- export declare const LibroJupyterConfiguration: Record<string, ConfigurationNode<string>>;
3
- //# sourceMappingURL=libro-configuration.d.ts.map
@@ -1 +0,0 @@
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;AAE3D,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAW/E,CAAC"}
@@ -1,12 +0,0 @@
1
- export var LibroJupyterConfiguration = {
2
- OpenSlot: {
3
- id: 'libro.jupyter.open.slot',
4
- description: '文件默认打开位置',
5
- title: '文件默认打开位置',
6
- type: 'checkbox',
7
- defaultValue: 'main',
8
- schema: {
9
- type: 'string'
10
- }
11
- }
12
- };
@@ -1,2 +0,0 @@
1
- export * from './libro-configuration.js';
2
- export * from './libro-configuration-contribution.js';
@@ -1,11 +0,0 @@
1
- import { ConfigurationContribution } from '@difizen/mana-app';
2
- import { singleton } from '@difizen/mana-app';
3
-
4
- import { LibroJupyterConfiguration } from './libro-configuration.js';
5
-
6
- @singleton({ contrib: ConfigurationContribution })
7
- export class LibroConfigurationContribution implements ConfigurationContribution {
8
- registerConfigurations() {
9
- return [LibroJupyterConfiguration['OpenSlot']];
10
- }
11
- }
@@ -1,14 +0,0 @@
1
- import type { ConfigurationNode } from '@difizen/mana-app';
2
-
3
- export const LibroJupyterConfiguration: Record<string, ConfigurationNode<string>> = {
4
- OpenSlot: {
5
- id: 'libro.jupyter.open.slot',
6
- description: '文件默认打开位置',
7
- title: '文件默认打开位置',
8
- type: 'checkbox',
9
- defaultValue: 'main',
10
- schema: {
11
- type: 'string',
12
- },
13
- },
14
- };