vsview-editor 0.2.0__tar.gz → 0.3.0__tar.gz

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 (80) hide show
  1. vsview_editor-0.3.0/.gitignore +2 -0
  2. vsview_editor-0.3.0/LICENSE +291 -0
  3. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/PKG-INFO +4 -1
  4. vsview_editor-0.3.0/package.json +51 -0
  5. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/pyproject.toml +11 -9
  6. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/console.py +47 -24
  7. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/lsp.py +31 -3
  8. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/settings.py +0 -1
  9. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/web.py +1 -21
  10. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/workspace.py +58 -15
  11. vsview_editor-0.3.0/src/ts/bridge/python.test.ts +1002 -0
  12. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/bridge/python.ts +56 -71
  13. vsview_editor-0.3.0/src/ts/editor/config.test.ts +85 -0
  14. vsview_editor-0.3.0/src/ts/editor/config.ts +49 -0
  15. vsview_editor-0.3.0/src/ts/editor/service.test.ts +736 -0
  16. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/editor/service.ts +111 -122
  17. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/index.css +7 -7
  18. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/index.html +6 -6
  19. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/lsp/connection.test.ts +27 -27
  20. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/lsp/connection.ts +23 -22
  21. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/lsp/progress.test.ts +21 -21
  22. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/lsp/progress.ts +2 -2
  23. vsview_editor-0.3.0/src/ts/lsp/service.test.ts +1020 -0
  24. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/lsp/service.ts +60 -21
  25. vsview_editor-0.3.0/src/ts/main.ts +19 -0
  26. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/manager.ts +6 -6
  27. vsview_editor-0.3.0/src/ts/services/fs.ts +151 -0
  28. vsview_editor-0.3.0/src/ts/services/models.ts +27 -0
  29. vsview_editor-0.3.0/src/ts/services/vscode.test.ts +466 -0
  30. vsview_editor-0.3.0/src/ts/services/vscode.ts +208 -0
  31. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/types.ts +11 -10
  32. vsview_editor-0.3.0/src/ts/ui/console.test.ts +737 -0
  33. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/ui/console.ts +107 -108
  34. vsview_editor-0.3.0/src/ts/ui/constants.ts +13 -0
  35. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/ui/layout.ts +1 -1
  36. vsview_editor-0.3.0/src/ts/ui/tabbar.test.ts +338 -0
  37. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/ui/tabbar.ts +37 -37
  38. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/utils/disposables.test.ts +13 -13
  39. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/utils/disposables.ts +3 -3
  40. vsview_editor-0.3.0/src/ts/utils/result.test.ts +253 -0
  41. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/utils/result.ts +1 -1
  42. vsview_editor-0.3.0/src/ts/utils/theme.test.ts +114 -0
  43. vsview_editor-0.3.0/src/ts/utils/theme.ts +139 -0
  44. vsview_editor-0.3.0/src/ts/utils/uri.test.ts +120 -0
  45. vsview_editor-0.3.0/src/ts/utils/uri.ts +67 -0
  46. vsview_editor-0.3.0/vite.config.ts +45 -0
  47. vsview_editor-0.2.0/.gitignore +0 -147
  48. vsview_editor-0.2.0/.npmrc +0 -1
  49. vsview_editor-0.2.0/.oxlintrc.json +0 -25
  50. vsview_editor-0.2.0/package-lock.json +0 -2855
  51. vsview_editor-0.2.0/package.json +0 -57
  52. vsview_editor-0.2.0/src/ts/editor/config.ts +0 -49
  53. vsview_editor-0.2.0/src/ts/main.ts +0 -18
  54. vsview_editor-0.2.0/src/ts/services/vscode.ts +0 -372
  55. vsview_editor-0.2.0/src/ts/ui/constants.ts +0 -13
  56. vsview_editor-0.2.0/src/ts/utils/result.test.ts +0 -253
  57. vsview_editor-0.2.0/src/ts/utils/theme.ts +0 -134
  58. vsview_editor-0.2.0/src/ts/utils/uri.test.ts +0 -88
  59. vsview_editor-0.2.0/src/ts/utils/uri.ts +0 -54
  60. vsview_editor-0.2.0/vite.config.ts +0 -28
  61. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/README.md +0 -0
  62. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/__init__.py +0 -0
  63. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/logging.py +0 -0
  64. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/py.typed +0 -0
  65. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/stubs.py +0 -0
  66. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/python/vsview_editor/utils.py +0 -0
  67. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/LICENSE.txt +0 -0
  68. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/README.md +0 -0
  69. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/VERSION +0 -0
  70. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/dark-colorblind.json +0 -0
  71. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/dark-default.json +0 -0
  72. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/dark-dimmed.json +0 -0
  73. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/dark-high-contrast.json +0 -0
  74. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/dark.json +0 -0
  75. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/light-colorblind.json +0 -0
  76. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/light-default.json +0 -0
  77. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/light-high-contrast.json +0 -0
  78. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/assets/themes/github/light.json +0 -0
  79. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/src/ts/stubs/empty.js +0 -0
  80. {vsview_editor-0.2.0 → vsview_editor-0.3.0}/tsconfig.json +0 -0
