pywebexec 1.4.21__py3-none-any.whl → 1.5.1__py3-none-any.whl
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.
- pywebexec/static/css/xterm.css +10 -1
- pywebexec/static/js/popup.js +1 -1
- pywebexec/static/js/script.js +2 -1
- pywebexec/static/js/xterm/{xterm-addon-fit.js → addon-fit.js} +1 -0
- pywebexec/static/js/xterm/addon-fit.js.map +1 -0
- pywebexec/static/js/xterm/xterm.js +2 -1
- pywebexec/static/js/xterm/xterm.js.map +1 -0
- pywebexec/templates/index.html +1 -2
- pywebexec/version.py +2 -2
- {pywebexec-1.4.21.dist-info → pywebexec-1.5.1.dist-info}/METADATA +1 -1
- {pywebexec-1.4.21.dist-info → pywebexec-1.5.1.dist-info}/RECORD +15 -14
- pywebexec/static/js/xterm/ansi_up.min.js +0 -7
- {pywebexec-1.4.21.dist-info → pywebexec-1.5.1.dist-info}/LICENSE +0 -0
- {pywebexec-1.4.21.dist-info → pywebexec-1.5.1.dist-info}/WHEEL +0 -0
- {pywebexec-1.4.21.dist-info → pywebexec-1.5.1.dist-info}/entry_points.txt +0 -0
- {pywebexec-1.4.21.dist-info → pywebexec-1.5.1.dist-info}/top_level.txt +0 -0
pywebexec/static/css/xterm.css
CHANGED
@@ -140,7 +140,7 @@
|
|
140
140
|
cursor: crosshair;
|
141
141
|
}
|
142
142
|
|
143
|
-
.xterm .xterm-accessibility,
|
143
|
+
.xterm .xterm-accessibility:not(.debug),
|
144
144
|
.xterm .xterm-message {
|
145
145
|
position: absolute;
|
146
146
|
left: 0;
|
@@ -152,6 +152,15 @@
|
|
152
152
|
pointer-events: none;
|
153
153
|
}
|
154
154
|
|
155
|
+
.xterm .xterm-accessibility-tree:not(.debug) *::selection {
|
156
|
+
color: transparent;
|
157
|
+
}
|
158
|
+
|
159
|
+
.xterm .xterm-accessibility-tree {
|
160
|
+
user-select: text;
|
161
|
+
white-space: pre;
|
162
|
+
}
|
163
|
+
|
155
164
|
.xterm .live-region {
|
156
165
|
position: absolute;
|
157
166
|
left: -9999px;
|
pywebexec/static/js/popup.js
CHANGED
@@ -6,6 +6,7 @@ let terminal = new Terminal({
|
|
6
6
|
disableStdin: true,
|
7
7
|
convertEol: true,
|
8
8
|
fontFamily: 'Consolas NF, monospace, courier-new, courier',
|
9
|
+
fontSize: 14,
|
9
10
|
scrollback: maxScrollback,
|
10
11
|
theme: {
|
11
12
|
background: '#111412',
|
@@ -141,4 +142,3 @@ window.addEventListener('load', () => {
|
|
141
142
|
const commandId = window.location.pathname.split('/').slice(-1)[0];
|
142
143
|
viewOutput(commandId);
|
143
144
|
});
|
144
|
-
|
pywebexec/static/js/script.js
CHANGED
@@ -16,6 +16,7 @@ function initTerminal()
|
|
16
16
|
disableStdin: true,
|
17
17
|
convertEol: true,
|
18
18
|
fontFamily: 'Consolas NF, monospace, courier-new, courier',
|
19
|
+
fontSize: 14,
|
19
20
|
scrollback: maxScrollback,
|
20
21
|
theme: {
|
21
22
|
background: '#111412',
|
@@ -337,4 +338,4 @@ window.addEventListener('resize', adjustOutputHeight);
|
|
337
338
|
window.addEventListener('load', initResizer);
|
338
339
|
|
339
340
|
fetchCommands();
|
340
|
-
setInterval(fetchCommands, 5000);
|
341
|
+
setInterval(fetchCommands, 5000);
|
@@ -1 +1,2 @@
|
|
1
1
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FitAddon=t():e.FitAddon=t()}(self,(()=>(()=>{"use strict";var e={};return(()=>{var t=e;Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;const t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal)return;if(!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,t=e._renderService.dimensions;if(0===t.css.cell.width||0===t.css.cell.height)return;const r=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(i.getPropertyValue("height")),s=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),l=o-(parseInt(n.getPropertyValue("padding-top"))+parseInt(n.getPropertyValue("padding-bottom"))),a=s-(parseInt(n.getPropertyValue("padding-right"))+parseInt(n.getPropertyValue("padding-left")))-r;return{cols:Math.max(2,Math.floor(a/t.css.cell.width)),rows:Math.max(1,Math.floor(l/t.css.cell.height))}}}})(),e})()));
|
2
|
+
//# sourceMappingURL=addon-fit.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addon-fit.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,IAEtBD,EAAe,SAAIC,GACpB,CATD,CASGK,MAAM,I,mHCeT,iBAGS,QAAAC,CAASC,GACdC,KAAKC,UAAYF,CACnB,CAEO,OAAAG,GAAiB,CAEjB,GAAAC,GACL,MAAMC,EAAOJ,KAAKK,oBAClB,IAAKD,IAASJ,KAAKC,WAAaK,MAAMF,EAAKG,OAASD,MAAMF,EAAKI,MAC7D,OAIF,MAAMC,EAAQT,KAAKC,UAAkBS,MAGjCV,KAAKC,UAAUO,OAASJ,EAAKI,MAAQR,KAAKC,UAAUM,OAASH,EAAKG,OACpEE,EAAKE,eAAeC,QACpBZ,KAAKC,UAAUY,OAAOT,EAAKG,KAAMH,EAAKI,MAE1C,CAEO,iBAAAH,GACL,IAAKL,KAAKC,UACR,OAGF,IAAKD,KAAKC,UAAUa,UAAYd,KAAKC,UAAUa,QAAQC,cACrD,OAIF,MAAMN,EAAQT,KAAKC,UAAkBS,MAC/BN,EAA0BK,EAAKE,eAAeK,WAEpD,GAA4B,IAAxBZ,EAAKa,IAAIC,KAAKC,OAAwC,IAAzBf,EAAKa,IAAIC,KAAKE,OAC7C,OAGF,MAAMC,EAAuD,IAAtCrB,KAAKC,UAAUqB,QAAQC,WAC5C,EAAId,EAAKe,SAASC,eAEdC,EAAqBC,OAAOC,iBAAiB5B,KAAKC,UAAUa,QAAQC,eACpEc,EAAsBC,SAASJ,EAAmBK,iBAAiB,WACnEC,EAAqBC,KAAKC,IAAI,EAAGJ,SAASJ,EAAmBK,iBAAiB,WAC9EI,EAAeR,OAAOC,iBAAiB5B,KAAKC,UAAUa,SAStDsB,EAAkBP,GAPjBC,SAASK,EAAaJ,iBAAiB,gBACpCD,SAASK,EAAaJ,iBAAiB,oBAO3CM,EAAiBL,GANdF,SAASK,EAAaJ,iBAAiB,kBACxCD,SAASK,EAAaJ,iBAAiB,kBAKiBV,EAKhE,MAJiB,CACfd,KAAM0B,KAAKC,IA/DI,EA+DcD,KAAKK,MAAMD,EAAiBjC,EAAKa,IAAIC,KAAKC,QACvEX,KAAMyB,KAAKC,IA/DI,EA+DcD,KAAKK,MAAMF,EAAkBhC,EAAKa,IAAIC,KAAKE,SAG5E,E","sources":["webpack://FitAddon/webpack/universalModuleDefinition","webpack://FitAddon/./src/FitAddon.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FitAddon\"] = factory();\n\telse\n\t\troot[\"FitAddon\"] = factory();\n})(self, () => {\nreturn ","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport type { Terminal, ITerminalAddon } from '@xterm/xterm';\nimport type { FitAddon as IFitApi } from '@xterm/addon-fit';\nimport { IRenderDimensions } from 'browser/renderer/shared/Types';\n\ninterface ITerminalDimensions {\n /**\n * The number of rows in the terminal.\n */\n rows: number;\n\n /**\n * The number of columns in the terminal.\n */\n cols: number;\n}\n\nconst MINIMUM_COLS = 2;\nconst MINIMUM_ROWS = 1;\n\nexport class FitAddon implements ITerminalAddon , IFitApi {\n private _terminal: Terminal | undefined;\n\n public activate(terminal: Terminal): void {\n this._terminal = terminal;\n }\n\n public dispose(): void {}\n\n public fit(): void {\n const dims = this.proposeDimensions();\n if (!dims || !this._terminal || isNaN(dims.cols) || isNaN(dims.rows)) {\n return;\n }\n\n // TODO: Remove reliance on private API\n const core = (this._terminal as any)._core;\n\n // Force a full render\n if (this._terminal.rows !== dims.rows || this._terminal.cols !== dims.cols) {\n core._renderService.clear();\n this._terminal.resize(dims.cols, dims.rows);\n }\n }\n\n public proposeDimensions(): ITerminalDimensions | undefined {\n if (!this._terminal) {\n return undefined;\n }\n\n if (!this._terminal.element || !this._terminal.element.parentElement) {\n return undefined;\n }\n\n // TODO: Remove reliance on private API\n const core = (this._terminal as any)._core;\n const dims: IRenderDimensions = core._renderService.dimensions;\n\n if (dims.css.cell.width === 0 || dims.css.cell.height === 0) {\n return undefined;\n }\n\n const scrollbarWidth = this._terminal.options.scrollback === 0 ?\n 0 : core.viewport.scrollBarWidth;\n\n const parentElementStyle = window.getComputedStyle(this._terminal.element.parentElement);\n const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height'));\n const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')));\n const elementStyle = window.getComputedStyle(this._terminal.element);\n const elementPadding = {\n top: parseInt(elementStyle.getPropertyValue('padding-top')),\n bottom: parseInt(elementStyle.getPropertyValue('padding-bottom')),\n right: parseInt(elementStyle.getPropertyValue('padding-right')),\n left: parseInt(elementStyle.getPropertyValue('padding-left'))\n };\n const elementPaddingVer = elementPadding.top + elementPadding.bottom;\n const elementPaddingHor = elementPadding.right + elementPadding.left;\n const availableHeight = parentElementHeight - elementPaddingVer;\n const availableWidth = parentElementWidth - elementPaddingHor - scrollbarWidth;\n const geometry = {\n cols: Math.max(MINIMUM_COLS, Math.floor(availableWidth / dims.css.cell.width)),\n rows: Math.max(MINIMUM_ROWS, Math.floor(availableHeight / dims.css.cell.height))\n };\n return geometry;\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","activate","terminal","this","_terminal","dispose","fit","dims","proposeDimensions","isNaN","cols","rows","core","_core","_renderService","clear","resize","element","parentElement","dimensions","css","cell","width","height","scrollbarWidth","options","scrollback","viewport","scrollBarWidth","parentElementStyle","window","getComputedStyle","parentElementHeight","parseInt","getPropertyValue","parentElementWidth","Math","max","elementStyle","availableHeight","availableWidth","floor"],"sourceRoot":""}
|