@jupyterlab/cells 4.0.0-alpha.10 → 4.0.0-alpha.11
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/lib/resizeHandle.d.ts +0 -1
- package/lib/resizeHandle.js +5 -11
- package/lib/resizeHandle.js.map +1 -1
- package/package.json +18 -18
- package/style/widget.css +7 -6
package/lib/resizeHandle.d.ts
CHANGED
|
@@ -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;
|
package/lib/resizeHandle.js
CHANGED
|
@@ -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-
|
|
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
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// Added friction to the dragging interaction
|
|
65
|
-
if (Math.round(resizedRatio * 100) % 10 == 0) {
|
|
66
|
-
document.documentElement.style.setProperty('--jp-side-by-side-resized-cell', resizedRatio + '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
63
|
}
|
|
70
64
|
case 'mouseup':
|
package/lib/resizeHandle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizeHandle.js","sourceRoot":"","sources":["../src/resizeHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"resizeHandle.js","sourceRoot":"","sources":["../src/resizeHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;IAKtC,YAAsB,UAAuB;QAC3C,KAAK,EAAE,CAAC;QADY,eAAU,GAAV,UAAU,CAAa;QAJrC,cAAS,GAAY,KAAK,CAAC;QAC3B,gBAAW,GAAY,KAAK,CAAC;QAC7B,oBAAe,GAAG,EAAE,CAAC;QAI3B,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACrC,CAAC;IAES,aAAa,CAAC,GAAY;QAClC,KAAK,CAAC,aAAa,CAAC,GAAG,CAA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MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;gBACzC,MAAM;YACR,KAAK,WAAW,CAAC,CAAC;gBAChB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,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": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.11",
|
|
4
4
|
"description": "JupyterLab - Notebook Cells",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
"watch": "tsc -b --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@jupyterlab/apputils": "^4.0.0-alpha.
|
|
46
|
-
"@jupyterlab/attachments": "^4.0.0-alpha.
|
|
47
|
-
"@jupyterlab/codeeditor": "^4.0.0-alpha.
|
|
48
|
-
"@jupyterlab/codemirror": "^4.0.0-alpha.
|
|
49
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
50
|
-
"@jupyterlab/documentsearch": "^4.0.0-alpha.
|
|
51
|
-
"@jupyterlab/filebrowser": "^4.0.0-alpha.
|
|
52
|
-
"@jupyterlab/nbformat": "^4.0.0-alpha.
|
|
53
|
-
"@jupyterlab/observables": "^5.0.0-alpha.
|
|
54
|
-
"@jupyterlab/outputarea": "^4.0.0-alpha.
|
|
55
|
-
"@jupyterlab/rendermime": "^4.0.0-alpha.
|
|
56
|
-
"@jupyterlab/services": "^7.0.0-alpha.
|
|
57
|
-
"@jupyterlab/shared-models": "^4.0.0-alpha.
|
|
58
|
-
"@jupyterlab/toc": "^6.0.0-alpha.
|
|
59
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
60
|
-
"@jupyterlab/ui-components": "^4.0.0-alpha.
|
|
45
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.11",
|
|
46
|
+
"@jupyterlab/attachments": "^4.0.0-alpha.11",
|
|
47
|
+
"@jupyterlab/codeeditor": "^4.0.0-alpha.11",
|
|
48
|
+
"@jupyterlab/codemirror": "^4.0.0-alpha.11",
|
|
49
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.11",
|
|
50
|
+
"@jupyterlab/documentsearch": "^4.0.0-alpha.11",
|
|
51
|
+
"@jupyterlab/filebrowser": "^4.0.0-alpha.11",
|
|
52
|
+
"@jupyterlab/nbformat": "^4.0.0-alpha.11",
|
|
53
|
+
"@jupyterlab/observables": "^5.0.0-alpha.11",
|
|
54
|
+
"@jupyterlab/outputarea": "^4.0.0-alpha.11",
|
|
55
|
+
"@jupyterlab/rendermime": "^4.0.0-alpha.11",
|
|
56
|
+
"@jupyterlab/services": "^7.0.0-alpha.11",
|
|
57
|
+
"@jupyterlab/shared-models": "^4.0.0-alpha.11",
|
|
58
|
+
"@jupyterlab/toc": "^6.0.0-alpha.11",
|
|
59
|
+
"@jupyterlab/translation": "^4.0.0-alpha.11",
|
|
60
|
+
"@jupyterlab/ui-components": "^4.0.0-alpha.26",
|
|
61
61
|
"@lumino/algorithm": "^1.9.1",
|
|
62
62
|
"@lumino/coreutils": "^1.12.0",
|
|
63
63
|
"@lumino/domutils": "^1.8.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"react": "^17.0.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@jupyterlab/testutils": "^4.0.0-alpha.
|
|
73
|
+
"@jupyterlab/testutils": "^4.0.0-alpha.11",
|
|
74
74
|
"@types/jest": "^26.0.10",
|
|
75
75
|
"@types/react": "^17.0.0",
|
|
76
76
|
"jest": "^26.4.2",
|
package/style/widget.css
CHANGED
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
.jp-collapseHeadingButton {
|
|
124
124
|
display: flex;
|
|
125
125
|
min-height: var(--jp-cell-collapser-min-height);
|
|
126
|
+
font-size: var(--jp-code-font-size);
|
|
126
127
|
position: absolute;
|
|
127
128
|
background-color: transparent;
|
|
128
129
|
background-size: 25px;
|
|
@@ -151,32 +152,32 @@
|
|
|
151
152
|
Align collapseHeadingButton with cell top header
|
|
152
153
|
The font sizes are identical to the ones in packages/rendermime/style/base.css
|
|
153
154
|
*/
|
|
154
|
-
.jp-collapseHeadingButton[data-heading-level='1'] {
|
|
155
|
+
.jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='1'] {
|
|
155
156
|
font-size: var(--jp-content-font-size5);
|
|
156
157
|
background-position-y: calc(0.3 * var(--jp-content-font-size5));
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
.jp-collapseHeadingButton[data-heading-level='2'] {
|
|
160
|
+
.jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='2'] {
|
|
160
161
|
font-size: var(--jp-content-font-size4);
|
|
161
162
|
background-position-y: calc(0.3 * var(--jp-content-font-size4));
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
.jp-collapseHeadingButton[data-heading-level='3'] {
|
|
165
|
+
.jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='3'] {
|
|
165
166
|
font-size: var(--jp-content-font-size3);
|
|
166
167
|
background-position-y: calc(0.3 * var(--jp-content-font-size3));
|
|
167
168
|
}
|
|
168
169
|
|
|
169
|
-
.jp-collapseHeadingButton[data-heading-level='4'] {
|
|
170
|
+
.jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='4'] {
|
|
170
171
|
font-size: var(--jp-content-font-size2);
|
|
171
172
|
background-position-y: calc(0.3 * var(--jp-content-font-size2));
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
.jp-collapseHeadingButton[data-heading-level='5'] {
|
|
175
|
+
.jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='5'] {
|
|
175
176
|
font-size: var(--jp-content-font-size1);
|
|
176
177
|
background-position-y: top;
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
.jp-collapseHeadingButton[data-heading-level='6'] {
|
|
180
|
+
.jp-mod-rendered .jp-collapseHeadingButton[data-heading-level='6'] {
|
|
180
181
|
font-size: var(--jp-content-font-size0);
|
|
181
182
|
background-position-y: top;
|
|
182
183
|
}
|