@isopodlabs/vscode_utils 0.0.2 → 0.1.0

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.
@@ -0,0 +1,618 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Hash = exports.codicons = exports.JSX = void 0;
37
+ exports.jsx = jsx;
38
+ exports.jsxs = jsxs;
39
+ exports.jsxFrag = jsxFrag;
40
+ exports.id_selector = id_selector;
41
+ exports.iconAttribute = iconAttribute;
42
+ exports.iconAttributes = iconAttributes;
43
+ exports.Label = Label;
44
+ exports.Nonce = Nonce;
45
+ exports.CSP = CSP;
46
+ const jsx_runtime_1 = require("./jsx-runtime");
47
+ /** @jsxImportSource . */
48
+ const vscode = __importStar(require("vscode"));
49
+ function jsx(type, props) {
50
+ return typeof type === 'function'
51
+ ? type(props)
52
+ : { type, props };
53
+ }
54
+ function jsxs(type, props) {
55
+ return typeof type === 'function'
56
+ ? type(props)
57
+ : { type, props };
58
+ }
59
+ function jsxFrag(props) {
60
+ return { props };
61
+ }
62
+ //-----------------------------------------------------------------------------
63
+ // render
64
+ //-----------------------------------------------------------------------------
65
+ function renderProps(props) {
66
+ return Object.entries(props)
67
+ .filter(([key, value]) => key !== 'children' && value !== undefined)
68
+ .map(([key, value]) => ` ${key}="${escape(String(value))}"`)
69
+ .join('');
70
+ }
71
+ function escape(v) {
72
+ return v.replace(/[\\&<>"]/g, match => {
73
+ switch (match) {
74
+ case '\\': return '\\\\';
75
+ case '&': return '&amp;';
76
+ case '<': return '&lt;';
77
+ case '>': return '&gt;';
78
+ case '"': return '&quot;';
79
+ default: return match;
80
+ }
81
+ });
82
+ }
83
+ // eslint-disable-next-line @typescript-eslint/no-namespace
84
+ var JSX;
85
+ (function (JSX) {
86
+ function render(element) {
87
+ if (typeof element === 'string')
88
+ return escape(element);
89
+ if (typeof element === 'number')
90
+ return element.toString();
91
+ if (!element)
92
+ return '';
93
+ const { type, props } = element;
94
+ const children = props.children;
95
+ const renderedChildren = Array.isArray(children)
96
+ ? children.flat().map(child => render(child)).join('')
97
+ : render(children);
98
+ return type
99
+ ? `<${type}${renderProps(props)}>${renderedChildren}</${type}>`
100
+ : renderedChildren;
101
+ }
102
+ JSX.render = render;
103
+ })(JSX || (exports.JSX = JSX = {}));
104
+ //globalThis.JSX = {render};
105
+ //-----------------------------------------------------------------------------
106
+ // helpers
107
+ //-----------------------------------------------------------------------------
108
+ function id_selector(id) {
109
+ if (typeof id === 'number')
110
+ return `[id="${id}"]`;
111
+ id = id.replace(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g, "\\$&");
112
+ return id[0] >= '0' && id[0] <= '9' ? `[id="${id}"]` : `#${id}`;
113
+ }
114
+ exports.codicons = {
115
+ add: '\uea60',
116
+ lightbulb: '\uea61',
117
+ repo: '\uea62',
118
+ fork: '\uea63',
119
+ pullRequest: '\uea64',
120
+ keyboard: '\uea65',
121
+ tag: '\uea66',
122
+ person: '\uea67',
123
+ branch: '\uea68',
124
+ mirror: '\uea69',
125
+ star: '\uea6a',
126
+ comment: '\uea6b',
127
+ alert: '\uea6c',
128
+ search: '\uea6d',
129
+ logOut: '\uea6e',
130
+ logIn: '\uea6f',
131
+ eye: '\uea70',
132
+ circleFilled: '\uea71',
133
+ primitiveSquare: '\uea72',
134
+ pencil: '\uea73',
135
+ info: '\uea74',
136
+ private: '\uea75',
137
+ close: '\uea76',
138
+ sync: '\uea77',
139
+ clone: '\uea78',
140
+ beaker: '\uea79',
141
+ desktop: '\uea7a',
142
+ file: '\uea7b',
143
+ ellipsis: '\uea7c',
144
+ reply: '\uea7d',
145
+ organization: '\uea7e',
146
+ newFile: '\uea7f',
147
+ newFolder: '\uea80',
148
+ trash: '\uea81',
149
+ clock: '\uea82',
150
+ folder: '\uea83',
151
+ github: '\uea84',
152
+ terminal: '\uea85',
153
+ symbolEvent: '\uea86',
154
+ error: '\uea87',
155
+ variable: '\uea88',
156
+ array: '\uea8a',
157
+ symbolModule: '\uea8b',
158
+ symbolFunction: '\uea8c',
159
+ symbolBoolean: '\uea8f',
160
+ symbolNumber: '\uea90',
161
+ symbolStruct: '\uea91',
162
+ symbolParameter: '\uea92',
163
+ symbolKey: '\uea93',
164
+ symbolReference: '\uea94',
165
+ symbolValue: '\uea95',
166
+ symbolUnit: '\uea96',
167
+ activateBreakpoints: '\uea97',
168
+ archive: '\uea98',
169
+ arrowBoth: '\uea99',
170
+ arrowDown: '\uea9a',
171
+ arrowLeft: '\uea9b',
172
+ arrowRight: '\uea9c',
173
+ arrowSmallDown: '\uea9d',
174
+ arrowSmallLeft: '\uea9e',
175
+ arrowSmallRight: '\uea9f',
176
+ arrowSmallUp: '\ueaa0',
177
+ arrowUp: '\ueaa1',
178
+ bell: '\ueaa2',
179
+ bold: '\ueaa3',
180
+ book: '\ueaa4',
181
+ bookmark: '\ueaa5',
182
+ debugBreakpointConditionalUnverified: '\ueaa6',
183
+ debugBreakpointConditional: '\ueaa7',
184
+ debugBreakpointDataUnverified: '\ueaa8',
185
+ debugBreakpointData: '\ueaa9',
186
+ debugBreakpointLogUnverified: '\ueaaa',
187
+ debugBreakpointLog: '\ueaab',
188
+ briefcase: '\ueaac',
189
+ broadcast: '\ueaad',
190
+ browser: '\ueaae',
191
+ bug: '\ueaaf',
192
+ calendar: '\ueab0',
193
+ caseSensitive: '\ueab1',
194
+ check: '\ueab2',
195
+ checklist: '\ueab3',
196
+ chevronDown: '\ueab4',
197
+ chevronLeft: '\ueab5',
198
+ chevronRight: '\ueab6',
199
+ chevronUp: '\ueab7',
200
+ chromeClose: '\ueab8',
201
+ chromeMaximize: '\ueab9',
202
+ chromeMinimize: '\ueaba',
203
+ chromeRestore: '\ueabb',
204
+ circle: '\ueabc',
205
+ circleSlash: '\ueabd',
206
+ circuitBoard: '\ueabe',
207
+ clearAll: '\ueabf',
208
+ clippy: '\ueac0',
209
+ closeAll: '\ueac1',
210
+ cloudDownload: '\ueac2',
211
+ cloudUpload: '\ueac3',
212
+ code: '\ueac4',
213
+ collapseAll: '\ueac5',
214
+ colorMode: '\ueac6',
215
+ commentDiscussion: '\ueac7',
216
+ creditCard: '\ueac9',
217
+ dash: '\ueacc',
218
+ dashboard: '\ueacd',
219
+ database: '\ueace',
220
+ debugContinue: '\ueacf',
221
+ debugDisconnect: '\uead0',
222
+ debugPause: '\uead1',
223
+ debugRestart: '\uead2',
224
+ debugStart: '\uead3',
225
+ debugStepInto: '\uead4',
226
+ debugStepOut: '\uead5',
227
+ debugStepOver: '\uead6',
228
+ debugStop: '\uead7',
229
+ debug: '\uead8',
230
+ deviceCameraVideo: '\uead9',
231
+ deviceCamera: '\ueada',
232
+ deviceMobile: '\ueadb',
233
+ diffAdded: '\ueadc',
234
+ diffIgnored: '\ueadd',
235
+ diffModified: '\ueade',
236
+ diffRemoved: '\ueadf',
237
+ diffRenamed: '\ueae0',
238
+ diff: '\ueae1',
239
+ discard: '\ueae2',
240
+ editorLayout: '\ueae3',
241
+ emptyWindow: '\ueae4',
242
+ exclude: '\ueae5',
243
+ extensions: '\ueae6',
244
+ eyeClosed: '\ueae7',
245
+ fileBinary: '\ueae8',
246
+ fileCode: '\ueae9',
247
+ fileMedia: '\ueaea',
248
+ filePdf: '\ueaeb',
249
+ fileSubmodule: '\ueaec',
250
+ fileSymlinkDirectory: '\ueaed',
251
+ fileSymlinkFile: '\ueaee',
252
+ fileZip: '\ueaef',
253
+ files: '\ueaf0',
254
+ filter: '\ueaf1',
255
+ flame: '\ueaf2',
256
+ foldDown: '\ueaf3',
257
+ foldUp: '\ueaf4',
258
+ fold: '\ueaf5',
259
+ folderActive: '\ueaf6',
260
+ folderOpened: '\ueaf7',
261
+ gear: '\ueaf8',
262
+ gift: '\ueaf9',
263
+ gistSecret: '\ueafa',
264
+ gist: '\ueafb',
265
+ gitCommit: '\ueafc',
266
+ compareChanges: '\ueafd',
267
+ gitMerge: '\ueafe',
268
+ githubAction: '\ueaff',
269
+ githubAlt: '\ueb00',
270
+ globe: '\ueb01',
271
+ grabber: '\ueb02',
272
+ graph: '\ueb03',
273
+ gripper: '\ueb04',
274
+ heart: '\ueb05',
275
+ home: '\ueb06',
276
+ horizontalRule: '\ueb07',
277
+ hubot: '\ueb08',
278
+ inbox: '\ueb09',
279
+ issueReopened: '\ueb0b',
280
+ issues: '\ueb0c',
281
+ italic: '\ueb0d',
282
+ jersey: '\ueb0e',
283
+ bracket: '\ueb0f',
284
+ kebabVertical: '\ueb10',
285
+ key: '\ueb11',
286
+ law: '\ueb12',
287
+ lightbulbAutofix: '\ueb13',
288
+ linkExternal: '\ueb14',
289
+ link: '\ueb15',
290
+ listOrdered: '\ueb16',
291
+ listUnordered: '\ueb17',
292
+ liveShare: '\ueb18',
293
+ loading: '\ueb19',
294
+ location: '\ueb1a',
295
+ mailRead: '\ueb1b',
296
+ mail: '\ueb1c',
297
+ markdown: '\ueb1d',
298
+ megaphone: '\ueb1e',
299
+ mention: '\ueb1f',
300
+ milestone: '\ueb20',
301
+ mortarBoard: '\ueb21',
302
+ move: '\ueb22',
303
+ multipleWindows: '\ueb23',
304
+ mute: '\ueb24',
305
+ noNewline: '\ueb25',
306
+ note: '\ueb26',
307
+ octoface: '\ueb27',
308
+ openPreview: '\ueb28',
309
+ package: '\ueb29',
310
+ paintcan: '\ueb2a',
311
+ pin: '\ueb2b',
312
+ play: '\ueb2c',
313
+ plug: '\ueb2d',
314
+ preserveCase: '\ueb2e',
315
+ preview: '\ueb2f',
316
+ project: '\ueb30',
317
+ pulse: '\ueb31',
318
+ question: '\ueb32',
319
+ quote: '\ueb33',
320
+ radioTower: '\ueb34',
321
+ reactions: '\ueb35',
322
+ references: '\ueb36',
323
+ refresh: '\ueb37',
324
+ regex: '\ueb38',
325
+ remoteExplorer: '\ueb39',
326
+ remote: '\ueb3a',
327
+ remove: '\ueb3b',
328
+ replaceAll: '\ueb3c',
329
+ replace: '\ueb3d',
330
+ repoClone: '\ueb3e',
331
+ repoForcePush: '\ueb3f',
332
+ repoPull: '\ueb40',
333
+ repoPush: '\ueb41',
334
+ report: '\ueb42',
335
+ requestChanges: '\ueb43',
336
+ rocket: '\ueb44',
337
+ rootFolderOpened: '\ueb45',
338
+ rootFolder: '\ueb46',
339
+ rss: '\ueb47',
340
+ ruby: '\ueb48',
341
+ saveAll: '\ueb49',
342
+ saveAs: '\ueb4a',
343
+ save: '\ueb4b',
344
+ screenFull: '\ueb4c',
345
+ screenNormal: '\ueb4d',
346
+ searchStop: '\ueb4e',
347
+ server: '\ueb50',
348
+ settingsGear: '\ueb51',
349
+ settings: '\ueb52',
350
+ shield: '\ueb53',
351
+ smiley: '\ueb54',
352
+ sortPrecedence: '\ueb55',
353
+ splitHorizontal: '\ueb56',
354
+ splitVertical: '\ueb57',
355
+ squirrel: '\ueb58',
356
+ starFull: '\ueb59',
357
+ starHalf: '\ueb5a',
358
+ symbolClass: '\ueb5b',
359
+ symbolColor: '\ueb5c',
360
+ symbolConstant: '\ueb5d',
361
+ symbolEnumMember: '\ueb5e',
362
+ symbolField: '\ueb5f',
363
+ symbolFile: '\ueb60',
364
+ symbolInterface: '\ueb61',
365
+ symbolKeyword: '\ueb62',
366
+ symbolMisc: '\ueb63',
367
+ symbolOperator: '\ueb64',
368
+ symbolProperty: '\ueb65',
369
+ symbolSnippet: '\ueb66',
370
+ tasklist: '\ueb67',
371
+ telescope: '\ueb68',
372
+ textSize: '\ueb69',
373
+ threeBars: '\ueb6a',
374
+ thumbsdown: '\ueb6b',
375
+ thumbsup: '\ueb6c',
376
+ tools: '\ueb6d',
377
+ triangleDown: '\ueb6e',
378
+ triangleLeft: '\ueb6f',
379
+ triangleRight: '\ueb70',
380
+ triangleUp: '\ueb71',
381
+ twitter: '\ueb72',
382
+ unfold: '\ueb73',
383
+ unlock: '\ueb74',
384
+ unmute: '\ueb75',
385
+ unverified: '\ueb76',
386
+ verified: '\ueb77',
387
+ versions: '\ueb78',
388
+ vmActive: '\ueb79',
389
+ vmOutline: '\ueb7a',
390
+ vmRunning: '\ueb7b',
391
+ watch: '\ueb7c',
392
+ whitespace: '\ueb7d',
393
+ wholeWord: '\ueb7e',
394
+ window: '\ueb7f',
395
+ wordWrap: '\ueb80',
396
+ zoomIn: '\ueb81',
397
+ zoomOut: '\ueb82',
398
+ listFilter: '\ueb83',
399
+ listFlat: '\ueb84',
400
+ listSelection: '\ueb85',
401
+ listTree: '\ueb86',
402
+ debugBreakpointFunctionUnverified: '\ueb87',
403
+ debugBreakpointFunction: '\ueb88',
404
+ debugStackframeActive: '\ueb89',
405
+ circleSmallFilled: '\ueb8a',
406
+ debugStackframe: '\ueb8b',
407
+ debugBreakpointUnsupported: '\ueb8c',
408
+ symbolString: '\ueb8d',
409
+ debugReverseContinue: '\ueb8e',
410
+ debugStepBack: '\ueb8f',
411
+ debugRestartFrame: '\ueb90',
412
+ debugAlt: '\ueb91',
413
+ callIncoming: '\ueb92',
414
+ callOutgoing: '\ueb93',
415
+ menu: '\ueb94',
416
+ expandAll: '\ueb95',
417
+ feedback: '\ueb96',
418
+ groupByRefType: '\ueb97',
419
+ ungroupByRefType: '\ueb98',
420
+ account: '\ueb99',
421
+ bellDot: '\ueb9a',
422
+ debugConsole: '\ueb9b',
423
+ library: '\ueb9c',
424
+ output: '\ueb9d',
425
+ runAll: '\ueb9e',
426
+ syncIgnored: '\ueb9f',
427
+ pinned: '\ueba0',
428
+ githubInverted: '\ueba1',
429
+ serverProcess: '\ueba2',
430
+ serverEnvironment: '\ueba3',
431
+ pass: '\ueba4',
432
+ stopCircle: '\ueba5',
433
+ playCircle: '\ueba6',
434
+ record: '\ueba7',
435
+ debugAltSmall: '\ueba8',
436
+ vmConnect: '\ueba9',
437
+ cloud: '\uebaa',
438
+ merge: '\uebab',
439
+ export: '\uebac',
440
+ graphLeft: '\uebad',
441
+ magnet: '\uebae',
442
+ notebook: '\uebaf',
443
+ redo: '\uebb0',
444
+ checkAll: '\uebb1',
445
+ pinnedDirty: '\uebb2',
446
+ passFilled: '\uebb3',
447
+ circleLargeFilled: '\uebb4',
448
+ circleLarge: '\uebb5',
449
+ combine: '\uebb6',
450
+ table: '\uebb7',
451
+ variableGroup: '\uebb8',
452
+ typeHierarchy: '\uebb9',
453
+ typeHierarchySub: '\uebba',
454
+ typeHierarchySuper: '\uebbb',
455
+ gitPullRequestCreate: '\uebbc',
456
+ runAbove: '\uebbd',
457
+ runBelow: '\uebbe',
458
+ notebookTemplate: '\uebbf',
459
+ debugRerun: '\uebc0',
460
+ workspaceTrusted: '\uebc1',
461
+ workspaceUntrusted: '\uebc2',
462
+ workspaceUnknown: '\uebc3',
463
+ terminalCmd: '\uebc4',
464
+ terminalDebian: '\uebc5',
465
+ terminalLinux: '\uebc6',
466
+ terminalPowershell: '\uebc7',
467
+ terminalTmux: '\uebc8',
468
+ terminalUbuntu: '\uebc9',
469
+ terminalBash: '\uebca',
470
+ arrowSwap: '\uebcb',
471
+ copy: '\uebcc',
472
+ personAdd: '\uebcd',
473
+ filterFilled: '\uebce',
474
+ wand: '\uebcf',
475
+ debugLineByLine: '\uebd0',
476
+ inspect: '\uebd1',
477
+ layers: '\uebd2',
478
+ layersDot: '\uebd3',
479
+ layersActive: '\uebd4',
480
+ compass: '\uebd5',
481
+ compassDot: '\uebd6',
482
+ compassActive: '\uebd7',
483
+ azure: '\uebd8',
484
+ issueDraft: '\uebd9',
485
+ gitPullRequestClosed: '\uebda',
486
+ gitPullRequestDraft: '\uebdb',
487
+ debugAll: '\uebdc',
488
+ debugCoverage: '\uebdd',
489
+ runErrors: '\uebde',
490
+ folderLibrary: '\uebdf',
491
+ debugContinueSmall: '\uebe0',
492
+ beakerStop: '\uebe1',
493
+ graphLine: '\uebe2',
494
+ graphScatter: '\uebe3',
495
+ pieChart: '\uebe4',
496
+ bracketDot: '\uebe5',
497
+ bracketError: '\uebe6',
498
+ lockSmall: '\uebe7',
499
+ azureDevops: '\uebe8',
500
+ verifiedFilled: '\uebe9',
501
+ newline: '\uebea',
502
+ layout: '\uebeb',
503
+ layoutActivitybarLeft: '\uebec',
504
+ layoutActivitybarRight: '\uebed',
505
+ layoutPanelLeft: '\uebee',
506
+ layoutPanelCenter: '\uebef',
507
+ layoutPanelJustify: '\uebf0',
508
+ layoutPanelRight: '\uebf1',
509
+ layoutPanel: '\uebf2',
510
+ layoutSidebarLeft: '\uebf3',
511
+ layoutSidebarRight: '\uebf4',
512
+ layoutStatusbar: '\uebf5',
513
+ layoutMenubar: '\uebf6',
514
+ layoutCentered: '\uebf7',
515
+ target: '\uebf8',
516
+ indent: '\uebf9',
517
+ recordSmall: '\uebfa',
518
+ errorSmall: '\uebfb',
519
+ arrowCircleDown: '\uebfc',
520
+ arrowCircleLeft: '\uebfd',
521
+ arrowCircleRight: '\uebfe',
522
+ arrowCircleUp: '\uebff',
523
+ layoutSidebarRightOff: '\uec00',
524
+ layoutPanelOff: '\uec01',
525
+ layoutSidebarLeftOff: '\uec02',
526
+ blank: '\uec03',
527
+ heartFilled: '\uec04',
528
+ foldHorizontal: '\uec05',
529
+ foldHorizontalFilled: '\uec06',
530
+ circleSmall: '\uec07',
531
+ bellSlash: '\uec08',
532
+ bellSlashDot: '\uec09',
533
+ commentUnresolved: '\uec0a',
534
+ gitPullRequestGoToChanges: '\uec0b',
535
+ gitPullRequestNewChanges: '\uec0c',
536
+ searchFuzzy: '\uec0d',
537
+ commentDraft: '\uec0e',
538
+ send: '\uec0f',
539
+ sparkle: '\uec10',
540
+ insert: '\uec11',
541
+ mic: '\uec12',
542
+ thumbsdownFilled: '\uec13',
543
+ thumbsupFilled: '\uec14',
544
+ coffee: '\uec15',
545
+ snake: '\uec16',
546
+ game: '\uec17',
547
+ vr: '\uec18',
548
+ chip: '\uec19',
549
+ piano: '\uec1a',
550
+ music: '\uec1b',
551
+ micFilled: '\uec1c',
552
+ repoFetch: '\uec1d',
553
+ copilot: '\uec1e',
554
+ lightbulbSparkle: '\uec1f',
555
+ robot: '\uec20',
556
+ sparkleFilled: '\uec21',
557
+ diffSingle: '\uec22',
558
+ diffMultiple: '\uec23',
559
+ surroundWith: '\uec24',
560
+ share: '\uec25',
561
+ gitStash: '\uec26',
562
+ gitStashApply: '\uec27',
563
+ gitStashPop: '\uec28',
564
+ vscode: '\uec29',
565
+ vscodeInsiders: '\uec2a',
566
+ codeOss: '\uec2b',
567
+ runCoverage: '\uec2c',
568
+ runAllCoverage: '\uec2d',
569
+ coverage: '\uec2e',
570
+ githubProject: '\uec2f',
571
+ foldVertical: '\uec30',
572
+ foldVerticalFilled: '\uec31',
573
+ goToSearch: '\uec32',
574
+ percentage: '\uec33',
575
+ attach: '\uec34',
576
+ };
577
+ function currentlyLight() {
578
+ return vscode.window.activeColorTheme.kind === vscode.ColorThemeKind.Light || vscode.window.activeColorTheme.kind === vscode.ColorThemeKind.HighContrastLight;
579
+ }
580
+ function iconAttribute(icon) {
581
+ return typeof icon === 'string' ? exports.codicons[icon] : icon.toString();
582
+ }
583
+ function getColor(col) {
584
+ const id = col instanceof vscode.ThemeColor ? col.id : col;
585
+ return `var(--vscode-${id.replace('.', '-')})`;
586
+ }
587
+ function iconAttributes(icon) {
588
+ if (icon) {
589
+ if (typeof icon === 'string' || icon instanceof vscode.Uri)
590
+ return { icon: iconAttribute(icon) };
591
+ if (icon instanceof vscode.ThemeIcon)
592
+ return icon.color ? { icon: exports.codicons[icon.id], color: getColor(icon.color) } : { icon: exports.codicons[icon.id] };
593
+ return { icon: iconAttribute(currentlyLight() ? icon.light : icon.dark) };
594
+ }
595
+ }
596
+ function Label({ id, display }) {
597
+ return (0, jsx_runtime_1.jsx)("label", { for: id, children: display });
598
+ }
599
+ class Hash {
600
+ algorithm;
601
+ value;
602
+ constructor(algorithm, value) {
603
+ this.algorithm = algorithm;
604
+ this.value = value;
605
+ }
606
+ toString() { return `'${this.algorithm}-${this.value}'`; }
607
+ }
608
+ exports.Hash = Hash;
609
+ function Nonce() {
610
+ const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
611
+ return new Hash('nonce', Array.from({ length: 32 }, () => possible.charAt(Math.floor(Math.random() * possible.length))).join(''));
612
+ }
613
+ function CSP({ csp, ...others }) {
614
+ return (0, jsx_runtime_1.jsx)("meta", { "http-equiv": "Content-Security-Policy", content: `
615
+ default-src ${csp};
616
+ ${Object.entries(others).map(([k, v]) => `${k}-src ${v};`)}
617
+ ` });
618
+ }
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@isopodlabs/vscode_utils",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "description": "vscode utilities",
5
- "main": "dist/utils.js",
5
+ "exports": {
6
+ "./fs": "./dist/fs.js",
7
+ "./debug": "./dist/debug.js",
8
+ "./icon-theme": "./dist/icon-theme.js",
9
+ "./jsx-runtime": "./dist/jsx-runtime.js"
10
+ },
6
11
  "files": [
7
12
  "dist",
8
13
  "assets",
@@ -20,6 +25,7 @@
20
25
  "license": "MIT",
21
26
  "devDependencies": {
22
27
  "@types/node": "^22.13.8",
28
+ "@vscode/debugprotocol": "^1.68.0",
23
29
  "eslint": "^9.21.0",
24
30
  "typescript": "^5.8.2",
25
31
  "typescript-eslint": "^8.26.0"