pywebexec 1.5.0__py3-none-any.whl → 1.5.2__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.
@@ -279,3 +279,17 @@ span {
279
279
  height: 16px;
280
280
  }
281
281
 
282
+ .font-size-button {
283
+ background-color: #444;
284
+ color: #eee;
285
+ border: none;
286
+ border-radius: 5px;
287
+ cursor: pointer;
288
+ font-size: 14px;
289
+ width: 45px;
290
+ }
291
+
292
+ .font-size-button:hover {
293
+ background-color: #666;
294
+ }
295
+
@@ -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;
@@ -1,12 +1,13 @@
1
1
  const maxScrollback = 99999;
2
2
  const maxSize = 10485760; // 10MB
3
+ let fontSize = 14;
3
4
  let terminal = new Terminal({
4
5
  cursorBlink: false,
5
6
  cursorInactiveStyle: 'none',
6
7
  disableStdin: true,
7
8
  convertEol: true,
8
9
  fontFamily: 'Consolas NF, monospace, courier-new, courier',
9
- fontSize: 14,
10
+ fontSize: fontSize,
10
11
  scrollback: maxScrollback,
11
12
  theme: {
12
13
  background: '#111412',
@@ -142,3 +143,15 @@ window.addEventListener('load', () => {
142
143
  const commandId = window.location.pathname.split('/').slice(-1)[0];
143
144
  viewOutput(commandId);
144
145
  });
146
+
147
+ document.getElementById('decreaseFontSize').addEventListener('click', () => {
148
+ fontSize = Math.max(8, fontSize - 1);
149
+ terminal.options.fontSize = fontSize;
150
+ fitAddon.fit();
151
+ });
152
+
153
+ document.getElementById('increaseFontSize').addEventListener('click', () => {
154
+ fontSize = Math.min(32, fontSize + 1);
155
+ terminal.options.fontSize = fontSize;
156
+ fitAddon.fit();
157
+ });
@@ -7,6 +7,7 @@ let fullOutput = '';
7
7
  let outputLength = 0;
8
8
  const maxScrollback = 99999;
9
9
  const maxSize = 10485760; // 10MB
10
+ let fontSize = 14;
10
11
 
11
12
  function initTerminal()
12
13
  {
@@ -16,7 +17,7 @@ function initTerminal()
16
17
  disableStdin: true,
17
18
  convertEol: true,
18
19
  fontFamily: 'Consolas NF, monospace, courier-new, courier',
19
- fontSize: 14,
20
+ fontSize: fontSize,
20
21
  scrollback: maxScrollback,
21
22
  theme: {
22
23
  background: '#111412',
@@ -334,8 +335,22 @@ function sliderUpdateOutput()
334
335
 
335
336
  slider.addEventListener('input', sliderUpdateOutput);
336
337
 
338
+ document.getElementById('decreaseFontSize').addEventListener('click', () => {
339
+ fontSize = Math.max(8, fontSize - 1);
340
+ terminal.options.fontSize = fontSize;
341
+ fitAddon.fit();
342
+ });
343
+
344
+ document.getElementById('increaseFontSize').addEventListener('click', () => {
345
+ fontSize = Math.min(32, fontSize + 1);
346
+ terminal.options.fontSize = fontSize;
347
+ fitAddon.fit();
348
+ });
349
+
337
350
  window.addEventListener('resize', adjustOutputHeight);
338
351
  window.addEventListener('load', initResizer);
339
352
 
340
353
  fetchCommands();
341
354
  setInterval(fetchCommands, 5000);
355
+
356
+
@@ -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":""}