jupyterlab_vscode_icons_extension 1.0.58 → 1.0.60

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
@@ -472,14 +472,18 @@ const plugin = {
472
472
  `;
473
473
  // Add a MutationObserver to mark special files in the file browser
474
474
  const markSpecialFiles = () => {
475
- // Mark Jupytext files (.py and .md notebooks) and CLAUDE.md
476
- const notebookItems = document.querySelectorAll('.jp-DirListing-item[data-file-type="notebook"]');
477
- notebookItems.forEach(item => {
478
- // Clear all previous special file attributes first
475
+ // Clear all special attributes from ALL items first (to handle DOM element reuse)
476
+ const allItems = document.querySelectorAll('.jp-DirListing-item');
477
+ allItems.forEach(item => {
479
478
  item.removeAttribute('data-claude-md');
480
479
  item.removeAttribute('data-readme-md');
481
480
  item.removeAttribute('data-jupytext-py');
482
481
  item.removeAttribute('data-jupytext-md');
482
+ item.removeAttribute('data-shell-type');
483
+ });
484
+ // Mark Jupytext files (.py and .md notebooks) and CLAUDE.md
485
+ const notebookItems = document.querySelectorAll('.jp-DirListing-item[data-file-type="notebook"]');
486
+ notebookItems.forEach(item => {
483
487
  const nameSpan = item.querySelector('.jp-DirListing-itemText');
484
488
  if (nameSpan && nameSpan.textContent) {
485
489
  const name = nameSpan.textContent.trim();
@@ -500,8 +504,6 @@ const plugin = {
500
504
  // Mark shell script files for different coloring
501
505
  const shellItems = document.querySelectorAll('.jp-DirListing-item[data-file-type="vscode-file-type-shell"]');
502
506
  shellItems.forEach(item => {
503
- // Clear previous shell type attribute first
504
- item.removeAttribute('data-shell-type');
505
507
  const nameSpan = item.querySelector('.jp-DirListing-itemText');
506
508
  if (nameSpan && nameSpan.textContent) {
507
509
  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.58",
3
+ "version": "1.0.60",
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
@@ -521,17 +521,21 @@ const plugin: JupyterFrontEndPlugin<void> = {
521
521
 
522
522
  // Add a MutationObserver to mark special files in the file browser
523
523
  const markSpecialFiles = () => {
524
- // Mark Jupytext files (.py and .md notebooks) and CLAUDE.md
525
- const notebookItems = document.querySelectorAll(
526
- '.jp-DirListing-item[data-file-type="notebook"]'
527
- );
528
- notebookItems.forEach(item => {
529
- // Clear all previous special file attributes first
524
+ // Clear all special attributes from ALL items first (to handle DOM element reuse)
525
+ const allItems = document.querySelectorAll('.jp-DirListing-item');
526
+ allItems.forEach(item => {
530
527
  item.removeAttribute('data-claude-md');
531
528
  item.removeAttribute('data-readme-md');
532
529
  item.removeAttribute('data-jupytext-py');
533
530
  item.removeAttribute('data-jupytext-md');
531
+ item.removeAttribute('data-shell-type');
532
+ });
534
533
 
534
+ // Mark Jupytext files (.py and .md notebooks) and CLAUDE.md
535
+ const notebookItems = document.querySelectorAll(
536
+ '.jp-DirListing-item[data-file-type="notebook"]'
537
+ );
538
+ notebookItems.forEach(item => {
535
539
  const nameSpan = item.querySelector(
536
540
  '.jp-DirListing-itemText'
537
541
  ) as HTMLElement;
@@ -554,9 +558,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
554
558
  '.jp-DirListing-item[data-file-type="vscode-file-type-shell"]'
555
559
  );
556
560
  shellItems.forEach(item => {
557
- // Clear previous shell type attribute first
558
- item.removeAttribute('data-shell-type');
559
-
560
561
  const nameSpan = item.querySelector(
561
562
  '.jp-DirListing-itemText'
562
563
  ) as HTMLElement;