@jupyterlab/cells 3.4.2 → 3.4.3

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.
@@ -7,7 +7,6 @@ export declare class ResizeHandle extends Widget {
7
7
  protected targetNode: HTMLElement;
8
8
  private _isActive;
9
9
  private _isDragging;
10
- private _mouseOffset;
11
10
  private _protectedWidth;
12
11
  constructor(targetNode: HTMLElement);
13
12
  protected onAfterAttach(msg: Message): void;
@@ -36,12 +36,10 @@ export class ResizeHandle extends Widget {
36
36
  (_a = this.targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.childNodes.forEach(node => {
37
37
  node.classList.remove(CELL_RESIZED_CLASS);
38
38
  });
39
- document.documentElement.style.setProperty('--jp-side-by-side-resized-cell', '');
39
+ document.documentElement.style.setProperty('--jp-side-by-side-output-size', '1fr');
40
40
  this._isActive = false;
41
41
  break;
42
42
  case 'mousedown':
43
- this._mouseOffset =
44
- event.clientX - this.node.getBoundingClientRect().x;
45
43
  this._isDragging = true;
46
44
  if (!this._isActive) {
47
45
  (_b = this.targetNode.parentNode) === null || _b === void 0 ? void 0 : _b.childNodes.forEach(node => {
@@ -57,14 +55,10 @@ export class ResizeHandle extends Widget {
57
55
  return;
58
56
  }
59
57
  const targetRect = this.targetNode.getBoundingClientRect();
60
- const inputWidth = event.clientX - targetRect.x - this._mouseOffset;
61
- const resized_ratio = 1 -
62
- Math.min(Math.max(inputWidth, this._protectedWidth), targetRect.width - this._protectedWidth) /
63
- (targetRect.width - this._protectedWidth);
64
- // Added friction to the dragging interaction
65
- if (Math.round(resized_ratio * 100) % 10 == 0) {
66
- document.documentElement.style.setProperty('--jp-side-by-side-resized-cell', resized_ratio + 'fr');
67
- }
58
+ const width = targetRect.width - this._protectedWidth * 2;
59
+ const position = event.clientX - targetRect.x - this._protectedWidth;
60
+ const outputRatio = width / position - 1;
61
+ document.documentElement.style.setProperty('--jp-side-by-side-output-size', `${outputRatio}fr`);
68
62
  break;
69
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AAC,IAAI,CAAC,WAAW,EAAE;oBACxC,OAAO;iBACR;gBACD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC;gBAE3D,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;gBAC1D,MAAM,QAAQ,GACX,KAAoB,CAAC,OAAO,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;gBAEtE,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,CAAC,CAAC;gBAEzC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CACxC,+BAA+B,EAC/B,GAAG,WAAW,IAAI,CACnB,CAAC;gBAEF,MAAM;aACP;YACD,KAAK,SAAS;gBACZ,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;gBACzB,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC9C,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;gBAC5C,MAAM;YACR;gBACE,MAAM;SACT;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlab/cells",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "description": "JupyterLab - Notebook Cells",
5
5
  "homepage": "https://github.com/jupyterlab/jupyterlab",
6
6
  "bugs": {
@@ -42,19 +42,19 @@
42
42
  "watch": "tsc -b --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@jupyterlab/apputils": "^3.4.2",
46
- "@jupyterlab/attachments": "^3.4.2",
47
- "@jupyterlab/codeeditor": "^3.4.2",
48
- "@jupyterlab/codemirror": "^3.4.2",
49
- "@jupyterlab/coreutils": "^5.4.2",
50
- "@jupyterlab/filebrowser": "^3.4.2",
51
- "@jupyterlab/nbformat": "^3.4.2",
52
- "@jupyterlab/observables": "^4.4.2",
53
- "@jupyterlab/outputarea": "^3.4.2",
54
- "@jupyterlab/rendermime": "^3.4.2",
55
- "@jupyterlab/services": "^6.4.2",
56
- "@jupyterlab/shared-models": "^3.4.2",
57
- "@jupyterlab/ui-components": "^3.4.2",
45
+ "@jupyterlab/apputils": "^3.4.3",
46
+ "@jupyterlab/attachments": "^3.4.3",
47
+ "@jupyterlab/codeeditor": "^3.4.3",
48
+ "@jupyterlab/codemirror": "^3.4.3",
49
+ "@jupyterlab/coreutils": "^5.4.3",
50
+ "@jupyterlab/filebrowser": "^3.4.3",
51
+ "@jupyterlab/nbformat": "^3.4.3",
52
+ "@jupyterlab/observables": "^4.4.3",
53
+ "@jupyterlab/outputarea": "^3.4.3",
54
+ "@jupyterlab/rendermime": "^3.4.3",
55
+ "@jupyterlab/services": "^6.4.3",
56
+ "@jupyterlab/shared-models": "^3.4.3",
57
+ "@jupyterlab/ui-components": "^3.4.3",
58
58
  "@lumino/algorithm": "^1.9.0",
59
59
  "@lumino/coreutils": "^1.11.0",
60
60
  "@lumino/domutils": "^1.8.0",
@@ -68,7 +68,7 @@
68
68
  "react": "^17.0.1"
69
69
  },
70
70
  "devDependencies": {
71
- "@jupyterlab/testutils": "^3.4.2",
71
+ "@jupyterlab/testutils": "^3.4.3",
72
72
  "@types/jest": "^26.0.10",
73
73
  "@types/marked": "^4.0.1",
74
74
  "@types/react": "^17.0.0",
package/style/widget.css CHANGED
@@ -123,6 +123,7 @@
123
123
  .jp-collapseHeadingButton {
124
124
  display: none;
125
125
  min-height: var(--jp-cell-collapser-min-height);
126
+ font-size: var(--jp-code-font-size);
126
127
  position: absolute;
127
128
  right: 0;
128
129
  top: 0;
@@ -161,32 +162,32 @@
161
162
  Align collapseHeadingButton with cell top header
162
163
  The font sizes are identical to the ones in packages/rendermime/style/base.css
163
164
  */
164
- .jp-collapseHeadingButton[data-heading-level='1'] {
165
+ .jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='1'] {
165
166
  font-size: var(--jp-content-font-size5);
166
167
  background-position-y: calc(0.3 * var(--jp-content-font-size5));
167
168
  }
168
169
 
169
- .jp-collapseHeadingButton[data-heading-level='2'] {
170
+ .jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='2'] {
170
171
  font-size: var(--jp-content-font-size4);
171
172
  background-position-y: calc(0.3 * var(--jp-content-font-size4));
172
173
  }
173
174
 
174
- .jp-collapseHeadingButton[data-heading-level='3'] {
175
+ .jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='3'] {
175
176
  font-size: var(--jp-content-font-size3);
176
177
  background-position-y: calc(0.3 * var(--jp-content-font-size3));
177
178
  }
178
179
 
179
- .jp-collapseHeadingButton[data-heading-level='4'] {
180
+ .jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='4'] {
180
181
  font-size: var(--jp-content-font-size2);
181
182
  background-position-y: calc(0.3 * var(--jp-content-font-size2));
182
183
  }
183
184
 
184
- .jp-collapseHeadingButton[data-heading-level='5'] {
185
+ .jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='5'] {
185
186
  font-size: var(--jp-content-font-size1);
186
187
  background-position-y: top;
187
188
  }
188
189
 
189
- .jp-collapseHeadingButton[data-heading-level='6'] {
190
+ .jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='6'] {
190
191
  font-size: var(--jp-content-font-size0);
191
192
  background-position-y: top;
192
193
  }