jupyterlab_vscode_icons_extension 1.0.44 → 1.0.48

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.
package/lib/index.js CHANGED
@@ -384,8 +384,8 @@ const plugin = {
384
384
  .jp-DirListing-item[data-file-type="notebook"][data-jupytext-py] .jp-DirListing-itemIcon::before {
385
385
  content: '';
386
386
  display: inline-block;
387
- width: 18px;
388
- height: 18px;
387
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
388
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
389
389
  background-image: url('${pythonDataUri}');
390
390
  background-size: contain;
391
391
  background-repeat: no-repeat;
@@ -400,8 +400,8 @@ const plugin = {
400
400
  .jp-DirListing-item[data-file-type="notebook"][data-jupytext-md] .jp-DirListing-itemIcon::before {
401
401
  content: '';
402
402
  display: inline-block;
403
- width: 18px;
404
- height: 18px;
403
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
404
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
405
405
  background-image: url('${markdownDataUri}');
406
406
  background-size: contain;
407
407
  background-repeat: no-repeat;
@@ -416,8 +416,8 @@ const plugin = {
416
416
  .jp-DirListing-item[data-file-type="notebook"][data-claude-md] .jp-DirListing-itemIcon::before {
417
417
  content: '';
418
418
  display: inline-block;
419
- width: 18px;
420
- height: 18px;
419
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
420
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
421
421
  background-image: url('${claudeDataUri}');
422
422
  background-size: contain;
423
423
  background-repeat: no-repeat;
@@ -433,8 +433,8 @@ const plugin = {
433
433
  .jp-DirListing-item[data-file-type="notebook"][data-readme-md] .jp-DirListing-itemIcon::before {
434
434
  content: '';
435
435
  display: inline-block;
436
- width: 20px;
437
- height: 20px;
436
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
437
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
438
438
  background-image: url('${readmeDataUri}');
439
439
  background-size: contain;
440
440
  background-repeat: no-repeat;
@@ -458,12 +458,22 @@ const plugin = {
458
458
  .jp-DirListing-item[data-shell-type="windows"] .jp-DirListing-itemIcon svg {
459
459
  filter: hue-rotate(180deg) saturate(0.6) brightness(1.2);
460
460
  }
461
+
462
+ /* Make hidden items darker (items starting with .) */
463
+ .jp-DirListing-item[data-is-dot] {
464
+ opacity: 55% !important;
465
+ }
461
466
  `;
462
467
  // Add a MutationObserver to mark special files in the file browser
463
468
  const markSpecialFiles = () => {
464
469
  // Mark Jupytext files (.py and .md notebooks) and CLAUDE.md
465
470
  const notebookItems = document.querySelectorAll('.jp-DirListing-item[data-file-type="notebook"]');
466
471
  notebookItems.forEach(item => {
472
+ // Clear all previous special file attributes first
473
+ item.removeAttribute('data-claude-md');
474
+ item.removeAttribute('data-readme-md');
475
+ item.removeAttribute('data-jupytext-py');
476
+ item.removeAttribute('data-jupytext-md');
467
477
  const nameSpan = item.querySelector('.jp-DirListing-itemText');
468
478
  if (nameSpan && nameSpan.textContent) {
469
479
  const name = nameSpan.textContent.trim();
@@ -484,6 +494,8 @@ const plugin = {
484
494
  // Mark shell script files for different coloring
485
495
  const shellItems = document.querySelectorAll('.jp-DirListing-item[data-file-type="vscode-file-type-shell"]');
486
496
  shellItems.forEach(item => {
497
+ // Clear previous shell type attribute first
498
+ item.removeAttribute('data-shell-type');
487
499
  const nameSpan = item.querySelector('.jp-DirListing-itemText');
488
500
  if (nameSpan && nameSpan.textContent) {
489
501
  const name = nameSpan.textContent.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_vscode_icons_extension",
3
- "version": "1.0.44",
3
+ "version": "1.0.48",
4
4
  "description": "Jupyterlab extension with a shameless rip-off of the vscode-icons into our beloved environment",
5
5
  "keywords": [
6
6
  "jupyter",
package/src/index.ts CHANGED
@@ -431,8 +431,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
431
431
  .jp-DirListing-item[data-file-type="notebook"][data-jupytext-py] .jp-DirListing-itemIcon::before {
432
432
  content: '';
433
433
  display: inline-block;
434
- width: 18px;
435
- height: 18px;
434
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
435
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
436
436
  background-image: url('${pythonDataUri}');
437
437
  background-size: contain;
438
438
  background-repeat: no-repeat;
@@ -447,8 +447,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
447
447
  .jp-DirListing-item[data-file-type="notebook"][data-jupytext-md] .jp-DirListing-itemIcon::before {
448
448
  content: '';
449
449
  display: inline-block;
450
- width: 18px;
451
- height: 18px;
450
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
451
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
452
452
  background-image: url('${markdownDataUri}');
453
453
  background-size: contain;
454
454
  background-repeat: no-repeat;
@@ -463,8 +463,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
463
463
  .jp-DirListing-item[data-file-type="notebook"][data-claude-md] .jp-DirListing-itemIcon::before {
464
464
  content: '';
465
465
  display: inline-block;
466
- width: 18px;
467
- height: 18px;
466
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
467
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
468
468
  background-image: url('${claudeDataUri}');
469
469
  background-size: contain;
470
470
  background-repeat: no-repeat;
@@ -480,8 +480,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
480
480
  .jp-DirListing-item[data-file-type="notebook"][data-readme-md] .jp-DirListing-itemIcon::before {
481
481
  content: '';
482
482
  display: inline-block;
483
- width: 20px;
484
- height: 20px;
483
+ width: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
484
+ height: calc(var(--jp-ui-font-size1, 13px) * var(--jp-custom-icon-scale, 1.5));
485
485
  background-image: url('${readmeDataUri}');
486
486
  background-size: contain;
487
487
  background-repeat: no-repeat;
@@ -506,6 +506,11 @@ const plugin: JupyterFrontEndPlugin<void> = {
506
506
  .jp-DirListing-item[data-shell-type="windows"] .jp-DirListing-itemIcon svg {
507
507
  filter: hue-rotate(180deg) saturate(0.6) brightness(1.2);
508
508
  }
509
+
510
+ /* Make hidden items darker (items starting with .) */
511
+ .jp-DirListing-item[data-is-dot] {
512
+ opacity: 55% !important;
513
+ }
509
514
  `;
510
515
 
511
516
  // Add a MutationObserver to mark special files in the file browser
@@ -515,6 +520,12 @@ const plugin: JupyterFrontEndPlugin<void> = {
515
520
  '.jp-DirListing-item[data-file-type="notebook"]'
516
521
  );
517
522
  notebookItems.forEach(item => {
523
+ // Clear all previous special file attributes first
524
+ item.removeAttribute('data-claude-md');
525
+ item.removeAttribute('data-readme-md');
526
+ item.removeAttribute('data-jupytext-py');
527
+ item.removeAttribute('data-jupytext-md');
528
+
518
529
  const nameSpan = item.querySelector(
519
530
  '.jp-DirListing-itemText'
520
531
  ) as HTMLElement;
@@ -537,6 +548,9 @@ const plugin: JupyterFrontEndPlugin<void> = {
537
548
  '.jp-DirListing-item[data-file-type="vscode-file-type-shell"]'
538
549
  );
539
550
  shellItems.forEach(item => {
551
+ // Clear previous shell type attribute first
552
+ item.removeAttribute('data-shell-type');
553
+
540
554
  const nameSpan = item.querySelector(
541
555
  '.jp-DirListing-itemText'
542
556
  ) as HTMLElement;
package/style/base.css CHANGED
@@ -43,3 +43,8 @@
43
43
  width: 18px;
44
44
  height: 18px;
45
45
  }
46
+
47
+ /* Make hidden items darker (items starting with .) */
48
+ .jp-DirListing-item[data-is-dot] {
49
+ opacity: 55% !important;
50
+ }