groove-dev 0.27.72 → 0.27.73

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 (129) hide show
  1. package/node_modules/@groove-dev/cli/package.json +1 -1
  2. package/node_modules/@groove-dev/daemon/package.json +1 -1
  3. package/node_modules/@groove-dev/daemon/src/api.js +10 -7
  4. package/node_modules/@groove-dev/gui/dist/assets/index-BFc7Ov6v.css +1 -0
  5. package/node_modules/@groove-dev/gui/dist/assets/{index-CHSXqfwy.js → index-Deza1S0i.js} +159 -159
  6. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  7. package/node_modules/@groove-dev/gui/package.json +1 -1
  8. package/node_modules/@groove-dev/gui/src/components/editor/editor-tabs.jsx +5 -5
  9. package/node_modules/@groove-dev/gui/src/components/settings/ProviderSetupWizard.jsx +7 -2
  10. package/node_modules/@groove-dev/gui/src/stores/groove.js +41 -52
  11. package/node_modules/@groove-dev/gui/src/views/editor.jsx +2 -9
  12. package/package.json +1 -1
  13. package/packages/cli/package.json +1 -1
  14. package/packages/daemon/package.json +1 -1
  15. package/packages/daemon/src/api.js +10 -7
  16. package/packages/gui/dist/assets/index-BFc7Ov6v.css +1 -0
  17. package/packages/gui/dist/assets/{index-CHSXqfwy.js → index-Deza1S0i.js} +159 -159
  18. package/packages/gui/dist/index.html +2 -2
  19. package/packages/gui/package.json +1 -1
  20. package/packages/gui/src/components/editor/editor-tabs.jsx +5 -5
  21. package/packages/gui/src/components/settings/ProviderSetupWizard.jsx +7 -2
  22. package/packages/gui/src/stores/groove.js +41 -52
  23. package/packages/gui/src/views/editor.jsx +2 -9
  24. package/node_modules/@groove-dev/gui/dist/assets/index-74E3YTkT.css +0 -1
  25. package/packages/gui/dist/assets/index-74E3YTkT.css +0 -1
  26. package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js +0 -68
  27. package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js.map +0 -7
  28. package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js +0 -1420
  29. package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js.map +0 -7
  30. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js +0 -17
  31. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js.map +0 -7
  32. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js +0 -22
  33. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js.map +0 -7
  34. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js +0 -34
  35. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js.map +0 -7
  36. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js +0 -101
  37. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js.map +0 -7
  38. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js +0 -2534
  39. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js.map +0 -7
  40. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js +0 -789
  41. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js.map +0 -7
  42. package/packages/gui/node_modules/.vite/deps/@codemirror_language.js +0 -115
  43. package/packages/gui/node_modules/.vite/deps/@codemirror_language.js.map +0 -7
  44. package/packages/gui/node_modules/.vite/deps/@codemirror_search.js +0 -1136
  45. package/packages/gui/node_modules/.vite/deps/@codemirror_search.js.map +0 -7
  46. package/packages/gui/node_modules/.vite/deps/@codemirror_state.js +0 -63
  47. package/packages/gui/node_modules/.vite/deps/@codemirror_state.js.map +0 -7
  48. package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js +0 -179
  49. package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js.map +0 -7
  50. package/packages/gui/node_modules/.vite/deps/@codemirror_view.js +0 -104
  51. package/packages/gui/node_modules/.vite/deps/@codemirror_view.js.map +0 -7
  52. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-context-menu.js +0 -1202
  53. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-context-menu.js.map +0 -7
  54. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js +0 -365
  55. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js.map +0 -7
  56. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js +0 -757
  57. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map +0 -7
  58. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js +0 -219
  59. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js.map +0 -7
  60. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js +0 -562
  61. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js.map +0 -7
  62. package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js +0 -46
  63. package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js.map +0 -7
  64. package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js +0 -121
  65. package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js.map +0 -7
  66. package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js +0 -9237
  67. package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js.map +0 -7
  68. package/packages/gui/node_modules/.vite/deps/@xyflow_react.js +0 -9934
  69. package/packages/gui/node_modules/.vite/deps/@xyflow_react.js.map +0 -7
  70. package/packages/gui/node_modules/.vite/deps/_metadata.json +0 -259
  71. package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js +0 -5169
  72. package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js.map +0 -7
  73. package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js +0 -2000
  74. package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js.map +0 -7
  75. package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js +0 -1776
  76. package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js.map +0 -7
  77. package/packages/gui/node_modules/.vite/deps/chunk-4JHIKDUF.js +0 -435
  78. package/packages/gui/node_modules/.vite/deps/chunk-4JHIKDUF.js.map +0 -7
  79. package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js +0 -292
  80. package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js.map +0 -7
  81. package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js +0 -1004
  82. package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js.map +0 -7
  83. package/packages/gui/node_modules/.vite/deps/chunk-FOR2E6IR.js +0 -105
  84. package/packages/gui/node_modules/.vite/deps/chunk-FOR2E6IR.js.map +0 -7
  85. package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js +0 -23
  86. package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js.map +0 -7
  87. package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js +0 -1062
  88. package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js.map +0 -7
  89. package/packages/gui/node_modules/.vite/deps/chunk-PGL3TTJA.js +0 -1115
  90. package/packages/gui/node_modules/.vite/deps/chunk-PGL3TTJA.js.map +0 -7
  91. package/packages/gui/node_modules/.vite/deps/chunk-PGMATLPZ.js +0 -2294
  92. package/packages/gui/node_modules/.vite/deps/chunk-PGMATLPZ.js.map +0 -7
  93. package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js +0 -42
  94. package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js.map +0 -7
  95. package/packages/gui/node_modules/.vite/deps/chunk-QX3PPTYO.js +0 -315
  96. package/packages/gui/node_modules/.vite/deps/chunk-QX3PPTYO.js.map +0 -7
  97. package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js +0 -10985
  98. package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js.map +0 -7
  99. package/packages/gui/node_modules/.vite/deps/chunk-SPKVQGZX.js +0 -701
  100. package/packages/gui/node_modules/.vite/deps/chunk-SPKVQGZX.js.map +0 -7
  101. package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js +0 -280
  102. package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js.map +0 -7
  103. package/packages/gui/node_modules/.vite/deps/chunk-YEUURE4V.js +0 -264
  104. package/packages/gui/node_modules/.vite/deps/chunk-YEUURE4V.js.map +0 -7
  105. package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js +0 -3459
  106. package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js.map +0 -7
  107. package/packages/gui/node_modules/.vite/deps/chunk-Z5NIFSCT.js +0 -1106
  108. package/packages/gui/node_modules/.vite/deps/chunk-Z5NIFSCT.js.map +0 -7
  109. package/packages/gui/node_modules/.vite/deps/clsx.js +0 -22
  110. package/packages/gui/node_modules/.vite/deps/clsx.js.map +0 -7
  111. package/packages/gui/node_modules/.vite/deps/framer-motion.js +0 -12732
  112. package/packages/gui/node_modules/.vite/deps/framer-motion.js.map +0 -7
  113. package/packages/gui/node_modules/.vite/deps/lucide-react.js +0 -29653
  114. package/packages/gui/node_modules/.vite/deps/lucide-react.js.map +0 -7
  115. package/packages/gui/node_modules/.vite/deps/package.json +0 -3
  116. package/packages/gui/node_modules/.vite/deps/react-dom.js +0 -6
  117. package/packages/gui/node_modules/.vite/deps/react-dom.js.map +0 -7
  118. package/packages/gui/node_modules/.vite/deps/react-dom_client.js +0 -20217
  119. package/packages/gui/node_modules/.vite/deps/react-dom_client.js.map +0 -7
  120. package/packages/gui/node_modules/.vite/deps/react.js +0 -5
  121. package/packages/gui/node_modules/.vite/deps/react.js.map +0 -7
  122. package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -278
  123. package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
  124. package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js +0 -6
  125. package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
  126. package/packages/gui/node_modules/.vite/deps/tailwind-merge.js +0 -3263
  127. package/packages/gui/node_modules/.vite/deps/tailwind-merge.js.map +0 -7
  128. package/packages/gui/node_modules/.vite/deps/zustand.js +0 -56
  129. package/packages/gui/node_modules/.vite/deps/zustand.js.map +0 -7
