jupyterlab_vscode_icons_extension 1.0.112 → 1.0.117
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 +42 -36
- package/package.json +1 -1
- package/src/index.ts +48 -34
package/lib/index.js
CHANGED
|
@@ -126,16 +126,8 @@ const fileTypeConfigs = [
|
|
|
126
126
|
iconName: 'file-type-perl',
|
|
127
127
|
group: 'enableLanguageIcons'
|
|
128
128
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
iconName: 'file-type-shell',
|
|
132
|
-
group: 'enableLanguageIcons'
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
extensions: ['.bat', '.cmd'],
|
|
136
|
-
iconName: 'file-type-shell',
|
|
137
|
-
group: 'enableLanguageIcons'
|
|
138
|
-
},
|
|
129
|
+
// Shell scripts (.sh, .bash, .zsh) and batch files (.bat, .cmd) use custom icons with black backgrounds
|
|
130
|
+
// Registered separately below with custom SVGs
|
|
139
131
|
{
|
|
140
132
|
extensions: ['.ps1'],
|
|
141
133
|
iconName: 'file-type-powershell',
|
|
@@ -604,15 +596,6 @@ const plugin = {
|
|
|
604
596
|
filter: brightness(0.85) saturate(0.75);
|
|
605
597
|
}
|
|
606
598
|
|
|
607
|
-
/* Color shell script icons - JupyterLab orange for Linux shells (.sh, .bash, .zsh) */
|
|
608
|
-
.jp-DirListing-item[data-file-type="vscode-file-type-shell"][data-shell-type="linux"] .jp-DirListing-itemIcon svg {
|
|
609
|
-
filter: brightness(0) saturate(100%) invert(58%) sepia(76%) saturate(3113%) hue-rotate(1deg) brightness(101%) contrast(101%);
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
/* Color shell script icons - pale blue for Windows shells (.bat, .cmd) */
|
|
613
|
-
.jp-DirListing-item[data-file-type="vscode-file-type-shell"][data-shell-type="windows"] .jp-DirListing-itemIcon svg {
|
|
614
|
-
filter: hue-rotate(180deg) saturate(0.6) brightness(1.2);
|
|
615
|
-
}
|
|
616
599
|
|
|
617
600
|
/* Make hidden items darker (items starting with .) */
|
|
618
601
|
.jp-DirListing-item[data-is-dot] {
|
|
@@ -658,23 +641,6 @@ const plugin = {
|
|
|
658
641
|
item.removeAttribute('data-jupytext-py');
|
|
659
642
|
item.removeAttribute('data-jupytext-md');
|
|
660
643
|
}
|
|
661
|
-
// Handle shell script files - ONLY set attribute if BOTH conditions match
|
|
662
|
-
if (fileType === 'vscode-file-type-shell') {
|
|
663
|
-
if (name.endsWith('.sh') || name.endsWith('.bash') || name.endsWith('.zsh')) {
|
|
664
|
-
item.setAttribute('data-shell-type', 'linux');
|
|
665
|
-
}
|
|
666
|
-
else if (name.endsWith('.bat') || name.endsWith('.cmd')) {
|
|
667
|
-
item.setAttribute('data-shell-type', 'windows');
|
|
668
|
-
}
|
|
669
|
-
else {
|
|
670
|
-
// Shell file type but wrong extension - clear attribute
|
|
671
|
-
item.removeAttribute('data-shell-type');
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
else {
|
|
675
|
-
// Not a shell file - always clear shell-type attribute
|
|
676
|
-
item.removeAttribute('data-shell-type');
|
|
677
|
-
}
|
|
678
644
|
// Handle PDF and Office files by extension (override native JupyterLab icons)
|
|
679
645
|
const nameLower = name.toLowerCase();
|
|
680
646
|
// Clear all office/pdf attributes first
|
|
@@ -874,6 +840,46 @@ const plugin = {
|
|
|
874
840
|
icon: mcpIcon
|
|
875
841
|
});
|
|
876
842
|
}
|
|
843
|
+
// Register shell scripts with custom black background and desaturated orange icon
|
|
844
|
+
if (settings.enableLanguageIcons) {
|
|
845
|
+
const shellSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
846
|
+
<rect x="1" y="3" width="30" height="26" rx="2" fill="#1a1a1a"/>
|
|
847
|
+
<path fill="#e8b070" d="M29.4 27.6H2.5V4.5h26.9Zm-25.9-1h24.9V5.5H3.5Z"/>
|
|
848
|
+
<path fill="#e8b070" d="m6.077 19.316l-.555-.832l4.844-3.229l-4.887-4.071l.641-.768l5.915 4.928zM12.7 18.2h7.8v1h-7.8zM2.5 5.5h26.9v1.9H2.5z"/>
|
|
849
|
+
</svg>`;
|
|
850
|
+
const shellIcon = new LabIcon({
|
|
851
|
+
name: 'shell-icon',
|
|
852
|
+
svgstr: shellSvg
|
|
853
|
+
});
|
|
854
|
+
docRegistry.addFileType({
|
|
855
|
+
name: 'vscode-shell',
|
|
856
|
+
displayName: 'Shell Script',
|
|
857
|
+
extensions: ['.sh', '.bash', '.zsh'],
|
|
858
|
+
fileFormat: 'text',
|
|
859
|
+
contentType: 'file',
|
|
860
|
+
icon: shellIcon
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
// Register batch files with custom black background and desaturated blue icon
|
|
864
|
+
if (settings.enableLanguageIcons) {
|
|
865
|
+
const batchSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
866
|
+
<rect x="1" y="3" width="30" height="26" rx="2" fill="#1a1a1a"/>
|
|
867
|
+
<path fill="#80c8f0" d="M29.4 27.6H2.5V4.5h26.9Zm-25.9-1h24.9V5.5H3.5Z"/>
|
|
868
|
+
<path fill="#80c8f0" d="m6.077 19.316l-.555-.832l4.844-3.229l-4.887-4.071l.641-.768l5.915 4.928zM12.7 18.2h7.8v1h-7.8zM2.5 5.5h26.9v1.9H2.5z"/>
|
|
869
|
+
</svg>`;
|
|
870
|
+
const batchIcon = new LabIcon({
|
|
871
|
+
name: 'batch-icon',
|
|
872
|
+
svgstr: batchSvg
|
|
873
|
+
});
|
|
874
|
+
docRegistry.addFileType({
|
|
875
|
+
name: 'vscode-batch',
|
|
876
|
+
displayName: 'Batch File',
|
|
877
|
+
extensions: ['.bat', '.cmd'],
|
|
878
|
+
fileFormat: 'text',
|
|
879
|
+
contentType: 'file',
|
|
880
|
+
icon: batchIcon
|
|
881
|
+
});
|
|
882
|
+
}
|
|
877
883
|
};
|
|
878
884
|
// Debounce timer for settings change alert
|
|
879
885
|
let settingsChangeTimeout = null;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -155,16 +155,8 @@ const fileTypeConfigs: IFileTypeConfig[] = [
|
|
|
155
155
|
iconName: 'file-type-perl',
|
|
156
156
|
group: 'enableLanguageIcons'
|
|
157
157
|
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
iconName: 'file-type-shell',
|
|
161
|
-
group: 'enableLanguageIcons'
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
extensions: ['.bat', '.cmd'],
|
|
165
|
-
iconName: 'file-type-shell',
|
|
166
|
-
group: 'enableLanguageIcons'
|
|
167
|
-
},
|
|
158
|
+
// Shell scripts (.sh, .bash, .zsh) and batch files (.bat, .cmd) use custom icons with black backgrounds
|
|
159
|
+
// Registered separately below with custom SVGs
|
|
168
160
|
{
|
|
169
161
|
extensions: ['.ps1'],
|
|
170
162
|
iconName: 'file-type-powershell',
|
|
@@ -654,15 +646,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
|
|
|
654
646
|
filter: brightness(0.85) saturate(0.75);
|
|
655
647
|
}
|
|
656
648
|
|
|
657
|
-
/* Color shell script icons - JupyterLab orange for Linux shells (.sh, .bash, .zsh) */
|
|
658
|
-
.jp-DirListing-item[data-file-type="vscode-file-type-shell"][data-shell-type="linux"] .jp-DirListing-itemIcon svg {
|
|
659
|
-
filter: brightness(0) saturate(100%) invert(58%) sepia(76%) saturate(3113%) hue-rotate(1deg) brightness(101%) contrast(101%);
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
/* Color shell script icons - pale blue for Windows shells (.bat, .cmd) */
|
|
663
|
-
.jp-DirListing-item[data-file-type="vscode-file-type-shell"][data-shell-type="windows"] .jp-DirListing-itemIcon svg {
|
|
664
|
-
filter: hue-rotate(180deg) saturate(0.6) brightness(1.2);
|
|
665
|
-
}
|
|
666
649
|
|
|
667
650
|
/* Make hidden items darker (items starting with .) */
|
|
668
651
|
.jp-DirListing-item[data-is-dot] {
|
|
@@ -712,21 +695,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
|
|
|
712
695
|
item.removeAttribute('data-jupytext-md');
|
|
713
696
|
}
|
|
714
697
|
|
|
715
|
-
// Handle shell script files - ONLY set attribute if BOTH conditions match
|
|
716
|
-
if (fileType === 'vscode-file-type-shell') {
|
|
717
|
-
if (name.endsWith('.sh') || name.endsWith('.bash') || name.endsWith('.zsh')) {
|
|
718
|
-
item.setAttribute('data-shell-type', 'linux');
|
|
719
|
-
} else if (name.endsWith('.bat') || name.endsWith('.cmd')) {
|
|
720
|
-
item.setAttribute('data-shell-type', 'windows');
|
|
721
|
-
} else {
|
|
722
|
-
// Shell file type but wrong extension - clear attribute
|
|
723
|
-
item.removeAttribute('data-shell-type');
|
|
724
|
-
}
|
|
725
|
-
} else {
|
|
726
|
-
// Not a shell file - always clear shell-type attribute
|
|
727
|
-
item.removeAttribute('data-shell-type');
|
|
728
|
-
}
|
|
729
|
-
|
|
730
698
|
// Handle PDF and Office files by extension (override native JupyterLab icons)
|
|
731
699
|
const nameLower = name.toLowerCase();
|
|
732
700
|
|
|
@@ -957,6 +925,52 @@ const plugin: JupyterFrontEndPlugin<void> = {
|
|
|
957
925
|
icon: mcpIcon
|
|
958
926
|
});
|
|
959
927
|
}
|
|
928
|
+
|
|
929
|
+
// Register shell scripts with custom black background and desaturated orange icon
|
|
930
|
+
if (settings.enableLanguageIcons) {
|
|
931
|
+
const shellSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
932
|
+
<rect x="1" y="3" width="30" height="26" rx="2" fill="#1a1a1a"/>
|
|
933
|
+
<path fill="#e8b070" d="M29.4 27.6H2.5V4.5h26.9Zm-25.9-1h24.9V5.5H3.5Z"/>
|
|
934
|
+
<path fill="#e8b070" d="m6.077 19.316l-.555-.832l4.844-3.229l-4.887-4.071l.641-.768l5.915 4.928zM12.7 18.2h7.8v1h-7.8zM2.5 5.5h26.9v1.9H2.5z"/>
|
|
935
|
+
</svg>`;
|
|
936
|
+
|
|
937
|
+
const shellIcon = new LabIcon({
|
|
938
|
+
name: 'shell-icon',
|
|
939
|
+
svgstr: shellSvg
|
|
940
|
+
});
|
|
941
|
+
|
|
942
|
+
docRegistry.addFileType({
|
|
943
|
+
name: 'vscode-shell',
|
|
944
|
+
displayName: 'Shell Script',
|
|
945
|
+
extensions: ['.sh', '.bash', '.zsh'],
|
|
946
|
+
fileFormat: 'text',
|
|
947
|
+
contentType: 'file',
|
|
948
|
+
icon: shellIcon
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
// Register batch files with custom black background and desaturated blue icon
|
|
953
|
+
if (settings.enableLanguageIcons) {
|
|
954
|
+
const batchSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
955
|
+
<rect x="1" y="3" width="30" height="26" rx="2" fill="#1a1a1a"/>
|
|
956
|
+
<path fill="#80c8f0" d="M29.4 27.6H2.5V4.5h26.9Zm-25.9-1h24.9V5.5H3.5Z"/>
|
|
957
|
+
<path fill="#80c8f0" d="m6.077 19.316l-.555-.832l4.844-3.229l-4.887-4.071l.641-.768l5.915 4.928zM12.7 18.2h7.8v1h-7.8zM2.5 5.5h26.9v1.9H2.5z"/>
|
|
958
|
+
</svg>`;
|
|
959
|
+
|
|
960
|
+
const batchIcon = new LabIcon({
|
|
961
|
+
name: 'batch-icon',
|
|
962
|
+
svgstr: batchSvg
|
|
963
|
+
});
|
|
964
|
+
|
|
965
|
+
docRegistry.addFileType({
|
|
966
|
+
name: 'vscode-batch',
|
|
967
|
+
displayName: 'Batch File',
|
|
968
|
+
extensions: ['.bat', '.cmd'],
|
|
969
|
+
fileFormat: 'text',
|
|
970
|
+
contentType: 'file',
|
|
971
|
+
icon: batchIcon
|
|
972
|
+
});
|
|
973
|
+
}
|
|
960
974
|
};
|
|
961
975
|
|
|
962
976
|
// Debounce timer for settings change alert
|