@@ -0,0 +1,2 @@
1
+ web_dist/
2
+ node_modules/
@@ -0,0 +1,291 @@
1
+ EUROPEAN UNION PUBLIC LICENCE v. 1.2
2
+ EUPL © the European Union 2007, 2016
3
+
4
+ This European Union Public Licence (the ‘EUPL’) applies to the Work (as
5
+ defined below) which is provided under the terms of this Licence. Any use of
6
+ the Work, other than as authorised under this Licence is prohibited (to the
7
+ extent such use is covered by a right of the copyright holder of the Work).
8
+
9
+ The Work is provided under the terms of this Licence when the Licensor (as
10
+ defined below) has placed the following notice immediately following the
11
+ copyright notice for the Work:
12
+
13
+ Licensed under the EUPL
14
+
15
+ or has expressed by any other means his willingness to license under the EUPL.
16
+
17
+ 1. Definitions
18
+
19
+ In this Licence, the following terms have the following meaning:
20
+
21
+ - ‘The Licence’: this Licence.
22
+
23
+ - ‘The Original Work’: the work or software distributed or communicated by the
24
+ Licensor under this Licence, available as Source Code and also as Executable
25
+ Code as the case may be.
26
+
27
+ - ‘Derivative Works’: the works or software that could be created by the
28
+ Licensee, based upon the Original Work or modifications thereof. This
29
+ Licence does not define the extent of modification or dependence on the
30
+ Original Work required in order to classify a work as a Derivative Work;
31
+ this extent is determined by copyright law applicable in the country
32
+ mentioned in Article 15.
33
+
34
+ - ‘The Work’: the Original Work or its Derivative Works.
35
+
36
+ - ‘The Source Code’: the human-readable form of the Work which is the most
37
+ convenient for people to study and modify.
38
+
39
+ - ‘The Executable Code’: any code which has generally been compiled and which
40
+ is meant to be interpreted by a computer as a program.
41
+
42
+ - ‘The Licensor’: the natural or legal person that distributes or communicates
43
+ the Work under the Licence.
44
+
45
+ - ‘Contributor(s)’: any natural or legal person who modifies the Work under
46
+ the Licence, or otherwise contributes to the creation of a Derivative Work.
47
+
48
+ - ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of
49
+ the Work under the terms of the Licence.
50
+
51
+ - ‘Distribution’ or ‘Communication’: any act of selling, giving, lending,
52
+ renting, distributing, communicating, transmitting, or otherwise making
53
+ available, online or offline, copies of the Work or providing access to its
54
+ essential functionalities at the disposal of any other natural or legal
55
+ person.
56
+
57
+ 2. Scope of the rights granted by the Licence
58
+
59
+ The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
60
+ sublicensable licence to do the following, for the duration of copyright
61
+ vested in the Original Work:
62
+
63
+ - use the Work in any circumstance and for all usage,
64
+ - reproduce the Work,
65
+ - modify the Work, and make Derivative Works based upon the Work,
66
+ - communicate to the public, including the right to make available or display
67
+ the Work or copies thereof to the public and perform publicly, as the case
68
+ may be, the Work,
69
+ - distribute the Work or copies thereof,
70
+ - lend and rent the Work or copies thereof,
71
+ - sublicense rights in the Work or copies thereof.
72
+
73
+ Those rights can be exercised on any media, supports and formats, whether now
74
+ known or later invented, as far as the applicable law permits so.
75
+
76
+ In the countries where moral rights apply, the Licensor waives his right to
77
+ exercise his moral right to the extent allowed by law in order to make
78
+ effective the licence of the economic rights here above listed.
79
+
80
+ The Licensor grants to the Licensee royalty-free, non-exclusive usage rights
81
+ to any patents held by the Licensor, to the extent necessary to make use of
82
+ the rights granted on the Work under this Licence.
83
+
84
+ 3. Communication of the Source Code
85
+
86
+ The Licensor may provide the Work either in its Source Code form, or as
87
+ Executable Code. If the Work is provided as Executable Code, the Licensor
88
+ provides in addition a machine-readable copy of the Source Code of the Work
89
+ along with each copy of the Work that the Licensor distributes or indicates,
90
+ in a notice following the copyright notice attached to the Work, a repository
91
+ where the Source Code is easily and freely accessible for as long as the
92
+ Licensor continues to distribute or communicate the Work.
93
+
94
+ 4. Limitations on copyright
95
+
96
+ Nothing in this Licence is intended to deprive the Licensee of the benefits
97
+ from any exception or limitation to the exclusive rights of the rights owners
98
+ in the Work, of the exhaustion of those rights or of other applicable
99
+ limitations thereto.
100
+
101
+ 5. Obligations of the Licensee
102
+
103
+ The grant of the rights mentioned above is subject to some restrictions and
104
+ obligations imposed on the Licensee. Those obligations are the following:
105
+
106
+ Attribution right: The Licensee shall keep intact all copyright, patent or
107
+ trademarks notices and all notices that refer to the Licence and to the
108
+ disclaimer of warranties. The Licensee must include a copy of such notices and
109
+ a copy of the Licence with every copy of the Work he/she distributes or
110
+ communicates. The Licensee must cause any Derivative Work to carry prominent
111
+ notices stating that the Work has been modified and the date of modification.
112
+
113
+ Copyleft clause: If the Licensee distributes or communicates copies of the
114
+ Original Works or Derivative Works, this Distribution or Communication will be
115
+ done under the terms of this Licence or of a later version of this Licence
116
+ unless the Original Work is expressly distributed only under this version of
117
+ the Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee
118
+ (becoming Licensor) cannot offer or impose any additional terms or conditions
119
+ on the Work or Derivative Work that alter or restrict the terms of the
120
+ Licence.
121
+
122
+ Compatibility clause: If the Licensee Distributes or Communicates Derivative
123
+ Works or copies thereof based upon both the Work and another work licensed
124
+ under a Compatible Licence, this Distribution or Communication can be done
125
+ under the terms of this Compatible Licence. For the sake of this clause,
126
+ ‘Compatible Licence’ refers to the licences listed in the appendix attached to
127
+ this Licence. Should the Licensee's obligations under the Compatible Licence
128
+ conflict with his/her obligations under this Licence, the obligations of the
129
+ Compatible Licence shall prevail.
130
+
131
+ Provision of Source Code: When distributing or communicating copies of the
132
+ Work, the Licensee will provide a machine-readable copy of the Source Code or
133
+ indicate a repository where this Source will be easily and freely available
134
+ for as long as the Licensee continues to distribute or communicate the Work.
135
+
136
+ Legal Protection: This Licence does not grant permission to use the trade
137
+ names, trademarks, service marks, or names of the Licensor, except as required
138
+ for reasonable and customary use in describing the origin of the Work and
139
+ reproducing the content of the copyright notice.
140
+
141
+ 6. Chain of Authorship
142
+
143
+ The original Licensor warrants that the copyright in the Original Work granted
144
+ hereunder is owned by him/her or licensed to him/her and that he/she has the
145
+ power and authority to grant the Licence.
146
+
147
+ Each Contributor warrants that the copyright in the modifications he/she
148
+ brings to the Work are owned by him/her or licensed to him/her and that he/she
149
+ has the power and authority to grant the Licence.
150
+
151
+ Each time You accept the Licence, the original Licensor and subsequent
152
+ Contributors grant You a licence to their contributions to the Work, under the
153
+ terms of this Licence.
154
+
155
+ 7. Disclaimer of Warranty
156
+
157
+ The Work is a work in progress, which is continuously improved by numerous
158
+ Contributors. It is not a finished work and may therefore contain defects or
159
+ ‘bugs’ inherent to this type of development.
160
+
161
+ For the above reason, the Work is provided under the Licence on an ‘as is’
162
+ basis and without warranties of any kind concerning the Work, including
163
+ without limitation merchantability, fitness for a particular purpose, absence
164
+ of defects or errors, accuracy, non-infringement of intellectual property
165
+ rights other than copyright as stated in Article 6 of this Licence.
166
+
167
+ This disclaimer of warranty is an essential part of the Licence and a
168
+ condition for the grant of any rights to the Work.
169
+
170
+ 8. Disclaimer of Liability
171
+
172
+ Except in the cases of wilful misconduct or damages directly caused to natural
173
+ persons, the Licensor will in no event be liable for any direct or indirect,
174
+ material or moral, damages of any kind, arising out of the Licence or of the
175
+ use of the Work, including without limitation, damages for loss of goodwill,
176
+ work stoppage, computer failure or malfunction, loss of data or any commercial
177
+ damage, even if the Licensor has been advised of the possibility of such
178
+ damage. However, the Licensor will be liable under statutory product liability
179
+ laws as far such laws apply to the Work.
180
+
181
+ 9. Additional agreements
182
+
183
+ While distributing the Work, You may choose to conclude an additional
184
+ agreement, defining obligations or services consistent with this Licence.
185
+ However, if accepting obligations, You may act only on your own behalf and on
186
+ your sole responsibility, not on behalf of the original Licensor or any other
187
+ Contributor, and only if You agree to indemnify, defend, and hold each
188
+ Contributor harmless for any liability incurred by, or claims asserted against
189
+ such Contributor by the fact You have accepted any warranty or additional
190
+ liability.
191
+
192
+ 10. Acceptance of the Licence
193
+
194
+ The provisions of this Licence can be accepted by clicking on an icon ‘I
195
+ agree’ placed under the bottom of a window displaying the text of this Licence
196
+ or by affirming consent in any other similar way, in accordance with the rules
197
+ of applicable law. Clicking on that icon indicates your clear and irrevocable
198
+ acceptance of this Licence and all of its terms and conditions.
199
+
200
+ Similarly, you irrevocably accept this Licence and all of its terms and
201
+ conditions by exercising any rights granted to You by Article 2 of this
202
+ Licence, such as the use of the Work, the creation by You of a Derivative Work
203
+ or the Distribution or Communication by You of the Work or copies thereof.
204
+
205
+ 11. Information to the public
206
+
207
+ In case of any Distribution or Communication of the Work by means of
208
+ electronic communication by You (for example, by offering to download the Work
209
+ from a remote location) the distribution channel or media (for example, a
210
+ website) must at least provide to the public the information requested by the
211
+ applicable law regarding the Licensor, the Licence and the way it may be
212
+ accessible, concluded, stored and reproduced by the Licensee.
213
+
214
+ 12. Termination of the Licence
215
+
216
+ The Licence and the rights granted hereunder will terminate automatically upon
217
+ any breach by the Licensee of the terms of the Licence.
218
+
219
+ Such a termination will not terminate the licences of any person who has
220
+ received the Work from the Licensee under the Licence, provided such persons
221
+ remain in full compliance with the Licence.
222
+
223
+ 13. Miscellaneous
224
+
225
+ Without prejudice of Article 9 above, the Licence represents the complete
226
+ agreement between the Parties as to the Work.
227
+
228
+ If any provision of the Licence is invalid or unenforceable under applicable
229
+ law, this will not affect the validity or enforceability of the Licence as a
230
+ whole. Such provision will be construed or reformed so as necessary to make it
231
+ valid and enforceable.
232
+
233
+ The European Commission may publish other linguistic versions or new versions
234
+ of this Licence or updated versions of the Appendix, so far this is required
235
+ and reasonable, without reducing the scope of the rights granted by the
236
+ Licence. New versions of the Licence will be published with a unique version
237
+ number.
238
+
239
+ All linguistic versions of this Licence, approved by the European Commission,
240
+ have identical value. Parties can take advantage of the linguistic version of
241
+ their choice.
242
+
243
+ 14. Jurisdiction
244
+
245
+ Without prejudice to specific agreement between parties,
246
+
247
+ - any litigation resulting from the interpretation of this License, arising
248
+ between the European Union institutions, bodies, offices or agencies, as a
249
+ Licensor, and any Licensee, will be subject to the jurisdiction of the Court
250
+ of Justice of the European Union, as laid down in article 272 of the Treaty
251
+ on the Functioning of the European Union,
252
+
253
+ - any litigation arising between other parties and resulting from the
254
+ interpretation of this License, will be subject to the exclusive
255
+ jurisdiction of the competent court where the Licensor resides or conducts
256
+ its primary business.
257
+
258
+ 15. Applicable Law
259
+
260
+ Without prejudice to specific agreement between parties,
261
+
262
+ - this Licence shall be governed by the law of the European Union Member State
263
+ where the Licensor has his seat, resides or has his registered office,
264
+
265
+ - this licence shall be governed by Belgian law if the Licensor has no seat,
266
+ residence or registered office inside a European Union Member State.
267
+
268
+ Appendix
269
+
270
+ ‘Compatible Licences’ according to Article 5 EUPL are:
271
+
272
+ - GNU General Public License (GPL) v. 2, v. 3
273
+ - GNU Affero General Public License (AGPL) v. 3
274
+ - Open Software License (OSL) v. 2.1, v. 3.0
275
+ - Eclipse Public License (EPL) v. 1.0
276
+ - CeCILL v. 2.0, v. 2.1
277
+ - Mozilla Public Licence (MPL) v. 2
278
+ - GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
279
+ - Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
280
+ works other than software
281
+ - European Union Public Licence (EUPL) v. 1.1, v. 1.2
282
+ - Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong
283
+ Reciprocity (LiLiQ-R+).
284
+
285
+ The European Commission may update this Appendix to later versions of the
286
+ above licences without producing a new version of the EUPL, as long as they
287
+ provide the rights granted in Article 2 of this Licence and protect the
288
+ covered Source Code from exclusive appropriation.
289
+
290
+ All other changes or additions to this Appendix require the production of a
291
+ new EUPL version.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vsview-editor
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Monaco-based code editor workspace for VSView
5
5
  Project-URL: Documentation, https://jaded-encoding-thaumaturgy.github.io/vs-view/usage/workspaces/editor/