@@ -1,46 +0,0 @@
1
- import "./chunk-PR4QN5HX.js";
2
-
3
- // ../../node_modules/@xterm/addon-fit/lib/addon-fit.mjs
4
- var h = 2;
5
- var _ = 1;
6
- var o = class {
7
- activate(e) {
8
- this._terminal = e;
9
- }
10
- dispose() {
11
- }
12
- fit() {
13
- let e = this.proposeDimensions();
14
- if (!e || !this._terminal || isNaN(e.cols) || isNaN(e.rows)) return;
15
- let t = this._terminal._core;
16
- (this._terminal.rows !== e.rows || this._terminal.cols !== e.cols) && (t._renderService.clear(), this._terminal.resize(e.cols, e.rows));
17
- }
18
- proposeDimensions() {
19
- var _a;
20
- if (!this._terminal || !this._terminal.element || !this._terminal.element.parentElement) return;
21
- let t = this._terminal._core._renderService.dimensions;
22
- if (t.css.cell.width === 0 || t.css.cell.height === 0) return;
23
- let s = this._terminal.options.scrollback === 0 ? 0 : ((_a = this._terminal.options.overviewRuler) == null ? void 0 : _a.width) || 14, r = window.getComputedStyle(this._terminal.element.parentElement), l = parseInt(r.getPropertyValue("height")), a = Math.max(0, parseInt(r.getPropertyValue("width"))), i = window.getComputedStyle(this._terminal.element), n = { top: parseInt(i.getPropertyValue("padding-top")), bottom: parseInt(i.getPropertyValue("padding-bottom")), right: parseInt(i.getPropertyValue("padding-right")), left: parseInt(i.getPropertyValue("padding-left")) }, m = n.top + n.bottom, d = n.right + n.left, c = l - m, p = a - d - s;
24
- return { cols: Math.max(h, Math.floor(p / t.css.cell.width)), rows: Math.max(_, Math.floor(c / t.css.cell.height)) };
25
- }
26
- };
27
- export {
28
- o as FitAddon
29
- };
30
- /*! Bundled license information:
31
-
32
- @xterm/addon-fit/lib/addon-fit.mjs:
33
- (**
34
- * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
35
- * @license MIT
36
- *
37
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
38
- * @license MIT
39
- *
40
- * Originally forked from (with the author's permission):
41
- * Fabrice Bellard's javascript vt100 for jslinux:
42
- * http://bellard.org/jslinux/
43
- * Copyright (c) 2011 Fabrice Bellard
44
- *)
45
- */
46
- //# sourceMappingURL=@xterm_addon-fit.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../node_modules/@xterm/addon-fit/src/FitAddon.ts"],
4
- "sourcesContent": ["/**\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';\nimport { ViewportConstants } from 'browser/shared/Constants';\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\n : (this._terminal.options.overviewRuler?.width || ViewportConstants.DEFAULT_SCROLL_BAR_WIDTH));\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"],
5
- "mappings": ";;;AAsBA,IAAMA,IAAe;AAArB,IACMC,IAAe;AADrB,IAGaC,IAAN,MAAmD;EAGjD,SAASC,GAA0B;AACxC,SAAK,YAAYA;EACnB;EAEO,UAAgB;EAAC;EAEjB,MAAY;AACjB,QAAMC,IAAO,KAAK,kBAAkB;AACpC,QAAI,CAACA,KAAQ,CAAC,KAAK,aAAa,MAAMA,EAAK,IAAI,KAAK,MAAMA,EAAK,IAAI,EACjE;AAIF,QAAMC,IAAQ,KAAK,UAAkB;AAAA,KAGjC,KAAK,UAAU,SAASD,EAAK,QAAQ,KAAK,UAAU,SAASA,EAAK,UACpEC,EAAK,eAAe,MAAM,GAC1B,KAAK,UAAU,OAAOD,EAAK,MAAMA,EAAK,IAAI;EAE9C;EAEO,oBAAqD;;AAK1D,QAJI,CAAC,KAAK,aAIN,CAAC,KAAK,UAAU,WAAW,CAAC,KAAK,UAAU,QAAQ,cACrD;AAKF,QAAMA,IADQ,KAAK,UAAkB,MACA,eAAe;AAEpD,QAAIA,EAAK,IAAI,KAAK,UAAU,KAAKA,EAAK,IAAI,KAAK,WAAW,EACxD;AAGF,QAAME,IAAkB,KAAK,UAAU,QAAQ,eAAe,IAC1D,MACC,UAAK,UAAU,QAAQ,kBAAvB,mBAAsC,UAAS,IAE9CC,IAAqB,OAAO,iBAAiB,KAAK,UAAU,QAAQ,aAAa,GACjFC,IAAsB,SAASD,EAAmB,iBAAiB,QAAQ,CAAC,GAC5EE,IAAqB,KAAK,IAAI,GAAG,SAASF,EAAmB,iBAAiB,OAAO,CAAC,CAAC,GACvFG,IAAe,OAAO,iBAAiB,KAAK,UAAU,OAAO,GAC7DC,IAAiB,EACrB,KAAK,SAASD,EAAa,iBAAiB,aAAa,CAAC,GAC1D,QAAQ,SAASA,EAAa,iBAAiB,gBAAgB,CAAC,GAChE,OAAO,SAASA,EAAa,iBAAiB,eAAe,CAAC,GAC9D,MAAM,SAASA,EAAa,iBAAiB,cAAc,CAAC,EAC9D,GACME,IAAoBD,EAAe,MAAMA,EAAe,QACxDE,IAAoBF,EAAe,QAAQA,EAAe,MAC1DG,IAAkBN,IAAsBI,GACxCG,IAAiBN,IAAqBI,IAAoBP;AAKhE,WAJiB,EACf,MAAM,KAAK,IAAIN,GAAc,KAAK,MAAMe,IAAiBX,EAAK,IAAI,KAAK,KAAK,CAAC,GAC7E,MAAM,KAAK,IAAIH,GAAc,KAAK,MAAMa,IAAkBV,EAAK,IAAI,KAAK,MAAM,CAAC,EACjF;EAEF;AACF;",
6
- "names": ["MINIMUM_COLS", "MINIMUM_ROWS", "FitAddon", "terminal", "dims", "core", "scrollbarWidth", "parentElementStyle", "parentElementHeight", "parentElementWidth", "elementStyle", "elementPadding", "elementPaddingVer", "elementPaddingHor", "availableHeight", "availableWidth"]
7
- }
@@ -1,121 +0,0 @@
1
- import "./chunk-PR4QN5HX.js";
2
-
3
- // ../../node_modules/@xterm/addon-web-links/lib/addon-web-links.mjs
4
- var v = class {
5
- constructor(e, t, n, o = {}) {
6
- this._terminal = e;
7
- this._regex = t;
8
- this._handler = n;
9
- this._options = o;
10
- }
11
- provideLinks(e, t) {
12
- let n = g.computeLink(e, this._regex, this._terminal, this._handler);
13
- t(this._addCallbacks(n));
14
- }
15
- _addCallbacks(e) {
16
- return e.map((t) => (t.leave = this._options.leave, t.hover = (n, o) => {
17
- if (this._options.hover) {
18
- let { range: p } = t;
19
- this._options.hover(n, o, p);
20
- }
21
- }, t));
22
- }
23
- };
24
- function k(l2) {
25
- try {
26
- let e = new URL(l2), t = e.password && e.username ? `${e.protocol}//${e.username}:${e.password}@${e.host}` : e.username ? `${e.protocol}//${e.username}@${e.host}` : `${e.protocol}//${e.host}`;
27
- return l2.toLocaleLowerCase().startsWith(t.toLocaleLowerCase());
28
- } catch {
29
- return false;
30
- }
31
- }
32
- var g = class l {
33
- static computeLink(e, t, n, o) {
34
- let p = new RegExp(t.source, (t.flags || "") + "g"), [i, r] = l._getWindowedLineStrings(e - 1, n), s = i.join(""), a, d = [];
35
- for (; a = p.exec(s); ) {
36
- let u = a[0];
37
- if (!k(u)) continue;
38
- let [c, h] = l._mapStrIdx(n, r, 0, a.index), [m, f] = l._mapStrIdx(n, c, h, u.length);
39
- if (c === -1 || h === -1 || m === -1 || f === -1) continue;
40
- let b = { start: { x: h + 1, y: c + 1 }, end: { x: f, y: m + 1 } };
41
- d.push({ range: b, text: u, activate: o });
42
- }
43
- return d;
44
- }
45
- static _getWindowedLineStrings(e, t) {
46
- let n, o = e, p = e, i = 0, r = "", s = [];
47
- if (n = t.buffer.active.getLine(e)) {
48
- let a = n.translateToString(true);
49
- if (n.isWrapped && a[0] !== " ") {
50
- for (i = 0; (n = t.buffer.active.getLine(--o)) && i < 2048 && (r = n.translateToString(true), i += r.length, s.push(r), !(!n.isWrapped || r.indexOf(" ") !== -1)); ) ;
51
- s.reverse();
52
- }
53
- for (s.push(a), i = 0; (n = t.buffer.active.getLine(++p)) && n.isWrapped && i < 2048 && (r = n.translateToString(true), i += r.length, s.push(r), r.indexOf(" ") === -1); ) ;
54
- }
55
- return [s, o];
56
- }
57
- static _mapStrIdx(e, t, n, o) {
58
- let p = e.buffer.active, i = p.getNullCell(), r = n;
59
- for (; o; ) {
60
- let s = p.getLine(t);
61
- if (!s) return [-1, -1];
62
- for (let a = r; a < s.length; ++a) {
63
- s.getCell(a, i);
64
- let d = i.getChars();
65
- if (i.getWidth() && (o -= d.length || 1, a === s.length - 1 && d === "")) {
66
- let c = p.getLine(t + 1);
67
- c && c.isWrapped && (c.getCell(0, i), i.getWidth() === 2 && (o += 1));
68
- }
69
- if (o < 0) return [t, a];
70
- }
71
- t++, r = 0;
72
- }
73
- return [t, r];
74
- }
75
- };
76
- var _ = /(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;
77
- function w(l2, e) {
78
- let t = window.open();
79
- if (t) {
80
- try {
81
- t.opener = null;
82
- } catch {
83
- }
84
- t.location.href = e;
85
- } else console.warn("Opening link blocked as opener could not be cleared");
86
- }
87
- var L = class {
88
- constructor(e = w, t = {}) {
89
- this._handler = e;
90
- this._options = t;
91
- }
92
- activate(e) {
93
- this._terminal = e;
94
- let t = this._options, n = t.urlRegex || _;
95
- this._linkProvider = this._terminal.registerLinkProvider(new v(this._terminal, n, this._handler, t));
96
- }
97
- dispose() {
98
- var _a;
99
- (_a = this._linkProvider) == null ? void 0 : _a.dispose();
100
- }
101
- };
102
- export {
103
- L as WebLinksAddon
104
- };
105
- /*! Bundled license information:
106
-
107
- @xterm/addon-web-links/lib/addon-web-links.mjs:
108
- (**
109
- * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
110
- * @license MIT
111
- *
112
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
113
- * @license MIT
114
- *
115
- * Originally forked from (with the author's permission):
116
- * Fabrice Bellard's javascript vt100 for jslinux:
117
- * http://bellard.org/jslinux/
118
- * Copyright (c) 2011 Fabrice Bellard
119
- *)
120
- */
121
- //# sourceMappingURL=@xterm_addon-web-links.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../node_modules/@xterm/addon-web-links/src/WebLinkProvider.ts", "../../../../../node_modules/@xterm/addon-web-links/src/WebLinksAddon.ts"],
4
- "sourcesContent": ["/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ILinkProvider, ILink, Terminal, IViewportRange, IBufferLine } from '@xterm/xterm';\n\nexport interface ILinkProviderOptions {\n hover?(event: MouseEvent, text: string, location: IViewportRange): void;\n leave?(event: MouseEvent, text: string): void;\n urlRegex?: RegExp;\n}\n\nexport class WebLinkProvider implements ILinkProvider {\n\n constructor(\n private readonly _terminal: Terminal,\n private readonly _regex: RegExp,\n private readonly _handler: (event: MouseEvent, uri: string) => void,\n private readonly _options: ILinkProviderOptions = {}\n ) {\n\n }\n\n public provideLinks(y: number, callback: (links: ILink[] | undefined) => void): void {\n const links = LinkComputer.computeLink(y, this._regex, this._terminal, this._handler);\n callback(this._addCallbacks(links));\n }\n\n private _addCallbacks(links: ILink[]): ILink[] {\n return links.map(link => {\n link.leave = this._options.leave;\n link.hover = (event: MouseEvent, uri: string): void => {\n if (this._options.hover) {\n const { range } = link;\n this._options.hover(event, uri, range);\n }\n };\n return link;\n });\n }\n}\n\nfunction isUrl(urlString: string): boolean {\n try {\n const url = new URL(urlString);\n const parsedBase = url.password && url.username\n ? `${url.protocol}//${url.username}:${url.password}@${url.host}`\n : url.username\n ? `${url.protocol}//${url.username}@${url.host}`\n : `${url.protocol}//${url.host}`;\n return urlString.toLocaleLowerCase().startsWith(parsedBase.toLocaleLowerCase());\n } catch (e) {\n return false;\n }\n}\n\nexport class LinkComputer {\n public static computeLink(y: number, regex: RegExp, terminal: Terminal, activate: (event: MouseEvent, uri: string) => void): ILink[] {\n const rex = new RegExp(regex.source, (regex.flags || '') + 'g');\n\n const [lines, startLineIndex] = LinkComputer._getWindowedLineStrings(y - 1, terminal);\n const line = lines.join('');\n\n let match;\n const result: ILink[] = [];\n\n while (match = rex.exec(line)) {\n const text = match[0];\n\n // check via URL if the matched text would form a proper url\n if (!isUrl(text)) {\n continue;\n }\n\n // map string positions back to buffer positions\n // values are 0-based right side excluding\n const [startY, startX] = LinkComputer._mapStrIdx(terminal, startLineIndex, 0, match.index);\n const [endY, endX] = LinkComputer._mapStrIdx(terminal, startY, startX, text.length);\n\n if (startY === -1 || startX === -1 || endY === -1 || endX === -1) {\n continue;\n }\n\n // range expects values 1-based right side including, thus +1 except for endX\n const range = {\n start: {\n x: startX + 1,\n y: startY + 1\n },\n end: {\n x: endX,\n y: endY + 1\n }\n };\n\n result.push({ range, text, activate });\n }\n\n return result;\n }\n\n /**\n * Get wrapped content lines for the current line index.\n * The top/bottom line expansion stops at whitespaces or length > 2048.\n * Returns an array with line strings and the top line index.\n *\n * NOTE: We pull line strings with trimRight=true on purpose to make sure\n * to correctly match urls with early wrapped wide chars. This corrupts the string index\n * for 1:1 backmapping to buffer positions, thus needs an additional correction in _mapStrIdx.\n */\n private static _getWindowedLineStrings(lineIndex: number, terminal: Terminal): [string[], number] {\n let line: IBufferLine | undefined;\n let topIdx = lineIndex;\n let bottomIdx = lineIndex;\n let length = 0;\n let content = '';\n const lines: string[] = [];\n\n if ((line = terminal.buffer.active.getLine(lineIndex))) {\n const currentContent = line.translateToString(true);\n\n // expand top, stop on whitespaces or length > 2048\n if (line.isWrapped && currentContent[0] !== ' ') {\n length = 0;\n while ((line = terminal.buffer.active.getLine(--topIdx)) && length < 2048) {\n content = line.translateToString(true);\n length += content.length;\n lines.push(content);\n if (!line.isWrapped || content.indexOf(' ') !== -1) {\n break;\n }\n }\n lines.reverse();\n }\n\n // append current line\n lines.push(currentContent);\n\n // expand bottom, stop on whitespaces or length > 2048\n length = 0;\n while ((line = terminal.buffer.active.getLine(++bottomIdx)) && line.isWrapped && length < 2048) {\n content = line.translateToString(true);\n length += content.length;\n lines.push(content);\n if (content.indexOf(' ') !== -1) {\n break;\n }\n }\n }\n return [lines, topIdx];\n }\n\n /**\n * Map a string index back to buffer positions.\n * Returns buffer position as [lineIndex, columnIndex] 0-based,\n * or [-1, -1] in case the lookup ran into a non-existing line.\n */\n private static _mapStrIdx(terminal: Terminal, lineIndex: number, rowIndex: number, stringIndex: number): [number, number] {\n const buf = terminal.buffer.active;\n const cell = buf.getNullCell();\n let start = rowIndex;\n while (stringIndex) {\n const line = buf.getLine(lineIndex);\n if (!line) {\n return [-1, -1];\n }\n for (let i = start; i < line.length; ++i) {\n line.getCell(i, cell);\n const chars = cell.getChars();\n const width = cell.getWidth();\n if (width) {\n stringIndex -= chars.length || 1;\n\n // correct stringIndex for early wrapped wide chars:\n // - currently only happens at last cell\n // - cells to the right are reset with chars='' and width=1 in InputHandler.print\n // - follow-up line must be wrapped and contain wide char at first cell\n // --> if all these conditions are met, correct stringIndex by +1\n if (i === line.length - 1 && chars === '') {\n const line = buf.getLine(lineIndex + 1);\n if (line && line.isWrapped) {\n line.getCell(0, cell);\n if (cell.getWidth() === 2) {\n stringIndex += 1;\n }\n }\n }\n }\n if (stringIndex < 0) {\n return [lineIndex, i];\n }\n }\n lineIndex++;\n start = 0;\n }\n return [lineIndex, start];\n }\n}\n", "/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport type { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';\nimport type { WebLinksAddon as IWebLinksApi } from '@xterm/addon-web-links';\nimport { ILinkProviderOptions, WebLinkProvider } from './WebLinkProvider';\n\n// consider everthing starting with http:// or https://\n// up to first whitespace, `\"` or `'` as url\n// NOTE: The repeated end clause is needed to not match a dangling `:`\n// resembling the old (...)*([^:\"\\'\\\\s]) final path clause\n// additionally exclude early + final:\n// - unsafe from rfc3986: !*'()\n// - unsafe chars from rfc1738: {}|\\^~[]` (minus [] as we need them for ipv6 adresses, also allow ~)\n// also exclude as finals:\n// - final interpunction like ,.!?\n// - any sort of brackets <>()[]{} (not spec conform, but often used to enclose urls)\n// - unsafe chars from rfc1738: {}|\\^~[]`\nconst strictUrlRegex = /(https?|HTTPS?):[/]{2}[^\\s\"'!*(){}|\\\\\\^<>`]*[^\\s\"':,.!?{}|\\\\\\^~\\[\\]`()<>]/;\n\n\nfunction handleLink(event: MouseEvent, uri: string): void {\n const newWindow = window.open();\n if (newWindow) {\n try {\n newWindow.opener = null;\n } catch {\n // no-op, Electron can throw\n }\n newWindow.location.href = uri;\n } else {\n console.warn('Opening link blocked as opener could not be cleared');\n }\n}\n\nexport class WebLinksAddon implements ITerminalAddon , IWebLinksApi {\n private _terminal: Terminal | undefined;\n private _linkProvider: IDisposable | undefined;\n\n constructor(\n private _handler: (event: MouseEvent, uri: string) => void = handleLink,\n private _options: ILinkProviderOptions = {}\n ) {\n }\n\n public activate(terminal: Terminal): void {\n this._terminal = terminal;\n const options = this._options as ILinkProviderOptions;\n const regex = options.urlRegex || strictUrlRegex;\n this._linkProvider = this._terminal.registerLinkProvider(new WebLinkProvider(this._terminal, regex, this._handler, options));\n }\n\n public dispose(): void {\n this._linkProvider?.dispose();\n }\n}\n"],
5
- "mappings": ";;;AAaO,IAAMA,IAAN,MAA+C;EAEpD,YACmBC,GACAC,GACAC,GACAC,IAAiC,CAAC,GACnD;AAJiB,SAAA,YAAAH;AACA,SAAA,SAAAC;AACA,SAAA,WAAAC;AACA,SAAA,WAAAC;EAGnB;EAEO,aAAaC,GAAWC,GAAsD;AACnF,QAAMC,IAAQC,EAAa,YAAYH,GAAG,KAAK,QAAQ,KAAK,WAAW,KAAK,QAAQ;AACpFC,MAAS,KAAK,cAAcC,CAAK,CAAC;EACpC;EAEQ,cAAcA,GAAyB;AAC7C,WAAO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WebLinkProvider", "_terminal", "_regex", "_handler", "_options", "y", "callback", "links", "LinkComputer", "link", "event", "uri", "range", "isUrl", "urlString", "url", "parsedBase", "_LinkComputer", "regex", "terminal", "activate", "rex", "lines", "startLineIndex", "line", "match", "result", "text", "startY", "startX", "endY", "endX", "lineIndex", "topIdx", "bottomIdx", "length", "content", "currentContent", "rowIndex", "stringIndex", "buf", "cell", "start", "i", "chars", "strictUrlRegex", "handleLink", "newWindow", "WebLinksAddon", "options"]
7
- }