jupyterlab_vscode_icons_extension 1.0.46 → 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 +12 -0
- package/package.json +1 -1
- package/src/index.ts +14 -0
- package/style/base.css +5 -0
package/lib/index.js
CHANGED
|
@@ -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
package/src/index.ts
CHANGED
|
@@ -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;
|