6
6
  Project-URL: Source Code, https://github.com/Jaded-Encoding-Thaumaturgy/vs-view/tree/main/src/workspaces/editor/
@@ -9,12 +9,15 @@ Project-URL: Contact, https://discord.gg/XTpc6Fa9eB
9
9
  Author-email: Vardë <ichunjo.le.terrible@gmail.com>
10
10
  Maintainer-email: Vardë <ichunjo.le.terrible@gmail.com>, Jaded Encoding Thaumaturgy <jaded.encoding.thaumaturgy@gmail.com>
11
11
  License-Expression: EUPL-1.2
12
+ License-File: LICENSE
13
+ License-File: src/ts/assets/themes/github/LICENSE.txt
12
14
  Classifier: Intended Audience :: Developers
13
15
  Classifier: Operating System :: OS Independent
14
16
  Classifier: Programming Language :: Python :: 3
15
17
  Classifier: Programming Language :: Python :: 3.12
16
18
  Classifier: Programming Language :: Python :: 3.13
17
19
  Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
18
21
  Classifier: Topic :: Multimedia :: Video
19
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
23
  Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "vsview-editor-npm",
3
+ "private": true,
4
+ "description": "Monaco-based code editor workspace for VSView",
5
+ "keywords": [
6
+ "monaco-editor",
7
+ "pyside6",
8
+ "qt",
9
+ "vsview"
10
+ ],
11
+ "license": "EUPL-1.2",
12
+ "author": "Vardë <ichunjo.le.terrible@gmail.com>",
13
+ "type": "module",
14
+ "scripts": {
15
+ "build": "vp build",
16
+ "watch": "vp build --watch",
17
+ "test": "vp test run",
18
+ "test:watch": "vp test"
19
+ },
20
+ "dependencies": {
21
+ "@codingame/monaco-vscode-api": "38.0.4",
22
+ "@codingame/monaco-vscode-configuration-service-override": "38.0.4",
23
+ "@codingame/monaco-vscode-editor-api": "38.0.4",
24
+ "@codingame/monaco-vscode-extension-api": "38.0.4",
25
+ "@codingame/monaco-vscode-extensions-service-override": "38.0.4",
26
+ "@codingame/monaco-vscode-files-service-override": "38.0.4",
27
+ "@codingame/monaco-vscode-languages-service-override": "38.0.4",
28
+ "@codingame/monaco-vscode-log-service-override": "38.0.4",
29
+ "@codingame/monaco-vscode-model-service-override": "38.0.4",
30
+ "@codingame/monaco-vscode-python-default-extension": "38.0.4",
31
+ "@codingame/monaco-vscode-textmate-service-override": "38.0.4",
32
+ "@codingame/monaco-vscode-theme-defaults-default-extension": "38.0.4",
33
+ "@codingame/monaco-vscode-theme-service-override": "38.0.4",
34
+ "@xterm/addon-fit": "0.11.0",
35
+ "@xterm/xterm": "6.0.0",
36
+ "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@38.0.4",
37
+ "vscode": "npm:@codingame/monaco-vscode-extension-api@38.0.4",
38
+ "vscode-jsonrpc": "10.0.0",
39
+ "vscode-languageclient": "11.0.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "catalog:",
43
+ "@types/vscode": "1.140.0",
44
+ "@vitest/coverage-v8": "catalog:",
45
+ "happy-dom": "21.0.4",
46
+ "typescript": "catalog:",
47
+ "vite": "catalog:",
48
+ "vite-plus": "catalog:",
49
+ "vitest": "catalog:"
50
+ }
51
+ }
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["hatchling>=1.29.0", "hatch-js>=0.1.2", "versioningit"]
2
+ requires = ["hatchling>=1.29.0", "hatch-js>=0.1.4", "versioningit"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [project]
@@ -7,6 +7,7 @@ name = "vsview-editor"
7
7
  description = "Monaco-based code editor workspace for VSView"
8
8
  readme = "README.md"
9
9
  license = "EUPL-1.2"
10
+ license-files = ["LICENSE", "src/ts/assets/themes/github/LICENSE.txt"]
10
11
  requires-python = ">=3.12"
11
12
  authors = [{ name = "Vardë", email = "ichunjo.le.terrible@gmail.com" }]
12
13
  maintainers = [
@@ -19,6 +20,7 @@ classifiers = [
19
20
  "Programming Language :: Python :: 3.12",
20
21
  "Programming Language :: Python :: 3.13",
21
22
  "Programming Language :: Python :: 3.14",
23
+ "Programming Language :: Python :: 3.15",
22
24
  "Operating System :: OS Independent",
23
25
  "Topic :: Multimedia :: Video",
24
26
  "Topic :: Software Development :: Libraries :: Python Modules",
@@ -49,9 +51,9 @@ artifacts = ["src/python/vsview_editor/web_dist/"]
49
51
 
50
52
  [tool.hatch.build.hooks.hatch-js]
51
53
  path = "."
52
- tool = "npm"
53
- install_cmd = "install --no-save --silent"
54
- build_cmd = "build-quiet --silent"
54
+ tool = "pnpm"
55
+ install_cmd = "install --frozen-lockfile --silent"
56
+ build_cmd = "build"
55
57
  targets = ["src/python/vsview_editor/web_dist/index.html"]
56
58
 
57
59
  [tool.hatch.version]
@@ -72,12 +74,12 @@ distance-dirty = "{next_version}.dev{distance}+{vcs}{rev}.dirty"
72
74
  [tool.uv]
73
75
  cache-keys = [
74
76
  { file = "pyproject.toml" },
77
+ { file = "package.json" },
75
78
  { file = "vite.config.ts" },
76
- { file = "ts/**/*.ts" },
77
- { file = "ts/**/*.json" },
78
- { file = "ts/**/*.js" },
79
- { file = "ts/index.css" },
80
- { file = "ts/index.html" },
79
+ { file = "src/ts/**/*.ts" },
80
+ { file = "src/ts/**/*.js" },
81
+ { file = "src/ts/index.css" },
82
+ { file = "src/ts/index.html" },
81
83
  ]
82
84
 
83
85
  [tool.uv.sources]
@@ -6,7 +6,7 @@ from collections.abc import Callable, Generator
6
6
  from contextlib import contextmanager
7
7
  from contextvars import ContextVar
8
8
  from io import StringIO
9
- from logging import Handler, Logger, LogRecord
9
+ from logging import Handler, Logger, LogRecord, getLogger
10
10
  from typing import Literal, TextIO, override
11
11
 
12
12
  from jetpytools import CustomRuntimeError, Singleton, inject_self
@@ -18,11 +18,15 @@ from vsview.api import QObjectSet, get_console_level
18
18
 
19
19
  from .web import MonacoBridge
20
20
 
21
+ logger = getLogger(__name__)
22
+
21
23
  IN_LOGGING = threading.local()
22
24
  EXECUTION_BRIDGE = ContextVar[MonacoBridge | None]("EXECUTION_BRIDGE", default=None)
23
25
 
24
26
 
25
27
  class EditorConsoleHandler(RichHandler):
28
+ lock: threading.RLock # pyright: ignore[reportIncompatibleVariableOverride]
29
+
26
30
  def __init__(self, dispatch: Callable[[Literal["stderr", "stdout"], str], None]) -> None:
27
31
  self.dispatch = dispatch
28
32
  super().__init__(
@@ -45,10 +49,12 @@ class EditorConsoleHandler(RichHandler):
45
49
  class ConsoleStreamRedirector:
46
50
  def __init__(self, name: Literal["stdout", "stderr"]) -> None:
47
51
  self.name = name
48
- self._original_stream: TextIO = getattr(sys, self.name)
52
+ self._original_stream: TextIO | None = getattr(sys, self.name, None)
49
53
  self._installed = False
50
54
 
51
55
  def __getattr__(self, name: str) -> object:
56
+ if self._original_stream is None:
57
+ raise AttributeError(f"Original stream {self.name} is None, cannot access attribute {name!r}")
52
58
  return getattr(self._original_stream, name)
53
59
 
54
60
  def install(self) -> None:
@@ -66,18 +72,28 @@ class ConsoleStreamRedirector:
66
72
  self._installed = False
67
73
 
68
74
  def write(self, text: str) -> int:
69
- res = self._original_stream.write(text)
75
+ res = self._original_stream.write(text) if self._original_stream is not None else len(text)
70
76
  # Suppress dispatching when text comes from an active logging emit() call
71
77
  if text and getattr(IN_LOGGING, "depth", 0) == 0:
72
78
  GlobalConsoleHub.dispatch({"stream": self.name, "text": text})
73
79
  return res
74
80
 
81
+ def flush(self) -> None:
82
+ if self._original_stream is not None and hasattr(self._original_stream, "flush"):
83
+ self._original_stream.flush()
84
+
85
+ def writable(self) -> bool:
86
+ return True
87
+
75
88
  def isatty(self) -> bool:
76
- return getattr(self._original_stream, "isatty", lambda: False)()
89
+ if self._original_stream is not None and hasattr(self._original_stream, "isatty"):
90
+ return self._original_stream.isatty()
91
+ return False
77
92
 
78
93
 
79
94
  class GlobalConsoleHub(Singleton):
80
95
  def __init__(self) -> None:
96
+ self._lock = threading.RLock()
81
97
  self._bridges = QObjectSet[MonacoBridge]()
82
98
  self._bridge_widths = dict[MonacoBridge, int]()
83
99
  self._stdout_redirector = ConsoleStreamRedirector("stdout")
@@ -88,37 +104,42 @@ class GlobalConsoleHub(Singleton):
88
104
 
89
105
  @inject_self.property
90
106
  def target_width(self) -> int:
91
- if (target_bridge := EXECUTION_BRIDGE.get()) in self._bridge_widths:
92
- return self._bridge_widths[target_bridge]
107
+ with self._lock:
108
+ if (target_bridge := EXECUTION_BRIDGE.get()) in self._bridge_widths:
109
+ return self._bridge_widths[target_bridge]
93
110
 
94
- for bridge in self._bridges:
95
- if bridge in self._bridge_widths:
96
- return self._bridge_widths[bridge]
111
+ for bridge in self._bridges:
112
+ if bridge in self._bridge_widths:
113
+ return self._bridge_widths[bridge]
97
114
 
98
- if self._log_handler:
99
- return self._log_handler.console.width
115
+ if self._log_handler:
116
+ return self._log_handler.console.width
100
117
 
101
- return 80
118
+ return 80
102
119
 
103
120
  @inject_self
104
121
  def register(self, bridge: MonacoBridge) -> None:
105
- self._bridges.add(bridge)
106
- if not self._installed:
107
- self._install_global_hooks()
122
+ with self._lock:
123
+ self._bridges.add(bridge)
124
+ if not self._installed:
125
+ self._install_global_hooks()
108
126
 
109
127
  @inject_self
110
128
  def unregister(self, bridge: MonacoBridge) -> None:
111
- self._bridges.discard(bridge)
112
- self._bridge_widths.pop(bridge, None)
113
- if not self._bridges and self._installed:
114
- self._uninstall_global_hooks()
129
+ with self._lock:
130
+ self._bridges.discard(bridge)
131
+ self._bridge_widths.pop(bridge, None)
132
+ if not self._bridges and self._installed:
133
+ self._uninstall_global_hooks()
115
134
 
116
135
  @inject_self
117
136
  def set_width(self, bridge: MonacoBridge, width: int) -> None:
118
- self._bridge_widths[bridge] = width
119
- target_bridge = EXECUTION_BRIDGE.get()
120
- if self._log_handler and (target_bridge == bridge or (target_bridge is None and bridge in self._bridges)):
121
- self._log_handler.console.width = width
137
+ with self._lock:
138
+ self._bridge_widths[bridge] = width
139
+ target_bridge = EXECUTION_BRIDGE.get()
140
+ if self._log_handler and (target_bridge == bridge or (target_bridge is None and bridge in self._bridges)):
141
+ with self._log_handler.lock:
142
+ self._log_handler.console.width = width
122
143
 
123
144
  @inject_self
124
145
  @contextmanager
@@ -135,7 +156,9 @@ class GlobalConsoleHub(Singleton):
135
156
  if dest_bridge is not None:
136
157
  dest_bridge.dispatch("console.append", payload)
137
158
  else:
138
- for bridge in self._bridges:
159
+ with self._lock:
160
+ bridges = list(self._bridges)
161
+ for bridge in bridges:
139
162
  bridge.dispatch("console.append", payload)
140
163
 
141
164
  def _install_global_hooks(self) -> None:
@@ -46,6 +46,10 @@ LSP_BASEDPYRIGHT_CONFIG = LSPConfig(
46
46
  progress_notifications=[{"begin": "pyright/beginAnalysis", "end": "pyright/endAnalysis"}],
47
47
  )
48
48
 
49
+ CLIENT_VIRTUAL_PATTERN = re.compile(
50
+ r"file:///workspace(?:/(script\.py|untitled_[a-zA-Z0-9_-]+\.py|workspace\.code-workspace)|(?=[\"']))"
51
+ )
52
+
49
53
 
50
54
  class LSPProcessServer(QObject):
51
55
  """Manages a single LSP subprocess and its associated WebSocket bridge server."""
@@ -71,7 +75,8 @@ class LSPProcessServer(QObject):
71
75
  self.uri_variations = self._build_uri_variations(workspace_dir)
72
76
  escaped_vars = "|".join(re.escape(v.rstrip("/")) for v in self.uri_variations)
73
77
  self._virtual_tab_pattern = re.compile(
74
- rf"(?:{escaped_vars})/(script\.py|untitled_[a-zA-Z0-9_-]+\.py|workspace\.code-workspace)"
78
+ rf"(?:{escaped_vars})/(script\.py|untitled_[a-zA-Z0-9_-]+\.py|workspace\.code-workspace)",
79
+ re.IGNORECASE if sys.platform == "win32" else 0,
75
80
  )
76
81
  logger.log(DEBUG - 1, "URI Variations: %s", self.uri_variations)
77
82
 
@@ -96,6 +101,7 @@ class LSPProcessServer(QObject):
96
101
  self.process.readyReadStandardOutput.connect(self._on_stdout_ready)
97
102
  self.process.readyReadStandardError.connect(self._on_stderr_ready)
98
103
  self.process.errorOccurred.connect(self._on_process_error)
104
+ self.process.finished.connect(self._on_process_finished)
99
105
 
100
106
  try:
101
107
  self.process.start(str(binary), self.config.command[1:])
@@ -125,6 +131,7 @@ class LSPProcessServer(QObject):
125
131
  proc.readyReadStandardOutput.disconnect(self._on_stdout_ready)
126
132
  proc.readyReadStandardError.disconnect(self._on_stderr_ready)
127
133
  proc.errorOccurred.disconnect(self._on_process_error)
134
+ proc.finished.disconnect(self._on_process_finished)
128
135
 
129
136
  if proc.state() != QProcess.ProcessState.NotRunning:
130
137
  if sys.platform == "win32":
@@ -173,7 +180,11 @@ class LSPProcessServer(QObject):
173
180
  return
174
181
 
175
182
  if self.real_uri and "file:///workspace" in message:
176
- message = message.replace("file:///workspace", self.real_uri)
183
+ real_uri = self.real_uri
184
+ message = CLIENT_VIRTUAL_PATTERN.sub(
185
+ lambda m: f"{real_uri}/{m.group(1)}" if m.group(1) else real_uri,
186
+ message,
187
+ )
177
188
 
178
189
  body = message.encode("utf-8")
179
190
  header = f"Content-Length: {len(body)}\r\n\r\n".encode()
@@ -195,7 +206,10 @@ class LSPProcessServer(QObject):
195
206
  content_length = None
196
207
  for line in header_bytes.split(b"\r\n"):
197
208
  if line.startswith(b"Content-Length:"):
198
- content_length = int(line.split(b":")[1].strip())
209
+ try:
210
+ content_length = int(line.split(b":")[1].strip())
211
+ except ValueError:
212
+ content_length = None
199
213
  break
200
214
 
201
215
  if content_length is None:
@@ -231,6 +245,20 @@ class LSPProcessServer(QObject):
231
245
  if self.process:
232
246
  logger.error("LSP QProcess error for %r (%s): %s", self.config.id, error, self.process.errorString())
233
247
 
248
+ @Slot(int, QProcess.ExitStatus)
249
+ def _on_process_finished(self, exit_code: int, exit_status: QProcess.ExitStatus) -> None:
250
+ logger.debug(
251
+ "LSP QProcess for %r finished (exit_code=%d, exit_status=%s)",
252
+ self.config.id,
253
+ exit_code,
254
+ exit_status,
255
+ )
256
+ for client in list(self.clients):
257
+ if client.isValid():
258
+ client.close()
259
+ client.deleteLater()
260
+ self.clients.clear()
261
+
234
262
  @staticmethod
235
263
  def _build_uri_variations(workspace_dir: Path | str) -> list[str]:
236
264
  if isinstance(workspace_dir, str) and workspace_dir.startswith("file:"):
@@ -35,7 +35,6 @@ class Theme(StrEnum):
35
35
  GITHUB_LIGHT_DEFAULT = "GitHub Light Default", "light"
36
36
  GITHUB_LIGHT = "GitHub Light", "light"
37
37
  GITHUB_LIGHT_COLORBLIND = "GitHub Light Colorblind", "light"
38
- GITHUB_LIGHT_DIMMED = "GitHub Light Dimmed", "light"
39
38
  GITHUB_LIGHT_HIGH_CONTRAST = "GitHub Light High Contrast", "hc-light"
40
39
 
41
40
  kind: str